david90
Advanced Member level 1
Code:
#include <avr/io.h>
#include <uart.h>
#include <delay.h>
#define BAUDRATE 19200
#define xtalCpu 8000000
int main(void)
{
DDRB=0xFF;
uart_init(19200);
while(1)
{
//uart_putc('U');
_delay_ms(5000);
PORTB=0xFF;
_delay_ms(5000);
NutSleep=0x0;
_delay_ms(500);
}
return 0;
}
For some reason, my LED blinks way faster than 5sec. Is there anything wrong with my code?