# How different is the Arduino language than Atmel Studio language? [closed]

I see that on the official Arduino website, the reference page contains the functions and vales you would use specified to the Arduino compiler.

http://arduino.cc/en/Reference/HomePage

What would you use instead, if you are working with Atmel Studio?

• The language is the same. The available symbols are different. – Ignacio Vazquez-Abrams Oct 7 '13 at 4:12
• Yes, i agree with Ignacio. i think you should learn the C language. – Roh Oct 7 '13 at 4:24
• This question appears to be off-topic because it is not about electronic design. – Leon Heller Oct 7 '13 at 8:07

The language is the same. You can either use Arduino IDE or Atmel Studio (http://www.engblaze.com/tutorial-using-atmel-studio-6-with-arduino-projects/) The Arduino libary is more of a wrapper to make it easy to do things, like digitalWrite, which you do not have by default in Atmel Studio (or you can define it yourself). With Atmel Studio you would flip a bit in a register to turn on the digital port. Now for the AtMega2560 and the AtMega328 these registers are different. So you can't just compile the same source and expect it to run on both MCU's when using the registers. Again, of course, you can specify a compiler flag that you are now using AtMega2560 or AtMega328 and define the registers in your own digitalWrite function accordingly, and that is exactly what the Arduino library is doing for you.

You can choose to use the Arduino Library while working in Atmel Studio, or you can choose to use native register operations toggling bits and so forth using Arduino IDE. To get Atmel Studio running with Arduino library and AVR dude requires some setup, but it might be worth it, depending on how large your code project is. Atmel Studio is based on Microsofts Visual Studio with code suggestion/completion and intellisense which could drastically speed up the development of the code.

Something that's available when using Atmel Studio is the Atmel Software Framework that gives some hardware abstraction like the Arduino libraries. It allows the same code (within reason) to run across multiple Atmel platforms including the AVR and their ARM based products. I've only just started using it for a new project but here's an example of some code:

#define RADIO_RX IOPORT_CREATE_PIN(PORTA, 0)