Tuesday 31 December 2013

Tutorial - II Basics of AVR programming

You are now set to begin programming. Before we proceed further, i would advice you to brush up your C basics, as the programming of a uC (microcontoller) involves C - embedded which closely resembles C.
Whenever we start programming we first include the header files:-

  1. #include<avr/io.h> - used for input/output through ports also known as port manipulation
  2. #include<util/delay.h> - used to create delays in the program.
Besides these there are several other header files which we will come across as we advance in our programming.
After the header files comes the main( ) function. The program begins by executing the main function.
So basically anything written in the main function is executed first.