
ML610Q421/ML610Q422/ML610421 User’s Manual
Chapter 24 RC Oscillation Type A/D Converter
24 – 19
<First Step>
Set the base clock to 32.768 kHz. (Write “00H” in FCON0.)
Preset “1000000H – nA0” in Counter A.
Preset “000000H” in Counter B.
Write “01H” in RADMOD to select Counter A reference mode and the oscillation mode that uses reference
resistance RS0.
Write “01H” in RADCON to start A/D conversion operation.
Write “1” in the HLT bit of SBYCON (see Chapter 4, “MCU”) to set the device to HALT mode.
Note:
In this example, nA0 is set to 4B0H because the gate time “nA0
t
BSCLK
” in oscillation mode with reference resistor RS0
is set to 0.3666 second. The value of nA0 is related to how much the margin of the quantizatoin error of the A/D
conversion is: the greater the nA0 value is, the smaller the margin of error becomes.
To reduce noise contamination to the RC oscillator circuit caused by CPU operation, it is recommended to constantly
put the device into HALT mode during operation of RC oscillation.
From this point of time, the RC oscillator circuit (RCOSC0) continues oscillation for about 0.366 second with the
reference resistance RS0. Then, when Counter A overflows, the RADINT signal is set to “1” and an RC-ADC
interrupt request is generated (section (a)). Also, the generation of interrupt request releases HALT mode (section (b))
and at the same time, A/D conversion operation stops (section (c), RARUN bit = “0”). At this time, Counter A is set
to “000000H”.
The content of Counter B at this time is expressed by the following expression:
nB0
=
nA0
t
BSCLK
……
Expression B
t
RCCLK
(RS0)
That completes the operations in First Step .
<Second Step>
Calculate “1000000H – nB0” from the content of Counter B “nB0” and set the obtained value in Counter B.
At this point, Counter A needs to be cleared; however, no processing is required since the counter is already set
to “000000H”.
Write “12H” in RADMOD to select Counter B reference mode and the oscillation mode that uses thermistor
RT0.
Write “01H” in RADCON to start A/D conversion operation.
Write “1” in the HLT bit of SBYCON (see Chapter 4, “MCU”) to set the device to HALT mode.
The RC oscillator circuit (RCOSC0) oscillates with thermistor RT0 from this point until Counter B overflows. This
period is equal to the product of “nB0” obtained in the First Step and the oscillation period t
RCCLK
(RT0) using RT0.
When Counter B overflows, the RADINT signal is set to “1” and an RC-ADC interrupt request is generated (section
(d)). Also, the generation of interrupt request releases HALT mode (section (e)) and at the same time, A/D conversion
operation stops (section (f), RARUN bit = “0”).
This completes the operations in Second Step .
The content of Counter A at this time becomes the A/D converison value nA1, which is expressed by the following
expression:
nA1
=
nB0
t
RCCLK
(RT0)
……
Expression C
t
BSCLK
From expressions B and C, nA1 is expressed by the following expression:
nA1
=
nA0
t
RCCLK
(RT0)
……
Expression D
t
RCCLK
(RS0)
Содержание ML610421
Страница 1: ...ML610Q421 ML610Q422 ML610421 User s Manual Issue Date Feb 9 2015 FEUL610Q421 06...
Страница 15: ...Chapter 1 Overview...
Страница 44: ...Chapter 2 CPU and Memory Space...
Страница 49: ...Chapter 3 Reset Function...
Страница 53: ...Chapter 4 MCU Control Function...
Страница 69: ...Chapter 5 Interrupts INTs...
Страница 93: ...Chapter 6 Clock Generation Circuit...
Страница 110: ...Chapter 7 Time Base Counter...
Страница 121: ...Chapter 8 Capture...
Страница 129: ...Chapter 9 1 kHz Timer 1kHzTM...
Страница 135: ...Chapter 10 Timers...
Страница 160: ...Chapter 11 PWM...
Страница 172: ...Chapter 12 Watchdog Timer...
Страница 180: ...Chapter 13 Synchronous Serial Port...
Страница 195: ...Chapter 14 UART...
Страница 216: ...Chapter 15 I2 C Bus Interface...
Страница 231: ...Chapter 16 NMI Pin...
Страница 237: ...Chapter 17 Port 0...
Страница 246: ...Chapter 18 Port 1...
Страница 252: ...Chapter 19 Port 2...
Страница 259: ...Chapter 20 Port 3...
Страница 270: ...Chapter 21 Port 4...
Страница 282: ...Chapter 22 Port A...
Страница 290: ...Chapter 23 Melody Driver...
Страница 304: ...Chapter 24 RC Oscillation Type A D Converter...
Страница 327: ...Chapter 25 Successive Approximation Type A D Converter...
Страница 338: ...Chapter 26 LCD Drivers...
Страница 371: ...Chapter 27 Battery Level Detector...
Страница 378: ...Chapter 28 Power Supply Circuit...
Страница 381: ...Chapter 29 On Chip Debug Function...
Страница 384: ...Appendixes...
Страница 435: ...Revision History...