
ML62Q1000 Series User's Manual
Chapter 8 16-Bit Timer
FEUL62Q1000 8-25
8.3.2.3
Setting Example
Figure 8-8 shows a setting example when using the 8-bit timer mode.
Start
Timer mode setting
Timer stop
confirmation
End
In the case change the setting
Enable interrupt
Timer data register
setting
Clear timer counter
Start timer
Confirm the corresponding bit of TMHSTAT register is “0”
Specify the timer mode, timer operation mode, timer clock, count clock
and the timer output logic in the THnMOD register.
THn8BM=1
;
// 8-bit timer mode
Stop timer
Repeat mode or
One shot mode
operation
Set a comparison value into TMHnD register that is to be compared with
TMHnC register
QTMn=0;
Reset corresponding bits of IRQ45 register and IRQ67 register to “0”.
ETMn=1;
Set corresponding bits of IE45 register and IE67 register to “1”.
TMHnC=0x0000; Write a data into the TMHnC register
Set corresponding bits of TMHSTR register to “1”.
Upper side 8-bit timer
THnHRUN=1;
Upper side 8-bit timer
THnRUN=1;
Timer output port
setting
High-speed clock
setting
Choose TMHnOUT as the shared function and specify enabling the
output by the PnMODxx register.
Need when using the high-speed clock (HSCLK) for the timer clock
Clear timer interrupt
THnHIC=1;
THnLIC=1;
Clear the interrupt by writing TMHnIC register to “1”.
Set corresponding bits of TMHSTP register to “1”.
Higher byte side 8-bit timer
THnHSTP=1;
Lower byte side 8-bit timer
THnSTP=1;
Figure 8-8 Setting Example of 8-Bit Timer Mode
Содержание 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...