![](http://datasheet.mmic.net.cn/330000/MB90F562_datasheet_16437954/MB90F562_358.png)
334
CHAPTER 12 MULTI-FUNCTION TIMER
MB90560 series
12.4 Operation of Multi-Function Timer
12.4.4 Operation of 8/16-bit PPG Timers
This section describe operation and timing of 8/16-bit PPG timers. The operation and
timing of ch0/ch1 will be explained here. The operation and timing of ch2 and ch4 is the
same as ch 0 and the operation and timing of ch 3 and ch 5 is the same as ch 1. Two
channels of PPG time 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 written 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
underflow. This operation results in L-wide or H-wide pulse outputs, corresponding to the reload
register value. Further more the output polarity can be selected by software.
The operation is started and resumed by writing data in the corresponding register bit.
The Table 12.4.4-1 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 an underflow from “00
H
” to “FF
H
” (or underflow from “0000
H
” to “FFFF
H
” in 16-bit PPG mode) of
each counter.
I
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.
8-bit 2ch independent mode
In this mode, the two channels of 8-bit PPG units operate independently. The PPG0 pin is connected
to the ch0 PPG output and the PPG1 pin is connected to the ch1 PPG output.
8 + 8-bit PPG mode
In this mode, ch0 is used as an 8-bit prescaler while the count in ch1 is based on underflow outputs
from ch0. Thus, 8-bit PPG waveforms can be output at any cycles. The PPG0 is connected to the
ch0 prescaler output and the PPG1 pin is connected to the ch1 PPG output.
16-bit PPG mode
In this 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.
Table 12.4.4-1 Reload operation and pulse output
Reload operation
Pin output change
Positive polarity
Negative Polarity
PRLH
→
PCNT
PPG0/1 [0
→
1]
↑
Rise
PPP0/1 [1
→
0]
↓
Fall
PRLL
→
PCNT
PPP0/1 [1
→
0]
↓
Fall
PPG0/1 [0
→
1]
↑
Rise