Pages: [1]   Go Down
Author Topic: timer0 interrupt gets compiled into binary  (Read 959 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 11
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 208
Posts: 12944
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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

Pages: [1]   Go Up
Jump to: