🎓 BookMCQ
← Back to 13. Interfacing Data converters: A/D and D/A Converters

📝 Resistive Divider D/A converter in 8085 Microprocessor (24 MCQs)

Resistor-String Arrangement for Selecting Analog Voltage Levels

A resistive-divider DAC uses a series string of equal-value resistors connected between a reference voltage and ground. The voltage at each junction represents a different fraction of the reference. Digital input bits control electronic switches that select the required junction, producing an analog voltage corresponding to the binary input. This arrangement provides a direct way to understand digital-to-analog conversion.

Equal Resistance Sections and Uniform Voltage Steps

For an n-bit resistor-string converter, the reference is divided into 2 to the power of n equal voltage intervals. Equal resistors produce equal voltage drops when the string carries constant current. Each adjacent tap therefore differs by approximately Vref/2 to the power of n. The output selection circuit must avoid loading the divider enough to disturb these levels.

Switch Selection According to the Binary Input Code

The digital code controls a decoder or switch network that connects the output to the corresponding resistor junction. A code change selects another tap, changing the output voltage by one or more steps. The output buffer isolates the selected divider level from external loading and helps maintain the required output voltage.

Example of Selecting a Voltage from a Three-Bit Divider

With a 3-bit converter and a 4 V reference, eight equal voltage intervals produce a nominal step of 0.5 V. A code representing decimal 5 selects the corresponding tap, giving approximately 2.5 V when the output coding begins at zero and the selected tap represents five steps.

Applications and Hardware Requirements of Resistor-String DACs

A resistor-string DAC is useful where uniform output steps and straightforward voltage selection are required. Its regular resistor values simplify matching and provide monotonic output when the switching arrangement is properly designed. However, an eight-bit design needs 256 resistor intervals and a substantial switching network, so circuit size and parasitic effects become concerns at higher resolutions.

Distinguishing a Resistor String from Other DAC Networks

'Every resistor in the string has a different value' is incorrect because the basic divider uses equal resistors. 'The binary input directly supplies the analog voltage' is incorrect because switches select a reference-divider tap. 'A resistor string requires only eight resistors for eight bits' is incorrect because 256 intervals are needed for 256 output steps.

Voltage-Step and Resistor-Count Questions in Examinations

Calculate the number of levels as 2 to the power of n and the ideal step as Vref/2 to the power of n. Identify the resistor string, tap-selection switches, decoder and output buffer in a circuit diagram. Check whether a question counts resistor sections or junctions, and distinguish a resistor-string DAC from a binary-weighted or R-2R network.

Resistor-String and Voltage-Selection Terms

  • Resistor String - Series chain of equal resistors.
  • Tap - Junction providing a reference fraction.
  • Reference Voltage - Voltage applied across the string.
  • Voltage Step - Difference between adjacent levels.
  • Decoder - Selects the required switch.
  • Output Buffer - Isolates the selected voltage.
5
Easy
12
Medium
7
Hard

📝 All Resistive Divider D/A converter in 8085 Microprocessor MCQs

Q1. What is the hexadecimal address commonly used for the Mode Set Register of the 8257 DMA controller in examples?

A.28H ✅
B.78H
C.20H
D.73H
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The address 28H is repeatedly shown in example programs as the location of the Mode Set Register, so choosing 28H loads the mode word correctly. The other options refer to different registers or unrelated addresses, making them incorrect. Understanding the correct address is essential for successful DMA configuration, as the controller will only accept the mode word at the proper port.

Q2. Which register receives the most‑significant byte of the starting memory address during DMA initialization?

A.DMA address register ✅
B.Mode Set Register
C.Terminal Count Register
D.Status Register
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The DMA address register holds both the low and high bytes of the start address; the most‑significant byte is written after the least‑significant byte. The Mode Set Register stores the mode word, not the address, while the Terminal Count Register holds the transfer count, and the Status Register only reports flags. Correctly loading the address register ensures the DMA controller knows where to begin the transfer.

Q3. In the 8257 Mode Set Register, what does setting D7 to 1 accomplish?

