Fujitsu FR81S User Manual
CHAPTER 20: RELOAD TIMER
5. Operation
FUJITSU SEMICONDUCTOR LIMITED
CHAPTER : RELOAD TIMER
FUJITSU SEMICONDUCTOR CONFIDENTIAL
FUJITSU SEMICONDUCTOR CONFIDENTIAL
44
5.3.6. Compare Reload Operation
The compare reload operation is shown below.
When bit15, bit14:MOD[1:0] of the TMCSR register =10, and bit4:RELD of the TMCSR register =1, the
timer compares a counter value (TMR) to the value of TMRLRB for each down count and if a compare
matched (TMR = TMRLRB) is detected, a down count starts and the TOUT output will be inverted. When
an underflow occurs, the compare reload operation will be performed, in which a value is loaded from
TMRLRA again and the down count operation starts. A load onto the counter starts from TMRLRA.
timer compares a counter value (TMR) to the value of TMRLRB for each down count and if a compare
matched (TMR = TMRLRB) is detected, a down count starts and the TOUT output will be inverted. When
an underflow occurs, the compare reload operation will be performed, in which a value is loaded from
TMRLRA again and the down count operation starts. A load onto the counter starts from TMRLRA.
The value of TMRLRA indicates the counter interval from a timer activation until a reload and the value of
TMRLRB indicates the "H level width" after the TOUT output inverted from "L level output" to "H level
output".
TMRLRB indicates the "H level width" after the TOUT output inverted from "L level output" to "H level
output".
When TMR + 1 = TMRLRB, TOUT output will invert to the "H level" (when OUTL=0).
Figure 5-15 TOUT Interval, Pulse Width
From the start of a down count to TMR = TMRLRB (while TMR is greater than or equal to TMRLRB), the
following operation will be performed.
following operation will be performed.
⋅ TOUT output continues to hold the initial value.
⋅ Count continues
When a down count starts from TMR = TMRLRB, the following operation will be performed.
⋅ Inverts TOUT output.
⋅ Count continues.
(For the compare operation in interval timer mode, bit7:EF bit of TMCSR register will not be set.)
⋅ Count continues.
(For the compare operation in interval timer mode, bit7:EF bit of TMCSR register will not be set.)
If an underflow occurs, the following operation will be performed.
⋅ Sets bit2:UF bit of the TMCSR register.
⋅ When interrupts are enabled (bit3:INTE=1 of TMCSR register), an interrupt occurs.
⋅ When interrupts are enabled (bit3:INTE=1 of TMCSR register), an interrupt occurs.
⋅ Initializes TOUT output.
⋅ Reloads a value from TMRLRA.
⋅ The timer continues to count.
⋅ Reloads a value from TMRLRA.
⋅ The timer continues to count.
The operation of a compare feature depends on the relationship between TMRLRA and TMRLRB.
TOUT external pin output
Cycle = TMRLRA
H width = TMRLRB
MB91520 Series
MN705-00010-1v0-E
771