Interfacing Analog to Digital Data Converters A/D D/A Converter 1
In most of the cases, the PPI 8255 is used for interfacing the analog to digital converters with microprocessor. 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. A/D D/A Converter 2
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. A/D D/A Converter 3
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 anywhere 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. A/D D/A Converter 4
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. 5. 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. A/D D/A Converter 5
6. 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. A/D D/A Converter 6
Signals / PINS A/D D/A Converter 7
Analog input IN0 to IN7 Address Lines A B C Digital output bits D0 to D7 SC - Start conversion; input pin; a low to high pulse is given EOC -End of conversion; output pin; goes low when the conversion is over ALE - Input pin; low to high pulse is required to latch in the address Clock input - Clock input; to provide external clock A/D D/A Converter 8
Interfacing of ADC with 8255 A/D D/A Converter 9
A/D D/A Converter 10
A/D D/A Converter 11
Digital to Analog Converter A/D D/A Converter 12
Digital to Analog Converter The digital-to-analog converter (DAC) is a device widely used to convert digital pulses to analog signals. two methods of creating a DAC: binary weighted and R/2R ladder. The first criterion for judging a DAC is its resolution, which is a function of the number of binary inputs. The common ones are 8, 10, and 12 bits. The number of data bit inputs decides the resolution of the DAC since the number of analog output levels is equal to 2, where n is the number of data bit inputs. Therefore, an 8-input DAC such as the DAC0808 provides 256 discrete voltage (or current) levels of output. Similarly, the 12- bit DAC provides 4096 discrete voltage levels A/D D/A Converter 13
MC1408 DAC (or DAC0808) In the MC1408 (DAC0808), the digital inputs are converted to current (I out ), and by connecting a resistor to the I out pin, we convert the result to voltage. The total current provided by the I out pin is a function of the binary numbers at the DO D7 inputs of the DAC0808 and the reference current (I re f), and is as follows: A/D D/A Converter 14
where DO is the LSB, D7 is the MSB for the inputs, and I re f is the input current that must be applied to pin 14. The I re f current is generally set to 2.0 ma. A/D D/A Converter 15
A/D D/A Converter 16