Using the ATMega168 chip externally from Arduino

I'm new to microcontrollers, and have been using the Arduino for a couple of weeks now. I would like to develop my projects using the Arduino IDE, and board, then remove the programmed chip and place it into a circuit board/breadboard.

I think I've got most of this figured out, but I want to keep my component count low. So how do you run the chip without an external clock? I tried the ATMega datasheet, but I'm afraid I don't know enough about AVR programming to make sense of it. I think I have to set some fuses for this, but I haven't a clue on how to do that.

My projects are mostly LED based, (no motors, solenoids, etc..)

Any advice and sample code would be greatly appreciated! :slight_smile:

HI

go to moderndevice.com and look at Paul Badger's standalone Arduino board... or check the Arduino on a breadboard tutorial by ITP. It sys it all.
NKCelectronics.com also sells standalone boards.

D

First, what your asking requires a familiarity with straight AVR development at least to a greater extent than just the Arduino managed environment.

The arduino uses a 16MHz clock--the internal clock on the 168 is limited to 8MHz. The change is possible but not really straight forward.

To program the 168 to use its internal clock is simply a matter of changing the fuses. Look at the documentation for the arduino programing software (AVRDUDE?) and the data sheet on how to do this.

After (or before this) you'll need to modify the Arduino environment and libraries to use the different clock speed from 16MHz. There have been some messages on the forum on how to do this.

On the other hand if you include a 16Mhz resonator (1 part) you could move your 168 to a breadboard after programming with the regular board. Personally I would use the resonator rather than introduce the complications of rebuilding the Arduino environment.

If you really want to use a different clock speed you can use the Arduino as a programmer (writeups elsewhere) and learn to use the underlying GCC (or WinAVR) to develop your application. More flexibility but a greater learning curve.

Thanks for your advice! I think I'll try the resonator approach.

I'm new to microcontrollers, and have been using the Arduino for a couple of weeks now. I would like to develop my projects using the Arduino IDE, and board, then remove the programmed chip and place it into a circuit board/breadboard.

I think I've got most of this figured out, but I want to keep my component count low. So how do you run the chip without an external clock? I tried the ATMega datasheet, but I'm afraid I don't know enough about AVR programming to make sense of it. I think I have to set some fuses for this, but I haven't a clue on how to do that.

My projects are mostly LED based, (no motors, solenoids, etc..)

Any advice and sample code would be greatly appreciated! :slight_smile:

When I ordered my Arduino from Modern Device, I ordered it with an extra 168 with the bootloader already installed. I took this chip and put it on a breadboard with a 16mhz xtal and it's working fine. There aren't that many connections to configure to allow it to be programmed like a regular arduino board.

Sparkfun.com has a pretty decent tutorial section that shows how to do most of this work.