Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
    
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. –  Chris Stratton Aug 11 at 21:06
    
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. –  Passerby Aug 11 at 22:21
    
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$... –  Blup1980 Aug 12 at 6:54
    
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. –  Scott Seidman Aug 13 at 12:32

2 Answers 2

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

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.

share|improve this answer
    
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... –  Vladimir Cravero Aug 11 at 21:15
    
@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? –  Funkyguy Aug 11 at 21:27
    
@VladimirCravero: USB->Serial converters can be had for a few dollars. –  whatsisname Aug 11 at 21:36
    
yep but most ucontrollers integrate some usb-ish hardware... that AN is somewhat old (2008) anyway. –  Vladimir Cravero Aug 11 at 21:58
1  
@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. –  Chris Stratton Aug 11 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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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