Interfacing Analog to Digital Data Converters



Similar documents
NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

Digital to Analog and Analog to Digital Conversion

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Conversion Between Analog and Digital Signals

CHAPTER 11: Flip Flops

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION

ADC0808/ADC Bit µp Compatible A/D Converters with 8-Channel Multiplexer

DAC Digital To Analog Converter

Decimal Number (base 10) Binary Number (base 2)

Digital to Analog Converter. Raghu Tumati

Micro-Step Driving for Stepper Motors: A Case Study

Interfacing To Alphanumeric Displays

PART B QUESTIONS AND ANSWERS UNIT I

ADS9850 Signal Generator Module

Timer A (0 and 1) and PWM EE3376

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

24-Bit Analog-to-Digital Converter (ADC) for Weigh Scales FEATURES S8550 VFB. Analog Supply Regulator. Input MUX. 24-bit Σ ADC. PGA Gain = 32, 64, 128

Part 1. MAX BIT DAC with an Arduino Board. MIDI to Voltage Converter Part1

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Microprocessor & Assembly Language

Microcomputers. Analog-to-Digital and Digital-to-Analog Conversion

DATA SHEET. TDA1543 Dual 16-bit DAC (economy version) (I 2 S input format) INTEGRATED CIRCUITS

Chapter 6: From Digital-to-Analog and Back Again

Digital To Analog Converter with Sine Wave Output

Analog/Digital Conversion. Analog Signals. Digital Signals. Analog vs. Digital. Interfacing a microprocessor-based system to the real world.

Features DISPLAY DECODING INPUT INTERFACING

PC BASED PID TEMPERATURE CONTROLLER

Experiments: Labview and RS232

Analog-to-Digital Converters

HD61202U. (Dot Matrix Liquid Crystal GraphicDisplay Column Driver)

12-Bit Serial Daisy-Chain CMOS D/A Converter DAC8143

The components. E3: Digital electronics. Goals:

Using the HT46R46 I/O Ports to Implement Half-Duplex SPI Communication

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

LC2 MOS Quad 8-Bit D/A Converter AD7226

STEPPER MOTOR SPEED AND POSITION CONTROL

TIMING DIAGRAM O 8085

DS1621 Digital Thermometer and Thermostat

Accurate Measurement of the Mains Electricity Frequency

PHY-2464 Physical Basis of Music

Model AD558J AD558K AD558S 1 AD558T 1 Min Typ Max Min Typ Max Min Typ Max Min Typ Max Units

SAMPLE CHAPTERS UNESCO EOLSS DIGITAL INSTRUMENTS. García J. and García D.F. University of Oviedo, Spain

Programmable Single-/Dual-/Triple- Tone Gong SAE 800

Operational Amplifier - IC 741

LM 358 Op Amp. If you have small signals and need a more useful reading we could amplify it using the op amp, this is commonly used in sensors.

Pulse Width Modulation Applications

PLL frequency synthesizer

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

NTE923 & NTE923D Integrated Circuit Precision Voltage Regulator

DS12885, DS12885Q, DS12885T. Real Time Clock FEATURES PIN ASSIGNMENT

Pulse Width Modulation

ARM Thumb Microcontrollers. Application Note. Software ISO 7816 I/O Line Implementation. Features. Introduction

L297 STEPPER MOTOR CONTROLLERS

HD44780U (LCD-II) (Dot Matrix Liquid Crystal Display Controller/Driver)

POCKET SCOPE 2. The idea 2. Design criteria 3

(Refer Slide Time: 00:01:16 min)

DS1621 Digital Thermometer and Thermostat

[F/T] [5] [KHz] [AMP] [3] [V] 4 ) To set DC offset to -2.5V press the following keys [OFS] [+/-] [2] [.] [5] [V]

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

Digital Sampling Oscilloscope

Monitoring of Intravenous Drip Rate

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

Construction and Application of a Computer Based Interface Card

MACHINE ARCHITECTURE & LANGUAGE


If an occupancy of room is zero, i.e. room is empty then light source will be switched off automatically

8254 PROGRAMMABLE INTERVAL TIMER

Lecture N -1- PHYS Microcontrollers

Op-Amp Simulation EE/CS 5720/6720. Read Chapter 5 in Johns & Martin before you begin this assignment.

CA3306, CA3306A, CA3306C 6-Bit, 15 MSPS, Flash A/D Converters

Analog to Digital Conversion of Sound with the MSP430F2013

W a d i a D i g i t a l

INSTRUMENTATION AND CONTROL TUTORIAL 3 SIGNAL PROCESSORS AND RECEIVERS

DM Segment Decoder/Driver/Latch with Constant Current Source Outputs

Lab Unit 4: Oscillators, Timing and the Phase Locked Loop

Asynchronous counters, except for the first block, work independently from a system clock.

Interfacing With Microprocessor

A Digital Timer Implementation using 7 Segment Displays

TRILOGI 5.3 PLC Ladder Diagram Programmer and Simulator. A tutorial prepared for IE 575 by Dr. T.C. Chang. Use On-Line Help

AC : PRACTICAL DESIGN PROJECTS UTILIZING COMPLEX PROGRAMMABLE LOGIC DEVICES (CPLD)

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

12-Bit, 4-Channel Parallel Output Sampling ANALOG-TO-DIGITAL CONVERTER

TDA CHANNEL VOLUME CONTROLLER 1 FEATURES 2 DESCRIPTION. Figure 1. Package

