AUTOMATIC STREET LIGHT WITH ATMEGA16 MICROCONTROLLER



#include <avr/io.h>
#include<util/delay.h>
int main(void)
{
DDRC=0x11;
DDRA=0x00;
while(1)
{
if(PINA==0x00)
{
PORTC=0x01;
}
else PORTC=0x00;
}}

Comments

Popular posts from this blog

AVR MICROCONTROLLER