SlideShare a Scribd company logo
1 of 25
Download to read offline
Interfacing Analog to Digital Data
Converters
• In most of the cases, the PIO 8255 is used for interfacing
the analog to digital converters with microprocessor.
• We have already studied 8255 interfacing with 8086 as an
I/O port, in previous section. This section we will only
emphasize the interfacing techniques of analog to digital
converters with 8255.
• The analog to digital converters is treaded as an input
device by the microprocessor, that sends an initialising
signal to the ADC to start the analogy to digital data
conversation process. The start of conversation signal is a
pulse of a specific duration.
1
Interfacing Analog to Digital Data
Converters (cont..)
• The process of analog to digital conversion is a slow
process, and the microprocessor has to wait for the digital
data till the conversion is over. After the conversion is
over, the ADC sends end of conversion EOC signal to
inform the microprocessor that the conversion is over and
the result is ready at the output buffer of the ADC. These
tasks of issuing an SOC pulse to ADC, reading EOC signal
from the ADC and reading the digital output of the ADC
are carried out by the CPU using 8255 I/O ports.
2
Interfacing Analog to Digital Data
Converters (cont..)
• The time taken by the ADC from the active edge of
SOC pulse till the active edge of EOC signal is called as
the conversion delay of the ADC.
• It may range any where from a few microseconds in case
of fast ADC to even a few hundred milliseconds in case of
slow ADCs.
• The available ADC in the market use different
conversion techniques for conversion of analog signal to
digitals. Successive approximation techniques and dual
slope integration techniques are the most popular
techniques used in the integrated ADC chip.
3
Interfacing Analog to Digital Data
Converters (cont..)
• General algorithm for ADC interfacing contains
the following steps:
1. Ensure the stability of analog input, applied to the ADC.
2. Issue start of conversion pulse to ADC
3. Read end of conversion signal to mark the end
of conversion processes.
4. Read digital data output of the ADC as equivalent
digital output.
4
Interfacing Analog to Digital Data
Converters (cont..)
• Analog input voltage must be constant at the input of the
ADC right from the start of conversion till the end of the
conversion to get correct results. This may be ensured by
a sample and hold circuit which samples the analog signal
and holds it constant for a specific time duration. The
microprocessor may issue a hold signal to the sample and
hold circuit.
• If the applied input changes before the complete
conversion process is over, the digital equivalent of the
analog input calculated by the ADC may not be correct.
5
Interfacing Analog to Digital Data
Converters (cont..)
ADC 0808/0809 :
• The analog to digital converter chips 0808 and 0809 are 8-
bit CMOS, successive approximation converters. This
technique is one of the fast techniques for analog to digital
conversion. The conversion delay is 100µs at a clock
frequency of 640 KHz, which is quite low as compared to
other converters. These converters do not need any external
zero or full scale adjustments as they are already taken care
of by internal circuits. These converters internally have a
3:8 analog multiplexer so that at a time eight different
analog conversion by using address lines -
6
Interfacing Analog to Digital Data
Converters (cont..)
ADD A, ADD B, ADD C. Using these address inputs,
multichannel data acquisition system can be designed
using a single ADC. The CPU may drive these lines using
output port lines in case of multichannel applications. In
case of single input applications, these may be hardwired
to select the proper input.
• There are unipolar analog to digital converters, i.e. they
are able to convert only positive analog input voltage to
their digital equivalent. These chips do no contain any
internal sample and hold circuit.
7
Analog I/P
selected
I / P 0
I / P 1
I / P 2
I / P 3
I / P 4
I / P 5
I / P 6
I / P 7
Address lines
C B A
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Fig
8
Interfacing Analog to Digital Data
Converters (cont..)
• If one needs a sample and hold circuit for the conversion
of fast signal into equivalent digital quantities, it has to
be externally connected at each of the analog inputs.
• Vcc Supply pins +5V
• GND GND
• Vref + Reference voltage positive +5 Volts
maximum.
• Vref
_
Reference voltage negative 0Volts
minimum.
9
Interfacing Analog to Digital Data
Converters (cont..)
• I/P0 –I/P7 Analog inputs
• ADD A,B,C Address lines for selecting analog
inputs.
• O7 – O0 Digital 8-bit output with O7 MSB and
O0 LSB
• SOC Start of conversion signal pin
• EOC End of conversion signal pin
• OE Output latch enable pin, if high enables
output
• CLK Clock input for ADC
10
11
I / P 0
I / P 1
I / P 2
I / P 3
I / P 4
I / P 5
I / P 6
I / P 7
SOC CLOCK
EOC
Control and
Timing unit
and S.A.R.
8 Channel
Analog
Multiplexer
O/P
Latch
256 R
Register
ladder and
Switch tree
O/P
Enable
V ref + V ref _
C B A
Address Lines
Block Diagram of ADC 0808 / 0809
8-bit
O/P
12
CLOCK
START
ALE
EOC
OE
O / P
Timing Diagram of ADC 0808
13
Interfacing Analog to Digital Data
Converters (cont..)
• Example: Interfacing ADC 0808 with 8086 using 8255
ports. Use port A of 8255 for transferring digital data
output of ADC to the CPU and port C for control signals.
Assume that an analog input is present at I/P2 of the
ADC and a clock input of suitable frequency is available
for ADC.
• Solution: The analog input I/P2 is used and therefore
address pins A,B,C should be 0,1,0 respectively to select
I/P2. The OE and ALE pins are already kept at +5V to
select the ADC and enable the outputs. Port C upper acts
as the input port to receive the EOC signal while port C
lower acts as the output port to send SOC to the ADC.
14
Interfacing Analog to Digital Data
Converters (cont..)
• Port A acts as a 8-bit input data port to receive the
digital data output from the ADC. The 8255 control
word is written as follows:
D7 D6 D5 D4 D3 D2 D1 D0
1 0 0 1 1 0 0 0
• The required ALP is as follows:
MOV AL, 98h ;initialise 8255 as
OUT CWR, AL ;discussed above.
MOV AL, 02h ;Select I/P2 as analog
OUT Port B, AL ;input.
15
Interfacing Analog to Digital Data
Converters (cont..)
MOV AL, 00h ;Give start of conversion
OUT Port C, AL ; pulse to the ADC
MOV AL, 01h
OUT Port C, AL
MOV AL, 00h
OUT Port C, AL
WAIT: IN AL, Port C ;Check for EOC by
RCR ; reading port C upper and
JNC WAIT ;rotating through carry.
IN AL, Port A ;If EOC, read digital equivalent
;in AL
HLT ;Stop.
16
Vref +
Vref +
+ 5 V
CS
+ 5 V Vcc Clock up
O7 – O0
D0 – D7
PA7 – PA0
ADC Analog
EOC
PC7 I/P
A2 SOC 0808
PC0 Voltage
A1 OE
GND
8255
Reset ALE
+5V
PB0
A B C
IORD
PB1
IOWR PB2
Interfacing 0808 with 8086
17
Interfacing Digital To Analog
Converters (cont..)
INTERFACING DIGITAL TO ANALOG CONVERTERS: The
digital to analog converters convert binary number into
their equivalent voltages. The DAC find applications in
areas like digitally controlled gains, motors speed
controls, programmable gain amplifiers etc.
AD 7523 8-bit Multiplying DAC : This is a 16 pin DIP,
multiplying digital to analog converter, containing R-2R
ladder for D-A conversion along with single pole double
thrown NMOS switches to connect the digital inputs to
the ladder.
18
OUT 1
OUT 2
GND
MSB B1
B2
B3
B4
B5
1 16
2 15
3 14
4 13
AD 7523
5 12
6 11
7 10
8 9
Pin Diagram of AD 7523
RFB
Vref in
V +
NC
NC
B8 LSB
B7
B6
19
Interfacing Analog to Digital Data
Converters (cont..)
+5V
(MSB)
LSB
D0 D1 D2 D3
2R R1 R3 2R R5 2R
R7
2R 2R
2R
-
R2 R4 R6 R8
V0
+
Fig:
20
Interfacing Digital To Analog
Converters (cont..)
• The pin diagram of AD7523 is shown in fig the supply
range is from +5V to +15V, while Vref may be any where
between -10V to +10V. The maximum analog output
voltage will be any where between -10V to +10V, when
all the digital inputs are at logic high state.
• Usually a zener is connected between OUT1 and OUT2 to
save the DAC from negative transients. An operational
amplifier is used as a current to voltage converter at the
output of AD to convert the current out put of AD to a
proportional output voltage.
21
Interfacing Digital To Analog
Converters (cont..)
• It also offers additional drive capability to the DAC
output. An external feedback resistor acts to control the
gain. One may not connect any external feedback resistor,
if no gain control is required.
• EXAMPLE: Interfacing DAC AD7523 with an 8086 CPU
running at 8MHZ and write an assembly language
program to generate a sawtooth waveform of period 1ms
with Vmax 5V.
• Solution: Fig shows the interfacing circuit of AD 74523
with 8086 using 8255. program gives an ALP to generate
a sawtooth waveform using circuit.
22
Example (cont..)
ASSUME CS:CODE
CODE SEGMENT
START: MOV AL,80h ;make all ports output
OUT CW, AL
AGAIN: MOV AL,00h ;start voltage for ramp
BACK : OUT PA, AL
INC AL
CMP AL, 0FFh
JB BACK
JMP AGAIN
CODE ENDS
END START
23
+5V +10V
15 14
16
PA7 MSB 4
R
FB
OUT1
1
-
8255A
VZ V0
LSB
2
+
11
PA0 OUT2
AD7523
CS
GND
3
Fig: Interfacing of AD7523
24
Interfacing Analog to Digital Data
Converters (cont..)
• In the above program, port A is initialized as the output
port for sending the digital data as input to DAC. The
ramp starts from the 0V (analog), hence AL starts with
00H. To increment the ramp, the content of AL is
increased during each execution of loop till it reaches F2H.
• After that the saw tooth wave again starts from 00H, i.e.
0V(analog) and the procedure is repeated. The ramp period
given by this program is precisely 1.000625 ms. Here the
count F2H has been calculated by dividing the required
delay of 1ms by the time required for the execution of the
loop once. The ramp slope can be controlled by calling a
controllable delay after the OUT instruction.
25

