Reprogramming Chip

Hello, i need more i/o for some leds, but i cannot for the life of me figure out the max7219, so i am just going to buy another atmega 328 and communicate over i2c. Since it already has the bootloader on it (kudos to sparkfun) i know i can just pop it into my arduino for programming. How do i remove the current chip w/o breaking?

Thanks so much!

With a simple chip puller. http://www.ecrater.com/product.php?pid=5750319

Slide a very small bladed screwdriver underneath and lever it up slowly a little on each side.

28-pin skinny DIPs are a serious challenge for safe removal: they're long and slender enough that you can, indeed, bend them enough to break if you're not careful. Even the extraction tools designed for smaller chips can break the long ones.

My favorite technique is to use a small straight-blade screwdriver with a skinny shaft. The best type is the one that looks like a miniature version of a big screwdriver, with a wide blade that's gently tapered (not the "jeweler's" style commonly used for small screws in electronic gear):

Slide it under one end of the chip, and lift the chip a very small amount by twisting the handle. Slide a little further in, and repeat until the whole chip is pulled part-way out of the socket.

Do two or three passes like that, and the pins will be far enough out of the socket that the retention force will be reduced to the point where you can lever it the rest of the way out without flexing the package (at least not much).

The key point is to take it slowly. This method sucks for doing high-volume production, but if you were doing that, you'd be buying the expensive special tools to do it fast.

Great, thanks everyone! Is there any way i can just connect rx and tx from the arduino to the atmega and program that way? Thanks!

You would have to isolate the original processor by removing the 1K resistors and making the connection the other side of them. That is connecting directly to the USB / serial chip. I guess if you are worried about taking out the chip un-soldering surface mount resistors is going to be a no go for you.

Hello, i need more i/o for some leds, but i cannot for the life of me figure out the max7219, so i am just going to buy another atmega 328 and communicate over i2c.

Programming two chips is easier than programming one to suit the other? [smiley=shocked.gif]

Have you considered this? http://arduino.cc/en/Tutorial/ArduinoISP

Another idea is to bend the reset pin (carefully) so it doesn't go into the socket, and instead straight to the side, solder a lead to it, and when you want to program the atmega thats in the socket, plug the reset pin in. This assumes you're not using the hardware serial port (Serial) for anything while programming for the LED controller. Although now that I think of it, the rx and tx pins could still be an issue.

Another idea is to bend the reset pin (carefully) so it doesn't go into the socket, and instead straight to the side, solder a lead to it, and when you want to program the atmega thats in the socket, plug the reset pin in.

Hey, cool idea! I may use that at some point.

Problem is that the reset pin needs to be held high for the arduino to run so simply removing it isn't going to work it needs to be pulled high or low depending on if you want stop / go.

Something that you could do (and I've posted about it before, but have yet to try it myself), based on what I have looked at on the schematic of the Arduino, is to build a "ZIF shield".

From sparkfun, buy the protoboard shield, a 28-pin ZIF socket, plus the 16 MHz resonator and caps needed by the clock part of the Arduino board design.

Build the protoboard shield, but leave the breadboard off. Mount the ZIF socket on it, and run the lines from the header pins to the appropriate pins on the ZIF socket for the ATMega (this is where it could get tricky and ugly). Wire up the clock circuit with the resonator and caps connected to the pins on the ZIF socket; put these parts as close as possible to the socket and pins. You have to add these parts because the headers on the Arduino don't bring up the clock pins.

Remove the ATMega from the Arduino, put it in the ZIF socket (orient it properly!), then plug the protoboard into the Arduino (you have to remove the ATMega from the Arduino for this to work).

In theory, you should now have a Arduino "programmer" for pre-bootloaded ATMega8/168/328 chips using a ZIF socket, which is infinitely easier to work with. You should be able to find info on arduino.cc about a ZIF socket shield (using a custom PCB or stripboard - I can't remember which), and if you look around on Sparkfun's site, they also did something similar (they have an article/writeup somewhere).

:)