![](http://datasheet.mmic.net.cn/330000/MB90F562_datasheet_16437954/MB90F562_290.png)
266
CHAPTER 11 16-BIT RELOAD TIMER
MB90560 series
11.6
11.6.1 Reload Mode (Internal Clock Mode)
Operation of the 16-Bit Reload Timer
Synchronized with the internal count clock, the 16-bit reload timer is used for counting
down of the 16-bit counter and generating an interrupt request to the CPU when the
counter is underflow. It can also output a toggle waveform to the timer output pin.
I
Operation in reload mode (internal clock mode)
When counting is enabled (TMCSR: CNTE = 1) and the timer is started by the software trigger
bit (TMCSR: TRG) or external trigger, the value of the reload register (TMRLR) is loaded into the
counter, and counting starts. If the count enable bit and software trigger bit are set to 1
simultaneously, counting starts simultaneously with the enabling of counting.
When an underflow of the counter value (from “0000
H
” to “FFFF
H
”) occurs, the value of the 16-bit
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 (INTE) bit 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.
G
Software trigger operation
When “1” is written to the TRG bit of the timer control status register (TMCSR), the counter is
started. Figure 11.6-4 shows software trigger operation in reload mode.
Figure 11.6-4 Count operation in reload mode (software trigger operation)
Count clock
Counter
Data load signal
UF bit
CNTE bit
TRG bit
TO pin
Reload data
Reload data
Reload data
Reload data
T: Machine cycle
* It takes 1T time from trigger input to loading of the reload data.