ML63611 User’s Manual
Chapter 7 Timers (TIMER)
7 – 22
OPTION B (D): 1.5 V (3.0 V), With regulator
circuit for LCD bias
OPTION A (C): 1.5 V (3.0 V), Without regulator
circuit for LCD bias
Assuming that the ceramic oscillation clock is exactly 700 kHz, value N1 read from the timer counter register is:
N1 = 700000
×
437/32768
= 9335 (decimal)
= 2477 (hexadecimal)
= 0010 0100 0111 0111 (binary)
(truncated)
Because 437/32768 second is equivalent to 128 clocks at 9600 Hz (more precisely, 9598 Hz), a division of the
count by 128 provides the frequency ratio (N2) between 700 kHz and 9600 Hz. Because 128 = 2
7
, that can be
determined by merely truncating the righthand seven digits of N1 (binary), yielding
N2 = 9335/128 = 001001000 (binary)
= 48 (hexadecimal)
= 72 (decimal)
This indicates that 9600 Hz is about 72 times the cycle of 700 kHz, which means that the timer data register
should be set to FFB8H so that the counter overflows every 72 counts of the 700 kHz clock in auto-reload mode.
As a result, overflow produces a TM3INT cycle t
TM3INT
of
t
TM3INT
= 1/700000
×
72 = 0.102857 ms (9722 Hz)
In the same way, assuming that RC oscillation clock is 600 kHz due to manufacturing variation, we get
N1 = 600000
×
437/32768 = 8001 (decimal)
= 1F41 (hexadecimal)
= 0001 1111 0100 0001 (binary)
(truncated)
Truncating the righthand seven digits of N1 (binary), we get
N2 = 8001/128 = 000111110 (binary)
= 3E (hexadecimal)
= 62 (decimal)
Set the timer data register to FFC2H so that the counter overflows every 62 counts of the 600 kHz clock in auto-
reload mode. As a result, overflow produces a TM3INT cycle t
TM3INT
of
t
TM3INT
= 1/600000
×
62 = 0.10333 ms (9677 Hz)
In this way the frequency measurement mode can be applied to generate TM3INT signals with precision cycles.
These TM3INT signals can be supplied to the serial port as a baud rate clock.
Changing the value of N2 makes it possible to generate baud rates of 4800 Hz, 2400 Hz or user-defined rates.
The precision of the generated baud rate clock is within
±
2% for 9600 Hz, and within
±
1% for 4800 Hz or lower.
Summary of Contents for ML63611
Page 9: ...Chapter 1 Overview...
Page 33: ...Chapter 2 CPU and Memory Spaces...
Page 42: ...Chapter 3 CPU Control Functions...
Page 49: ...Chapter 4 Interrupt INT...
Page 62: ...Chapter 5 Clock Generator Circuit OSC...
Page 71: ...Chapter 6 Time Base Counter TBC...
Page 75: ...Chapter 7 Timers TIMER...
Page 99: ...Chapter 8 100 Hz Timer Counter 100HzTC...
Page 103: ...Chapter 9 Watchdog Timer WDT...
Page 108: ...Chapter 10 Ports INPUT I O PORT...
Page 140: ...Chapter 11 Melody Driver MELODY...
Page 152: ...Chapter 12 Serial Port SIO...
Page 179: ...Chapter 13 LCD Driver LCD...
Page 200: ...Chapter 14 Battery Low Detect Circuit BLD...
Page 204: ...Chapter 15 Power Supply Circuit POWER...
Page 215: ...Chapter 16 A D Converter ADC...
Page 238: ...Appendixes...