More Related Content

Similar to analog to digital converter and dac final

Interfacing technique with 8085- ADC[0808]
Interfacing technique with 8085- ADC[0808]Interfacing technique with 8085- ADC[0808]
Interfacing technique with 8085- ADC[0808]Guhan k
 
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERDIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERChirag Lakhani
 
digitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdfdigitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdfsatyamsinha37
 
Digital voltmeter using 89c51 microcontroller
Digital voltmeter using 89c51 microcontrollerDigital voltmeter using 89c51 microcontroller
Digital voltmeter using 89c51 microcontrollerSaylee joshi
 
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
UNIT 4 & 5 - I         nterfacing_Lecture7.pptxUNIT 4 & 5 - I         nterfacing_Lecture7.pptx
UNIT 4 & 5 - I nterfacing_Lecture7.pptxnaveen088888
 
Microprocessor based Temperature Controller
Microprocessor based Temperature ControllerMicroprocessor based Temperature Controller
Microprocessor based Temperature ControllerRevanth Reddy
 
Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148Omkar Rane
 
adc dac converter
adc dac converteradc dac converter
adc dac converterGaurav Rai
 
Varsha patil AISSMS IOIT Pune mca te pu book
Varsha patil AISSMS IOIT Pune mca te pu bookVarsha patil AISSMS IOIT Pune mca te pu book
Varsha patil AISSMS IOIT Pune mca te pu bookVarsha Patil
 
