Don_dody
Full Member level 1
- Joined
- Nov 4, 2012
- Messages
- 96
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,288
- Location
- Indonesia
- Activity points
- 1,921
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