6

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?

David Högberg
  • 1,835
  • 2
  • 21
  • 34

2 Answers2

6

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/

Daniel Grillo
  • 7,659
  • 18
  • 51
  • 69
  • Is it possible to program the soldered chip if you have traces to an ISP header even if the ISP pins on the chip are also connected to other things on the PCB? I'm guessing yes, otherwise it wouldn't be called "in system" programming. – David Högberg Oct 08 '13 at 12:08
  • 2
    @user29920: It depends on what is connected. You have to make sure that the required signals are not actively driven to high or low by any other device/circuit. [Take a look at this](http://electronics.stackexchange.com/a/76418/16051) – Rev Oct 08 '13 at 13:41
  • Thank you very much. One last thing: If I do it this way and add an ISP header to the board, do I need a pull-up resistor on the reset pin of the Atmega328 for the programming to work correctly? – David Högberg Oct 08 '13 at 14:22
  • 1
    @user29920: The programmer will pull the reset pin. You'll need a pullup resistor for your Atmega to run in circuit though, unless you flash the fuses so it doesn't use that. Be warned (I just found this out the hard way): flashing fuses to disable RESET will require use of a high voltage programmer! – Bryan Boettcher Oct 08 '13 at 14:26
  • But I use it with the reset pin floating currently, and it works perfectly? – David Högberg Oct 08 '13 at 14:28
  • 1
    The AVR's reset pin has an internal pullup. – joeforker Oct 08 '13 at 17:54
1

You can use a breakout board with a suitable socket.

example

You can then use jumpers to connect the appropriate pins back to the AVR dragon ISP headers.

RedGrittyBrick
  • 14,602
  • 5
  • 37
  • 77