![](http://datasheet.mmic.net.cn/330000/MB90F562_datasheet_16437954/MB90F562_359.png)
MB90560 series
CHAPTER 12 MULTI-FUNCTION TIMER
335
I
PPG output operation
Writing ’1’ to bit7 (PEN0) of PPGC0 register will activate ch0 PPG timer to start counting when bit6
(SST0) of PPGC0 register is “0” (Software activation). Alternately, GATE signal becoming “H” will
activate ch0 PPG timer to start counting when bit6 (SST0) of PPGC0 register is “1” (Hardware
activation).
Similarly, writing '1' to bit15 (PEN1) of PPGC1 register will activate ch1 PPG timer to start counting
when bit14 (SST1) of PPGC1 register is “0” (Software activation). Alternately, GATE signal becoming
“H” will activate ch1 PPG timer to start counting when bit14 (SST1) of PPGC1 register is “1” (Hardware
activation).
Once the operation has started, counting is terminated by writing '0' to bit 7 (PEN0) of PPGC0 or in bit
15 (PEN1) of PPGC1, or when the GATE signal changes to “L”. Once the counting is terminated, the
pulse output is maintained at the “L” level when it is positive polarity output. (the pulse output is
maintained at the “H” level when it is negative polarity output.)
In 8 + 8-bit PPG mode, do not set ch1 to be in operation while ch0 operation is stopped.
For software activation of 16-bit PPG mode, ensure to set bit 7 (PEN0) of PPGC0 register and bit 15
(PEN1) of PPGC1 register simultaneously to start or stop the PPG timer.
The Figure 12.4.4-1 below is a diagram of PPG output operation. During PPG operation, a pulse wave
is continuously output at a frequency and duty ratio (the ratio of the H-level period of the pulse wave to
the L-level period). PPG continues operation until stop is specified explicitly.
Figure 12.4.4-1 PPG output operation, output waveform
PEN
PPGx
T x (L+1)
T x (H+1)
L :
H
T
PRLL value
PRLH value
Input from peripheral clock (
,
/4,
/16)
or timer base counter (depending on the
clock selection by PPGC)
:
:
Output pin
Starts operation based on PEN (from L side).
When activate PPG timer by software
When activate PPG timer by hardware
GATE
PPGx
Output pin
Starts operation based on GATE signal “H”
SST
T x (L+1)
T x (H+1)