Sei sulla pagina 1di 8

Microcontroller ATmega8535 Programming And Interfacing

Introduction to ATmega8535 Microcontroller:


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.

Pin Diagram of ATmega8535:


Architecture And Block Diagram:
Figure bellow shows overall block diagram and architecture of ATmega8535 microcontroller.
Some Examples to Program 8535:
LCD Programming:
#include<avr/io.h>

#include<delay.h>

#include<lcd.h>

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<avr/io.h>

#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. For
interfacing ATmega8535, you have following components.

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

Now interface circuit as shown in bellow figure on multipurpose PCB.


<img src='http://www.MaharashtraSpider.com/attachments/Resources/7429-26100-pin121.jpg' alt='pin configuration 8535' align='left'
style='padding:10px'>

<img src='http://www.MaharashtraSpider.com/attachments/Resources/7429-26101-pin1.jpg' alt='pin configuration atmega8535'


align='left' style='padding:10px'>

<img src='http://www.MaharashtraSpider.com/attachments/Resources/7429-26102-Architecture.jpg' alt='Architecture 8535'


align='left' style='padding:10px'>

<img src='http://www.MaharashtraSpider.com/attachments/Resources/7429-26103-Block-Diagram.jpg' alt='Block Diagram 8535'


align='left' style='padding:10px'>

<img src='http://www.MaharashtraSpider.com/attachments/Resources/7429-26104-Interfacing8535.jpg' alt='Interfacing8535 '


align='left' style='padding:10px'>

<img src='http://www.MaharashtraSpider.com/attachments/Resources/7429-26106-Sell_ATmega8535L-8AU_ATmega8535-16.jpg' alt='8535


microcontroller2' align='left' style='padding:10px'>

<img src='http://www.MaharashtraSpider.com/attachments/Resources/7429-26105-gen_image.php_1.png' alt='8535 microcontroller1'


align='left' style='padding:10px'>

Potrebbero piacerti anche