Fujitsu MB90480 Series Hardware Manual page 356

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

CHAPTER 15 8/16-BIT PPG TIMER
PPG output operation
For the 8/16-bit PPG timer, PPG operation of channel 0 (channel 2 or channel 4) is started by
setting bit7 of the PPGC0 register (PEN0) to "1". Similarly, PPG operation of channel 1 (channel
3 or channel 5) is started by setting bit15 of the PPGC1 register (PEN1) to "1" to start counting.
By subsequently setting bit7 of the PPGC0 register (PEN0) or bit15 of the PPGC1 register
(PEN1) to "0", the count operation is stopped, and the pulse output level is fixed at "L" level.
In 8-bit prescaler/8-bit PPG mode, do not set channel 0 (channel 2 or channel 4) in stop mode
and channel 1 (channel 3 or channel 5) to active mode.
In 16-bit PPG mode, use bit7 of the PPGC0 register (PEN0) and bit15 of the PPGC1 register
(PEN1) to control simultaneous start or stop of operation.
In the following, the operation for PPG output is described.
During PPG operation, a pulse wave with an arbitrary interval and duty ratio (ratio of "H" level
pulse wave to "L" level pulse wave) is repeatedly output. After that, the PPG will not stop until
operation stop is specified.
Figure 15.5-1 shows the output waveform during PPG output operation.
Figure 15.5-1 Output waveform during PPG output operation
PEN
Output pin PPG
Relationship between reload value and pulse width
The width of the output pulse can be calculated by adding 1 to the reload register value, and
multiplying the result by the count clock interval. In other words, if the reload register value
during 8-bit PPG operation is "00
will be equal to one interval length of the count clock. If the reload register value during 8-bit
PPG operation is "FF
reload register value during 16-bit PPG operation is "FFFF
intervals of the count clock. The pulse width is expressed with the formula below:
= T ✕ (L + 1)
P
L
= T ✕ (H + 1)
P
H
P
: Width of "L" pulse
L
P
: Width of "H" pulse
H
T : Input clock interval
L
: PRLL value
H : PRLH value
334
Operation start by PEN (from L side)
T × (L + 1)
T × (H + 1)
(Start)
", or that in 16-bit PPG operation is "0000
H
", the pulse width is equal to 256 intervals of the count clock, and if the
H
L : PRLL value
H : PRLH value
T : peripheral clock
(by PPGC clock selection)
H
" the pulse width is equal to 65,536
H
", the pulse width

Advertisement

Table of Contents
loading

Table of Contents