Sunday, May 26, 2013

ATmega8535 Programming And Interfacing

ATmega8535 Programming And Interfacing:

ATmega 8535 is basically from atmel's microcontroller family with 8kb flash memory. This microcontroller works at 16MIPS. Easy to configure as well as program. Advantages of this microcontroller are there are so many applications of this microcontroller in practical work. You can program this microcontroller with AVR programmable board. You can also buy the readymade programming board or learning kit on internet or at your end. It is easily available on internet because this microcontroller is very popular in market for projects and other applications.





Programming Examples:

 
LCD Programming:

#include
#include
#include
int main(void)
{
lcd_init();
while(1)
{
int i;
for(i=1;i<3;i++)
{
lcd_gotoxy(i,0);
lcd_string("Pranay");
delayms(1500);
lcd_clear();
delayms(10);
}
}
}

Running LED Program:

#include
#include"delay.h"
int main(void)
{
PORTC=0X00;
DDRC=0XF0;
unsigned char x;
while(1)
{
for(x=0x10;x!=0x00;x<<=1)
{
PORTC=x;
delayms(300);
}
x=0x10;
}
}


Interfacing ATmega8535:

Interfacing LCD and key board with ATmega8535 microcontroller is as shown in figure bellow.

1)LCD
2)Keyboard
3)ATmega8535 microcontroller
4) 10K resistor (4)
5)2.2K, 4.7K resistor
6)30pf capacitor (2)
7) 8MHz Crystal Oscillator
8) BC547 Transistor





No comments:

Post a Comment