Download as PPTX, PDF, TXT or read online from Scribd
Download as pptx, pdf, or txt
You are on page 1of 19
Applications of Microprocessor
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. • 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. ADC 0808/0809 : • The ADC 0808/0809 is an 8-bit analog to digital converter. It has 8 channel multiplexer to interface with the microprocessor. • This chip is popular and widely used ADC. ADC 0808/0809 is a monolithic CMOS device. This device uses successive approximation technique to convert analog signal to digital form. One of the main advantage of this chip is that it does not require any external zero and full scale adjustment, only +5V DC supply is sufficient. • 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 - 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. • Features of ADC 0808/0809:- The conversion speed is much higher. The accuracy is also high. It has minimal temperature dependence. Excellent long term accuracy and repeatability. Less power consumption functional block diagram of this chip: Interfacing ADC with 8085 Microprocessor • To interface the ADC with 8085, we need 8255 Programmable Peripheral Interface chip with it. Let us see the circuit diagram of connecting 8085, 8255 and the ADC converter. • The PortA of 8255 chip is used as the input port. The PC7 pin of Port Cupper is connected to the End of Conversion (EOC) Pin of the analog to digital converter. This port is also used as input port. The Clower port is used as output port. The PC2-0 lines are connected to three address pins of this chip to select input channels. The PC3 pin is connected to the Start of Conversion (SOC) pin and ALE pin of ADC 0808/0809. A program to generate digital signal from analog data.We are using IN0 as input pin, so the pin selection value will be 00H. MVI A, 98H ; Set Port A and Cupper as input, CLower as output OUT 03H ; Write control word 8255-I to control Word register XRA A ; Clear the accumulator OUT 02H ; Send the content of Acc to Port Clower to select IN0 MVI A, 08H ; Load the accumulator with 08H OUT 02H ; ALE and SOC will be 0 XRA A ; Clear the accumulator OUT 02H ; ALE and SOC will be low. READ: IN 02H ; Read from EOC (PC7) RAL ; Rotate left to check C7 is 1. JNC READ ; If C7 is not 1, go to READ IN 00H ; Read digital output of ADC STA 8000H ; Save result at 8000H HLT ; Stop the program DAC Interfacing with 8085 Microprocessor DAC 0800 Features : • To convert the digital signal to analog signal a Digital-to-Analog Converter (DAC) has to be employed. • The DAC will accept a digital (binary) input and convert to analog voltage or current. • Every DAC will have "n" input lines and an analog output. • The DAC require a reference analog voltage (Vref) or current (Iref) source. • The smallest possible analog value that can be represented by the n-bit binary code is called resolution. • The resolution of DAC with n-bit binary input is 1/2nof reference analog value. • The DAC0800 is an 8-bit, high speed, current output DAC with a typical settling time (conversion time) of 100 ns. • It produces complementary current output, which can be converted to voltage by using simple resistor load. • The DAC0800 require a positive and a negative supply voltage in the range of ± 5V to ±18V. • It can be directly interfaced with TTL, CMOS, PMOS and other logic families. • For TTL input, the threshold pin should be tied to ground (VLC = 0V). • The reference voltage and the digital input will decide the analog output current, which can be converted to a voltage by simply connecting a resistor to output terminal or by using an op-amp I to V converter. • The DAC0800 is available as a 16-pin IC in DIP. Interfacing 7(Seven) Segment Display to 8085 Microprocessor
An output device which is very common is,
especially in the kit of 8085 microprocessor and it is the Light Emitting Diode consisting of seven segments. Moreover, we have eight segments in a LED display consisting of 7 segments which includes ‘.’, consisting of character 8 and having a decimal point just next to it. We denote the segments as ‘a, b, c, d, e, f, g, and dp’ where dp signifies ‘.’ which is the decimal point. Moreover, these are LEDs or together a series of Light Emitting Diodes. We have shown the internal circuit comprising of a display of seven segment is as shown in Fig 2 • A 7-segment display is as shown in the following Fig. • There are two types of 7-segment LED: They are the common anode type and the common cathode type. We have discussed the common anode-type which is 7 segmented Light Emitting Diode. In the LED which is common anode and is 7-segmented, here we connect all the eight LED anodes together and the eight external pin is brought to display. And this pin gets connected to a DC supply of +5 Volt. The cathode ends of the eight segments are brought out on the pins of the display. • The use of 74373 latch for interfacing a 7-segment display is shown in the following Fig. Here we are not decoding the entire address bus. Instead, we used only least significant 4 bits to decode the input and output devices. It creates a problem called foldback where a device has multiple addresses. Since we are not using this interface in any other application, we can sometimes use linear decoding also like this. Stepper motor Interfacing/Control using 8085 • Stepper Motor A stepper motor is a device that translates electrical pulses into mechanical movement in steps of fixed step angle. • The stepper motor rotates in steps in response to the applied signals. • It is mainly used for position control. • It is used in disk drives, dot matrix printers, plotters and robotics and process control circuits.