I have an Arduino and I also bought a Ladyada Boarduino kit. The kit enables me to swap out the ATMEga chip with another if I so wish. I would therefore like to use it just to program up the ATMEga168 chip.
However, can someone please direct me how to use the ATMega in its naked form if I make up my own perfboard?
Once programmed and taken out of the Boarduino, what else do I need to get this chip to run safely? I am aware it will need a crystal, but what else is needed?
Are there any schematics around for using the ATMega in this way?
If you check out the Lilypad, you'll notice you can get by without the crystal+caps, too, if you're willing to run at 8MHz.
A minimal system that will still allow Arduino IDE use is probably:
ATmega w/lilypad bootloader & fuses
reset pullup resistor (10k)
.1uF cap between Vcc and ground
either a reset button (NG style) or auto-reset cap (diecimilla style)
regulated power source
an RS232 interface circuit (such as a MAX232 or the FT232L usb chip-in-a-cable)
If you don't want the capability of reprogramming it without pulling the ATmega, leave off the reset button/cap and the RS232 interface. That leaves you with the ATmega, one resistor, one capacitor, and a power supply.
the chip on the right has run for months on end with hardly anything connected to it. the two 330ohm resistors are the signals it is generating for testing purposes.
Well, I looked into all the options, and wound up with a usbtinyisp for now for $22 in kit form:
There are tons of options though, I got tired of messing around with it and got this kit as my parallel programmer didn't work with my desktop for some reason. This is a lot more reliable this far.
Oh, btw, I just did an experiment (nothing terribly exciting). I put the lillypad bootloader on a pdip atmega168 chip with the usbtinyisp and was able to run it scripts on it without even a crystal on a breadboard. Just 5 volts and ground, and an LED/resistor on pin 13 so I could confirm correct runningness. So if you can live with about 8mhz then the only extra circuitry you need is 5 volts (8205, couple caps, mebbe a diode or two) plus whatever else you need to control.
On that makezine website the picture shows an FTDI cable plugged into it. Surely I can use one of those wired up like in the diagram to program the chip?
Does running it at 5MHz make it use less power? Might be an option for battery operated devices. Though I guess it would be easier just to use a less powerful ATMEGA chip.
you can program scripts onto it with the ftdi cable after you get a bootloader on the chip.
re:5mz, probably does save some power. The AVR Butterfly runs at 1mhz on a button cell battery (even though it can do 8mhz) for the expressed purpose of saving power.
OK Nm I have read the Bootloader development section. Looks like I will need a different cable. Does anyone know of any schematics to make one of these cables that will work over USB (or a Serial-USB adaptor) ?
You cannot use the ftdi cable by itself to put a bootloader on a chip. you need an isp programmer to do that. I've had good luck with the USBtinyISP after very much messing around and experimenting.
Or buy a chip with a bootloader already on it for $4.
How does the reset button (NG style) or auto-reset cap (diecimilla style) works ? Could you point me to schematics or other info ?
I'd like to make a minimal programmable board.