📝 Simultaneous A/D Converter in 8085 Microprocessor (17 MCQs)
Parallel Comparator Architecture of a Simultaneous ADC
A simultaneous analog-to-digital converter, commonly called a flash ADC, compares the input voltage with multiple reference levels at the same time. A resistor divider supplies equally spaced thresholds, and a bank of comparators evaluates the analog input in parallel. An encoder converts the resulting comparator pattern into a binary output code that the 8085 can read.
Comparator Bank and Reference Threshold Arrangement
An n-bit flash ADC requires 2 to the power of n minus one comparators to distinguish its 2 to the power of n quantization intervals. Each comparator receives the same analog input and a different threshold. Its output indicates whether the input is above that threshold, producing a thermometer-like pattern for encoding.
Parallel Comparison and Binary Encoding Sequence
When the analog input is applied, all comparators respond according to their respective reference thresholds rather than testing one candidate value at a time. The encoder examines the pattern of comparator outputs and produces the corresponding binary code. The result can then be captured by an output latch and transferred to the microprocessor.
Comparator Count for a Three-Bit Simultaneous Converter
A three-bit flash ADC has eight output codes and requires seven comparators. If the input rises above five successive thresholds, the comparator bank produces a pattern representing five crossed levels. The encoder converts that pattern into the appropriate three-bit output, according to the chosen coding and threshold convention.
High-Speed Measurement and Hardware Cost Trade-Off
Because all threshold comparisons occur in parallel, flash conversion is extremely fast and is suitable for rapidly changing signals. However, comparator count increases exponentially with resolution. An eight-bit design needs 255 comparators, together with a reference network and encoder, making the circuit more complex and power-intensive than many sequential conversion methods.
Correcting Misconceptions About Simultaneous Conversion
'A flash ADC uses one comparator for every output bit' is incorrect because it needs 2 to the power of n minus one comparators. 'Comparators test thresholds one after another' is incorrect because comparisons occur in parallel. 'A flash ADC is always the simplest and cheapest design' is incorrect because its hardware grows rapidly with resolution.
Comparator Counts and Flash Conversion Features in Examinations
Calculate comparator count using 2 to the power of n minus one and distinguish it from the number of output codes. Explain the role of the reference ladder, comparator bank and encoder. Compare flash conversion speed with counter and successive-approximation methods, especially when a question emphasizes high sampling speed.
Parallel Conversion and Comparator Terms
- Flash ADC - Performs parallel threshold comparisons.
- Comparator - Compares two analog voltage levels.
- Threshold - Reference level for one comparison.
- Encoder - Converts comparator outputs into binary.
- Thermometer Code - Ordered comparator-output pattern.
- Parallel Conversion - Simultaneous evaluation of thresholds.
📝 All Simultaneous A/D Converter in 8085 Microprocessor MCQs
Q1. What does the Mode Set Register configure in the 8257 DMA controller?
📖 Explanation: The Mode Set Register contains bits that define the transfer direction (read or write), the type of addressing (incremental or page), and which channel is enabled. Option B captures this purpose. Option A is set in the interrupt vector register, not the mode word. Option C relates to the data bus, which the DMA does not control. Option D concerns the system clock, unrelated to DMA configuration.
Q2. Why must the terminal count be loaded LSB first then MSB when initializing the 8257?
📖 Explanation: The terminal count register expects a 16‑bit value. Loading the LSB first guarantees that when the MSB arrives, the controller already has the lower half, forming the correct total count. Option A describes the controller behavior but does not explain why the order matters. Option B mentions little‑endian but the DMA is independent of CPU endianness. Option D is incorrect because the order is defined by the hardware.
Q3. In the binary pattern D10–D0 = 11111111111, what amount of data does this represent for the 8257?
📖 Explanation: The eleven low bits correspond to a count of . Adding one for zero‑based counting gives 2048 bytes to be transferred. Option A (512) would require 9 bits, Option B (1024) needs 10 bits, and Option D (4096) would need 12 bits. Understanding how the count field translates to byte quantity is essential for correct DMA programming.
Q4. How does the DMA address register relate to the memory location used during a transfer?
📖 Explanation: The DMA address register is loaded with the base memory address; the controller increments this address as each byte is transferred, allowing sequential access. Option A confuses the register with a post‑transfer pointer. Option C is the role of the terminal count register. Option D describes the peripheral address, not the memory address.
Q5. What is the effect of setting the Enable bit (D7) to 1 in the mode word for channel 0?
📖 Explanation: Setting D7 enables the channel, permitting it to accept requests and perform transfers. Option A is the opposite of the intended effect. Option B describes an interrupt enable, which is a separate bit. Option D describes the TC‑stop behavior, controlled by a different bit (D1).
Q6. If D5 (Auto‑initialize) is set to 1 while D4 (Address increment) is 0, what transfer behavior results?
📖 Explanation: Auto‑initialize causes the DMA controller to reload the starting address automatically when the terminal count expires, enabling repeated bursts. With D4 cleared, the address does not increment, so each burst starts at the same location. Option A would require D4=1. Option B describes a fixed‑address mode without auto‑reload. Option D is not a defined function of these bits.
Q7. When multiple channels are enabled, how does the 8257 decide which channel gets the bus first?
📖 Explanation: The 8257 assigns fixed priority based on channel number; channel 0 has the highest priority, followed by 1, 2, and 3. Therefore, the lowest numbered enabled channel wins arbitration. Option B describes a dynamic scheme not implemented in the 8257. Option C is unrelated to address values. Option D is incorrect because priority is internal, not set by external pins.
Q8. A system needs to move 512 bytes from a peripheral to memory starting at address using channel 0. Which sequence of OUT instructions correctly programs the controller?
📖 Explanation: The mode word 0x42 enables channel 0 for a read operation. The terminal count for 512 bytes is (LSB 0x00, MSB 0x02) written to address 0x21 (TC register). The starting address is split into low byte 0x00 and high byte 0x30, both sent to address 0x20 (DMA address register). Option A follows this correct order. The other options either swap registers or use the wrong mode word.
Q9. If the terminal count is mistakenly loaded with the high byte first (MSB then LSB), what is the most likely outcome for a 256‑byte transfer?
📖 Explanation: Loading the MSB first means the LSB remains at its previous value (often 0x00). For a desired count of 256 (), the controller would see where XX is whatever leftover LSB was, resulting in a larger count than intended. This can cause extra bytes to be moved, risking overflow. Option A assumes no effect, which is false. Option B underestimates the count. Option D describes behavior not defined for the 8257.
Q10. Given a mode word of for channel 0, which transfer direction is selected?
📖 Explanation: In the 8257, bit D6 selects the transfer direction: 0 for write (memory to peripheral) and 1 for read (peripheral to memory). The hex value 0x42 has binary 0100 0010, where D6 = 1, indicating a read operation. Option A flips the direction. Option C is not a mode supported by the 8257. Option D would require the enable bit to be cleared.
Q11. If the terminal count register is set to , how many bytes will be transferred before the TC signal is asserted?
📖 Explanation: The terminal count value represents the number of bytes minus one. Loading (255 decimal) means the controller will count from 0 to 255, completing 256 transfers before asserting TC. Option A misinterprets the count as the exact number. Options C and D correspond to larger counts.
Q12. When the DMA address register high byte is 0x21 and low byte is 0x00, what is the starting memory address for the transfer?
📖 Explanation: The high byte forms the most‑significant 8 bits and the low byte the least‑significant 8 bits of a 16‑bit address. Concatenating 0x21 (high) with 0x00 (low) yields . Option B swaps the bytes, Option C uses the wrong low byte, and Option D misplaces the high nibble.
Q13. Two DMA channels are active: channel 0 set for memory‑to‑peripheral and channel 1 set for peripheral‑to‑memory. Which channel obtains the bus first if both request simultaneously?
📖 Explanation: The 8257 uses fixed priority based on channel number; the lower the number, the higher the priority. Hence channel 0 wins arbitration over channel 1 when requests occur at the same time. Option B reverses the priority order. Option C is not supported because the bus is granted to a single channel at a time. Option D describes behavior not defined for the controller.
Q14. If the \TC stop\ bit is not set in the mode word, what happens after the terminal count is reached?
📖 Explanation: When the TC‑stop bit (D1) is cleared, the controller does not automatically disable the channel after reaching the terminal count. Instead, it raises the TC signal and may generate an interrupt while keeping the channel ready for another request. Option A describes the behavior when the bit is set. Option B would cause uncontrolled data flow, which is not the default. Option D is not a defined error condition.
Q15. Which mode word correctly enables channel 3 for a read (peripheral‑to‑memory) operation?
📖 Explanation: Channel selection uses bits D7‑D5; for channel 3 these bits are 011 (binary 3). The read direction requires D6 = 1. The TC‑stop bit can be 0 or 1; here we choose 0. Thus the mode word is 1000 0010 = . Option A () would set the enable bit for channel 3 but also set TC‑stop, which is acceptable but not the simplest form; however the question asks for a correct word, and directly matches the required bits. Option B () targets channel 0. Option D () lacks the enable bits for any channel.
Q16. How does the 8257 handle a spurious DMA request that arrives while a transfer is already in progress?
📖 Explanation: The 8257 has a single request line per channel; if a request occurs while the channel is busy, the controller latches the request and services it once the current terminal count is reached, ensuring data integrity. Option B would risk losing a legitimate request. Option C would cause data corruption by interrupting an ongoing transfer. Option D describes behavior not implemented in the hardware.
Q17. Why is DMA particularly advantageous for simultaneous A/D conversion involving multiple channels?
📖 Explanation: DMA transfers data directly between the peripheral and memory without CPU intervention, preserving precise timing between conversions on multiple channels. This ensures that the ADC can sample at its intended rate without being slowed by processor overhead. Options B and C describe unrelated benefits, and D is inaccurate because buffering may still be required for signal conditioning.