4 * Created on: 4 Feb 2011
6 * This is a very slightly modified version of atmega48_disabled_timer.c
11 #include <avr/interrupt.h>
12 #include <avr/sleep.h>
14 #include "avr_mcu_section.h"
15 AVR_MCU(F_CPU, "atmega48");
17 ISR(TIMER0_COMPA_vect)
23 // Set up timer0 - do not start yet
24 TCCR0A |= (1 << WGM01); // Configure timer 0 for CTC mode
25 TIMSK0 |= (1 << OCIE0A); // Enable CTC interrupt
26 OCR0A = 0xAA; // CTC compare value
28 TCCR0B |= (1 << CS00) | (1 << CS01); // Start timer: clk/64
30 sei(); // Enable global interrupts
32 // here the interupts are enabled, but the interupt
33 // vector should not be called
36 // this should not be reached