Thursday 2 August 2012

Programming the Atmega8


There are many programming environment like AVR studio, Winavr, Codevision to program the Atmega8. I prefer Winavr because it is a open source software and easy to use. C language is used as the programming language. The 23 pins of  ports B,C,D can be used as input or output individually. To specify any port as an input port set the data direction register of that port to 0xff. Similarly for input set the DDR as 0x00.  After writing the C-code, compile it and create a HEX file. This HEX file will be transferred to the microcontroller using a programmer/burner. Winavr can be downloaded here   

No comments:

Post a Comment