English
Language : 

4524 Datasheet, PDF (48/161 Pages) Renesas Technology Corp – SINGLE-CHIP 4-BIT CMOS MICROCOMPUTER
4524 Group
(1) A/D control register
• A/D control register Q1
Register Q1 controls the selection of A/D operation mode and the
selection of analog input pins. Set the contents of this register
through register A with the TQ1A instruction. The TAQ1 instruc-
tion can be used to transfer the contents of register Q1 to register
A.
• A/D control register Q2
Register Q2 controls the selection of P20/AIN0–P23/AIN3. Set the
contents of this register through register A with the TQ2A instruc-
tion. The TAQ2 instruction can be used to transfer the contents of
register Q2 to register A.
• A/D control register Q3
Register Q3 controls the selection of P30/AIN4–P33/AIN7. Set the
contents of this register through register A with the TQ3A instruc-
tion. The TAQ3 instruction can be used to transfer the contents of
register Q3 to register A.
(2) Operating at A/D conversion mode
The A/D conversion mode is set by setting the bit 3 of register Q1 to “0.”
(3) Successive comparison register AD
Register AD stores the A/D conversion result of an analog input in
10-bit digital data format. The contents of the high-order 8 bits of
this register can be stored in register B and register A with the
TABAD instruction. The contents of the low-order 2 bits of this reg-
ister can be stored into the high-order 2 bits of register A with the
TALA instruction. However, do not execute these instructions dur-
ing A/D conversion.
When the contents of register AD is n, the logic value of the com-
parison voltage Vref generated from the built-in DA converter can
be obtained with the reference voltage VDD by the following for-
mula:
(4) A/D conversion completion flag (ADF)
A/D conversion completion flag (ADF) is set to “1” when A/D con-
version completes. The state of ADF flag can be examined with the
skip instruction (SNZAD). Use the interrupt control register V2 to
select the interrupt or the skip instruction.
The ADF flag is cleared to “0” when the interrupt occurs or when
the next instruction is skipped with the skip instruction.
(5) A/D conversion start instruction (ADST)
A/D conversion starts when the ADST instruction is executed. The
conversion result is automatically stored in the register AD.
(6) Operation description
A/D conversion is started with the A/D conversion start instruction
(ADST). The internal operation during A/D conversion is as follows:
➀ When the A/D conversion starts, the register AD is cleared to
“00016.”
➁ Next, the topmost bit of the register AD is set to “1,” and the com-
parison voltage Vref is compared with the analog input voltage
VIN.
➂ When the comparison result is Vref < VIN, the topmost bit of the
register AD remains set to “1.” When the comparison result is Vref
> VIN, it is cleared to “0.”
The 4524 Group repeats this operation to the lowermost bit of the
register AD to convert an analog value to a digital value. A/D con-
version stops after 62 machine cycles (31 µs when f(XIN) = 6.0
MHz in high-speed through mode) from the start, and the conver-
sion result is stored in the register AD. An A/D interrupt activated
condition is satisfied and the ADF flag is set to “1” as soon as A/D
conversion completes (Figure 34).
Logic value of comparison voltage Vref
Vref = VDD ✕ n
1024
n: The value of register AD (n = 0 to 1023)
Table 13 Change of successive comparison register AD during A/D conversion
At starting conversion
1st comparison
2nd comparison
3rd comparison
Change of successive comparison register AD
-------------
1
0
0 ----- 0
0
0
-------------
-------------
✼1
1
0 ----- 0
0
0
-------------
-------------
✼1 ✼2
1
----- 0
0
0
-------------
After 10th comparison
completes
A/D conversion result
-------------
✼1 ✼2 ✼3 ----- ✼8 ✼9 ✼A
-------------
✼1: 1st comparison result
✼3: 3rd comparison result
✼9: 9th comparison result
✼2: 2nd comparison result
✼8: 8th comparison result
✼A: 10th comparison result
VDD
2
VDD
2
VDD
2
VDD
2
Comparison voltage (Vref) value
VDD
±
4
VDD
VDD
± 4 ±8
±
○
○
○
○
±
VDD
1024
Rev.2.00 Jul 27, 2004 page 48 of 159
REJ03B0091-0200Z