|

Setting Up your AVR Microcontroller

AVR ATmega8 and its Datasheet

Hello guyz....this post will give you a brief overview of how to setup your AVR and necessary tools. You may start from mini-projects and take yourself to mega-projects like designing of automated and control systems etc etc..... Well ATmega8L is an AVR product an 8-bit microcontroller with built-in 8 bit ADC apart from timers and interrupts. The detail datasheet can be downloaded from the links given below:
Download Link 1
Download Link 2
Once the datasheet is read, you may proceed further.

Making Your Own Parallal Port Cable


We need to have some sort of connector which will burn our AVR. Since AVR Atmega8L is in-system-programmable (that can be programmed while remaining in the system), we can easily program our microcontroller. For that purpose take DB-25 connector and make connections as shown below. The pins of DB-25 i-e 1-5,8,11,12 shall remain unconnected.SCK, MOSI, RESET, MISO ,GND are some pins of ATmega8L to program the chip. The explanation of these pins may be found in the datasheet.

You may use a MRC 5 pin connector in between DB-25 and microcontroller so that your cable becomes handy. It is also sometimes referred as cream-shell connector. Remember to take both the male and female part when you purchase from your local market. The overall cable looks like:-


Download AVR Studio

Software Required:
The following softwares are required to handle AVR microcontrollers. The download links is given below for the readers.

Congratulations, now your microcontroller is ready to use.....

Your Very First Program


To strengthen your knowledge just try out the following C code which makes the LED blink...........
#include //header file to include input output port
#include //header file to include delay function
#define LED PD4
int main(void)
{
DDRD = (1 << LED); /* DDR=Data Direction register... its to define PD4 OUTPUT pin rest bits of DDRD can be 0 or 1 does not make any significance */ while (1) { PORTD = (1 << LED); // switch on _delay_ms(200); PORTD = (0 << LED); // switch off _delay_ms(200); } return 0; }

Posted by Unknown on 12:20. Filed under , . You can follow any responses to this entry through the RSS 2.0. Feel free to leave a response

Labels

Recently Commented

Recently Added