Operations Of 8/16-Bit Ppg Timer - Fujitsu MB90480 Series Hardware Manual

F2mc-16lx 16-bit microcontroller
Table of Contents

Advertisement

15.5 Operations of 8/16-Bit PPG Timer

The 8/16-bit PPG timer contains an 8-bit PPG unit for six channels (PPG0/PPG1, PPG2/
PPG3, PPG4/PPG5). In addition to independent operation mode, the channels can also
be used in direct connection mode (PPG0 + PPG1, PPG2 + PPG3, and PPG4 + PPG5).
In total, three types of operation modes are therefore supported: independent
operation mode, 8-bit prescaler + 8-bit PPG mode and 16-bit PPG mode.
Outline of 8/16-bit PPG timer operation
Each 8-bit PPG unit has two 8-bit reload registers, one "L"side and the other "H"side register
(PRLL, PRLH).
The values in these registers are reloaded into the corresponding "L"/"H" sides of the 8-bit down
counter (PCNT) alternately and decremented at every count clock. The value of the output pin is
inverted at reloading when a counter borrow occurs. This operation ensures that the output pin
outputs pulses with an "L"/"H" width that corresponds to the reload register values.
Operation start or restart are initiated by setting the corresponding bit in the register.
The relationship between the reload operation and pulse output is shown below.
If bit4 (PIE0) of PPGC0 register is set to "1" and bit12 (PIE1) of PPGC1 is set to "1", 00
counter borrow for each counter (in 16-bit PPG mode, "0000
cause an interrupt request.
Operation mode
The 8/16-bit PPG timer has three operation modes: two-channel independent mode, 8-bit
prescaler/8-bit PPG mode, and 16-bit PPG mode (the MB90480/485 series has three channels
per mode). Two-channel independent mode allows the two channels to be used independently
as 8-bit PPGs. The PPG0 pin is connected to the PPG output of channel 0, and the PPG1 pin is
connected to the PPG output of channel 1 (PPG2 to PPG5 correspond to channels 2 to 5,
respectively).
8-bit prescaler/8-bit PPG mode is a mode in which channel 0 (channel 2 or channel 4) operates
as 8-bit prescaler while channel 1 (channel 3 or channel 5) is counted with a borrow output of
channel 0 (channel 2 or channel 4), which allows an 8-bit PPG waveform of an arbitrary interval
to be output. The PPG0 (PPG2 or PPG4) pin is connected with the prescaler output of channel
0 (channel 2 or channel 4), and the PPG1 pin is connected with the PPG output of channel 1
(channel 3 or channel 5).
16-bit PPG1 channel mode (the MB90480/485 series has 3 channels) is an operation mode in
which channel 0 and channel 1 are directly connected (direct connection between channels 2
and 3 respectively with channels 4 and 5) to allow 16-bit PPG operation. Both PPG 0 and PPG1
are connected with the 16-bit PPG output.
Reload operation
PRLH → PCNT
CHAPTER 15 8/16-BIT PPG TIMER
Pin output change
PPG0/1[0 → 1] rising
" to "FFFF
" counter borrow) will
H
H
→ FF
H
H
333

Advertisement

Table of Contents
loading

Table of Contents