Hide minor edits - Show changes to markup
This page has moved. See the new location on Google Code.
Esta pÔgina se ha movido. Puedes ver su nueva localización en Google Code.
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.
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.
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).
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.
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.
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.
This page has moved. See the new location on Google Code.
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 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 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 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.
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).
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).
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.
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.
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.
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.
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 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.
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).
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.
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.
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).
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.
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.
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.
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.
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 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.
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.
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).
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.
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.
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.
If your circuit or board uses a different speed clock or no external clock, then you'll need to make a few adjustments.
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.
If your circuit or board uses a different speed clock or no external clock, then you'll need to make a few adjustments.
It is possible to use the Arduino software with hardware besides the Arduino board. The fewer differences, the easier it will be.
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.
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.