📝 Digital to Analog Converter in 8085 Microprocessor (6 MCQs)
Converting 8085 Digital Data into a Continuous Analog Signal
A Digital-to-Analog Converter (DAC) changes a binary number produced by the 8085 microprocessor into a corresponding analog voltage or current. The 8085 processes information digitally through its eight-bit data bus, whereas devices such as speakers, motor-control circuits and analog instruments require electrical signals that vary continuously. A DAC provides this conversion by assigning a defined analog output level to each digital input code.
Binary Weighting and Reference Voltage in Digital-to-Analog Conversion
An eight-bit DAC accepts values from 00H to FFH, representing 256 possible input codes. Each bit contributes a weighted fraction of the reference signal, with the most significant bit contributing the largest amount. The output depends on the reference voltage or current, the binary code and the converter's resolution. An output amplifier may condition the resulting voltage or current.
Relationship Between Digital Input Code and Analog Output Level
When the digital input changes, the DAC changes its output to the level associated with the new code. For an ideal unipolar voltage-output converter, the output is approximately Vref multiplied by D divided by 2 to the power of n, where D is the decimal input code and n is the number of bits. The output changes in discrete steps.
Calculating an Eight-Bit DAC Output for a Given Input
Consider an eight-bit DAC with a 5 V reference and an input code of 128, or 80H. Its ideal output is approximately 5 × 128/256 = 2.5 V. For the maximum code FFH, the output approaches 5 V but equals 255/256 of the reference in this ideal coding arrangement.
Using DAC Outputs for Analog Control and Signal Generation
The 8085 can send successive digital values to a DAC through an output port or programmable interface. A sequence of increasing codes produces a rising staircase waveform, while repeated alternating codes can generate a square-like signal. Similar arrangements provide analog references for motor speed control, voltage adjustment, waveform generation and laboratory measurement systems.
Clarifying Digital Resolution and Analog Output Behaviour
'A DAC produces every possible voltage continuously' is incorrect because its digital input selects discrete output levels. 'An eight-bit DAC has eight output levels' is incorrect because it represents 256 codes. 'The DAC always produces voltage directly' is incorrect because some converters, including DAC0808, produce current that requires external conversion.
DAC Resolution, Reference Levels and Code Calculations in Examinations
Be able to distinguish digital input codes from analog output values and calculate the ideal output using the reference and resolution. Remember that an eight-bit converter has 256 codes and a nominal step of Vref/256. Identify the role of an output amplifier, and explain why increasing resolution produces smaller changes between adjacent output levels.
Conversion and Output-Level Terminology
- DAC - Converts digital codes into analog signals.
- Resolution - Number of distinguishable output levels.
- Reference - Sets the conversion scale.
- LSB - Represents the smallest code increment.
- MSB - Has the greatest binary weight.
- Analog Output - Voltage or current representing a code.
📝 All Digital to Analog Converter in 8085 Microprocessor MCQs
Q1. What hexadecimal value is loaded into the Mode Set Register to enable channel 0 and start a DMA transfer?
📖 Explanation: The 8257 DMA controller uses the mode word 0x41H (binary 0100 0001) to enable channel 0, select a memory‑read operation, and start the transfer. Option A matches this value, so it is correct. Options B‑D represent different configurations: 0x42H would set a different channel, 0x43H adds auto‑initialize, and 0x44H disables the channel. Understanding the bit pattern links the hexadecimal code to the intended hardware behavior, which is essential for correct initialization.
Q2. Why must the terminal count be loaded first with the LS byte and then the MS byte when initializing the 8257 DMA controller?
📖 Explanation: The 8257 expects the least‑significant byte before the most‑significant byte because its internal counter is built as a little‑endian register. Loading the LS byte first ensures the lower 8 bits are correctly placed before the higher bits are latched, preventing an accidental carry that could corrupt the count. Option B describes this required sequencing; the other options misstate the hardware behavior or claim irrelevant effects.
Q3. Which of the following instruction sequences correctly programs channel 0 to transfer 512 bytes from a peripheral to memory locations starting at 3000H?
📖 Explanation: To move 512 bytes the terminal count must be set to 0x0200 (LS = 00H, MS = 02H). The DMA address registers require the high byte first (30H) then low byte (00H). Option C follows the required order: LS count → MS count → address MS → address LS, matching the 8257 programming protocol. Options A and B reverse the byte order, causing incorrect counts, while D loads the address before the count, which the controller would ignore until the count is programmed.
Q4. To transfer 2 Kbytes (2048 bytes) from memory to a floppy using channel 1, which mode‑word hexadecimal value correctly indicates a memory‑read operation?
📖 Explanation: A memory‑read operation requires D7=0 (DMA disabled), D6=1 (channel 1 selected), and D5‑D0 set to 0 100 001b, which corresponds to 0x41H. This value programs the Mode Set Register to enable channel 1, select a read from memory, and allow auto‑initialize. Option D matches the required bit pattern; the other values either select the wrong channel, indicate a write operation, or leave the controller disabled, leading to failed transfers.
Q5. In an ideal n‑bit DAC, how does changing one least‑significant bit affect the output voltage?
📖 Explanation: For an n‑bit binary‑weighted DAC the voltage step size, or LSB, is Vref divided by . Flipping the least‑significant bit adds or subtracts exactly one LSB, producing a change of . Option A states this relationship correctly. Option B uses the wrong exponent, option C suggests a half‑step that does not exist in an ideal DAC, and option D denies any effect, contradicting the fundamental quantization principle.
Q6. A system wants to transfer 1024 bytes using channel 2. The terminal count register must contain the number of bytes minus one. Which hexadecimal value should be loaded into the LS byte of the terminal count register?
📖 Explanation: The transfer length is 1024 bytes, which is in hex. Subtracting one gives . The LS (least‑significant) byte of is . Therefore option B is correct. Option A would represent zero bytes, option C corresponds to 3 bytes, and option D to 4 bytes, none of which match the required count. Recognizing the off‑by‑one rule for terminal counts is essential for accurate DMA programming.