Converted timer to Timer0, and enabled global interrupts to make the timer work.

This commit is contained in:
skarg
2007-08-15 19:18:56 +00:00
parent 7e1b95d18f
commit 916843468c
2 changed files with 31 additions and 14 deletions
+4 -2
View File
@@ -42,7 +42,6 @@ void init(void)
/* Initialize I/O ports */
/* For Port DDRx (Data Direction) Input=1, Output=1 */
/* For Port PORTx (Bit Value) TriState=0, High=1 */
DDRB = 0;
PORTB = 0;
DDRC = 0;
@@ -55,11 +54,14 @@ void init(void)
WDTCSR = 0;
/* Configure USART */
RS485_Set_Baud_Rate(38400);
RS485_Initialize();
RS485_Set_Baud_Rate(38400);
/* Configure Timer0 for millisecond timer */
timer_initialize();
/* Enable global interrupts */
sei();
}
void task_milliseconds(void)