Waveform Generation Mode Bit

Hello

I'm confuse about how this link below describe the WGM bit in AVR
http://www.csulb.edu/~hill/ee444/Review%20for%20Quizzes/Timer%20PWM%20Questions%20and%20Answers.pdf

As you can see on page 2, The WGM21, 20 and 22 are bits in timer control register (TCCR). In the table 17-8 of page 3, they describe sth. about WGM0, WGM1 and WGM2 which are not in TCCR register. What are these bits?

Thanks
BlackMelon

I have encountered the following terminologu quite often.

WGM20, WGM21 and WGM22 refer to "real bits" in TCCR2.
WGM0, WGM1 WGM2 are used in a general discussion on timers, They do not have a "real" counterpart They refer bits in a "general" TCCR

Generally speaking WGM0, WGM1 and WGM2 are the general bits.

Then depending which timer you use you can have

WGM22, WGM21, WGM20 or WGM12, WGM11, WGM10

You just change accordingly for whatever timer you are using, assuming the timer in question supports the waveform generation feature.

Thank you very much!!! With this information, I can start to write sth. about PWM :smiley:

Just a little sth. left, If I wanna use timer 2, I will have to give value for both TCCR2A and TCCR2B, right?
Because I found WGM2 is in TCCR2B while WGM1 and 0 are on TCCR2A and the sheet said that we need to give value to WGM 2,1 and 0. Moreover, there are the other bits on those TCCR2A and TCCR2B which need to be set/clear.

BlackMelon:
Just a little sth. left, If I wanna use timer 2, I will have to give value for both TCCR2A and TCCR2B, right?
Because I found WGM2 is in TCCR2B while WGM1 and 0 are on TCCR2A and the sheet said that we need to give value to WGM 2,1 and 0. Moreover, there are the other bits on those TCCR2A and TCCR2B which need to be set/clear.

What exactly is that you want to do with the timer?