ML63611 User’s Manual
Chapter 16 A/D Converter (ADC)
16 – 15
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
<First Step>
①
Set the system clock to 32.768 kHz (write 0H to FCON), if using High-speed clock as system clock.
②
Set “80,000 – nA0” to Counter A.
Note:
nA0 is taken as 12,000 in order to set the gate time nA0
•
t
SYSCLK
of oscillation mode of the reference resistance
RS0 as 0.366 second. The value of nA0 depends on the size of quantum error of A/D conversion and the larger
nA0, the smaller the error.
③
Clear Counter B to “0000H”.
④
Write “1H” to ADCON1 and set it to oscillation mode with reference resistance RS0.
⑤
Write “4H” to ADCON0 to set the internal power supply voltage as the power supply voltage.
⑥
Wait for about 120
µ
s, then write “5H” to ADCON0 to start operation of Counter A reference mode.
Note:
The order of
➀
to
➃
is arbitrary.
For step
➄
, set STV (bit 2 of ADCON0) to “1” after setting the halver circuit to “turned OFF" (set bit 0 of VHCON to
“0”). Next, wait for about 120
µ
s and then set EADC to “1”. In the OPTION A and OPTION B, the setting of
VHCON is not required.
⑦
Execute the HALT instruction to enter the halt mode.
Note:
By selecting halt mode, noise to the RC oscillation circuit may be reduced. In regular usage, halt mode is
recommended during RC oscillation operation.
The RC oscillation circuit (CROSC0) continues oscillation with reference resistance RS0 for about 0.366 second
at this time and when Counter A overflows, the ADINT signal is set to “1” and the A/D converter interrupt request
is generated ([a]). By the generation of the interrupt request, halt mode is released ([b]) and the A/D conversion
operation is stopped ([c]; the EADC bit = 0). At this moment, Counter A is in 00000 state.
The contents of Counter B are expressed as
nB0 = nA0 • - - - - - equation (b)
<Second Step>
⑧
Calculate “4000H – nB0” by the contents “nB0” of Counter B and set that value to Counter B.
Note:
Although clearing of Counter A is needed, additional processing is not necessary as it is already in “00000” state.
⑨
Write “2H” to ADCON1 and start oscillation mode with thermistor RT0.
!
!
!
t
SYSCLK
t
OSCCLK
(RS0)
!
Содержание ML63611
Страница 9: ...Chapter 1 Overview...
Страница 33: ...Chapter 2 CPU and Memory Spaces...
Страница 42: ...Chapter 3 CPU Control Functions...
Страница 49: ...Chapter 4 Interrupt INT...
Страница 62: ...Chapter 5 Clock Generator Circuit OSC...
Страница 71: ...Chapter 6 Time Base Counter TBC...
Страница 75: ...Chapter 7 Timers TIMER...
Страница 99: ...Chapter 8 100 Hz Timer Counter 100HzTC...
Страница 103: ...Chapter 9 Watchdog Timer WDT...
Страница 108: ...Chapter 10 Ports INPUT I O PORT...
Страница 140: ...Chapter 11 Melody Driver MELODY...
Страница 152: ...Chapter 12 Serial Port SIO...
Страница 179: ...Chapter 13 LCD Driver LCD...
Страница 200: ...Chapter 14 Battery Low Detect Circuit BLD...
Страница 204: ...Chapter 15 Power Supply Circuit POWER...
Страница 215: ...Chapter 16 A D Converter ADC...
Страница 238: ...Appendixes...
Страница 271: ...ML63611 User s Manual First Edition May 2001 Second Edition June 2001 2001 Oki Electric Industry Co Ltd PEUL63611 02...