Lab Exercise 6: Digital/Analog conversion Introduction In this lab exercise, you will study circuits for analog-to-digital and digital-to-analog conversion Preparation Before arriving at the lab, you should do the following: Review the lecture notes and handouts. Read through the lab, and plan the circuits for each section. Lab setup For this lab, you will need the following equipment An experiment breadboard A pulse generator and a function generator An ADC0809 analog-to-digital converter IC A DAC08 digital-to-analog converter Exercises 1. Analog-to-digital converter (ADC) Read and consult the data sheet for the ADC0809 IC for this portion of the lab. Mount the ADC on your breadboard, and connect the power and ground pins to +5V and GND, respectively. You will need an analog voltage signal to test. For this part of the lab connect a potentiometer between +5V and GND to create an adjustable input to the ADC. The ADC has eight selectable inputs (IN0 to IN7), but for this lab only one is needed. Connect your analog input to IN0. You can leave the other inputs unconnected. Select input IN0 by setting all three input address pins (ADD A, B, C) to zero (GND). To let this address be latched into the ADC, connect the address latch enable pin (ALE) to high (+5V).
The ADC needs two reference voltages (Vref+ and Vref-) to set the absolute measurement scale. Since we want to make measurements in the range 0 to 5V, connect the two Vref pins to +5V and ground, respectively. The ADC requires a clock signal as input to perform the conversion. With your function generator, generate a square wave with frequency around 600 khz. Use the offset knob to keep the output between 0 and 5V. When you have a good clock signal, connect it to the clock input pin of the ADC. To begin a new conversion, the start conversion pin (SC) must be set high. At the end of the conversion, the ADC sets the end of conversion (EOC) pin to high. For continual conversion of your input signal, connect the EOC output to the SC input, so that the end of each conversion automatically starts a new one. Enable the digital output pins D0 to D7 must be enabled by setting the output-enable (OE) pin to high (+5V). Otherwise the output pins will be high impedance. To read the output, connect eight LEDs from the digital output pins to GND. The internal resistance of the TTL outputs lets them drive a single LED without needing a current-limiting resistor. A lit LED is logic 1 and an unlit is 0. In this way you can read the binary-encoded result, from the most-significant bit (MSB) down to the leastsignificant bit (LSB). Power up and test your design. Measure the binary output for a few different analog input voltages between 0 and +5V, and record your results here: Input Voltage Binary output Decimal value
Plot your measurements and fit a line to your results (10 points or so between 0V and 5V). How linear is the ADC scale? ADC output (counts) Input voltage (V)
2. Digital-to-analog conversion Now connect and test a highspeed multiplying D/A converter IC. Read and consult the data sheet for the DAC08 for this portion of the lab. Connect V+ and V- to +5V and -5V, respectively. The DAC requires eight parallel digital signals as input. Disconnect the LEDs from your ADC circuit from section 1 and connect the ADC outputs directly to your DAC inputs (output 0 to input 0, 1 to 1, and so on). Leave the logic threshold control pin (VLC) unconnected. Like the ADC, a DAC also needs a reference voltage or current to set the output scale. In the case of the DAC08, you will want to set a reference current of about 2 ma using the reference voltage to set the output scale. To do this, connect a 2.7k resistor between the +5V and the positive reference voltage input, and a second 2.7k resistor between GND and the negative reference voltage input. The compensation input (COMP) may be left unconnected. The output pins drive current, instead of voltage. The maximum value of IO is 2 ma. To produce an output voltage from these currents, connect 2.7k pull-up resistors from both the non-inverted and inverted IO outputs to +5V. Draw a schematic of your DAC circuit below. You should plan this before coming to the lab:
Finally, test your circuit with a few ADC input voltages, and record the resulting output voltage from your DAC circuit Plot your measurements and fit a line to your results. DAC output (V) Input voltage (V) Finally, ask the instructor to help connect a sine-wave input to the ADC, instead of the variable resistor. With an oscilloscope, observe the DAC response for different ADC clock frequencies with respect to the sine wave frequency. What happens as you approach and exceed the Nyquist limit? Put away your components and show your results to the instructor.