LPU,NH-1 GT road, Jalandhar rohit.hero12@gmail.com +91-8437503569 https://www.facebook.com/rohit.adhikary3

P-Programming T-Technology A-And TI-Tips C-Cracking

Saturday, 7 February 2015

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);
 }
}

0 comments:

Post a Comment

Popular Posts

Recent Posts

Unordered List

Text Widget

Powered by Blogger.