ANALOG TO DIGITAL CONVERTOR
ANALOG TO DIGITAL CONVERTORANALOG TO DIGITAL CONVERTOR
ANALOG TO DIGITAL CONVERTORAnil Yadav
 
Unit iv microcontrollers final
Unit iv microcontrollers finalUnit iv microcontrollers final
Unit iv microcontrollers finalSARITHA REDDY
 
Fundamental of MSD Module-III Part-a.ppt
Fundamental of MSD Module-III Part-a.pptFundamental of MSD Module-III Part-a.ppt
Fundamental of MSD Module-III Part-a.pptBEVARAVASUDEVAAP1813
 
digital anlage c converter for digital .ppt
digital anlage c converter for digital .pptdigital anlage c converter for digital .ppt
digital anlage c converter for digital .pptAbdullahOmar64
 

Similar to analog to digital converter and dac final (20)

Interfacing technique with 8085- ADC[0808]
Interfacing technique with 8085- ADC[0808]Interfacing technique with 8085- ADC[0808]
Interfacing technique with 8085- ADC[0808]
 
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERDIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
 
digitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdfdigitalvoltmeterusing805112b2-170214173216 (1).pdf
digitalvoltmeterusing805112b2-170214173216 (1).pdf
 
8155 GPPI
8155 GPPI8155 GPPI
8155 GPPI
 
