Learning Arduino using atmega

I started learning arduino With out any prior knowledge in Micro controller and programming, and Without a help from the Forum people I should have abandoned the day i tried it.

The One of many good thing's in arduino board and IDE is its learning curve for complete newbie's like me.

One of the disadvantage[(?) or advantage (?) I don't know what to name it] of its IDE is doing very much make up for its instructions( i am not total against it because I don't know any other language except Arduino IDE language) But i think it is useful to know what is it doing behind that Magic.
I mean...what exactly does Arduino Functions like digitalWrite(), millis(), Serial.print()... and Many more Do on The behind calls and how the atmega controller respond to it.


  1. I am still newbie... Is it better to learn how atmega controller responding to the arduino codes or should I stick to the arduino magic code or functions (I don't know what to call)?

  2. how can i start ?.... By learning c++ programming or starting with atmega controller block diagram ? I don't know C when I started my tinkering with arduino except some addition or subtraction learned to qualify my college exams.. but Now I think I know(basic) some coding. If do you suggest me to learn atmega controller.. where do you want me to start? starting from Micro controller block diagram? or some other (I still don't know what)

  3. is it possible to learn the atmega controller from arduino. if yes How?

  4. any references to learn from scratch(i am afraid I am a slow learner I think I have to learn from very basic)....

The code for all the Arduino functions (such as millis() and digitalWrite() ) is included with the Arduino IDE so you can study it yourself to see how it is done.

The Atmel Atmega datasheets contain all the technical information about the Atmega MCUs, including their instruction set. There are links to download the datasheets on the various Arduino product pages.

It is also possible to view the Atmega assembler code that the Arduino compiler produces so that you can see how, exactly, your C/C++ code is converted to Atmega code. I don't have a link to a Thread that explains how to do this but Google should find it for you - the subject comes up regularly.

Not sure if this answers your questions.


Re: the first question - if your goal is to do something cool with an Arduino board, it's sufficient to just use the Arduino functions, and just be aware that there's a lot of stuff going on behind the scenes. Those functions were written to make life easier for doing the sorts of common tasks that people want to do with microcontrollers. You can do a lot on an Arduino without having to get too deep into that stuff.

If you want a better understanding, I'd recommend starting with looking at the definitions for those functions. They'll have a lot of setting of registers (something you'll almost never do directly if writing using the IDE), so you'll need the Atmega328p datasheet handy to make much sense of it.