RTUComputer ScienceYr 2024 · Sem 52024

Q6Microprocessor and Interfaces

Question

4 marks

Describe the interfacing of ADC and DAC with microprocessor.

Answer

Interfacing an ADC and a DAC gives the microprocessor a bridge to the analog physical world - the ADC digitizes sensor voltages for the CPU to process, while the DAC converts computed digital values back into analog signals to drive actuators, both requiring an I/O port and handshaking logic around the conversion delay.

A microprocessor natively understands only binary digital data, but most real-world quantities - temperature, sound, light intensity, position - are continuous analog signals. Analog-to-Digital Converters (ADC) and Digital-to-Analog Converters (DAC) form the bridge that lets the CPU sense and control such signals, typically connected through a parallel port such as the 8255 PPI.

ADC Interfacing (e.g., ADC 0808/0809)

Because analog-to-digital conversion is not instantaneous, the interface must be handshaken rather than a simple instantaneous read:

  • 1. The CPU selects the desired analog input channel (if the ADC is multi-channel) and issues a Start of Conversion (SOC/WR) pulse through an output port.
  • 2. The ADC begins internally converting the analog voltage on the selected channel into an equivalent digital value, a process that takes a finite, chip-specified conversion time (typically on the order of microseconds).
  • 3. Once finished, the ADC raises an End of Conversion (EOC) or INTR flag.
  • 4. The CPU either polls this flag in a loop or waits for the corresponding hardware interrupt, and only then issues a read (RD) pulse to fetch the stable digital result from the ADC's output latch into the accumulator.

DAC Interfacing (e.g., DAC 0800)

DAC interfacing is comparatively simple because conversion is near-instantaneous once the digital input is stable. The CPU computes or fetches the digital value to output and writes it to an output port connected to the DAC's digital input pins. The DAC's internal resistor ladder (commonly R-2R) network immediately produces a proportional analog current, which an external op-amp typically converts to an analog voltage. No handshaking signal is generally required, though the CPU must maintain a steady output rate (via a timer-driven loop) if it is reconstructing a time-varying waveform such as an audio signal or a control voltage ramp.

Practical Significance

Together, ADC and DAC interfacing enable closed-loop embedded control: a sensor's analog output is digitized via the ADC, processed by the microprocessor, and the resulting control decision is converted back to an analog signal via the DAC to drive a motor, heater, or actuator - the fundamental architecture behind most microprocessor-based measurement and control systems.

Back to Paper