How do I program a SMD package?


I'm sure this is a common question, but how do I program a SMD package? Do I add a header to the PCB to connect the programmer or do I use test pins?

Commercially, do people program on the pick and place so the chip can be dropped into a populated board? Or do they have points or a clip that programs the micro controller in situ?

I'm starting with the ATTINY85.




I usually put a header that I can plug an ICSP Programmer onto, and one for an FTD device to plug on to for Serial interfacing.
When I don't have the 2 headers, I try to include those pins as IO pins that the outside world sees.

Commercially, the parts can be pre-programmed before installation using an SMD adapter.

I don't know of a press-on adapter for 8-pin parts. I have one for 32-pin TQFP, I used it to program one batch of cards
(turned out my Programmer had bad 6-pin ribbon cable, but I didn't discover that until later).

With just 8 pins, you could have the IO go to two 4-pin headers next to the chip before going to the rest of the board.
Can be smaller pitch, like 1.5mm, where you can use a JST header or two or similar and make a breakout cable that an ICSP Programmer can plug into.
(There are smaller types even, SMD parts, I'd be worried about ripping them off the board)

Microchip (formerly Atmel) has published an application note on the topic, AVR910. Even if you don't think you will reprogram it in the future, it is always a good idea for any micro-controller that isn't socketed, smd or pdip, to have a means to program in-system.

Confronted with the issue of Attiny's being quite a lot cheaper SMD, and considering assembly. I went for a some exposed strip on the edge of the PCB that i can connect to using an edge-connector. A standard ISP header, would stick out at the top of the board.

You can hit pads with pogo pins too, but they are difficult to find and expensive. In large quantity production, on board programming can automatically verify programming and sometimes more, for example by measuring supply current while in the programming fixture. Failures can then be set aside for re-testing or re-work. You could do that with pre-programmed parts too, but it saves a step.

Not difficult or expensive, I find lots of 6 pin POGO ready to be used for ISP for under $10. Or you can buy plain POGO pins in lot of 50 for $2 and slip em on pins.

Also this Hack A Day page shows using a common SOIC-8 test clip as ISP programmer by having the pads on the edge of the board: SOICbite: A Program/Debug Connector For An SOIC Test Clip | Hackaday Since this isn't a standard use, you will likely need to create a custom footpad in PCB program to use em.

If you're going to solder ISP headers on the side of the PCB rather than pointing up, be aware the PCB is usually 1,6mm thick while ISP pins are about 2mm between the pins so it will be slightly loose fitting. Just bend those pins just a tiny bit then it should slip in and not fall off while you try to solder it in place.