Program on Arduino board, remove ATMega from board

I would like to eventually disconnect the ATMega168 from the Duemilanove board and have it run the code autonomously, without having to the code be downloaded from a computer.

What are my options? Is there non-volatile memory that can be utilized.

What do you mean have it run code autonomously? Do you mean upload code without having the chip inside a board connected to a pc?

I'm programming my arduino to be used in a project. Ideally, I'd like to only require the microcontroller to be placed in the project without the Arduino board, saving space. Hence, it would require that it retain the program in non-volatile memory.

The program is stored in non-volatile memory on the 168 chip so it will run without connection to the computer. But you will need to have some support components for the system clock and perhaps a regulator for power. Have a search for arduino bare bones boards for some example circuits.

Just to add, you can always then drop your chip back into a standard board if you need to reprogram it.

You can bring out the TX, RX, and Ground pins, at least to be connected to, that way you could just use the board itself without needing to put the chip in the board.

But if you’re looking to run the Arduino off the board, I suggest you buy a 328 or 168 with the Arduino bootloader. And take a look at this tutorial, there are a few extra components you need to get the Arduino running on a breadboard, or a protoboard.

http://itp.nyu.edu/physcomp/Tutorials/ArduinoBreadboard

On eBay there’s a couple people selling the 328, a Resonator(instead of a crystal and 2 caps), 5v regulator and 28 pin IC socket for $7, free shipping in the US and Canada, that’s a damn good deal. They’re both bootloaded with Arduino, just make sure it says that:D

http://search.ebay.com/_W0QQsassZkylej1050QQhtZ-1

On eBay there's a couple people selling the 328, a Resonator(instead of a crystal and 2 caps), 5v regulator and 28 pin IC socket for $7, free shipping in the US and Canada, that's a darn good deal. They're both bootloaded with Arduino, just make sure it says that:D

http://search.ebay.com/_W0QQsassZkylej1050QQhtZ-1

Thanks for the ebay link. That's a gem. I will be ordering soon.

Great, thanks for the info!

Can someone explain what the need for bootloading is? If I program the board on an Arduino, why won't it work off the board, provided it has the right power supplied and clock supplied to it?

Can someone explain what the need for bootloading is? If I program the board on an Arduino, why won't it work off the board, provided it has the right power supplied and clock supplied to it?

Well if you program the processor on a Arduino board, then there is by definition a bootloader in the processor, even you you remove it to a standalone application. The standalone processor will run the program that was uploaded while connected to the Arduino IDE.

There is however no requirement that a standalone processor contain the bootloader code, there are ways using a hardware programmer to burn the hex code from the application to a standalone processor minus any bootloader code.

That help any, if not can you restate your question?

Lefty

And if you just want to have a smaller board footprint... consider a BOARDUINO fro LADYADA. You can't get much smaller than that without spending more money.

http://www.ladyada.net/make/boarduino/

You can't get much smaller than that without spending more money.

Oh yea, here is smaller and cheaper. :wink:

http://store.fundamentallogic.com/ecom/index.php?main_page=product_info&cPath=15&products_id=29

Lefty

Well, I do prefer the one that still has USB FTDI chip... but you have a point.