![](http://datasheet.mmic.net.cn/330000/MB90F562_datasheet_16437954/MB90F562_294.png)
270
CHAPTER 11 16-BIT RELOAD TIMER
MB90560 series
11.6
11.6.3 Event count mode
Operation of the 16-Bit Reload Timer
In the 16-bit reload timer, an input edge from the TIN pin is used to count down the 16-
bit counter and an interrupt request to the CPU is generated when the counter is
underflow. It can also output a toggle waveform or rectangular waveform to the TO pin.
I
Event count mode
When counting is enabled (TMCSR: CNTE = 1) and the counter is started (TMCSR: TRG = 1),
the value of the reload register is loaded into the counter. Counting down is then done every
time a valid edge (rising, falling, and both edges can be selected) of the pulse input to the TIN
pin (external count clock) is detected.
When the count enable bit and software trigger bit are set to “1” simultaneously, counting is
started simultaneously with the enabling of counting.
G
Operation in reload mode
When an underflow of the counter value (from “0000
H
” to “FFFF
H
”) occurs, the value of the
reload register (TMRLR) is loaded into the counter, and counting continues. If the underflow
interrupt request flag (UF) bit is set to “1” and the interrupt request enable bit (TMCSR: INTE) is
1, an interrupt request is generated.
The timer can also output to the TO pin a toggle waveform, which is inverted for each underflow.
Figure 11.6-10 shows counting in reload mode.
Figure 11.6-10 Count operation in reload mode (event count mode)
<Check>
Specify 4/
φ
(machine clock) or more for the “H” and “L” widths of the clock input to the TIN
pin.
Reload data
TIN pin
Counter
Data load signal
UF bit
CNTE bit
TRG bit
TO pin
Reload data
Reload data
Reload data
T: Machine cycle
* It takes 1T time from trigger input to loading of the reload data.