Digital voltmeter using 89c51 microcontroller
Digital voltmeter using 89c51 microcontrollerDigital voltmeter using 89c51 microcontroller
Digital voltmeter using 89c51 microcontroller
 
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
UNIT 4 & 5 - I         nterfacing_Lecture7.pptxUNIT 4 & 5 - I         nterfacing_Lecture7.pptx
UNIT 4 & 5 - I nterfacing_Lecture7.pptx
 
Microprocessor based Temperature Controller
Microprocessor based Temperature ControllerMicroprocessor based Temperature Controller
Microprocessor based Temperature Controller
 
Analog to digital converter
Analog to digital converterAnalog to digital converter
Analog to digital converter
 
Analog to digital converter
Analog to digital converterAnalog to digital converter
Analog to digital converter
 
Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148Analog To Digital Conversion (ADC) Programming in LPC2148
Analog To Digital Conversion (ADC) Programming in LPC2148
 
adc dac converter
adc dac converteradc dac converter
adc dac converter
 
Varsha patil AISSMS IOIT Pune mca te pu book
Varsha patil AISSMS IOIT Pune mca te pu bookVarsha patil AISSMS IOIT Pune mca te pu book
Varsha patil AISSMS IOIT Pune mca te pu book
 
A TO D CONVERTER
A TO D CONVERTERA TO D CONVERTER
A TO D CONVERTER
 
ANALOG TO DIGITAL CONVERTOR
ANALOG TO DIGITAL CONVERTORANALOG TO DIGITAL CONVERTOR
ANALOG TO DIGITAL CONVERTOR
 
Anup2
Anup2Anup2
Anup2
 
Unit iv microcontrollers final
Unit iv microcontrollers finalUnit iv microcontrollers final
Unit iv microcontrollers final
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Fundamental of MSD Module-III Part-a.ppt
Fundamental of MSD Module-III Part-a.pptFundamental of MSD Module-III Part-a.ppt
Fundamental of MSD Module-III Part-a.ppt
 
8051 FINIAL
8051 FINIAL8051 FINIAL
8051 FINIAL
 
digital anlage c converter for digital .ppt
digital anlage c converter for digital .pptdigital anlage c converter for digital .ppt
digital anlage c converter for digital .ppt
 

More from DrVikasMahor

Automation for KUKA youBot ROS Project.pptx
Automation for KUKA youBot ROS Project.pptxAutomation for KUKA youBot ROS Project.pptx
Automation for KUKA youBot ROS Project.pptxDrVikasMahor
 
UNIT 5 microcontroller 8051 OVERVIEW.pdf
UNIT 5 microcontroller 8051 OVERVIEW.pdfUNIT 5 microcontroller 8051 OVERVIEW.pdf
UNIT 5 microcontroller 8051 OVERVIEW.pdfDrVikasMahor
 
embeddedsystemspresentation-140524063909-phpapp01-converted.pptx
embeddedsystemspresentation-140524063909-phpapp01-converted.pptxembeddedsystemspresentation-140524063909-phpapp01-converted.pptx
embeddedsystemspresentation-140524063909-phpapp01-converted.pptxDrVikasMahor
 
