ML610471/472/473/Q471/Q472/Q473 User's Manual
Chapter 9 Timer
9-14
(7) When (T23MFM bit == "1") and (TM23M16 bit == "1") and (T2RUN bit == "1"),
the count up starts with the falling of the 64Hz clock signal.
(8) The count-up stops at the falling edge of the next timer clock (HTBCLK) after 437C signal becomes “1”.
Also, at the same time, T2RUN bit and T2STAT bit become “0” and the interrupt signal TM3INT activates.
The 437C signal is the pulse signal that rises in 437/32768 seconds after the falling of the 64Hz signal.
(9) After checking T2STAT bit or TM3INT interrupt occurs, read out the data (N1) of TM2C register and TM3C
register.
For example of utilizing N1, 9600Hz timer interrupt is generated.
Assuming a low-accuracy high-speed clock (HTBCLK) is exactly 600kHz, then the count value N1 is:
N1 = 600000 × 437 / 32768
= 8001 (Decimal)
= 1F41 (Hexadecimal)
= 0001 1111 0100 0001 (Binary)
Because 437/32768 seconds are equivalent to 128 clocks at 9600 Hz (more precisely, 9598 Hz),
dividing the count value NI by 128 provides the frequency ratio (N2) between the HTBCLK and 9600 Hz.
Because 128 = 2^7, this calculation can be solved by truncating the right-hand seven digits of N1 (Binary), that is:
N2 = 8001(Decimal) / 128 (Decimal)
=0001 1111 0 (Binary)
=3E (Hexadecimal)
=62 (Decimal)
This indicates that 9600Hz is about 62 times the cycle of HTBCLK.
Therefore, for an operation in the timer mode where the timer data register is set to
3EH – 1 = 3DH to overflow the counter every 62 counts of the HTBCLK clock,
the TMnINT interrupt signal cycle tTMnINT is:
tTMnINT = 1 / 600000 × 62 = 0.10333ms(9677Hz)
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...