Don_dody
Full Member level 1
Hi,,
I want to make a blinking LED with 1s delay using ATmega8535. The compiler is codevisionAVR and here is my code:
It is working actually but the delay is not exactly 1s. Anybody can help me to make it exactly 1s??
Thank you
I want to make a blinking LED with 1s delay using ATmega8535. The compiler is codevisionAVR and here is my code:
Code:
#include <mega8535.h>
#include <delay.h>
void main(void)
{
PORTC=0x00;
DDRC=0x08;
while (1)
{
PORTC=0x08;
delay_ms(1000);
PORTC=0x00;
delay_ms(1000);
}
}
It is working actually but the delay is not exactly 1s. Anybody can help me to make it exactly 1s??
Thank you