WAVEFORM GENERATOR

The WG_RELOAD register is updated when the counter value reaches the reload value. The WG_COUNTER register is loaded with the updated WG_RELOAD value, so a new reload value takes effect for the next cycle. In mode 3 (and mode 4 for the 8XC196MH), the WG_RELOAD register can be updated when an EPA event occurs. This requires you to enable an EPA channel’s peripheral function. (See Chapter 11, “Event Processor Array (EPA)” for details.)

The WG_OUTPUT register contains a synchronization bit that controls whether changes to the output signals are reflected immediately or are synchronized with an event. The synchronization bit is not buffered, so changes to it take effect immediately. You should initialize the synchroni- zation to zero (changes take effect immediately) to ensure that the pins are in the desired states when the counter starts.

9.3.5Operating Modes

The waveform generator can operate in a center-aligned or an edge-aligned mode. In the center- aligned modes, the counter counts both up and down; in the edge-aligned modes, it counts up only. The center-aligned modes generate PWM outputs that are more efficient for driving 3-phase AC induction motors, while the edge-aligned modes generate conventional PWM outputs. Cen- ter-aligned outputs have less harmonic content than edge-aligned outputs, with effectively twice the carrier period.

The initial condition of the waveform generator is the same for all operating modes. Following a system power-up or reset, the counter is stopped, outputs are deasserted, and all registers are cleared. Values written to the registers take effect one-half state time later.

The main differences between center-aligned and edge-aligned modes are the counter’s initial value, the count direction, and the conditions that cause a change in the state of the outputs. Table 9-3 summarizes the operation of the center-aligned and edge-aligned modes.

9-7

Page 206
Image 206
Intel 8XC196MC, 8XC196MD, 8XC196MH manual Operating Modes