250
CHAPTER 11 16-BIT RELOAD TIMER
11.6.1 Internal Clock Mode (Reload Mode)
The 16-bit reload timer count downs the 16-bit down counter in synchronization with
the internal count clock and outputs an interrupt request when an underflow occurs
(change from "0000H" to "FFFFH"). It can also output a toggle waveform from the timer
output pin.
s Operation in Internal Clock Mode (Reload Mode)
While the count enable bit (CNTE) of the timer control status register (TMCSR) is set to "1", a
value stored in the 16-bit reload register (TMRLR0/TMRHR0, TMRLR1/TMRHR1) is loaded into
the 16-bit down counter, and then countdown starts in one of the following cases: the software
trigger bit (TRG) is set to "1", or a valid edge (rising, falling, or both edges) of the trigger input
specified in the operation mode setting bits (MOD2, MOD1, and MOD0) is input to the TIN pins.
When the CNTE bit and the software trigger bit are set to "1" simultaneously, countdown starts
as soon as counting is enabled.
When an underflow of the 16-bit down counter occurs (change from "0000H" to "FFFFH"), a
value stored in the 16-bit reload register (TMRLR0/TMRHR0, TMRLR1/TMRHR1) is loaded into
the 16-bit down counter and countdown continues.
An interrupt request is output when an
underflow of the 16-bit down counter occurs while the underflow interrupt request flag bit (UF) of
the timer control status register (TMCSR) is set to "1" and the underflow interrupt request
enable bit (INTE) is set to "1".
The timer can also output from the TO pin a toggle waveform, which is inverted for each
underflow.
r Software trigger operation
Counting starts when the software trigger bit (TRG) is set to "1" while the count enable bit
(CNTE) of the timer control status register (TMCSR) is set to "1".
Figure 11.6-4 Count Operation in Reload Mode (Software Trigger Operation)
Internal count clock
Counter
Data load signal
CNTE bit
UF bit
TRG bit
0000H
Reload data
TO pin
T: Machine cycle
* It takes 1T time from trigger input to loading of the reload data.
-1
Reload data
T*