architecture of 8086 new Lecture 4new.pptx
architecture of 8086 new Lecture 4new.pptxarchitecture of 8086 new Lecture 4new.pptx
architecture of 8086 new Lecture 4new.pptxDrVikasMahor
 
POWER AMPLIFIER- introduction to power amplifier.pptx
POWER AMPLIFIER- introduction to power amplifier.pptxPOWER AMPLIFIER- introduction to power amplifier.pptx
POWER AMPLIFIER- introduction to power amplifier.pptxDrVikasMahor
 
Unit IV 8086 complete ppt, architecture and instruction set.pptx
Unit IV 8086 complete ppt, architecture and instruction set.pptxUnit IV 8086 complete ppt, architecture and instruction set.pptx
Unit IV 8086 complete ppt, architecture and instruction set.pptxDrVikasMahor
 
8259 programmable PPI interfacing with 8085 .ppt
8259 programmable PPI interfacing with 8085 .ppt8259 programmable PPI interfacing with 8085 .ppt
8259 programmable PPI interfacing with 8085 .pptDrVikasMahor
 
8086 all instructions combined presentation.pptx
8086 all instructions combined presentation.pptx8086 all instructions combined presentation.pptx
8086 all instructions combined presentation.pptxDrVikasMahor
 
presentation for NEC course to defend for NEP 2020
presentation for NEC course to defend for NEP 2020presentation for NEC course to defend for NEP 2020
presentation for NEC course to defend for NEP 2020DrVikasMahor
 
introduction to Architecture of 8086 and it's application
introduction to Architecture of 8086 and it's applicationintroduction to Architecture of 8086 and it's application
introduction to Architecture of 8086 and it's applicationDrVikasMahor
 
final thesis pptReductions of leakage and ground bounce noise in.ppt
final thesis pptReductions of leakage and ground bounce noise in.pptfinal thesis pptReductions of leakage and ground bounce noise in.ppt
final thesis pptReductions of leakage and ground bounce noise in.pptDrVikasMahor
 
8087 COPROCESSOR connection with 8086 and other processors
8087 COPROCESSOR connection with 8086 and other processors8087 COPROCESSOR connection with 8086 and other processors
8087 COPROCESSOR connection with 8086 and other processorsDrVikasMahor
 
unit 2 lect 6 AND 7 8254.pptx
unit 2 lect 6 AND 7 8254.pptxunit 2 lect 6 AND 7 8254.pptx
unit 2 lect 6 AND 7 8254.pptxDrVikasMahor
 
department ppt for students.pptx
department ppt for students.pptxdepartment ppt for students.pptx
department ppt for students.pptxDrVikasMahor
 

More from DrVikasMahor (15)

Automation for KUKA youBot ROS Project.pptx
Automation for KUKA youBot ROS Project.pptxAutomation for KUKA youBot ROS Project.pptx
Automation for KUKA youBot ROS Project.pptx
 
UNIT 5 microcontroller 8051 OVERVIEW.pdf
UNIT 5 microcontroller 8051 OVERVIEW.pdfUNIT 5 microcontroller 8051 OVERVIEW.pdf
UNIT 5 microcontroller 8051 OVERVIEW.pdf
 
embeddedsystemspresentation-140524063909-phpapp01-converted.pptx
embeddedsystemspresentation-140524063909-phpapp01-converted.pptxembeddedsystemspresentation-140524063909-phpapp01-converted.pptx
embeddedsystemspresentation-140524063909-phpapp01-converted.pptx
 
architecture of 8086 new Lecture 4new.pptx
architecture of 8086 new Lecture 4new.pptxarchitecture of 8086 new Lecture 4new.pptx
architecture of 8086 new Lecture 4new.pptx
 
POWER AMPLIFIER- introduction to power amplifier.pptx
POWER AMPLIFIER- introduction to power amplifier.pptxPOWER AMPLIFIER- introduction to power amplifier.pptx
POWER AMPLIFIER- introduction to power amplifier.pptx
 
