
ML610471/472/473/Q471/Q472/Q473 User's Manual
Chapter 7 Time Base Counter
7-7
7.3 Description of Operation
7.3.1 Low-speed Time Base Counter
The low-speed time base counter (LTBC) starts counting from 0000H on the LSCLK falling edge after system reset.
The T128HZ, T32HZ, T16HZ, and T2HZ outputs of LTBC are used as time base interrupts and an interrupt is requested
on the falling edge of each output. Each of LTBC outputs is also used as an operation clock for peripheral circuits.
The output data of T128HZ to T1HZ of LTBC can be read from the low-speed time base counter register (LTBR). When
reading the data, read LTBR twice and check that the two values coincide to prevent reading of undefined data during
counting.
Figure 7-3 shows an example of program to read LTBR.
LEA
offset
LTBR
;
EA LTBR
address
MARK:
L
R0,
[EA]
; 1st read
L
R1, [EA]
;
2nd
read
;
CMP
R0, R1
;
Comparison
for
LTBR
BNE
MARK
; To MARK when the values do not coincide
;
:
Figure 7-3 Programming Example for Reading LTBR
LTBR is reset when write operation is performed and the T128HZ to T1HZ outputs are set to “0”. Write data is invalid.
Since an interrupt occurs if a falling edge occurs in the T128Hz to T2HZ outputs during writing to LTBR, take care in
software programming.
Figure 7-4 shows interrupt generation timing and reset timing of the time base counter output by writing to LTBR.
Figure 7-4 Interrupt Timing and Reset Timing by Writing to LTBR
LTBR Write
T1HZ
T2HZ
T4HZ
T8HZ
T16HZ
T32HZ
T64HZ
T128HZ
T256HZ
T16HZ
Indicates interrupt timing.
Содержание ML610471
Страница 12: ...Chapter 1 Overview...
Страница 38: ...Chapter 2 CPU and Memory Space...
Страница 44: ...Chapter 3 Reset Function...
Страница 48: ...Chapter 4 MCU Control Function...
Страница 62: ...Chapter 5 Interrupts...
Страница 82: ...Chapter 6 Clock Generation Circuit...
Страница 94: ...Chapter 7 Time Base Counter...
Страница 105: ...Chapter 8 Capture...
Страница 114: ...Chapter 9 Timer...
Страница 133: ...Chapter 10 Watchdog Timer...
Страница 141: ...Chapter 11 UART...
Страница 164: ...Chapter 12 Port 0...
Страница 173: ...Chapter 13 Port 2...
Страница 180: ...Chapter 14 Port 3...
Страница 188: ...Chapter 15 Port 4...
Страница 199: ...Chapter 16 Port 6...
Страница 205: ...Chapter 17 RC Oscillation Type A D Converter...
Страница 225: ...Chapter 18 LCD Drivers...
Страница 243: ...Chapter 19 Power Supply Circuit...
Страница 245: ...Chapter 20 uEASE Flash Writer System...
Страница 249: ...Chapter 21 Software Development...
Страница 258: ...Appendixes...
Страница 280: ...Revision History...