Top Banner
ADC DAC
16

ADC and DAC

Apr 27, 2017

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ADC and DAC

ADC DAC

Page 2: ADC and DAC
Page 3: ADC and DAC

Timing Diagram for ADC

Page 4: ADC and DAC

MVI A,98HOUT CWRMVI A,02HOUT PortBMVI A,00HOUT PortCMVI A,01HOUT PortCMVI A,00HOUT PortCWAIT: IN Port C ;Check for EOC by

RCR ; reading port C upper and JNC WAIT ;rotating through carry. IN Port A ;If EOC, read digital equivalent in A HLT ;Stop.

Page 5: ADC and DAC

• Take Analog input and convert in digital, send digital input to microprocessor, provide some delay and then send to DAC .

Page 6: ADC and DAC

Digital to Analog(D/A) Converters• Digital to analog converters can be broadly classified in three categories:

current output, voltage output, and multiplying type.• The current output DAC provides current as the output signal. • The voltage output DAC internally converts signal into the voltage signal.

The voltage output DAC is slower than the current output DAC because of the delay in converting the current signal into the voltage signal.

• The multiplying DAC is similar to the other two types except its output represents the product of the input signal and the reference source, and product is linear over a broad range.

• D/A converters are available as integrated circuits. Some are designed to be compatible with the microprocessor. Typical applications include digital voltmeters, peak detectors , panel meters, programmable gain and attenuation, and stepping motor drive.

Page 7: ADC and DAC

• Figure shows a block diagram of a 3 bit D/A converter; it has three digital input lines (D2, D1, D0) and one output line for the analog signal.

• The three input lines can assume eight input combinations from 000 to 111.

• If the input ranges from 0 to 1 V, it can be divided into eight equal parts; each successive input is 1/8V higher than the previous combination

D/A Conveter

Digital Input

LSB

MSB

D0

D1

D2

Analog Output

3 Bit D/A converter

Page 8: ADC and DAC

• The 3 bit D/A converter has eight input possible combinations. If a converter has n input lines, it can have 2n input combinations.

• If the full scale analog voltage is 1V, the smallest unit or the LSB is equivalent to 1/2n of 1V. This is defined as resolution.

• The MSB represents half of the full scale value.

Page 9: ADC and DAC

• Calculate the values of the LSB and MSB and full scale output for an 8-bit DAC for the 0 to 10V range.

• LSB 10/256=39mV• MSB 10/2 =5• Full scale Output 10-0.0039V= 9.9

Page 10: ADC and DAC

D/A Converter Circuits

• Input signals representing appropriate binary values can be simulated by an operational amplifier with a summing network.

Page 11: ADC and DAC
Page 12: ADC and DAC

Interfacing an 8-bit D/A converter with 8085

• Design an output port with the address FFH to interface the 1408 D/A converter that is calibrated for a 0 to 10V range.

• Write a program to generate a continuous ramp waveform.

• Explain the operation of the 1408, which is calibrated for a bipolar range ±5V. Calculate the output Vo if the input is 10000000.

Page 13: ADC and DAC

MVI A,00HDTOA: OUT FFH

MVI B, COUNTDELAY: DCR B

JNZ DELAY INR A JMP DTOA

This program outputs 00 to FF continuously to the D/A converter. The analog output of the DAC starts at 0 and increase up to 10V as a ramp. When the accumulator contents go to 0, the next cycle begins: thus the ramp signal is generated continuously. The ramp output of the DAC can be observed on as oscilloscope with an external sync.

The delay in the program is necessary for two reasons:1. The time needed for a microprocessor to execute an output loop is likely to be less

than the settling time of the DAC.2. The slope of the ramp can be varied by changing the delay.

Page 14: ADC and DAC

Analog-to-digital (A/D) converters• The A/D conversion is a quantizing process whereby an analog signal is represented

by equivalent binary states; this is opposite to the D/A conversion process.• Analog-to-digital converters can be classified into two general groups based on the

conversion technique.• One technique involves comparing a given analog signal with the internally generated

equivalent signal. This group includes successive approximation, counter and flash-type converters.

• The second technique involves changing an analog signal into time or frequency and comparing these new parameters to known values. This group includes integrator converters and voltage to frequency converters.

• The trade-off between the two techniques is based on accuracy vs. speed. • The successive-approximation and the flash type are faster but generally less accurate

than the integrator and the voltage-to-frequency type converters.• Furthermore, the flash type is expensive and difficult to design for high accuracy.

Page 15: ADC and DAC

Interfacing 8-Bit A/D Converters• To interface an A/D converter with the

microprocessor, the microprocessor should1.Send a pulse to the START pin. This can be derived

from a control signal such as Write (WR).2.Wait until the end of the conversion. The end of

the conversion period can be verified either by status checking (polling) or by using the interrupt.

3.Read the digital signal at an input port.

Page 16: ADC and DAC

Q1. Write a program to generate a triangular wave?

Q2. Write a program to generate a square wave of particular frequency?

Q3. Write a program to generate a saw tooth wave?

Q4. Write a program to generate a ramp wave?