[an error occurred while processing this directive]
|
#include
void initialization(void);
void delay(void);
void initialization(void)
{
DDRB = 0xff; // Set PORTB as output
TCCR0 = 0x05; // Count clock/1024.
}
void delay(void) //Producing a delay of 65 ms at 4 MHz
{
while (!(TIFR&0x02)); // Waiting for timer0 overflow flag to be set
TIFR = 0x02; // Clearing overflow flag
}
void main (void)
{
initialization(); //Initialize Pheripherals
while (1) //Forever
{
PORTB++; //Increment PORTB
delay(); //Short delay
}
}
E-mail: info@telesys.ru