Welcome To Sculland.

My Notes On The Atmel 8-bit AVR ATmega168 Microcontroller

Interrupts And Timers How to Control 30 LEDS With Only 6 Pins
Create Sounds Using A PC Speaker

Timers And Interrupts On The ATMEGA168 Microcontroller

There are three timers available to you on the ATmega168. There is one 16-bit timer, called Counter 1 and two 8-bit timers called Counter 0 and Counter 2. The 16-bit timer can count up from 0 to 65,535 (Which in Binary is 11111111 11111111). The 8-bit timers can only count up from 0 to 255 (Which in Binary is 11111111).

How To Setup The 8-bit Timers How To Setup The 16-bit Timers
Now For the Software End Of Things Timer Counting Speed Table
8-bit Timer Example - Use Software To Control A LED 16-bit Timer Example - Use Software To Control A LED
8-bit Timer Example - Use Hardware To Control A LED 16-bit Timer Example 2 - Use Software To Control A LED
Show All

Now For The Software End Of Things

The ISR(vector_name) Macro – ISR stands for Interrupt Service Routine

Vector nameOld vector nameDescription
ADC_vectSIG_ADCADC Conversion Complete
ANALOG_COMP_vectSIG_COMPARATORAnalog Comparator
EE_READY_vectSIG_EEPROM_READYEEPROM Ready
INT0_vectSIG_INTERRUPT0External Interrupt 0
INT1_vectSIG_INTERRUPT1External Interrupt Request 1
PCINT0_vectSIG_PIN_CHANGE0Pin Change Interrupt Request 0
PCINT1_vectSIG_PIN_CHANGE1Pin Change Interrupt Request 1
PCINT2_vectSIG_PIN_CHANGE2Pin Change Interrupt Request 2
SPI_STC_vectSIG_SPISerial Transfer Complete
SPM_READY_vectSIG_SPM_READYStore Program Memory Read
TIMER0_COMPA_vectSIG_OUTPUT_COMPARE0ATimer/Counter0 Compare Match A
TIMER0_COMPB_vectSIG_OUTPUT_COMPARE0BTimer/Counter0 Compare Match B
TIMER0_OVF_vectSIG_OVERFLOW0Timer/Counter0 Overflow
TIMER1_CAPT_vectSIG_INPUT_CAPTURE1Timer/Counter Capture Event
TIMER1_COMPA_vectSIG_OUTPUT_COMPARE1ATimer/Counter1 Compare Match A
TIMER1_COMPB_vectSIG_OUTPUT_COMPARE1BTimer/Counter1 Compare Match B
TIMER1_OVF_vectSIG_OVERFLOW1Timer/Counter1 Overflow
TIMER2_COMPA_vectSIG_OUTPUT_COMPARE2ATimer/Counter2 Compare Match A
TIMER2_COMPB_vectSIG_OUTPUT_COMPARE2BTimer/Counter2 Compare Match A
TIMER2_OVF_vectSIG_OVERFLOW2Timer/Counter2 Overflow
TWI_vectSIG_2WIRE_SERIAL2-wire Serial Interface
USART_RX_vectSIG_USART_RECV, SIG_UART_RECVUSART, Rx Complete
USART_TX_vectSIG_USART_TRANS, SIG_UART_TRANSUSART, Tx Complete
USART_UDRE_vectSIG_USART_DATA, SIG_UART_DATAUSART Data Register Empty
WDT_vectSIG_WDT, SIG_WATCHDOG_TIMEOUTWatchdog Timeout Interrupt

References