The circuit shown could be used to implement a PWM output with a period up to 256
clocks and a duty cycle from 1/256 to 100%. Figure B.6 also shows how the timing works.
The counter value is shown as a continuous line, although it of course decrements in steps.
The value X on the graph is the value in the period register, which is where the counter
starts counting when it is reloaded. The value Y on the graph represents the value in the
duty cycle register. Note that if the duty cycle value is greater than the period value, the
PWM output will never go high. This sort of scenario is possible on many microcontrollers
with PWM outputs.
This particular hardware configuration was selected to make the explanation easy.
There are a number of variations on ...