Intel 8XC196MC Microscope & Magnifier User Manual


 
9-9
WAVEFORM GENERATOR
9.3.5.1 Center-aligned Modes
In the center-aligned modes, the counter counts down from the WG_RELOAD value to 1, then
counts back up from 1 to WG_RELOAD. When you write to the WG_RELOAD register,
WG_COUNTER is loaded with the reload value. When you set the enable bit in the control reg-
ister, the counter begins counting down and continues counting until it reaches 1, waits one state
time, and starts counting up until it reaches WG_RELOAD. At this point, WG_RELOAD is up-
dated and WG_COUNTER is reloaded with the updated value, so a new reload value takes effect
for the next cycle. The counter resumes counting down from WG_RELOAD to 1. This produces
a symmetrical ascending and descending count, illustrated by the triangular wave in Figure 9-4,
with a period that is twice the WG_RELOAD value. Figure 9-5 shows the operation of outputs
and interrupts in center-aligned modes.
Figure 9-4. Center-aligned Modes — Counter Operation
In mode 0, the WG_COMPx and WG_OUTPUT registers are updated only once during the car-
rier period, when the counter reaches the reload value. In mode 1, these registers are updated
twice during the carrier period: first when the counter is set to 1, then again when it reaches the
reload value.
A2636-01
WG_COUNTER
Value
WG_COUNTER =
WG_RELOAD
WG_RELOAD
Changed
Carrier Period
Reset Write to WG_RELOAD
1
0
Counter
Enabled