
ML610Q421/ML610Q422/ML610421User’s Manual
Chapter 9 1 kHz Timer (1kHzTM)
9 – 5
9.3 Description of Operation
By setting the T1KRUN bit of the 1kHz timer control register (T1KCON) to “1”, the 1kHz timer starts counting of the
1kHz timer counter registers L or H (T1KCRL, T1KCRH).
By dividing the T2KHz signal frequency (2.048kHz) of the low-speed timer base counter (LTBC) by the binary/ternary
counter, the timer generates a 1kHz signal. Based on the 1kHz signal, a 1kHz timer interrupt request signal (T1KINT) is
generated by the decimal counters of T1KCRL and T1KCRH. The period of the 1kHz timer interrupt can be selected
between the 10Hz interrupt or 1Hz interrupt using the T1KSEL bit of T1KCON.
When write operation is performed for T1KCRL or T1KCRH, the value of the binary/ternary counter and the value of
T1KCRL or T1KCRH is cleared to “0”.
Data can be read from T1KCRL and T1KCRH. When reading data from T1KCRL or T1KCRH in the 1kHz timer
operation start state, read T1KCRL or T1KCRH twice and check that the values match to prevent the reading of
undefined data during counting.
Figure 9-2 shows an example of the program for reading T1KCL and T1LCRH.
LEA offset T1KCRL ; EA
←
T1KCRL address
MARK:
L ER0, [EA]
; First read
L ER2, [EA]
; Second read
;
CMP ER0, ER1
; Comparison of T1KCRL and T1CKRH
BNE MARK
; To MARK when not matched.
;
:
Figure 9-2 Example of Program for Reading T1KCRL and T1KCRH
Содержание ML610421
Страница 1: ...ML610Q421 ML610Q422 ML610421 User s Manual Issue Date Feb 9 2015 FEUL610Q421 06...
Страница 15: ...Chapter 1 Overview...
Страница 44: ...Chapter 2 CPU and Memory Space...
Страница 49: ...Chapter 3 Reset Function...
Страница 53: ...Chapter 4 MCU Control Function...
Страница 69: ...Chapter 5 Interrupts INTs...
Страница 93: ...Chapter 6 Clock Generation Circuit...
Страница 110: ...Chapter 7 Time Base Counter...
Страница 121: ...Chapter 8 Capture...
Страница 129: ...Chapter 9 1 kHz Timer 1kHzTM...
Страница 135: ...Chapter 10 Timers...
Страница 160: ...Chapter 11 PWM...
Страница 172: ...Chapter 12 Watchdog Timer...
Страница 180: ...Chapter 13 Synchronous Serial Port...
Страница 195: ...Chapter 14 UART...
Страница 216: ...Chapter 15 I2 C Bus Interface...
Страница 231: ...Chapter 16 NMI Pin...
Страница 237: ...Chapter 17 Port 0...
Страница 246: ...Chapter 18 Port 1...
Страница 252: ...Chapter 19 Port 2...
Страница 259: ...Chapter 20 Port 3...
Страница 270: ...Chapter 21 Port 4...
Страница 282: ...Chapter 22 Port A...
Страница 290: ...Chapter 23 Melody Driver...
Страница 304: ...Chapter 24 RC Oscillation Type A D Converter...
Страница 327: ...Chapter 25 Successive Approximation Type A D Converter...
Страница 338: ...Chapter 26 LCD Drivers...
Страница 371: ...Chapter 27 Battery Level Detector...
Страница 378: ...Chapter 28 Power Supply Circuit...
Страница 381: ...Chapter 29 On Chip Debug Function...
Страница 384: ...Appendixes...
Страница 435: ...Revision History...