0% found this document useful (0 votes)
535 views18 pages

Laboratory Manual: Analogue and Digital Communication Lab

This document provides instructions for Lab #11 on implementing analog to digital converters (ADCs) and digital to analog converters (DACs). The objectives are to understand the operation and characteristics of the ADC0804, ADC0809, and DAC0800 chips, and to implement an analog to digital converter using the ADC0804 and ADC0809 and a digital to analog converter using the DAC0800. It describes the basic operation of ADCs and DACs, quantization, successive approximation ADCs, and provides details on the ADC0804 chip including its pinout and specifications.

Uploaded by

Zain Haider
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
535 views18 pages

Laboratory Manual: Analogue and Digital Communication Lab

This document provides instructions for Lab #11 on implementing analog to digital converters (ADCs) and digital to analog converters (DACs). The objectives are to understand the operation and characteristics of the ADC0804, ADC0809, and DAC0800 chips, and to implement an analog to digital converter using the ADC0804 and ADC0809 and a digital to analog converter using the DAC0800. It describes the basic operation of ADCs and DACs, quantization, successive approximation ADCs, and provides details on the ADC0804 chip including its pinout and specifications.

Uploaded by

Zain Haider
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Analogue and Digital Communication Lab

(EL-323)

LABORATORY MANUAL

ENGR. IHTISHAM KHALID & ENGR. MUHAMMAD ASIM

Implementation of ADC and DAC


