[an error occurred while processing this directive]
[an error occurred while processing this directive]
|
|
void init_timer0 (void)
{
/* Timer0 Initialisation */
TCNT0 = 0;OCR0 += F_CLK/(32 * 1000); // 1 ms timer
TCCR0 = (0 << PWM0) | // PWM mode not used
(0 << COM01)| // OC0 pin not used
(0 << COM00)| // OC0 pin not used
(1 << CTC0) | // Clear on compare match
(0 << CS02) |
(1 << CS01) |
(1 << CS00) ; // Fclk/32 & enable// set_bit(TIMSK, OCIE0); // Enable OC0 interrupts
enable_OC0();
}
E-mail: info@telesys.ru