Hi
I'm looking for some reading material on the Arduino information working with the internal registers.
I read someplace not to mess with Timer 0 because it used in all timed based items like delay().
Are there any special rules with Timer 1 and Timer 2? What about using other AVR interrupts and sleep modes? Is there any restrictions using PORTx or DDRx registers directly? Why use _BV() macro?
Do you have to restore anything when done?
I met someone here that designed a library that used output compare with Timer1 and Timer2.
Also used external interrupts 0 and 1 too. I didn't realize you could access these timers and registers
directly. Maybe we could make a pdf or something. I'm just looking to expand my knowledge of the language and Arduino.
You can mess with whatever you want, it's your chip.
However they have packed quite a bit into a small chip, so various things tend to be inter-dependent. For example, the Tone library uses a timer. The analogWrite (PWM write) uses timers. You can use sleep if you want. You can use most interrupts if you want. One is already used for Timer0 overflow for the millis() function.
Nick looks really nice I could live with 8 channels these days. Mine is old and I have to use my cell to make a screen shot. It has a pod for 68HC11 dissembler which I used before the Atmel Avr became so popular I got it cheap and have had it for 18 years now.
Don