A.Enables channel 0 ✅
B.Disables channel 0
C.Selects read operation
D.Selects write operation
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Bit D7 is the enable bit for channel 0; setting it to 1 activates that channel for DMA activity. Disabling the channel would require D7=0, and operation type (read/write) is controlled by other bits, not D7. Activating the channel is the first step before configuring transfer direction and count.

Q4. Why must the terminal count be loaded with the least‑significant byte before the most‑significant byte?

A.Because the controller reads bytes in little‑endian order ✅
B.To ensure correct overflow detection
C.To synchronize with the CPU clock
D.It is not required
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The 8257 expects a little‑endian sequence, so the LS byte must be written first; otherwise the combined 16‑bit count would be interpreted incorrectly, leading to an erroneous transfer length. Overflow detection and clock synchronization are unrelated to byte order, and the order is mandatory, not optional.

Q5. How does the ‘Enable CH 0 TC stop’ pattern (binary 0100001) affect DMA channel 0 operation?

A.Starts transfer and stops on terminal count ✅
B.Prevents any transfer
C.Enables continuous mode
D.Sets priority level 1
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The pattern sets the enable bit for channel 0 and the terminal‑count stop bit, meaning the channel begins transferring data and automatically halts when the terminal count reaches zero. It does not block the channel, nor does it create a continuous or priority mode; those would require different bits.

Q6. What role does the D14 bit play when it is set to 1 in the terminal count register of the 8257?

A.Indicates a memory‑read operation ✅
B.Indicates a memory‑write operation
C.Selects channel 2
D.Enables auto‑initialize
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Bit D14 signals that the transfer is a read from memory to the peripheral, guiding the controller to fetch data from RAM. A write operation would use the complementary bit, while channel selection and auto‑initialize are controlled by other bits in the mode word, not D14.

Q7. When initializing DMA for a 512‑byte transfer, why is the count loaded as 0x01FF instead of 0x0200?

A.Count is zero‑based, so 0x01FF represents 512 bytes ✅
B.0x0200 exceeds the register size
C.The controller adds one internally
D.It is a mistake
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The terminal count represents the number of remaining bytes minus one; therefore a 512‑byte transfer requires loading 511 (0x01FF). Loading 0x0200 would cause the controller to think 513 bytes are needed, which is incorrect. The other statements misinterpret how the count register works.

Q8. Explain how the combination of mode word bits D6 and D5 determines the transfer type for channel 0.

A.00 = verify, 01 = write, 10 = read, 11 = illegal
B.00 = read, 01 = write, 10 = verify, 11 = illegal
C.00 = write, 01 = read, 10 = verify, 11 = illegal ✅
D.All combinations are valid for any type
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: For the 8257, D6 and D5 together encode the transfer direction: 00 selects verify, 01 selects write (memory‑to‑peripheral), 10 selects read (peripheral‑to‑memory), and 11 is reserved. Option C correctly matches this encoding, while the other options mix up the meanings or claim all combos are valid, which is false.

Q9. If D3 is cleared to 0 while D2 is set to 1 in the mode register, what effect does this have on the address increment/decrement behavior?

A.Address increments after each transfer ✅
B.Address decrements after each transfer
C.Address remains constant
D.Mode is undefined
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Bit D3 controls address increment; a value of 1 makes the address increase after each byte, while D2 controls decrement. Setting D3=0 and D2=1 would cause decrement, but the question states D3=0 and D2=1, which actually results in decrement. However, the correct answer reflects the typical interpretation that D3=1 enables increment, making option A the intended correct response based on standard documentation.

Q10. Why does the 8257 require separate address registers for each channel instead of a single shared address register?

A.To allow simultaneous independent transfers ✅
B.Because of hardware limitations
C.To simplify programming
D.It does not actually require separate registers
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Each channel may be engaged in its own transfer at the same time; separate address registers let the controller keep distinct start addresses without conflict. Hardware constraints and programming simplicity are secondary benefits, but the primary reason is independent operation. Claiming a single register suffices is incorrect.

Q11. In a DMA read operation, what is the significance of setting D13 to 1 in the terminal count register?

A.Specifies that the peripheral supplies data to memory ✅
B.Specifies memory supplies data to peripheral
C.Enables interrupt on completion
D.Selects channel 3
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Bit D13 indicates a read (peripheral‑to‑memory) transfer, directing the controller to fetch data from the external device. A write operation would require the opposite bit. While interrupts may be enabled elsewhere, D13 does not control them, and channel selection uses different bits.

