Lab 1 Analog To Digital Conversion
Lab 1 Analog To Digital Conversion
DENT 3563
TELECOMMUNICATION ENGINEERING
LAB SESSION 1
1. Module KL–94001
2. Digital Multimeter
3. Power Supply
4. Oscilloscope
5. Function Generator
3. THEORY
In electronics, an analog-to-digital converter (ADC) is a system that converts an analog
signal, such as a sound picked up by a microphone or light entering a digital camera, into a
digital signal. An ADC may also provide an isolated measurement such as an electronic
device that converts an input analog voltage or current to a digital number representing the
magnitude of the voltage or current.
2
The normal operation proceeds as the samples and hold circuit is used to retain the
analog input voltage Vi that present at a given time before the conversion starts and
maintain it constant to avoid and change during the conversion period. The control logic
sets the most significant bit (MSB) D7 of register to 1, with all other bits to 0. The digital–
to–analog converter convert the binary codes into analog output V(D), and which can be
evaluated by:
1
𝑉(𝐷) = 𝐿 × 𝑄 = 𝑉𝑟𝑒𝑓
2
where: L is the quantization level
Q is the quantization value (or quantum) and given that:
𝐹𝑆
𝑄=
2𝑛 −1
and
(2𝑛 − 1)
𝐹𝑆 = [ ]
2𝑛
The DAC output, V(D) is just a half of the reference voltage, Vref. The comparator
compares the V(D) with the analog input Vi. If Vi > V(D), the 1 remains in D7. If Vi <
V(D), the 1 is removed from D7 and it tries the next most significant bit D6. Thus a 1 is
tried in each bit of register output until at the end of the process of binary equivalent of Vi
is obtained.
3
The analogue input signal is connected to Vin(+) input and the amplitude is controlled
by VR2. Another input Vin(–) is connected to ground. The reference voltage to the Vref/2
(pin 9) is provided by +5V with the voltage divider containing R1, R2 and VR1. The
combination of C1 and R3 determines the clock frequency. The CS (pin 1) and RD (pin 2)
are directly connected to ground to enable the ADC. For convenience the WR (pin 3) and
INTR (pin 5) are wired to the switch SW1 to stimulate the control signal.
A practical ADC circuit with the ADC0809 is shown in Figure 3. The EOC (end of
conversion) pin is directly connected to the START pin. This uses the EOC output signal
to start the ADC0809. The clock pulses are applied to ALE (address latch enable) and CLK
pins to control the ADC operation. The magnitude of the analogue voltage to IN0 input is
controlled by adjusting the VR1, whereas those of other input (IN1 to IN7) are determined
by the voltage divider network (R1 to R7). The analogue channel inputs are selected by
states of SW1, SW2 and SW3. The LED display indicates the states of digital outputs.
4
4. PROCEDURE
2. Using DMM, measure voltage Vref/2 input (pin 9) and slowly adjust VR1 until the
measured voltage reaches 2.5V. This will set the ADC0804 analogue voltage input
range from 0V to 5V.
3. Measure the analog input (pin 6) and slowly adjust VR2 until the measured voltage
reaches 0V.
4. Insert connecting plug into J1. This will hold the digital outputs. Observe LED
states and record the results in Table 1.
5. Remove connecting plug from J1. The digital output will vary with the change of
analogue input.
6. Carefully and adjust VR2 to get other analogue input voltages output as listed in
Table 1 by repeating steps 4 and 5.
2. Set function generator to 120 kHz, 2.5V square wave with 2.5Vmax offset (high =
2.5V, low = 0V) and connect to the clock input (CLK).
3. Set the switches SW1, SW2 and SW3 to GND position. The analog signal will come
to the IN0 input port.
5. Observe the LED display states for each analogue input and record the results in
Table 2.
6. Calculate the input voltage at input port IN1 to IN7 and record results in Table 3.
7. Set the positions of switches SW1, SW2 and SW3 listed in Table 3 to assign an
input port (IN1 to IN7) as the analogue input each time.
5
5. RESULTS
Table 1
Digital Output
Analogue
Voltage Calculated Value Measured Value
Input (V)
Binary Hexadecimal Binary Hexadecimal
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
Table 2
Digital Output
Analogue
Voltage Calculated Value Measured Value
Input (V)
Binary Hexadecimal Binary Hexadecimal
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
6
Table 3
6. QUESTIONS
1. What is the function of R3 and C1 in ADC0804 circuit of Figure 2?
2. What is the function of switches SW1, SW2 and SW3 in ADC0809 of ADC circuit in
Figure 3?