Unit IV 8086 complete ppt, architecture and instruction set.pptx
Unit IV 8086 complete ppt, architecture and instruction set.pptxUnit IV 8086 complete ppt, architecture and instruction set.pptx
Unit IV 8086 complete ppt, architecture and instruction set.pptx
 
8259 programmable PPI interfacing with 8085 .ppt
8259 programmable PPI interfacing with 8085 .ppt8259 programmable PPI interfacing with 8085 .ppt
8259 programmable PPI interfacing with 8085 .ppt
 
8086 all instructions combined presentation.pptx
8086 all instructions combined presentation.pptx8086 all instructions combined presentation.pptx
8086 all instructions combined presentation.pptx
 
presentation for NEC course to defend for NEP 2020
presentation for NEC course to defend for NEP 2020presentation for NEC course to defend for NEP 2020
presentation for NEC course to defend for NEP 2020
 
introduction to Architecture of 8086 and it's application
introduction to Architecture of 8086 and it's applicationintroduction to Architecture of 8086 and it's application
introduction to Architecture of 8086 and it's application
 
final thesis pptReductions of leakage and ground bounce noise in.ppt
final thesis pptReductions of leakage and ground bounce noise in.pptfinal thesis pptReductions of leakage and ground bounce noise in.ppt
final thesis pptReductions of leakage and ground bounce noise in.ppt
 
8087 COPROCESSOR connection with 8086 and other processors
8087 COPROCESSOR connection with 8086 and other processors8087 COPROCESSOR connection with 8086 and other processors
8087 COPROCESSOR connection with 8086 and other processors
 
unit 2 lect 6 AND 7 8254.pptx
unit 2 lect 6 AND 7 8254.pptxunit 2 lect 6 AND 7 8254.pptx
unit 2 lect 6 AND 7 8254.pptx
 
department ppt for students.pptx
department ppt for students.pptxdepartment ppt for students.pptx
department ppt for students.pptx
 
LTspice.ppt
LTspice.pptLTspice.ppt
LTspice.ppt
 

Recently uploaded

Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 

Recently uploaded (20)

Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Serviceyoung call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 