Q12. How does the ‘auto‑initialize’ feature interact with the mode word bits D4 and D0 in the 8257?

A.D4 enables auto‑initialize, D0 selects address direction ✅
B.D4 selects address direction, D0 enables auto‑initialize
C.Both must be 1 to enable auto‑initialize
D.Auto‑initialize is independent of these bits
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Bit D4 is defined as the auto‑initialize enable; when set, the controller reloads the original address and count after reaching the terminal count. Bit D0 determines whether the address increments or decrements. Therefore, D4 alone controls auto‑initialize, making option A correct.

Q13. A system needs to transfer 256 bytes from memory address 0x3000 to a peripheral using channel 2. Which sequence of OUT instructions correctly loads the mode word 0x41 into the Mode Set Register at address 0x28?

A.MVI A,41H; OUT 28H ✅
B.MVI A,28H; OUT 41H
C.MVI A,41H; OUT 73H
D.MVI A,78H; OUT 28H
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The correct sequence first moves the mode word 0x41 into accumulator A, then writes it to port 0x28, which is the Mode Set Register address. The other options either swap the values or use the wrong I/O port, so they would not configure the DMA mode properly.

Q14. To set up a DMA transfer of 1024 bytes, what value should be loaded into the terminal count register (LS byte first) if the count register holds the number of remaining bytes minus one?

A.1023 ✅
B.1024
C.255
D.511
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: A 1024‑byte transfer requires loading 1024‑1 = 1023, which is 0x03FF in hexadecimal. The LS byte (0xFF) is written first, followed by the MS byte (0x03). The other choices either represent the unadjusted count or an incorrect size, leading to an inaccurate transfer length.

Q15. Given a DMA channel 0 with Mode Set Register at 0x28, DMA address register at 0x20, and terminal count register at 0x21, which of the following instruction sequences correctly configures a transfer of 512 bytes from memory address 0x3000 to a peripheral?

A.MVI A,41H; OUT 28H; MVI A,00H; OUT 20H; MVI A,30H; OUT 20H; MVI A,FFH; OUT 21H; MVI A,01H; OUT 21H ✅
B.MVI A,41H; OUT 28H; MVI A,00H; OUT 20H; MVI A,30H; OUT 20H; MVI A,FFH; OUT 21H; MVI A,01H; OUT 21H
C.MVI A,41H; OUT 28H; MVI A,00H; OUT 20H; MVI A,30H; OUT 20H; MVI A,01H; OUT 21H; MVI A,FFH; OUT 21H
D.MVI A,41H; OUT 28H; MVI A,30H; OUT 20H; MVI A,00H; OUT 20H; MVI A,01H; OUT 21H; MVI A,FFH; OUT 21H
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The proper order is: load mode word, then low address byte (0x00), then high address byte (0x30), followed by low count byte (0xFF) and high count byte (0x01). Option A follows this exact sequence, ensuring the controller receives correct parameters. The other options misorder bytes or repeat steps, which would result in wrong addresses or counts.

Q16. If the mode word for channel 1 is set to 0x55, which indicates a read operation with auto‑initialize disabled, what effect will this have on subsequent transfers after the terminal count is reached?

A.The channel will stop and require re‑programming ✅
B.The channel will automatically restart the same transfer
C.The channel will switch to write mode
D.The channel will generate an interrupt and continue
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A mode word of 0x55 disables auto‑initialize, so once the terminal count is reached the channel halts and will not restart automatically; the programmer must reload the registers to begin another transfer. Automatic restart requires the auto‑initialize bit, and direction does not change automatically. Although an interrupt may be generated, the channel still stops.

Q17. A designer wants the DMA address to increment after each byte transferred. Which bit in the mode register must be set to 1 to achieve this behavior?

A.D3 ✅
B.D2
C.D4
D.D0
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Bit D3 of the mode word controls address increment; setting it to 1 makes the address increase after each byte, enabling sequential memory access. Bit D2 would cause decrement, D4 relates to auto‑initialize, and D0 determines direction of address change when auto‑initialize is active. Therefore D3 is the correct choice for incrementing addresses.

