Hacking.OtherHardware History

Hide minor edits - Show changes to markup

August 15, 2009, at 02:26 PM by David A. Mellis -
Changed lines 1-25 from:

Using the Arduino Software with Other Hardware

It is possible to use the Arduino software with hardware besides the Arduino board. The fewer differences, the easier it will be.

If you have questions or problems about getting the Arduino software to work with other hardware, please post to the software development forum. For discussions of the circuit itself, please post to the hardware development forum.

ATmega8 or ATmega168 from Arduino

To use the Arduino software with an ATmega8 or ATmega168 on a different board or in a different circuit but still using a 16 MHz clock, you just need to figure out how to get your code onto the chip. One possibility is to use the ATmega8 or ATmega168 that came with an Arduino and therefore already contains the Arduino bootloader. Then, you can upload your sketch as normal (with the chip in the Arduino board), then move the chip to your own circuit or board.

ATmega8 or ATmega168 without Bootloader

If you've bought a new ATmega8 or ATmega168, then you'll need to burn a bootloader onto it before uploading your sketches. See the bootloader page for more information. If your board is not running at 16 MHz, you'll need to make more adjustments (see below).

ATmega8 or ATmega168 with a different external clock

If your circuit or board uses a different speed external clock (but still has one), then you'll need to make a few adjustments. In the Arduino board definition file, you'll want to create a new board definition and set the <BOARD>.build.f_cpu preference to the speed of your clock. Then you can compile and upload your sketches as normal. Some functions (e.g. delayMicroseconds(), pulseIn(), and analogRead()) will behave differently (millis(), delay(), and serial communication should work fine). You'll also need to recompile the bootloader with the correct clock speed specified, as the standard bootloaders assume 16 MHz.

ATmega168 using the internal clock

To use an ATmega168 running on the internal (8 MHz) clock, just select the LilyPad option from the Boards menu. If the ATmega168 was previously configured to use an external clock, you'll need to change the fuses to get it work off of the internal clock instead.

Other ATmega/AVR

To use a different ATmega/AVR chip, you'll need to make changes to the Arduino core, which is in the hardware/cores/arduino sub-folder of the Arduino application directory. This shouldn't be too hard, but it will require reading the datasheet for your chip. In particular, the names of registers and register bits are likely to vary between microcontrollers.

to:

This page has moved. See the new location on Google Code.

December 21, 2007, at 04:47 PM by David A. Mellis -
Changed line 25 from:

To use a different ATmega/AVR chip, you'll need to make changes to the Arduino core, which is in the hardware/cores/arduino sub-folder of the Arduino application directory. This shouldn't be too hard, but it will require reading the datasheet for your chip.

to:

To use a different ATmega/AVR chip, you'll need to make changes to the Arduino core, which is in the hardware/cores/arduino sub-folder of the Arduino application directory. This shouldn't be too hard, but it will require reading the datasheet for your chip. In particular, the names of registers and register bits are likely to vary between microcontrollers.

October 23, 2007, at 11:51 PM by David A. Mellis -
Changed lines 7-10 from:

ATmega8 from Arduino

To use the Arduino software with an ATmega8 on a different board or in a different circuit but still using a 16 MHz clock, you just need to figure out how to get your code onto the chip. One possibility is to use the ATmega8 that came with an Arduino and therefore already contains the Arduino bootloader. Then, you can upload your sketch as normal (with the chip in the Arduino board), then move the chip to your own circuit or board.

to:

ATmega8 or ATmega168 from Arduino

To use the Arduino software with an ATmega8 or ATmega168 on a different board or in a different circuit but still using a 16 MHz clock, you just need to figure out how to get your code onto the chip. One possibility is to use the ATmega8 or ATmega168 that came with an Arduino and therefore already contains the Arduino bootloader. Then, you can upload your sketch as normal (with the chip in the Arduino board), then move the chip to your own circuit or board.

Changed lines 13-14 from:

If you've bought a new ATmega8 or ATmega168 (which won't have a bootloader), then you'll need to use an external programmer to upload your sketches. See the programmer page for more information. If your board is not running at 16 MHz, you'll need to make more adjustments (see below).

to:

If you've bought a new ATmega8 or ATmega168, then you'll need to burn a bootloader onto it before uploading your sketches. See the bootloader page for more information. If your board is not running at 16 MHz, you'll need to make more adjustments (see below).

Changed lines 17-22 from:

If your circuit or board uses a different speed external clock (but still has one), then you'll need to make a few adjustments. In the Arduino preferences file, you'll need to change the build.f_cpu preference from 16000000L to the speed of your clock. Then you can compile and upload your sketches as normal. Some functions (e.g. delayMicroseconds(), pulseIn(), and analogRead()) may behave differently (millis(), delay(), and serial communication should work fine). You'll also need to recompile the bootloader with the correct clock speed specified, as the standard bootloaders assume 16 MHz.

