
ML62Q1000 Series User's Manual
Chapter 8 16-Bit Timer
FEUL62Q1000 8-19
8.3 Description of Operation
Two timer modes are available for the 16-bit timer:
ž
16-bit timer mode
ž
8-bit timer mode
8.3.1 16-Bit Timer Mode
When the THn8BM bit of the THnMOD register is set to "0", the timer operates in the 16-bit timer mode.
In the 16-bit timer mode, writing "1" to the THnRUN bit causes the 16-bit counter to start counting up in synchronization
with the rising edges of the timer clock.
If output of the general-purpose port is enabled by choosing the timer output (TMHnOUT) through the shared function
setting of the port, the output of the port is reversed when the timer count value matches with TMHnD register value. In
addition, writing "1" to the THnSTP bit during counting causes the counting to stop in synchronization with the timer
clock and the output of the port is reset to the initial value. For the the initial value of the port, "H" and "L" levels can be
chosen through the THnNEG bit of the HnMOD register.
In the 16-bit timer mode, following two operation modes are available:
ž
Repeat mode
ž
One-shot mode
8.3.1.1
Repeat Mode
Figure 8-3 shows the repeat mode operation in the 16-bit timer mode.
TMHnD
Register
value
TMHn
C
register
value
TMHnSTAT
TMHn Interrupt
TMHnOUT
Enable Port
Output
Start
timer
The count
value
matches
HiZ
Initial value
T
TMI
Stop
timer
Clear
TMHnC
Initial value
Figure 8-3 Repeat Mode Operation Timing in 16-Bit Timer Mode
In the repeat mode, when the timer count value matches with the TMHnD register, 16-bit timer n interrupt request
(TMnINT) is generated and the value of the port is reversed. Then, the timer count value automatically is reset to
"0x0000" and the counting up operation is resumed.
The TMnINT generation cycle and the port output reverse cycle can be expressed in the following formula:
T
TMI
=
TMHnD + 1
(n = 0 to 7)
THnCK (Hz)
TMHnD : TMHnD register setting value (0001H to 0FFFFH)
THnCK : Count clock frequency chosen in the TMHnMOD register
See Section 8.3.3.1 "Start/Stop Timing" for the timing of the timer start/stop and counting up. See Section 8.3.3.2
"External Input Count Timing" for the counting up timing when using the external input.
Содержание ML62Q1000 Series
Страница 17: ...Chapter 1 Overview...
Страница 112: ...Chapter 2 CPU and Memory Space...
Страница 154: ...Chapter 3 Reset Function...
Страница 166: ...Chapter 4 Power Management...
Страница 196: ...Chapter 5 Interrupts...
Страница 248: ...Chapter 6 Clock generation Circuit...
Страница 274: ...Chapter 7 Low Speed Time Base Counter...
Страница 291: ...Chapter 8 16 Bit Timer...
Страница 320: ...Chapter 9 Functional Timer FTM...
Страница 382: ...Chapter 10 Watchdog Timer...
Страница 402: ...Chapter 11 Serial Communication Unit...
Страница 456: ...Chapter 12 I2 C Bus Unit...
Страница 491: ...Chapter 13 I2 C Master...
Страница 512: ...Chapter 14 DMA Controller...
Страница 531: ...Chapter 15 Buzzer...
Страница 550: ...Chapter 16 Simplified RTC...
Страница 559: ...Chapter 17 GPIO...
Страница 594: ...Chapter 18 External Interrupt Function...
Страница 612: ...Chapter 19 CRC Generator...
Страница 632: ...Chapter 20 Analog Comparator...
Страница 644: ...Chapter 21 D A Converter...
Страница 655: ...Chapter 22 Voltage Level Supervisor...
Страница 676: ...Chapter 23 Successive Approximation Type A D Converter...
Страница 709: ...Chapter 24 Regulator...
Страница 714: ...Chapter 25 Flash Memory...
Страница 743: ...Chapter 26 Code Option...
Страница 750: ...Chapter 27 LCD Driver...
Страница 788: ...Chapter 28 On Chip Debug Function...
Страница 795: ...Chapter 29 Safety Function...
Страница 813: ...Appendix A...
Страница 881: ...Revision History...