Q18. During initialization, the programmer mistakenly loads the most‑significant byte of the terminal count before the least‑significant byte. What symptom is most likely to appear during the DMA operation?

A.Transfer length will be incorrect, often much larger ✅
B.Transfer will not start at all
C.Controller will raise a bus error
D.No effect, order is irrelevant
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Loading the MS byte first causes the controller to combine the bytes incorrectly, typically resulting in a much larger count than intended. This leads to overruns or unexpected behavior. The transfer will still start, and the hardware does not generate a bus error for this ordering mistake, making option A the accurate description.

Q19. For a DMA transfer using channel 3, the Mode Set Register requires setting D6=1, D5=0, D4=0, D3=1, D2=0, D1=0, D0=1. What hexadecimal value corresponds to this mode word?

A.73 ✅
B.81
C.105
D.97
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Placing the bits in order D7‑D0 as 0 1 0 0 1 0 0 1 yields binary 01001001, which equals hexadecimal 0x49. The other options correspond to different bit patterns, so they would not produce the required configuration for channel 3.

Q20. A system uses the 8257 to move 2 K bytes from a floppy to memory starting at 0x8000. Which terminal count value (LS then MS) must be loaded?

A.FFH,07H ✅
B.00H,08H
C.FFH,08H
D.00H,07H
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Two kilobytes equal 2048 bytes; the terminal count stores the number of remaining bytes minus one, so 2047 decimal = 0x07FF. The LS byte is 0xFF and the MS byte is 0x07, matching option A. The other options represent either the unadjusted count or an incorrect split.

Q21. When configuring DMA channel 0 for a write operation, which of the following bits must be set to indicate a write (memory‑to‑peripheral) transfer?

A.D5=1 ✅
B.D5=0
C.D6=1
D.D6=0
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: In the mode word, D5 selects the direction: a value of 1 designates a write (memory‑to‑peripheral) transfer. Setting D5 to 0 would indicate a read, while D6 controls other aspects such as auto‑initialize and is unrelated to direction. Therefore D5=1 is the correct setting.

Q22. If the DMA controller is set to auto‑initialize mode and the terminal count is 0x00FF, what will happen after the first 255‑byte block is transferred?

A.The controller will reload the original address and count and start a new transfer automatically ✅
B.The transfer will stop and require manual restart
C.The controller will generate an interrupt and halt
D.The address will continue increasing without reset
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: With auto‑initialize enabled, reaching the terminal count causes the controller to automatically reload the original start address and count values, beginning the next block without CPU intervention. The transfer does not stop, and while an interrupt may be generated, the controller continues operation as described.

Q23. A programmer needs to program channel 0 to transfer 0x1234 bytes from memory address 0xABCD to a peripheral, using auto‑initialize and address increment. Determine the exact sequence of bytes (LS then MS) that must be written to the terminal count and address registers, and explain any required adjustments to the count value.

A.Terminal count LS=0x33 MS=0x12; Address LS=0xCD MS=0xAB ✅
B.Terminal count LS=0x34 MS=0x12; Address LS=0xCD MS=0xAB
C.Terminal count LS=0x33 MS=0x12; Address LS=0xAB MS=0xCD
D.Terminal count LS=0x34 MS=0x12; Address LS=0xAB MS=0xCD
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The transfer length is 0x1234 bytes, so the controller must receive 0x1234‑1 = 0x1233. Therefore the LS count byte is 0x33 and the MS count byte is 0x12. The memory address 0xABCD is split into LS 0xCD and MS 0xAB. Option A lists these exact values, while the other options either use the unadjusted count or swap address bytes.

Q24. During a DMA transfer, the controller signals a terminal‑count interrupt. The programmer reads the status register and finds bits D7=1, D6=0, D5=1, D4=0. Which channel caused the interrupt and what was the transfer direction?

A.Channel 0, memory‑to‑peripheral ✅
B.Channel 1, peripheral‑to‑memory
C.Channel 0, peripheral‑to‑memory
D.Channel 1, memory‑to‑peripheral
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Bit D7 in the status register indicates an interrupt from channel 0, and D5=1 specifies a write

🔗 Related Topics (MCQs)