I am trying to make my first PCB, an would like to program an ATmega328P-PU using my Arduino and a breadboard and transfer it to my printed circuit board.

My problem is that either I will make a mistake, or need to reprogram it in the future, so permanently soldering it is not a great idea.

I am going to buy a microcontroller socket, but I am wondering if it is specific to the model and if the eagle schematic is different from the MCU's.

  • \$\begingroup\$ Practically speaking you can usually substitute DIP ICs and their mating sockets for one another on the same PCB footprint, and by extension same schematic symbol - for using a socket on the prototype of something that will ultimately have the IC directly soldered. Depending on your circuit though, you may be able to connect an ISP harness to the chip in place. Also, if you have a serial header (and you really should, for debug messages) you can simply burn an Arduino bootloader once and then do your subsequent programming via the serial connection. \$\endgroup\$ – Chris Stratton Aug 11 '14 at 21:06
  • \$\begingroup\$ Why bother with making it removable? Unless you are using every single pin, the ATmega328P has In-Circuit Serial Programming (ISCP) ability. And if you are using the arduino bootloader, it can be programmed over a Serial connection. \$\endgroup\$ – Passerby Aug 11 '14 at 22:21
  • \$\begingroup\$ You should consider the price of the sockets, the need for a tool to extract the chip (using a lever or a screwdriver works, but after some insertion your MCU would be damaged.) The cost of nowadays MCU is so low that using a socket might not be useful at all. And as already said, using ICSP is the best thing to do. removing the chip to program it, would damage a lot of chip during the code development. And using a high quality socket that does not damage the chip would cost like 15$... \$\endgroup\$ – Blup1980 Aug 12 '14 at 6:54
  • \$\begingroup\$ Two different issues seem to have come up 1)How to best program, and 2) whether you should use a socket. As to (1), yes, ICSP is the way to go. As to (2), if you are using a DIP package, yes, use a socket, by all means. If you're not talking about production, screwing up and burning a DIO or something is fixed by changing a chip, instead of a desolder/resolder. \$\endgroup\$ – Scott Seidman Aug 13 '14 at 12:32

Since you are using a through-hole version, you might want to use an IC socket:


You can also include an ISP header on your board so that you can program it in-system. Atmel has a document about doing that.

  • \$\begingroup\$ Why are they still using the serial port? I know most pcs have the serial onboard but I've not seen the connector for a long time... \$\endgroup\$ – Vladimir Cravero Aug 11 '14 at 21:15
  • \$\begingroup\$ @VladimirCravero I wonder if they wanted to target like high end systems so another processor could re-program the chip on the fly based on user preferences, kind of like a BIOS chip? \$\endgroup\$ – Funkyguy Aug 11 '14 at 21:27
  • \$\begingroup\$ @VladimirCravero: USB->Serial converters can be had for a few dollars. \$\endgroup\$ – whatsisname Aug 11 '14 at 21:36
  • \$\begingroup\$ yep but most ucontrollers integrate some usb-ish hardware... that AN is somewhat old (2008) anyway. \$\endgroup\$ – Vladimir Cravero Aug 11 '14 at 21:58
  • 2
    \$\begingroup\$ @VladimirCravero - no, you pay a premium for USB-on-chip so numerically speaking, the majority of microcontrollers shipped do not provide it. Also, it makes a firmware drastically more complicated - a serial port will still get debug messages out when your early-stage firmware is a mess of bugs, but keeping USB up is very delicate... in fact it's really useful to have serial available to debug your USB code. \$\endgroup\$ – Chris Stratton Aug 11 '14 at 23:13

Sockets are specific to the package. The -PU variant is a 300-mil 28-pin DIL package, so any socket that fits that should work (since clock speed won't be high enough for inductance and capacitance to be an issue).

DIL sockets share the same footprint as the DIL IC itself, but hole size might matter depending on which type you get (spring wiper vs. machined vs. ZIF).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.