I'm new to electronics. Professionally I'm a software developer. I want to know whether it is possible to program Atmel AVR 8-bit and 32-bit Microcontrollers using Arduino IDE. If yes could any one guide me on the process or direct me to any site where I can learn about it.

  • 3
    You can Google AVR. There are tons of tutorials. Google is your friend. – PhillyNJ Jan 8 '15 at 13:12
  • Yes I do have winavr to program it but I would like to know whether Aurdino programming language can be used. – SAM Jan 8 '15 at 13:51
  • Understood. Just to be clear, there is no such thing as an Arduino programming language. You can program an Arduino with c or cpp with the Arduino library. – PhillyNJ Jan 8 '15 at 14:28
  • 1
    "Arduino" is not a programming language. It's C++ with an IDE that does most of the drudge work of dealing with hardware and libraries. – Ignacio Vazquez-Abrams Jan 8 '15 at 16:44
  • 6
    Downvoted because, well, it's a lousy question. You need more detail. This is not the kind of question I would expect from a software developer with professional experience. – Jasmine Jan 8 '15 at 18:07

Yes, it is possible. In fact, this is how the whole 'Arduino' concept works - programming 8/32 bit AVR microcontrollers with the Arduino IDE.

program Atmel AVR 8-bit and 32-bit Microcontrollers using Aurdino IDE

This has two parts actually:

1. Generate compiled HEX targeting AVR

Using the Arduino IDE you could utilize the Arduino libraries (aka working with assist utility functions like digitalWrite for example), which are built on top of the AVR tool-chain. The official Arduino IDE comes with pre-built support for several 8-bit/32-bit Atmel AVR micro-controllers, the full list of supported boards can be found on the Arduino official website or in this Wikipedia page. You did not specify a specific MCU, therefor you should check if the MCU you would like to work with is in that list.

2. Uploading an Arduino sketch to a compatible AVR

Arduino IDE uses avrdude under the hood. avrdude is

an utility to download/upload/manipulate the ROM and EEPROM contents of AVR microcontrollers using the in-system programming technique

(From their website).

The best place to start is the official Arduino.cc website, in the 'Getting Started' section. If you haven't picked any specific Atmel AVR chip yet, consider that each has slightly different features, size, I/O pins etc. so make sure to research a bit before purchasing one (reference the table in the Wikipedia link above to compare between the different kinds).

| improve this answer | |

http://arduino.cc/ is good place to start. It includes articles about how to get started, library references, and user forums. The Arduino IDE will certainly get you started, but as an experienced developer you'll most likely hit its limitations pretty quickly.

Later, or quite possibly sooner(!) you can use same toolset (compiler, loader, libraries) in several less limiting environments: Eclipse IDE, edit/make at the command line, and Atmel's AVR Studio. C and C++ are mainstream; I've seen references to the existence of (but never tried) AVR Forth and AVR python.

Though you'll see occasional references to an 'Arduino language' it's really nothing more than C++ with some attempt to be smart about detecting references to library packages and auto-inserting the relevant #includes. You probably won't want to take advantage of such shortcuts, and keep to good programming practices, if you think you'll ever want to move up from the Arduino IDE.

I personally use Eclipse (supplementing with a few command line tools) and I'd recommend it once you've tried the Arduino IDE.

| improve this answer | |

Just to complement the other responses. You can program some AVR chips using the Arduino IDE, but for it to work out-of-the-box just by using a USB cable it needs to be an Arduino or "Arduino compatible" board, mostly because these come with the Arduino Bootloader.

The bootloader is a small piece of software that runs at power-up and is responsible to load your program into the chip (as well as other configuration stuff, for more info read the previous link). If the AVR chip does not have the bootloader already flashed, then you will have to use a programmer (connected to its ISP pins) to burn it first.

So, it's not like you can just buy random AVR chips or development boards online and start using them. But taking in consideration the wide selection of official boards and "Arduino compatible" ones, you should be able to find something to fit your needs.

| improve this answer | |
  • Although if you have a programmer there's no need to have a bootloader at all, since the IDE supports uploading the code via programmer. – Ignacio Vazquez-Abrams Jan 10 '15 at 6:54
  • Also, you can also buy bootloader-loaded chips, and you can program a chip with another Arduino or your homemade-duino. – JRobert Jan 10 '15 at 20:17
  • Thanks Ignacio Vazquez-Abrams just for clarification if I have Arduino programmer I can program my Atmel Avr MCU without a bootloader. – SAM Jan 17 '15 at 5:42

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.