Does anybody know how to program smd ATtiny microcontrollers?
At the moment I am using ATtiny20 and the main function of it will be for switching purposes.
I want to use my microcontroller on a pcb board but I don't know how to program it with if it is not
through hole..
Your circuit board will have to have a means of accessing the in circuit programming pins (Reset, TPCLK,TPDATA), through a TPI connector. Other components on the board have to be designed so as not to interfere with those signals while in programming mode. Another solution would be to mount the ATtiny on a surface mount adapter board that can be removed and programmmed, and then plugged back on the pcb board into a socket.
Thanks for your helpful suggestion!
Could you explain more what you mean by "Other components on the board have to be designed so as not to interfere with those signals while in programming mode" and also "TPI connector"?
Is a TPI connector a programmer like the AVRISPmkII?
The Data sheet just refers to a connector with the three programming signals as a TPI connector. It is just the way that those pins will be connected to an appropriate programmer.
Outputs from other components on the pcb can't be connected to the programming signals at the same time the programmer is connected to them. If this is the case, then the board needs switches or some other means to give the programmer control of those pins while in programming mode.