![](http://datasheet.mmic.net.cn/330000/MB90F562_datasheet_16437954/MB90F562_362.png)
338
CHAPTER 12 MULTI-FUNCTION TIMER
MB90560 series
I
Interrupts
An interrupt request is generated when the reload value is counted out and a underflow occurs.
In 8-bit PPG 2ch independent mode or 8 + 8-bit PPG mode, an interrupt request is generated by a
underflow in each counter. In 16-bit PPG mode, PUF0 and PUF1 are set simultaneously by a
underflow in the 16-bit counter. Therefore, enable only PIE0 or PIE1 to unify the interrupt causes. In
addition, simultaneously clear the interrupt causes for PUF0 and PUF1.
I
Reload register write timing
In any operation mode other than 16-bit PPG mode, it is recommended to use a word transfer
instruction to write data in reload registers PRLL and PRLH. If two byte transfer instructions are used to
write a data item to these registers, a pulse of unexpected width may be output depending on the
timing.
Figure 12.4.4-3 Write timing chart
Assume that PRLL is updated from A to C before point
x
in the time chart above, and PRLH is
updated from B to D after point
x
. Since the PRL values at point
x
are PRLL=C and PRLH=B, a pulse
of L side count value C and H side count value B is output only once.
Similarly, to write data in PRL of ch0 and ch1 in 16-bit PPG mode, use a long word transfer instruction,
or use word transfer instructions in the order of ch0 and then ch1. In this mode, the data is only
temporarily written to ch0 PRL. Then, the data is actually written into ch0 PRL when the ch1 PRL is
written to.
In any operation mode other than 16-bit PPG mode, ch0 and ch1 PRL are written independently.
Figure 12.4.4-4 PRL write operation block diagram
PPG0
B
B
C
C
A
A
D
D
C
B
x
ch0 PRL write data
ch0 write in a mode
other than 16-bit PPG
mode
Temporary latch
Transferred in
ynchronization with
ch1 write in
16-bit PPG mode
ch1 PRL write data
ch0 PRL
ch1 write
ch1 PRL