Microcontroller tutorial series: AVR and Arduino timer interrupts
engblaze.com