Hello!
I have seen people used timer ISRs, USART0 ISRs, ADC ISRs. There are probably more types of ISRs. I only know how to use pin change interrupts. I found some code like this:
All the manipulating of the constants are very confusing. How can I change that code to make the ISR trip at different intervals (100ms, 1000ms, 50ms, etc.)? What's the prescaler, and all that? Most of these ISRs use a syntax like this:
I'm just learning how to do all this myself. Those callouts are for the registers in
the ATmega328. It will help to download the datasheet for the chip, and cross-
reference the code with the actual register info, then it's very easy to figure out
how to modify the register values.
Code such as TCCR1B |= (1 << WGM12); is simply shifting a "1" into the proper
bitwise position, and then setting the bit in the register.
Another thing that will help is to get a copy of Dale Wheat's book "Arduino
Internals", as he spends a lot of time describing examples of how to do Timer
register settings and interrupts.