![LAPIS Semiconductor ML610472 User Manual Download Page 215](http://html1.mh-extra.com/html/lapis-semiconductor/ml610472/ml610472_user-manual_3645865215.webp)
ML610471/472/473/Q471/Q472/Q473 User's Manual
Chapter 17 RC Oscillation Type A/D Converter
17-10
17.3.2 Counter A/Counter B Reference Modes
There are the following two modes of RC-ADC conversion operation:
•Counter A reference mode (RADMOD RADI = “0”)
In this mode, a gate time is determined by Counter A and the base clock (BSCLK), which is used as the time reference,
then the RC oscillator clock (RCCLK) is counted by Counter B within the gate time to make the content of Counter B
the A/D conversion value.
The A/D conversion value is proportional to RC oscillation frequency.
•Counter B reference mode (RADMOD RADI = “1”)
In this mode, a gate time is determined by Counter B and the RC oscillator clock (RCCLK), and the base clock
(BSCLK), which is used as the time reference, is counted by Counter A within the gate time to make the content of
Counter A the A/D conversion value.
The A/D conversion value is inversely proportional to RC oscillation frequency.
(1) Operation in Counter A reference mode
Figure 17-3 shows the operation timing in Counter A reference mode.
Following is an example of operation procedure in Counter A reference mode:
c
Preset to Counter A (RADCA1 and RADCA0) the value obtained by subtracting the count value “nA0” from the
maximum value + 1 (10000H). The product of the count value “nA0” and the BSCLK clock cycle indicates the
gate time.
d
Preset “0000H” to Counter B (RADCB1 and RADCB0).
e
Set the OM3–OM0 bits of RADMOD to desired oscillation mode. (See Table 17-1.)
f
Set the RADI bit of RADMOD to “0” to specify generating of an interrupt request signal by Counter A overflow.
g
Set the RARUN bit of RADCON to “1” to start A/D conversion.
Counter A starts counting of the base clock (BSCLK) when RARUN is set to “1” and the RCON signal (signal
synchronized with the fall of the base clock) is set to “1”. When Counter A overflows, the RARUN bit is automatically
reset to “0” (
h
) and counting is terminated. At the same time, an RC-ADC interrupt request (RADIN) occurs (
i
).
When the RCON signal is set to “1”, the RC oscillator circuit starts operation and Counter B starts counting of the RC
oscillator clock (RCCLK). When the RARUN bit is reset to “0” due to overflow of Counter A, RC oscillation stops and
Counter B stops counting.
The final count value “nB0” of Counter B is the RCCLK count value during the gate time “nA0 x t
BSCLK
” and is
expressed by the following expression:
t
BSCLK
nB0
≅
nA0
•
t
RCCLK
∝
f
RCCLK
where t
BSCLK
indicates the BSCLK period and t
RCCLK
the RCCLK period. That is, “nB0” is a value proportional to the RC
oscillation frequency f
RCCLK
.
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...