1
\$\begingroup\$

If I grab any Atmel AVR-based microcontroller off the shelf, will I be able to write code for it using the Arduino SDK?

\$\endgroup\$
4
\$\begingroup\$

Arduino SDK (i.e. Arduino core and default shipped libraries), supports a specific set of boards, which in turn use a specific set of AVR8 microcontrollers. This is a subset of total set of AVR8 microcrontrollers that ATMEL sells. The various AVR8's, use the same instruction-set as you might already be aware, but vary in terms of maximum clock speed, SRAM + flash sizes, peripherals and pin-count. The Arduino core software takes care of those differences, but only for the AVR8's that are used in the supported set of boards.

So, if one designs their own board, using an AVR8 that is also used in a supported Arduino board, and you have a way to (re-)program this microcontroller, then they are about as good as the original supported board, from the Arduino board family. This is what all the "Arduino" clones in market are.

As for the rest of the AVR8's, the support for them can be added by creating custom Arduino core, and libraries. For example 'MIT - High Low Tech' attiny85 core, or Arduino-Tiny core for attiny85. There are other similar user-contributed/generated custom cores.

Note that AVR8 microcontrollers also have a hardware signature, which identifies the part-number. This is something which is checked by the programmer at the time of programming the part via ISP.

Some people consider the Arduino IDE as part of that SDK. Do note that the IDE can be used to write programs for, and program any AVR8, for as long as core/libraries for the AVR8 have been added, a "boards" definition created to enable compilation and programming of the uC.

\$\endgroup\$
  • 1
    \$\begingroup\$ Also the register addresses vary per controller. PORTB on a ATmega8 is on an entirely different address than on a ATmega328. So it is very tricky which exact controllers can be programmed from IDE. Also it is mentioned that not all Arduino functions and libraries work on every AVR, but there is no definite list of which ones will work and which won't. It is trial and error. \$\endgroup\$ – jippie May 27 '13 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.