Go Down

Topic: timer0 interrupt gets compiled into binary (Read 1 time) previous topic - next topic


hi, my Arduino software has 2 interrupts, timer2 and USART interrupts. i compiled the executables and looked at the .elf and .hex file (the .elf files are easier to read) compiled.

i found the instructions that are to be executed if timer2 (_vector_9) or USART rx interrupt (_vector_18) kicks in. however, i also found timer0 (_vector_16) interrupt inside the compiled file.  in my .pde file, i did not write anything remotely related to timer0, whereas for the other 2 interrupts, i had to write the respective ISR().  in other arduino applications, the timer0 interrupt can also be found, and only the timer0 interrupt seems to be the exception.

is the timer0 interrupt essential to every arduino app? what is its purpose? couldn't dig anything useful from the ATMega328 datasheet.

Coding Badly

The timer 0 interrupt service routine is used for millis / micros.  The source code is in "wiring.c".

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131