Understanding ATmega 328p Data Sheet Format/Syntax

Hello All,

I'm in the process of learning how to use the timers on an Atmega 328P chip, with the goal of eventually building and programming an inverted pendulum robot.

However, I'm having a hard time understanding some of the "syntax" the data sheet uses, for lack of a better word.

For example, in section 19.7.4;

The Phase Correct PWM mode (WGM0[2:0]=0x1 or WGM0[2:0]=0x5) provides a high resolution, phase
correct PWM waveform generation.

What does the "WGM0[2:0]=0x1" part mean? I've seen a lot of similar things on the data sheet but I can't figure it out. I know what WGM is, I just don't understand what the "[2:0]=0x1" part is trying to convey.

Here's the link to the Atmega 328p data sheet for anyone who wants to see the whole thing. My question comes from the very beginning of section 19.7.4



This is shorthand for the bits of the waveform generation mode for Timer0. There are three bits which set the waveform generation mode of this timer. WGM02, WGM01,WGM00.

WGM -- waveform generation mode

0 -- Timer 0

[2:0] -- bits 2,1,0

WGM0[2:0] = 0x1 means WGM02 =0, WGM01= 0 and WGM00 = 1 which is binary 1 for Mode 1 PWM to 255.

WGM0[2:0] = 0x5 means WGM02 = 1, WGM01 = 0 and WGM00 = 1 which is binary 5 for Mode 5 PWM to OCR0A

These are the two phase correct pwm modes, where the timer counts up and down.

Cattledog thank you so much! This makes sense now.