analog to digital converter and dac final

  • 1. Interfacing Analog to Digital Data Converters • In most of the cases, the PIO 8255 is used for interfacing the analog to digital converters with microprocessor. • We have already studied 8255 interfacing with 8086 as an I/O port, in previous section. This section we will only emphasize the interfacing techniques of analog to digital converters with 8255. • The analog to digital converters is treaded as an input device by the microprocessor, that sends an initialising signal to the ADC to start the analogy to digital data conversation process. The start of conversation signal is a pulse of a specific duration. 1
  • 2. Interfacing Analog to Digital Data Converters (cont..) • The process of analog to digital conversion is a slow process, and the microprocessor has to wait for the digital data till the conversion is over. After the conversion is over, the ADC sends end of conversion EOC signal to inform the microprocessor that the conversion is over and the result is ready at the output buffer of the ADC. These tasks of issuing an SOC pulse to ADC, reading EOC signal from the ADC and reading the digital output of the ADC are carried out by the CPU using 8255 I/O ports. 2
  • 3. Interfacing Analog to Digital Data Converters (cont..) • The time taken by the ADC from the active edge of SOC pulse till the active edge of EOC signal is called as the conversion delay of the ADC. • It may range any where from a few microseconds in case of fast ADC to even a few hundred milliseconds in case of slow ADCs. • The available ADC in the market use different conversion techniques for conversion of analog signal to digitals. Successive approximation techniques and dual slope integration techniques are the most popular techniques used in the integrated ADC chip. 3
  • 4. Interfacing Analog to Digital Data Converters (cont..) • General algorithm for ADC interfacing contains the following steps: 1. Ensure the stability of analog input, applied to the ADC. 2. Issue start of conversion pulse to ADC 3. Read end of conversion signal to mark the end of conversion processes. 4. Read digital data output of the ADC as equivalent digital output. 4
  • 5. Interfacing Analog to Digital Data Converters (cont..) • Analog input voltage must be constant at the input of the ADC right from the start of conversion till the end of the conversion to get correct results. This may be ensured by a sample and hold circuit which samples the analog signal and holds it constant for a specific time duration. The microprocessor may issue a hold signal to the sample and hold circuit. • If the applied input changes before the complete conversion process is over, the digital equivalent of the analog input calculated by the ADC may not be correct. 5
  • 6. Interfacing Analog to Digital Data Converters (cont..) ADC 0808/0809 : • The analog to digital converter chips 0808 and 0809 are 8- bit CMOS, successive approximation converters. This technique is one of the fast techniques for analog to digital conversion. The conversion delay is 100µs at a clock frequency of 640 KHz, which is quite low as compared to other converters. These converters do not need any external zero or full scale adjustments as they are already taken care of by internal circuits. These converters internally have a 3:8 analog multiplexer so that at a time eight different analog conversion by using address lines - 6
  • 7. Interfacing Analog to Digital Data Converters (cont..) ADD A, ADD B, ADD C. Using these address inputs, multichannel data acquisition system can be designed using a single ADC. The CPU may drive these lines using output port lines in case of multichannel applications. In case of single input applications, these may be hardwired to select the proper input. • There are unipolar analog to digital converters, i.e. they are able to convert only positive analog input voltage to their digital equivalent. These chips do no contain any internal sample and hold circuit. 7
  • 8. Analog I/P selected I / P 0 I / P 1 I / P 2 I / P 3 I / P 4 I / P 5 I / P 6 I / P 7 Address lines C B A 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 Fig 8
  • 9. Interfacing Analog to Digital Data Converters (cont..) • If one needs a sample and hold circuit for the conversion of fast signal into equivalent digital quantities, it has to be externally connected at each of the analog inputs. • Vcc Supply pins +5V • GND GND • Vref + Reference voltage positive +5 Volts maximum. • Vref _ Reference voltage negative 0Volts minimum. 9
  • 10. Interfacing Analog to Digital Data Converters (cont..) • I/P0 –I/P7 Analog inputs • ADD A,B,C Address lines for selecting analog inputs. • O7 – O0 Digital 8-bit output with O7 MSB and O0 LSB • SOC Start of conversion signal pin • EOC End of conversion signal pin • OE Output latch enable pin, if high enables output • CLK Clock input for ADC 10
  • 11. 11
  • 12. I / P 0 I / P 1 I / P 2 I / P 3 I / P 4 I / P 5 I / P 6 I / P 7 SOC CLOCK EOC Control and Timing unit and S.A.R. 8 Channel Analog Multiplexer O/P Latch 256 R Register ladder and Switch tree O/P Enable V ref + V ref _ C B A Address Lines Block Diagram of ADC 0808 / 0809 8-bit O/P 12
  • 13. CLOCK START ALE EOC OE O / P Timing Diagram of ADC 0808 13
  • 14. Interfacing Analog to Digital Data Converters (cont..) • Example: Interfacing ADC 0808 with 8086 using 8255 ports. Use port A of 8255 for transferring digital data output of ADC to the CPU and port C for control signals. Assume that an analog input is present at I/P2 of the ADC and a clock input of suitable frequency is available for ADC. • Solution: The analog input I/P2 is used and therefore address pins A,B,C should be 0,1,0 respectively to select I/P2. The OE and ALE pins are already kept at +5V to select the ADC and enable the outputs. Port C upper acts as the input port to receive the EOC signal while port C lower acts as the output port to send SOC to the ADC. 14
  • 15. Interfacing Analog to Digital Data Converters (cont..) • Port A acts as a 8-bit input data port to receive the digital data output from the ADC. The 8255 control word is written as follows: D7 D6 D5 D4 D3 D2 D1 D0 1 0 0 1 1 0 0 0 • The required ALP is as follows: MOV AL, 98h ;initialise 8255 as OUT CWR, AL ;discussed above. MOV AL, 02h ;Select I/P2 as analog OUT Port B, AL ;input. 15
  • 16. Interfacing Analog to Digital Data Converters (cont..) MOV AL, 00h ;Give start of conversion OUT Port C, AL ; pulse to the ADC MOV AL, 01h OUT Port C, AL MOV AL, 00h OUT Port C, AL WAIT: IN AL, Port C ;Check for EOC by RCR ; reading port C upper and JNC WAIT ;rotating through carry. IN AL, Port A ;If EOC, read digital equivalent ;in AL HLT ;Stop. 16
  • 17. Vref + Vref + + 5 V CS + 5 V Vcc Clock up O7 – O0 D0 – D7 PA7 – PA0 ADC Analog EOC PC7 I/P A2 SOC 0808 PC0 Voltage A1 OE GND 8255 Reset ALE +5V PB0 A B C IORD PB1 IOWR PB2 Interfacing 0808 with 8086 17
  • 18. Interfacing Digital To Analog Converters (cont..) INTERFACING DIGITAL TO ANALOG CONVERTERS: The digital to analog converters convert binary number into their equivalent voltages. The DAC find applications in areas like digitally controlled gains, motors speed controls, programmable gain amplifiers etc. AD 7523 8-bit Multiplying DAC : This is a 16 pin DIP, multiplying digital to analog converter, containing R-2R ladder for D-A conversion along with single pole double thrown NMOS switches to connect the digital inputs to the ladder. 18
  • 19. OUT 1 OUT 2 GND MSB B1 B2 B3 B4 B5 1 16 2 15 3 14 4 13 AD 7523 5 12 6 11 7 10 8 9 Pin Diagram of AD 7523 RFB Vref in V + NC NC B8 LSB B7 B6 19
  • 20. Interfacing Analog to Digital Data Converters (cont..) +5V (MSB) LSB D0 D1 D2 D3 2R R1 R3 2R R5 2R R7 2R 2R 2R - R2 R4 R6 R8 V0 + Fig: 20
  • 21. Interfacing Digital To Analog Converters (cont..) • The pin diagram of AD7523 is shown in fig the supply range is from +5V to +15V, while Vref may be any where between -10V to +10V. The maximum analog output voltage will be any where between -10V to +10V, when all the digital inputs are at logic high state. • Usually a zener is connected between OUT1 and OUT2 to save the DAC from negative transients. An operational amplifier is used as a current to voltage converter at the output of AD to convert the current out put of AD to a proportional output voltage. 21
  • 22. Interfacing Digital To Analog Converters (cont..) • It also offers additional drive capability to the DAC output. An external feedback resistor acts to control the gain. One may not connect any external feedback resistor, if no gain control is required. • EXAMPLE: Interfacing DAC AD7523 with an 8086 CPU running at 8MHZ and write an assembly language program to generate a sawtooth waveform of period 1ms with Vmax 5V. • Solution: Fig shows the interfacing circuit of AD 74523 with 8086 using 8255. program gives an ALP to generate a sawtooth waveform using circuit. 22
  • 23. Example (cont..) ASSUME CS:CODE CODE SEGMENT START: MOV AL,80h ;make all ports output OUT CW, AL AGAIN: MOV AL,00h ;start voltage for ramp BACK : OUT PA, AL INC AL CMP AL, 0FFh JB BACK JMP AGAIN CODE ENDS END START 23
  • 24. +5V +10V 15 14 16 PA7 MSB 4 R FB OUT1 1 - 8255A VZ V0 LSB 2 + 11 PA0 OUT2 AD7523 CS GND 3 Fig: Interfacing of AD7523 24
  • 25. Interfacing Analog to Digital Data Converters (cont..) • In the above program, port A is initialized as the output port for sending the digital data as input to DAC. The ramp starts from the 0V (analog), hence AL starts with 00H. To increment the ramp, the content of AL is increased during each execution of loop till it reaches F2H. • After that the saw tooth wave again starts from 00H, i.e. 0V(analog) and the procedure is repeated. The ramp period given by this program is precisely 1.000625 ms. Here the count F2H has been calculated by dividing the required delay of 1ms by the time required for the execution of the loop once. The ramp slope can be controlled by calling a controllable delay after the OUT instruction. 25