AVRs on e-bay?!?

I love all the hardware extras on the Orangutans, but sometimes a project just needs a whole bunch of I/O lines. The AVRs intended for LCD control have lots, but don’t come in DIP packages. SparkFun has a nice bare-bones ATMega128 board from Olimex, but it’s $38, which is kind of steep for no frills (and a 10-pin programming header?!? Come ON!). The ATMega128 alone is only ~$12 on Digikey, but TQFP breakout boards are generally quite expensive (SparkFun claims to sell an unpopulated version of an older Olimex board for just $4, but it hasn’t been in stock in a long, long time, the picture says copyright 2002).

So, I happened to be searching e-bay for some other project parts, and on a whim I searched for “atmega128” (really, click on it). WOW! There’s an e-bay store called Sure Electronics that has printed their own neat TQFP breakout board which accommodates chips with 32 to 64 pins (some really long pads), and they’re selling two of them, AND two ATMega128’s, (and header pins, why not?) for $20 including shipping! I actually ended up ordering a pair from another more local e-bay electronics store for faster shipping.

AVRs on e-bay, who knew?


P.S. If you just search for “TQFP”, there’s another place selling circular breakout boards. They sort of remind me of the Pololu round prototyping boards, only poorly executed, as these have the breakout headers in two concentric circles. How am I supposed to put header pins in that???

Some things, like those round PCBs with concentric circles of pads, look so nice, until you have to use them…

- Jan

how do you use that?

Lets see, in my experience the steps are:

  1. Carefully solder all 64 tiny pins of the chip to the board with a pinpoint soldering iron, headband magnifiers and good lighting really help! Check for continuity between the pins and their respective header sockets, and shorts between each pin and the ones on either side of it, use solder-wick and resolder if necessary.

  2. Solder on other necessary components: a 5V regulator connected to all the VCC and GND headers, and the AVCC header, a pull-up resistor between the VCC and Reset headers (conveniently right next to eachother), a resistor and power LED, and resistors and LEDs on a couple of test headers you want to be able to watch the state of. Be careful looking at the header numbers, they’re quite useful, but with the exception of the words TOP and BOTTOM, the board is printed the same on both sides, so what’s labeled pin1 on one side is labeled pin64 on the other. Go by the numbers on the same side of the board as you soldered the chip.

  3. Make some sort of programming header, I used a 6-pin header socket and some ribbon cable. The programming pins aren’t conveniently ordered so you can’t just solder six pins right to the board, and it turns out that the normal MISO and MOSI SPI pins aren’t the MISO and MOSI pins used for SPI programming. For that you need to use the special PDI and PDO pins, although you wouldn’t know it without looking at the data sheet (p. 300, bottom) with your headband magnifiers still on!

  4. Hook up power and a programmer, go to the fuses and immediately turn off ATMega103 compatibility mode. It’s on by default, and it disables some of the hardware, and makes some pins always outputs, so I want nothing to do with it! Unless you plan on using it you can also disable the JTAG interface.

Anyway, it’s not super-easy, but it is a fairly cheap way to get a whole lot of I/O lines right on a single AVR (as opposed to, say, networking multiple ATTiny’s). Plus you get two for less than half the price (including shipping) of one of these guys. I don’t always get along with my electronics, so it’s always good to pre-order spares!


Here’s a beauty shot of the work in progress:

Actually the picture came out pretty poorly, I’m not sure why (it looks slightly nicer in real life).

Also, the second chip footprint on the underside of the board is a good place to make board-internal connections, like connecting the multiple grounds and VCCs.