Getting a near naked ATMega to run?

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?

Something like this: http://blog.makezine.com/archive/2007/07/barebones_arduino_on_a_br.html?

It seems that you only need a few resistors and a crystal (with caps to the ground?)

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.

-j

you only need 5 volts and ground, but a crystal for 16mhz is a cheap fix for not dealing with timing discrepencies.

take a look at the hookup diagram below:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1212853308

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.

Guys, that is exactly the info. I was after. Thanks for that :slight_smile:

Can anyone tell me if I can upload the bootloader using that Makezine bare bones board? I have an FT232L usb chip-in-a-cable.

Nope, cheapest way to go is with the parallel programmer and giveio. It takes some finagling, but I got it to work, usually:

you can cobble one together with an old parallel cable and some quality time with an ohmmeter (and a bit of hard disk connector)

Sorry I don't have any PC younger than about 5 years old so they don't have parallel ports.

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 so does programming the bootloader onto the chip need anything special or can I use the FTDI cable?

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.

It would be a bit of work, but you can probably find an RS232 port programmer schematic that can be adapted for use with the FTDI cable and avrdude.

I'm reading good things about LadyAda's USBtiny programmer (US$22), and Atmel's AVRispmkII works great (US$35). Both are USB.

-j

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.

please don't take this the wrong way, but go to:

and type in schematic in the search box in the upper right

theres a lot of stuff on arduino.cc that doesn't show up using the forum search.

Thanks for all the info. guys.

I've ordered one of these - http://www.skpang.co.uk/catalog/product_info.php?cPath=126_129&products_id=331&osCsid=18

:slight_smile:

Yes you can get them cheaper from outside the UK but I got stung by customs for some electronics last week :frowning:

http://art364.pbwiki.com/Standalone+Arduino