Interfacing the LED and LCD
Hello reader,
Previous page,i told you how to install Two software where you can run this program and also how to check your own program from it.
Configuring IO Ports:Everyport(PORTx, x = A or B or C or D) of AVR microcontroller 3 registers associated with it:1)DDRx :- its to set direction of the pin of PORTx and known as Data Direction Register2)PORTx 3)PINx
Program to blink LED using ATmega 16
#include<avr/io.h> //command on which Atmega 16 pin worked on
#include<util/delay.h> //this is for time delay
int main(void)
{
DDRA=0xff; //for directing port A
While(1)
{
PORTA=~PORTA;
_delay_ms(1000);
}
}
Previous page,i told you how to install Two software where you can run this program and also how to check your own program from it.
Configuring IO Ports:Everyport(PORTx, x = A or B or C or D) of AVR microcontroller 3 registers associated with it:1)DDRx :- its to set direction of the pin of PORTx and known as Data Direction Register2)PORTx 3)PINx
Program to blink LED using ATmega 16
#include<avr/io.h> //command on which Atmega 16 pin worked on
#include<util/delay.h> //this is for time delay
int main(void)
{
DDRA=0xff; //for directing port A
While(1)
{
PORTA=~PORTA;
_delay_ms(1000);
}
}
0 comments:
Post a Comment