Hi friends,
I'm starting to work with timers and arduino registers recently and i have a question with a the TCCR2A register. In this datasheet, page 130, there's a table explaining the modes. What i dont' understand is why it's write WGM2, WGM1 and WGM0 instead of WGM21 and WGM20, so i can't undersand the table.
My TCCR2A is B10000011, what mode it would be?
If someone could explain what's the function of WGM too, I would be thankful, because i have an idea but not clear at all.
On the ATmega328P, the two 8-bit timers (Timer0 and Timer2) have the same Waveform Generation Modes so the bits are abbreviated as WGM2, WGM1, WGM0 instead of WGM02/WGM22, WGM01/WGM21, WGM00/WGM20.
Note: Timer1 (the 16-bit timer) has a WGM13 bit for twice as many modes.
Note: WGM1 and WGM0 are in the TCCRxA register and the higher WGM bits are in TCCRxB. It is easy to forget that and think that all 3 or 4 bits are next to each other.