Saturday, 10 October 2015

Blinking of LED using TIMER1

#include <avr/io.h>

int main(void)
{DDRA=0XFF;
//TCCR1A=0x00;
TCCR1B=0X05;
PORTA=0x00;
    while(1)
    {TCNT1H=0Xfa;
TCNT1L=0X00;
while((TIFR&0x04)==0);
PORTA=PORTA^0xff;
TIFR|=0x04;
       
    }
}

No comments:

Post a Comment