Section 3. Sensor to ADC Design Example

HDMM01 V1.0. Dual-axis Magnetic Sensor Module With I 2 C Interface FEATURES. Signal Path X

Chapter 2 Logic Gates and Introduction to Computer Architecture

PCAN-MicroMod Universal I/O Module with CAN Interface. User Manual. Document version ( )

DRM compatible RF Tuner Unit DRT1

Controlling a Dot Matrix LED Display with a Microcontroller

16-Bit Monotonic Voltage Output D/A Converter AD569

ADC12041 ADC Bit Plus Sign 216 khz Sampling Analog-to-Digital Converter

UC3842/UC3843/UC3844/UC3845

GT Sensors Precision Gear Tooth and Encoder Sensors

Supply voltage Supervisor TL77xx Series. Author: Eilhard Haseloff

Analog Servo Drive 25A8

Microcontroller to Sensor Interfacing Techniques

Operating Manual Ver.1.1

Transcription:

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. M Krishhna Kumar MAM/M3/LU9g/V1/2004 1

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. M Krishhna Kumar MAM/M3/LU9g/V1/2004 2

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. M Krishhna Kumar MAM/M3/LU9g/V1/2004 3

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. M Krishhna Kumar MAM/M3/LU9g/V1/2004 4

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. M Krishhna Kumar MAM/M3/LU9g/V1/2004 5

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 - M Krishhna Kumar MAM/M3/LU9g/V1/2004 6

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. M Krishhna Kumar MAM/M3/LU9g/V1/2004 7

Analog I/P selected C Address lines B A I / P 0 I / P 1 I / P 2 I / P 3 I / P 4 I / P 5 I / P 6 I / P 7 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 M Krishhna Kumar MAM/M3/LU9g/V1/2004 8

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. M Krishhna Kumar MAM/M3/LU9g/V1/2004 9

I/P 0 I/P 7 Analog inputs ADD A,B,C Address lines for selecting analog inputs. O 7 O 0 Digital 8-bit output with O 7 MSB and O 0 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 M Krishhna Kumar MAM/M3/LU9g/V1/2004 10

M Krishhna Kumar MAM/M3/LU9g/V1/2004 11

C 8 Channel Analog Multiplexer B A SOC 256 R ladder and Switch tree CLOCK EOC O/P Latch O/P 8-bit O/P I / P 0 I / P 1 Control and Timing unit and S.A.R. I / P 2 I / P 3 I / P 4 I / P 5 I / P 6 I / P 7 Register V ref + V ref _ Enable Block Diagram of ADC 0808 / 0809 Address Lines M Krishhna Kumar MAM/M3/LU9g/V1/2004 12

CLOCK START ALE EOC OE O / P Timing Diagram of ADC 0808 M Krishhna Kumar MAM/M3/LU9g/V1/2004 13

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/P 2 of the ADC and a clock input of suitable frequency is available for ADC. Solution: The analog input I/P 2 is used and therefore address pins A,B,C should be 0,1,0 respectively to select I/P 2. 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. M Krishhna Kumar MAM/M3/LU9g/V1/2004 14

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: D 7 D 6 D 5 D 4 D 3 D 2 D 1 D 0 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/P 2 as analog OUT Port B, AL ;input. M Krishhna Kumar MAM/M3/LU9g/V1/2004 15

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. M Krishhna Kumar MAM/M3/LU9g/V1/2004 16

Vref + Vref + CS + 5 V + 5 V Vcc Clock up A 2 D 0 D 7 PA 7 PA 0 PC 7 PC 0 EOC SOC O 7 O 0 ADC 0808 Analog I/P Voltage A 1 Reset 8255 +5V OE ALE A B GND C IORD PB 0 PB 1 IOWR PB 2 Interfacing 0808 with 8086 M Krishhna Kumar MAM/M3/LU9g/V1/2004 17

Interfacing Digital To Analog 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. M Krishhna Kumar MAM/M3/LU9g/V1/2004 18

OUT 1 1 16 R FB OUT 2 2 15 Vref in GND 3 14 V + MSB B 1 B 2 4 5 AD 7523 13 12 NC NC B 3 6 11 B 8 LSB B 4 7 10 B 7 B 5 8 9 B 6 Pin Diagram of AD 7523 M Krishhna Kumar MAM/M3/LU9g/V1/2004 19

LSB Interfacing Analog to Digital Data D 0 D 1 D 2 D 3 +5V (MSB) 2R R 1 R 2R 3 2R R R 5 2R 7 2R 2R R 2 R 4 R 6 R 8 - + V 0 Fig: M Krishhna Kumar MAM/M3/LU9g/V1/2004 20

Interfacing Digital To Analog 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. M Krishhna Kumar MAM/M3/LU9g/V1/2004 21

Interfacing Digital To Analog 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 8MH Z 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. M Krishhna Kumar MAM/M3/LU9g/V1/2004 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 M Krishhna Kumar MAM/M3/LU9g/V1/2004 23

+5V +10V 15 14 16 R FB 8255A PA 7 PA 0 MSB LSB 4 11 OUT1 OUT2 1 2 VZ - + V 0 AD7523 CS 3 GND Fig: Interfacing of AD7523 M Krishhna Kumar MAM/M3/LU9g/V1/2004 24

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. M Krishhna Kumar MAM/M3/LU9g/V1/2004 25