(LAB # 11)
Student Name: ______________________________________________

Roll No: ________________ Section: ____

Date performed: _____________, 2016

____________________________________________________________________________________________________________________________________________________________

NATIONAL UNIVERSITY OF COMPUTER AND EMERGING SCIENCES, ISLAMABAD

Prepared by: Engr. M. Asim, Engr. Ihtisham Khalid Version: 2.01


Last Edited by: Engr. M. Asim, Engr. Ihtisham Khalid
Verified by: Dr. Shahzad Saleem Updated: Fall 2016
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________
Lab # 11: Implementation of ADC and DAC
Learning Objectives:
1. To understand the operation theory of ADC and DAC
2. To understand the characteristics of ADC0804, ADC0809, and DAC0800
3. To implement the analog to digital converter using ADC0804 and ADC0809
4. To implement the digital to analog converter using DAC0800
Equipment Required:
1. ETEK Function Generator Board
2. ETEK DA-2000-04 Board
3. Oscilloscope
In, general, the continuous signal that we measure in voltage or current is called as analog signal. If
via a devide we can convert the analog signal to digital signal, then we call this device as analog to
digital converter (ADC). ADC can redure the effect of noise and by using the technique of coding,
ADC has the function of debugging. Also, digital signal can easily be stored.
The Operation Theory of ADC
Figure-1 is the characteristics curve of an ideal 3-bit ADC, analog input range is from 0 V to 1 V.
We can divide the input signal into 8 ranges, at each range all the analog values use the same binary
code to represent, and this binary code is corresponding with the mid value. Therefore during the
processing to converter, it consists of ± 1/2 least significant bit (LSB) quantization uncertainity or
quantization error. One of the methods to reduce the quantization error is to increase the number of
bits of the converter.

Figure-1: The ideal waveform of analog to digital converter

_____________________________________________________________________________________________
Page 2 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________
Quantization value (Q) means when the digital output changes 1 LSB, the required input voltage
value also changes, the expression is

FS 1
Q= n
= n
2 −1 2

2n −1 n
Where FS is the full scale, the value equals to
[ ]
2n
, 2 , 2n is defined as resolution, where n is the

ADC digital output bit, so larger the value of n, the higher the resolution. In general, the ADC
technical manual defines resolution in bits. For example, the resolution of ADC0804 is 8 bits.

The methods of conversion for ADC are various, normally can be divided as A/D conversion
methods are digital ramp ADC, successive approximation ADC, flash ADC and tracking ADC. In
this chapter, only the successive approximation ADC is discussed, therefore, we will discuss on the
operation theory of successive approximation of ADC.

Figure-2 is the block diagram of successive approximation ADC, which is provided with 8 bit
resolution. When we input the analog signal, sample-and-hold, S&H will circuit will capture the
input signal Vin to avoid any signal change during conversion period. At this moment, the control
logic will store all the bits and reset to “0”, follow by the most significant bit, MSB D 7 is set to “1”.
Thus, the output voltage of DAC is

n−1 2 n−1∗V ref V ref


V ( D )=2 ∗Q= =
2n 2

Figure-2: The basic block of successive approximation ADC

This voltage is half of the reference voltage Vref. If the input voltage Vin is higher than V(D), then
D7 remains at “1”, otherwise alters to “0”. Next make the second bit D 6 as “1”, after passing through
a DAC then obtain an output voltage V(D), at this moment capturing the new V(D), at this moment
comparing the new V(D) and Vin, if Vin is higher than V(D), then D 6 remains at “1” otherwise

_____________________________________________________________________________________________
Page 3 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________
alters to “0”. Similarly for the others until the comparison of D 7 to D0 have been completed, then we
can obtain the complete D7 to D0 digital output.

ADC0804 Analog to Digital Converter


ADC0804 is a 20 pin DIP package with an 8 bit resolution single channel IC. The analog input
voltage range is from 0 V to 5 V with single 5 V power supply, 15 mW power consumption and 100
us conversion time. As this IC contains 8 bit resolution, so it has 28=256 quantization steps, if the
reference voltage is 5 V, each step will be 5/256 = 0.01953 V. 00000000 (00H) represents 0.00 V
and 1111111 (FFH) represents 4.9805 V. This unadjusted error of ADC0804 is ± 1 LSB, which is
0.01953 V, which includes full scale error, offset error and non-linearity error.

Figure-3 shows the pin diagram of ADC0804. In figure-3, the D 0 to D7 of ADC0804 is the 8 bit
´ and RD
output pins, when CS ´ are low, the digital data will be sent to the output pins. In any pins of
´ and RD
CS ´ are high, then D0 to D7 are in floating condition.

Figure-3: The pin diagram of ADC0804

WR´ is the write control signal, when CS


´ and WR ´ are low, ADC0804 will do the clear action, when
WR backs to high, ADC will start the conversion. CLK IN (pin 4) is the clock input, the frequency
´
range starts from 100 KHz to 800 KHz. During the conversion period, INTR ´ is at high level and
then after the conversion completed, INTR ´ will alter to low. Pin 6 Vin(+) and pin 7 Vin(-) are
differential analog signal inputs, ordinarily used single input terminal and Vin(-) is connected to
ground. ADC0804 has two ground terminals, one is analog ground (A GND) and another one is
digital ground (D GND). Pin 9 (Vref/2) is ½ of the reference voltage, if pin 9 is floating, then the ½
reference voltage equals to power supply voltage Vcc. ADC0804 has a built in Schmitt trigger as
shown in figure-4. If we add a resistor and capacitor at CLK R (pin 19) and CLK IN (pin 4), then
we can generate the ADC operating time, where the frequency is

_____________________________________________________________________________________________
Page 4 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________

1
f CLK ≈ (Hz)
1.1∗R∗C

Figure-4: The internal circuit diagram of ADC0804

Therefore, we need not input an external clock signal to CLK IN terminal. We can determine the
clock signal by the external R and C via pin 4 and pin 19.

Figure-5 is the circuit diagram of ADC 0804 analog to digital converter, the analog signal input
range is controlled by VR2 and input through the Vin(+) terminal and at the same time, the Vin(-) is
short circuit. Vref/2 is provided by R1, R2 and VR1. C1 and R3 is used to control the clock of the
´ and RD
circuit, CS ´ are short circuit, so that the IC is enable, then let WR
´ and INTR
´ connect to SW1
in order to simulate the control signal.

Figure-5: The circuit diagram of ADC0804 circuit


ADC0809 Analog to Digital Converter

_____________________________________________________________________________________________
Page 5 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________
ADC0809 is a 28 bit DIP package, which has a 8-bit resolution and 8 channel multiplexer IC. It
operates with 5 V single power supply, the input signal analog range is from 0 V to 5 V and the
power consumption is 15 mW. The 8 channel multiplexer can directly access any of 8 single ended
analog signals. With 8 bit resolution, the ADC0809 have 28=256 quantization steps. Therefore for
the 5 V voltage power supply condition, each step is 5/256 V, so the quantization value (Q) is
0.01953 V. So 00000000 (00H) represents 0.00 V and 11111111 (FFH) represents (255/256)x5 =
4.9805 V. The unadjusted error is ± 1 LSB, which is same as 0.01953 V where it contains of full-
scale error, offset error, non linearity error and multiplexer error. ADC0809 needs a group of clock
input signals to operate, the frequency range of the clock signal starts from 10 KHz to 1280 KHz.
At 640 KHz clock frequency, the typical conversion time is 100 us.

Figure-6 is the pins diagram of ADC0809. In figure-6, the ADC0809 pins 5, 4, 3, 2, 1, 28, 27 and
26 are the 8 input ports, which is IN7 to IN0. Pins 21, 20, 19, 18, 8, 15, 14 and 17 are the output
ports, which are D7 to D0 and pin 10 is the clock input port. Pin 11 is the power supply Vcc input
port and pin 12 is the positive reference voltage Vref(+) input port. Normmally, pins 11 and 12 are
connected together. Pin 13 is grounded and pin 16 is the negative reference voltage V ref(-) input port
that normally connects to ground pin 13. The selection of channels are controlled by pins 25, 24 and
23 which are ADD A, ADD B and ADD C. If select pin 26 (IN 0) is used as input port, then connect
23, 24 and 25 to ground.

ADC0809 can be easily connected with microprocessor, where pin 6 (START), pin 7 (end of
conversion, EOC), pin 9 (output enable, OE) and pin 22 (address latch enable, ALE) are normally
used to control the ADC and the clock of data conversion of microprocessor. When ADC0809
conversion is finished, EOC can enable the central processing unit (CPU). When CPU is ready to
receive data, it will enable pin OE and read the data. After that enables ALE and START, to let the
ADC0809 continue the next conversion. If under the condition of using multi channel inputs, pin 23
(ADD C), pin 24 (ADD B) and pin 25 (ADD A), ALE and START must be set during the period of
enable.

Figure-6: The pins diagram of ADC0809

_____________________________________________________________________________________________
Page 6 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________
Figure-7 is the circuit diagram of ADC0809 ADC, where EOC (pin 7) output signal is the START
input signal, and the ALE and CLK output signal are the clock signal. The input signal range of
analog input port IN0 is determined by VR1. The IN1 and IN7 input signal ranges are determined
by R1 to R7, which is a group of resistor networks. The channel selection is controlled by SW1,
SW2 and SW3. We use LED to represent the digital output, therefore, LED “ON” represents “1”
and LED “OFF” represents “0”. The brightness of the LED depends on the current flowing through,
so it is related to the serial resistors pack.

Figure-7: The circuit diagram of ADC0809

The Operation Theory of DAC


Digital to analog conveter is a device which converts the digital signal to analog signal.
For exapmle, when a reciever recieves the digital modulated signal, then after demodulation, we
obtain the analog signal using DAC.

_____________________________________________________________________________________________
Page 7 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________

Basically. DAC is a digital code which represents digita value converted to analog voltage or
current. Below given figure 8 is s genral 4 bit DAC binary codes, the digital input terminal D 3, D2,
D1 and D0 are manipulated by the register in a digital system.

Figure-8: 4-bit DAC binary codes

The 4-bit code represents 24=16 group of 2 binary value, as shown in figure 9. For every binary
code input, DAC will output a voltage (Vout), which is double or other order of the binary value.

Figure-8: Truth-Table
Figure 9 is the basic block diagram of DAC. The reference voltage connects to the resistor network, while
the digital input codes are used to control the different switches and is decided whether the reference
voltage connects to resistor network or not. Normally, the DAC output is represented by current, if we wanr
to obtain the voltage the we need to connect an operational aamplifier.

_____________________________________________________________________________________________
Page 8 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________

Figure-9: Basic Block Diagram of DAC


The resistor network is R-2R ladder network which is shown below in Figure 10.

Figure-10: Circuit Diagram of DAC with 4-bit R-2R ladder resistor network

According to these characteristics, we can obtain the output current as

_____________________________________________________________________________________________
Page 9 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________
Where D3, D2, D1 and D0 can be divided into 0 and 1, if switch is on the 1 otherwise 0. So, we just need to
control the values of D3, D2, D1 and D0 correctly and we can get the required output current.

Input Weigtage:
From the DAC digitaal input, when only one of the bit is on and other bits are zero, the DAC output
signal range is called input weight. From figure 8, if every time, we let one of the bits D3, D2, D1 and D0 as
high level and the other bits are at zero level then the value of lowest bit D 0 is 1V, D1 is 2V, D2 is 4V, D3 is
8V. For every bit, the input wieght starts from the lowest bit and then increases by following the weight.
So, we can say that Vout is the sum of weight of the digital input. For example, to find the V out of digital
input 0111, we can sum D2, D1 and D0 bits weight and the total value is 4+2+1=7V.

Resolution and Step Size:


Resolution of DAC means, when the digital input terminal changes a unit, it will produce a small
change at the analog output terminal, which is normally the LSB levels. Resolution is also called step size
because Vout will change, when the digital input step varies from one to another.

DAC0800 Digital to Analog Converter:


DAC0800 is a cheap and commonly used 8-bit DAC, the internal circuit consists of reference voltage
power supply, R-2R ladder resistor network and transistor switch. The voltage power supply range is
± 4.5 V ¿± 18 V under the ± 5V condition. Figure 11 shows the pin diagram of DAC0800. Figure 12 shows
the circuit diagram of single polarity voltahe output, while D7 –D0 are the 8-bit digital inputs. The positive
reference voltage +5V passes through R1 to connet to V ref(+) (pin14). The negative refernce voltage is
GND and passes through R2 to connect to Vref (-)(pin15). The refernce current can be expresses as

_____________________________________________________________________________________________
Page 10 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________

Figure-11: The pins diagram of DAC0800

Figure-12: The Circuit diagram of DAC0800 single polarity voltage output

At the current output terminal(pin 4), the output current is

_____________________________________________________________________________________________
Page 11 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________

The objective to let the courretnt Iout to connecct with the amplifier is to convert the current into voltage. In
the abobe figure, the output voltage is

Figure 13 is the diagram of bipolar output voltage of DAC0800.

Figure-13: The Circuit diagram diagram of bipolar output voltage of DAC0800

So, the output voltage is

As

So,

Where, IFS is called the full scale current.

Where I out and Í out are in complementary relations, so when I out equals I FS Í out is zero.

_____________________________________________________________________________________________
Page 12 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________

Experiment 1: ADC0804 analog to digital converter

1. Refer to figure 7-5 on ETEK DA-2000-04 module, let J1 open circuit


2. Adjust the variable resistor VR1 and use thhe digital voltage meter to measure the voltage of Vref/2
input terminal (pin 9), then adjust VR1 until Vref/2 input terminal violtage is 2.5 V. At this
moment, ADC0804 analog voltage input range is 0 V to 5 V.
3. Adjust the variable resistor VR2 so that the input voltage of analog signal input terminal (which is
pin 9) is 0 V.
4. Let J1 short circuit and connect to the ground, then maintain the output digital signal. Observe on
the change of LED, LED “ON” represents “1”, LED “OFF” represents “0”, finally record the
measured results in table-1.
5. Let J1 open circuit, the digital output will be varied from the analog input signal.
6. Adjust VR2, so that the input voltage of the analog signal input terminal is similar to the values in
table-1, then repeat step 4 and step 5.

Table-1:
The measured results of ADC0804
Digital Output
Analog Input
Ideal Values Experimental Values
Voltages (V)
Binary Digits Binary Digits
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0

_____________________________________________________________________________________________
Page 13 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________

Experiment 2: ADC0809 analog to digital converter

1. Refer to figure 7-7 on ETEK DA 2000-04 module.


2. From CLK input terminal, input a 120 KHz frequency, 1V amplitude, and a square wave with 1 V
offset (i.e. high is 2 V, low is 0 V)
3. Let SW3, SW2 and SW1 switch to GND (push down the slide switch), at this moment, the analog
signal is inputted from the IN0 input.
4. Adjust VR1 so that the input voltage of the analog signal input terminal IN 0 is similar to the values
in table-2.
5. Observe on the changes of LED, LED “ON” represents “1”, LED “OFF” represents “0”, then record
the measured results in table-2.
6. Calculate the output voltage of the input terminal IN 1 to IN7, then record the measured results in
table-3.
7. Refer to table-3, by using SW3, SW2 and SW1, select the different input terminals (IN 1 to IN7) as the
analog input.
8. Observe on the changes of LED, then record the measured results in table-3

Table-2:
The measured results of ADC0809
Digital Output
Analog Input
Ideal Values Experimental Values
Voltages (V)
Binary Digits Binary Digits
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0

_____________________________________________________________________________________________
Page 14 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________

Table-3:
The measured results of ADC0809 multi-channel input
Digital Output
Analog Input (Ideal Value)
SW3 SW2 SW1 (Experimental Value)
Input Terminal Voltage (V) Binary Digits
GND GND +5 V IN1
GND +5 V GND IN2
GND +5 V +5 V IN3
+5 V GND GND IN4
+5 V GND +5 V IN5
+5 V +5 V GND IN6
+5 V +5 V +5 V IN7

Experiment 3: DAC0800 UNIPOLAR VOLTAGE OUTPUT


1. Refer to figure 8-6 on ETEK DA-2000-04 module, let J1 short circuit which means the Iout output
terminal (pin 4) of DAC0800 is connected to Vin(-ve) terminal (pin 2 ) of uA741.
2. Calculate the step size and record the calculation in table-4.
3. In table-4,the binary values are used as the digital inputs which is 0 means GND and 1 means 5V.
4. Calculate the theoratical values of output current and output voltage. Record the results in table-4.
5. Now let J1 open circuit and measure the output current using multimeter.
6. Now remove the current meter and let J1 short circuit and measure the output voltage.
7. Adjust the on/off of D7 to D0 , input the binary values in accordance with bonary values in tabl-4
and repeat step 5 and 6.

Experiment 4: DAC0800 BIPOLAR VOLTAGE OUTPUT


1. Refer to figure 8-7 on ETEK DA-2000-04 module, let J1 and J2 short circuit which means the I out
output terminal (pin 4) of DAC0800 is connected to Vin(-ve) terminal (pin 2 ) of uA741 and I ´out
output terminal (pin 2) of DAC0800 is connected to Vin(+ve) terminal (pin 3 ) of uA741
2. Calculate the step size and record the calculation in table-5.
3. In table-5,the binary values are used as the digital inputs which is 0 means GND and 1 means 5V.
4. Calculate the theoratical values of output voltage, current and full scale current using the above
given equations. Record the results in table-5.
5. Now let J1 open circuit, J2 short circuit and measure the output current Iout using multimeter.
6. Now let J2 open circuit, J1 short circuit and measure the output current I ´out using multimeter.
7. Calculate Iout+ I ´out and record the results in table-5.
8. Adjust the on/off of D7 to D0 , input the binary values in accordance with bonary values in tabl-5
and repeat step 5 and 6.
_____________________________________________________________________________________________
Page 15 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________

Table-4:
The measured results of DAC0800 unipolar output voltage

Table-5:
The measured results of DAC0800 bipolar output voltage

_____________________________________________________________________________________________
Page 16 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________

_____________________________________________________________________________________________
Page 17 of 18
Lab #
Analogue and Digital National University Roll No: __________
Communication Lab
(EL323)
of Computer and Emerging Sciences
Islamabad Fall 2016
11
____________________________________________________________________________________
Student's feedback (Try giving useful feedback, e.g. did this lab session help you in learning, how to
improve student's learning experience, was the staff helpful, etc):
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________

Student's Signature: _________________________________

Correctness of

TOTAL
AWARDED

Attitude

Neatness

Conclusion
Originality
Initiative
MARKS

TOTAL 10 10 10 20 20 30 100

EARNED

Lab Instructor's Comments:_______________________________________________________


_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________

Lab Instructor's Signature: _________________________________

_____________________________________________________________________________________________
Page 18 of 18

You might also like