Electronic – How to program a surface-mount Atmega328

avrispsurface-mount

I want to program a surface-mounted Atmega328 before soldering it to my board. I have an AVR Dragon board that is capable of ISP. This works fine with DIP Atmegas where I can just pop them into a ZIF socket and program them. But how would I program a surface-mount Atmega328?

Best Answer

One option is use a TQFP-32 socket and connect the necessary pins in your AVR Dragon.

enter image description here

Source: http://jeelabs.org/2009/07/11/programming-a-32-tqfp-chip/

Or you can program the device directly in your board after soldering the ATMega328. I suppose that you didn't prepare your board with a connector for JTAG or ISP like explained here: http://support.atmel.no/knowledgebase/avrstudiohelp/mergedProjects/AVRDragon/AVRDragon_ISP_Description.htm

So you will have to soldering some wires and connect in your AVR Dragon. You can create an adapter like this picture:

enter image description here

Source: http://jeelabs.org/2012/01/04/isp-programmers/