Tuesday, 17 October 2017

INTERFACING LEDS WITH ATMEGA8 MCU

INTERFACING LEDS WITH ATMEGA8 MCU:

SCHEMATIC DIAGRAM:



CODING:

#include<avr/io.h>
#include<util/delay.h>

int main(void)
{
DDRD=0xFF;            // set portD as out put
while(1)                     // run forever
{
PORTD=0xFF;          //All the pins of portD is set
_delay_ms(1000);      //wait  for 1sec
PORTD=0x00;          //all the pins of portD is reset
_delay_ms(1000);      // wait for 1 sec
}
return(0);

}

SOFTWARE AND HARDWARE REQUIREMENTS:

SOFTWARE:

  • AVR STUDIO
  • PROTEUS SIMULATION
  • EMBEDDED C PROGRAMMING LANGUAGE
HARDWARE:
  • ATMEGA8 MCU
  • LEDS
  • POWER SUPPLY SECTION


VIDEO:

https://www.youtube.com/watch?v=Vy94lCerEkY&t=6s

No comments:

Post a Comment