ATmega8 or ATmega168 using the internal clock

If you want to use the internal clock of the ATmega8 or ATmega168, you'll need to change the fuses. Please see the appropriate datasheet to determine the correct settings, and be careful as burning the wrong values can render your chip useless. As in the previous case, you'll want to modify the build.f_cpu setting to reflect the clock speed.

to:

If your circuit or board uses a different speed external clock (but still has one), then you'll need to make a few adjustments. In the Arduino board definition file, you'll want to create a new board definition and set the <BOARD>.build.f_cpu preference to the speed of your clock. Then you can compile and upload your sketches as normal. Some functions (e.g. delayMicroseconds(), pulseIn(), and analogRead()) will behave differently (millis(), delay(), and serial communication should work fine). You'll also need to recompile the bootloader with the correct clock speed specified, as the standard bootloaders assume 16 MHz.

ATmega168 using the internal clock

To use an ATmega168 running on the internal (8 MHz) clock, just select the LilyPad option from the Boards menu. If the ATmega168 was previously configured to use an external clock, you'll need to change the fuses to get it work off of the internal clock instead.

Changed line 25 from:

To use a different ATmega/AVR chip, you'll need to make changes to the Arduino core, which is in the lib/targets/arduino sub-folder of the Arduino application directory. This shouldn't be too hard, but it will require reading the datasheet for your chip.

to:

To use a different ATmega/AVR chip, you'll need to make changes to the Arduino core, which is in the hardware/cores/arduino sub-folder of the Arduino application directory. This shouldn't be too hard, but it will require reading the datasheet for your chip.

February 27, 2007, at 11:49 PM by David A. Mellis -
Changed lines 17-18 from:

If your circuit or board uses a different speed external clock (but still has one), then you'll need to make a few adjustments. In the Arduino preferences file, you'll need to change the build.f_cpu preference from 16000000L to the speed of your clock. Then you can compile and upload your sketches as normal. Some functions (e.g. delayMicroseconds(), pulseIn(), and analogRead()) may behave differently (millis(), delay(), and serial communication should work fine).

to:

If your circuit or board uses a different speed external clock (but still has one), then you'll need to make a few adjustments. In the Arduino preferences file, you'll need to change the build.f_cpu preference from 16000000L to the speed of your clock. Then you can compile and upload your sketches as normal. Some functions (e.g. delayMicroseconds(), pulseIn(), and analogRead()) may behave differently (millis(), delay(), and serial communication should work fine). You'll also need to recompile the bootloader with the correct clock speed specified, as the standard bootloaders assume 16 MHz.

December 18, 2006, at 09:07 AM by David A. Mellis -
Changed lines 17-18 from:

If your circuit or board uses a different speed external clock (but still has one), then you'll need to make a few adjustments. In the Arduino preferences file, you'll need to change the build.f_cpu preference from 16000000L to the speed of your clock. Then you can compile and upload your sketches as normal. Some functions (e.g. delayMicroseconds(), pulseIn(), and analogRead()) may behave differently.

to:

If your circuit or board uses a different speed external clock (but still has one), then you'll need to make a few adjustments. In the Arduino preferences file, you'll need to change the build.f_cpu preference from 16000000L to the speed of your clock. Then you can compile and upload your sketches as normal. Some functions (e.g. delayMicroseconds(), pulseIn(), and analogRead()) may behave differently (millis(), delay(), and serial communication should work fine).

November 30, 2006, at 11:36 AM by David A. Mellis -
Added lines 5-6:

If you have questions or problems about getting the Arduino software to work with other hardware, please post to the software development forum. For discussions of the circuit itself, please post to the hardware development forum.

Changed lines 17-21 from:

If your circuit or board uses a different speed external clock (but still has one), then you'll need to make a few adjustments. In the Arduino preferences file, you'll need to change the build.f_cpu preference from 16000000L to the speed of your clock. Then you can compile and upload your sketches as normal. Some functions (e.g. delayMicroseconds(), pulseIn(), and analogRead()) may behave differently; please report any problems to the software development forum.

ATmega8 or ATmega168 with no external clock

If you want to use the internal clock of the ATmega8 or ATmega168, you'll need to change the fuses. Please see the appropriate datasheet to determine the correct settings, and be careful as burning the wrong values can render your chip useless. As in the previous case, you'll want to modify the build.f_cpu setting to reflect the clock speed.

to:

If your circuit or board uses a different speed external clock (but still has one), then you'll need to make a few adjustments. In the Arduino preferences file, you'll need to change the build.f_cpu preference from 16000000L to the speed of your clock. Then you can compile and upload your sketches as normal. Some functions (e.g. delayMicroseconds(), pulseIn(), and analogRead()) may behave differently.

ATmega8 or ATmega168 using the internal clock

If you want to use the internal clock of the ATmega8 or ATmega168, you'll need to change the fuses. Please see the appropriate datasheet to determine the correct settings, and be careful as burning the wrong values can render your chip useless. As in the previous case, you'll want to modify the build.f_cpu setting to reflect the clock speed.

Other ATmega/AVR

To use a different ATmega/AVR chip, you'll need to make changes to the Arduino core, which is in the lib/targets/arduino sub-folder of the Arduino application directory. This shouldn't be too hard, but it will require reading the datasheet for your chip.

November 30, 2006, at 11:33 AM by David A. Mellis -
Changed lines 5-6 from:

ATmega8 with Bootloader at 16 MHz

to:

ATmega8 from Arduino

Changed lines 9-12 from:

ATmega8 or ATmega168 without Bootloader at 16 MHz

If you've bought a standard ATmega8 or ATmega168 (which won't have a bootloader), then you'll need to use an external programmer to upload your sketches. See the programmer page for more information.

to:

ATmega8 or ATmega168 without Bootloader

If you've bought a new ATmega8 or ATmega168 (which won't have a bootloader), then you'll need to use an external programmer to upload your sketches. See the programmer page for more information. If your board is not running at 16 MHz, you'll need to make more adjustments (see below).

November 30, 2006, at 11:12 AM by David A. Mellis -
Changed lines 15-17 from:

If your circuit or board uses a different speed clock (but still has one), then you'll need to make a few adjustments. In the Arduino preferences file, you'll need to change the build.f_cpu preference from 16000000L to the speed of your clock. Then you can compile and upload your sketches as normal. Some functions (e.g. delayMicroseconds(), pulseIn(), and analogRead()) may behave differently; please report any problems to the software development forum.

ATmega8 or ATmega168 with no external clock

to:

If your circuit or board uses a different speed external clock (but still has one), then you'll need to make a few adjustments. In the Arduino preferences file, you'll need to change the build.f_cpu preference from 16000000L to the speed of your clock. Then you can compile and upload your sketches as normal. Some functions (e.g. delayMicroseconds(), pulseIn(), and analogRead()) may behave differently; please report any problems to the software development forum.

ATmega8 or ATmega168 with no external clock

If you want to use the internal clock of the ATmega8 or ATmega168, you'll need to change the fuses. Please see the appropriate datasheet to determine the correct settings, and be careful as burning the wrong values can render your chip useless. As in the previous case, you'll want to modify the build.f_cpu setting to reflect the clock speed.

November 27, 2006, at 02:52 PM by David A. Mellis -
Changed lines 13-15 from:

ATmega8 or ATmega168 with a different (or no) external clock

If your circuit or board uses a different speed clock or no external clock, then you'll need to make a few adjustments.

to:

ATmega8 or ATmega168 with a different external clock

If your circuit or board uses a different speed clock (but still has one), then you'll need to make a few adjustments. In the Arduino preferences file, you'll need to change the build.f_cpu preference from 16000000L to the speed of your clock. Then you can compile and upload your sketches as normal. Some functions (e.g. delayMicroseconds(), pulseIn(), and analogRead()) may behave differently; please report any problems to the software development forum.

ATmega8 or ATmega168 with no external clock

November 27, 2006, at 02:48 PM by David A. Mellis -
Added line 15:

If your circuit or board uses a different speed clock or no external clock, then you'll need to make a few adjustments.

November 27, 2006, at 02:47 PM by David A. Mellis -
Added lines 1-14:

Using the Arduino Software with Other Hardware

It is possible to use the Arduino software with hardware besides the Arduino board. The fewer differences, the easier it will be.

ATmega8 with Bootloader at 16 MHz

To use the Arduino software with an ATmega8 on a different board or in a different circuit but still using a 16 MHz clock, you just need to figure out how to get your code onto the chip. One possibility is to use the ATmega8 that came with an Arduino and therefore already contains the Arduino bootloader. Then, you can upload your sketch as normal (with the chip in the Arduino board), then move the chip to your own circuit or board.

ATmega8 or ATmega168 without Bootloader at 16 MHz

If you've bought a standard ATmega8 or ATmega168 (which won't have a bootloader), then you'll need to use an external programmer to upload your sketches. See the programmer page for more information.

ATmega8 or ATmega168 with a different (or no) external clock

Share