![LAPIS Semiconductor ML610472 User Manual Download Page 101](http://html1.mh-extra.com/html/lapis-semiconductor/ml610472/ml610472_user-manual_3645865101.webp)
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.
Summary of Contents for ML610472
Page 12: ...Chapter 1 Overview...
Page 38: ...Chapter 2 CPU and Memory Space...
Page 44: ...Chapter 3 Reset Function...
Page 48: ...Chapter 4 MCU Control Function...
Page 62: ...Chapter 5 Interrupts...
Page 82: ...Chapter 6 Clock Generation Circuit...
Page 94: ...Chapter 7 Time Base Counter...
Page 105: ...Chapter 8 Capture...
Page 114: ...Chapter 9 Timer...
Page 133: ...Chapter 10 Watchdog Timer...
Page 141: ...Chapter 11 UART...
Page 164: ...Chapter 12 Port 0...
Page 173: ...Chapter 13 Port 2...
Page 180: ...Chapter 14 Port 3...
Page 188: ...Chapter 15 Port 4...
Page 199: ...Chapter 16 Port 6...
Page 205: ...Chapter 17 RC Oscillation Type A D Converter...
Page 225: ...Chapter 18 LCD Drivers...
Page 243: ...Chapter 19 Power Supply Circuit...
Page 245: ...Chapter 20 uEASE Flash Writer System...
Page 249: ...Chapter 21 Software Development...
Page 258: ...Appendixes...
Page 280: ...Revision History...