14.4 Operations
This block has two channels of 8-bit PPG units. These two channels can be used in three modes:
independent two-channel mode, 8-bit prescaler + 8-bit PPG mode, and single-channel 16-bit PPG mode.
Each of the 8-bit PPG units has two eight-bit reload registers. One reload register is for the L side (PRLL)
and the other is for the H side (PRLH). The values stored in these registers are reloaded into the 8-bit
down counter (PCNT), from the L side and H side in turn. Thus, the values are decremented for each count
clock, and the pin output (PPG) value is inverted upon a reload caused by a counter borrow. This operation
results in L-wide or H-wide pulse outputs, corresponding to the reload register value.
The operation is started and resumed by writing data in the corresponding register bit.
The table below lists the relationship between the reload operation and pulse outputs.
When 1 is set in bit 4 (PIE0) of PPGC0 or in bit 12 (PIE1) of PPGC1, an interrupt request is output upon a
borrow from 00 to FF (from 0000 to FFFF in 16-bit PPG mode) of each counter.
(1) Operation mode
This block can be used in three modes: independent two-channel mode, 8-bit prescaler + 8-bit PPG mode,
and single-channel 16-bit PPG mode.
In independent two-channel mode, the two channels of 8-bit PPG units operate independently. The PPG0
pin is connected to the ch0 PPG output, while the PPG1 pin is connected to the ch1 PPG output.
In 8-bit prescaler + 8-bit PPG mode, ch0 is used as an 8-bit prescaler while the count in ch1 is based on
borrow outputs from ch0. Thus, 8-bit PPG waveforms can be output at any cycles. The PPG0 is connected
to the ch0 prescaler output, while the PPG1 pin is connected to the ch1 PPG output.
In 16-bit PPG 1ch mode, ch0 and ch1 are connected and used as a single 16-bit PPG. The PPG0 and
PPG1 pins are connected to the 16-bit PPG output.
MB90580 Series
Table 14.4a Reload operation and pulse output
Reload operation
PRLH
PCNT
PPG0x/1x [0
PRLL
PCNT
PPP0x/1x [1
Pin output change
1]
Rise
0]
Fall
14.4 Operations
Chapter 14: 8/16-Bit PPG
201