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

📝 Binary Ladder D/A Converter in 8085 Microprocessor (19 MCQs)

Binary-Weighted Output Generation Through an R-2R Ladder

A binary ladder DAC converts an n-bit digital word into an analog output by assigning progressively smaller weights to its bits. A commonly used ladder arrangement is the R-2R network, which contains only two resistor values: R and twice R. Its repeated sections divide current or voltage into binary proportions and combine the contributions of the input bits.

Current Division and the Contribution of Individual Bits

Each ladder section divides the signal so that the contribution of one bit is half that of the preceding more significant bit. The most significant bit therefore has the greatest influence, while the least significant bit contributes the smallest increment. In a current-output arrangement, an operational amplifier can sum the weighted currents and convert them into an output voltage.

From Binary Input Switching to an Analog Result

Each digital input controls a switch in the ladder. Depending on its logic value, the corresponding branch is connected to the reference or a defined ground or summing potential. The resulting weighted currents combine at the output. Changing one bit modifies its assigned contribution without requiring a separate resistor value for every binary position.

Calculating the Output of an Eight-Bit R-2R Converter

For an ideal inverting R-2R DAC with a feedback resistor equal to R, Vref = 10 V and input code B4H, the decimal code is 180. The output is approximately −10 × 180/256 = −7.03125 V. The negative sign results from the inverting summing amplifier used in this circuit arrangement.

Why R-2R Networks Suit Microprocessor-Based Systems

The R-2R structure is attractive because it uses only two nominal resistor values, making matching easier than a network requiring many different binary-weighted resistances. It can be connected to an eight-bit latch or output port controlled by the 8085. The operational amplifier provides current summation, voltage conversion and useful output isolation.

Correcting Misconceptions About Ladder Resistor Values

'An R-2R ladder uses a different resistor value for every bit' is incorrect because it repeats R and 2R. 'All digital bits contribute equally' is incorrect because each bit has a binary weight. 'The output must be positive' is incorrect because an inverting op-amp configuration produces a negative output for a positive reference.

Binary Weighting and Ladder Circuit Calculations for Examinations

Identify the MSB and LSB branches, explain the halving of successive bit contributions, and recognize the repeated R and 2R values. Practise converting hexadecimal input codes to decimal before calculating the output. Pay attention to the reference polarity, feedback resistor and inverting amplifier because these determine the sign and scale of the final voltage.

R-2R Circuit and Binary-Weighting Terms

  • R-2R Ladder - Network using two resistor values.
  • Binary Weight - Contribution assigned to each bit.
  • MSB - Bit with the largest output contribution.
  • LSB - Bit with the smallest contribution.
  • Reference - Source defining the output scale.
  • Feedback Resistor - Sets op-amp conversion gain.
4
Easy
9
Medium
6
Hard

📝 All Binary Ladder D/A Converter in 8085 Microprocessor MCQs

Q1. When the mode word 0x420x42 is written to the Mode Set Register at address 0x780x78, which operation is being configured for channel 0?

A.Enable channel 0 for a memory‑read transfer ✅
B.Disable channel 0
C.Enable channel 1 for a memory‑write transfer
D.Reset the DMA controller
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The mode word 0x420x42 sets bits D7‑D6 to 01, which selects channel 0, and D0 to 1, which selects a memory‑read operation. Therefore option A correctly describes the configuration. Option B would disable the channel, which requires different bits. Option C addresses channel 1 and a write, not matching the bits. Option D describes a reset, which is not performed by writing a mode word. This mirrors real hardware where the correct bits program the desired DMA function.

Q2. In the 8257 mode word, which bits determine whether a channel is enabled, and what value must they have to activate channel 0?

A.Bits D7‑D6 set to 00
B.Bits D3‑D2 set to 01
C.Bits D7‑D6 set to 01 ✅
D.Bits D0‑D1 set to 11
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: Bits D7‑D6 encode the channel number; the pattern 01 selects channel 0. Thus option C is correct. Option A would select channel 3, not channel 0. Option B refers to unrelated bits that control transfer type, not channel enable. Option D uses the low‑order bits, which are used for read/write control, not channel selection. Understanding this mapping is essential when programming the DMA controller for the correct channel.

Q3. What hexadecimal value corresponds to the binary pattern 1000 0111 1111 1111?

A.34815 ✅
B.32655
C.65415
D.65535
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The binary sequence 1000 0111 1111 1111 translates directly to the hexadecimal digits 8 7 F F, giving 0x87FF0x87FF. Option A matches this conversion. The other options represent different binary patterns: 0x7F8F0x7F8F would be 0111 1111 1000 1111, 0xFF870xFF87 is 1111 1111 1000 0111, and 0xFFFF0xFFFF is all ones. Recognizing binary‑to‑hex conversion is a basic skill needed when setting DMA registers.

Q4. To transfer exactly 512 bytes using channel 0, what terminal‑count value should be loaded into the count registers?

A.512 ✅
B.256
C.8192
D.16
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: A transfer of 512 decimal bytes corresponds to the hexadecimal value 0x02000x0200 because 0x0200=2×256=5120x0200 = 2\times256 = 512. Option A provides this exact value. Option B (0x01000x0100) would give 256 bytes, option C (0x20000x2000) equals 8192 bytes, and option D (0x00100x0010) equals only 16 bytes. Loading the correct count ensures the DMA controller stops after the intended number of bytes, which is critical for reliable data movement.

Q5. Why must the least‑significant byte of the terminal count be loaded before the most‑significant byte?

A.Because the controller latches the low byte first
B.To avoid overwriting the high byte
C.The DMA logic only reads the LS byte during the first OUT
D.It ensures correct 16‑bit value formation ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: The DMA controller assembles a 16‑bit count by first receiving the LS byte, then the MS byte; loading them in this order guarantees the final value matches the intended count. Option D captures this requirement. Option A is partially true but does not explain the necessity for correct value formation. Option B is inaccurate because overwriting is not the issue. Option C misstates the controller’s behavior. Proper sequencing prevents erroneous transfer lengths in practical applications.

Q6. If the LS byte loaded is 0x000x00 and the MS byte is 0x020x02, what total transfer count does the DMA controller calculate?

A.512 decimal ✅
B.256 decimal
C.1024 decimal
D.128 decimal
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Combining the bytes yields the 16‑bit value 0x02000x0200, which equals 2×256=5122\times256 = 512 decimal. Therefore option A is correct. Option B would result from 0x01000x0100, option C from 0x04000x0400, and option D from 0x00800x0080. This calculation mirrors how the controller forms the terminal count, and recognizing it is vital when programming DMA transfers.

Q7. What is the I/O address assigned to the DMA address register for channel 0 in the given example?

A.32 ✅
B.33
C.40
D.114
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The example specifies that channel 0’s address register resides at I/O port 0x200x20. Hence option A is correct. Option B (0x210x21) is the terminal‑count register, option C (0x280x28) is the Mode Set Register, and option D (0x720x72) belongs to a different DMA controller (8255) in the passage. Knowing the correct ports allows software to write the starting address accurately.

Q8. For a memory‑read operation that transfers 2 KB from RAM to a floppy using channel 1, which mode‑word bits must be set to indicate a read and enable the channel?

A.D6=1, D0=1
B.D5=1, D1=0
C.D4=1, D2=1
D.D7=0, D0=1 ✅
💡 Difficulty: medium | ✅ Correct: D

📖 Explanation: Channel 1 is selected by setting bits D7‑D6 to 01, and a read operation requires D0=1. Together this yields the pattern where D7=0, D6=1, and D0=1, which is described in option D. The other options either target the wrong channel bits or the write direction, making them incorrect. Applying the correct bits ensures the DMA controller performs the intended read transfer.

Q9. What effect does setting the TC‑stop bit in the mode word have on subsequent DMA transfers after the terminal count is reached?

A.The controller halts further transfers until re‑initialized ✅
B.It automatically restarts the transfer
C.It ignores the terminal count
D.It disables the channel permanently
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: When the TC‑stop bit is set, reaching the terminal count causes the DMA controller to stop and wait for new programming before any further transfers, which matches option A. Option B describes auto‑restart, which requires a different bit. Option C would mean the count is ignored, contradicting the purpose of the TC‑stop. Option D suggests permanent disable, which is not the case; the channel can be re‑enabled. This behavior is important for controlled data bursts.

Q10. To load a starting address of 0x21340x2134 into the DMA address registers, which two OUT instructions and data bytes are required in the correct order?

A.OUT 0x72, 0x34 then OUT 0x72, 0x21 ✅
B.OUT 0x72, 0x21 then OUT 0x72, 0x34
C.OUT 0x73, 0x34 then OUT 0x73, 0x21
D.OUT 0x73, 0x21 then OUT 0x73, 0x34
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The DMA address register expects the LS byte first, followed by the MS byte. Loading 0x340x34 (LS) then 0x210x21 (MS) via port 0x720x72 follows this rule, making option A correct. Option B reverses the order, causing an incorrect address. Options C and D use port 0x730x73, which belongs to the terminal‑count register, not the address register. Correct sequencing guarantees the DMA controller accesses the intended memory region.

Q11. Why does the 8257 encode the channel number in bits D7‑D6 of the mode word rather than using a separate register?

A.To reduce I/O port usage ✅
B.Because those bits are unused otherwise
C.To allow simultaneous configuration of multiple channels
D.For backward compatibility with older DMA designs
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Embedding the channel selector within the mode word means the controller needs only one I/O write per channel, saving port space and simplifying programming, which is described in option A. Option B is incorrect because the bits are purposefully used for channel selection. Option C is false; each channel still requires its own configuration. Option D is not a design reason for this encoding. Efficient port utilization is a key practical advantage.

Q12. If the mode word loaded is 0x410x41, which channel is enabled and what type of transfer (read or write) is selected?

A.Channel 0, read ✅
B.Channel 1, write
C.Channel 0, write
D.Channel 1, read
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The binary form of 0x410x41 is 0100 0001: bits D7‑D6 = 01 select channel 0, and D0 = 1 selects a read operation. Thus option A correctly identifies channel 0 with a read. Option B selects channel 1, which is not indicated. Option C would require D0 = 0 for a write. Option D also points to channel 1. Understanding the bit fields allows accurate DMA setup.

Q13. Provide the sequence of OUT instructions (including I/O ports and data bytes) needed to initialize channel 2 for a write operation of 1024 bytes starting at memory address 0x30000x3000.

A.MVI A,0x48; OUT 0x78; MVI A,0x00; OUT 0x73; MVI A,0x04; OUT 0x73; MVI A,0x00; OUT 0x71; MVI A,0x30; OUT 0x71
B.MVI A,0x48; OUT 0x78; MVI A,0x00; OUT 0x73; MVI A,0x04; OUT 0x73; MVI A,0x00; OUT 0x72; MVI A,0x30; OUT 0x72 ✅
C.MVI A,0x48; OUT 0x78; MVI A,0x04; OUT 0x73; MVI A,0x00; OUT 0x73; MVI A,0x30; OUT 0x72; MVI A,0x00; OUT 0x72
D.MVI A,0x48; OUT 0x78; MVI A,0x04; OUT 0x73; MVI A,0x00; OUT 0x73; MVI A,0x00; OUT 0x71; MVI A,0x30; OUT 0x71
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Option B correctly programs the mode word for channel 2 write (bits D7‑D6 = 10, D0 = 0), loads the LS count byte 0x000x00 then MS count byte 0x040x04 for 1024 bytes, and writes the address LS byte 0x000x00 and MS byte 0x300x30 to port 0x720x72. Option A uses the wrong address port (0x71), option C swaps the count bytes, and option D also misplaces the address port. Accurate sequencing is essential for reliable DMA operation.

Q14. What does setting bit D14 to 1 in the mode word indicate about the direction of the DMA transfer?

A.Memory‑to‑peripheral
B.Peripheral‑to‑memory ✅
C.No transfer
D.Bidirectional
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Bit D14 controls the transfer direction: a value of 1 selects peripheral‑to‑memory, matching option B. Option A would require D14 = 0. Option C is not a valid setting; the controller always performs a transfer when enabled. Option D suggests a dual‑direction mode, which the 8257 does not provide. Knowing this bit’s meaning helps engineers configure the correct data flow direction.

Q15. Write a short program (series of MVI and OUT statements) to transfer 256 bytes from a peripheral to memory locations beginning at 0x40000x4000 using channel 0, assuming the Mode Set Register is at 0x280x28, the DMA address register at 0x200x20, and the terminal‑count register at 0x210x21.

A.MVI A,0x41; OUT 0x28; MVI A,0x00; OUT 0x21; MVI A,0x01; OUT 0x21; MVI A,0x00; OUT 0x20; MVI A,0x40; OUT 0x20 ✅
B.MVI A,0x41; OUT 0x28; MVI A,0x01; OUT 0x21; MVI A,0x00; OUT 0x21; MVI A,0x00; OUT 0x20; MVI A,0x40; OUT 0x20
C.MVI A,0x41; OUT 0x28; MVI A,0x00; OUT 0x21; MVI A,0x01; OUT 0x21; MVI A,0x40; OUT 0x20; MVI A,0x00; OUT 0x20
D.MVI A,0x41; OUT 0x28; MVI A,0x01; OUT 0x21; MVI A,0x00; OUT 0x21; MVI A,0x40; OUT 0x20; MVI A,0x00; OUT 0x20
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Option A follows the correct order: load mode word 0x410x41 to enable channel 0 read, write LS count 0x000x00 then MS count 0x010x01 for 256 bytes, and finally load address LS byte 0x000x00 and MS byte 0x400x40 to port 0x200x20. Options B‑D either reverse count bytes or swap address bytes, leading to incorrect transfer length or start address. Proper programming ensures the DMA moves the exact 256‑byte block to the intended memory region.

Q16. What does the acronym DMA stand for?

A.Direct Memory Access ✅
B.Dynamic Memory Allocation
C.Digital Motor Architecture
D.Distributed Memory Array
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: DMA is universally defined as Direct Memory Access, which allows peripherals to read or write memory without CPU intervention. Option A provides the correct expansion. The other choices describe unrelated concepts: dynamic memory allocation is a software technique, digital motor architecture is unrelated hardware, and distributed memory array refers to a memory system topology. Recognizing the acronym is fundamental when studying DMA controllers.

Q17. If the most‑significant byte of the terminal count is loaded before the least‑significant byte, how will the DMA controller interpret the transfer length?

A.It will treat the count as a much larger value ✅
B.It will ignore the high byte
C.It will swap the bytes, resulting in a shorter transfer
D.It will cause a hardware fault
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: Loading the MS byte first causes the controller to latch an incorrect LS byte (often zero) followed by the intended MS byte, effectively forming a value where the high byte is placed in the low‑order position, yielding a much larger count than intended. Option A captures this outcome. Options B and C describe behaviors that do not occur, and option D is incorrect because the controller does not fault; it simply misinterprets the count. This mistake can cause buffer overruns in real systems.

Q18. Explain why a binary‑ladder D/A converter is useful when generating the address lines for a DMA transfer.

A.It provides a scalable way to convert binary count to parallel address signals ✅
B.It reduces power consumption
C.It increases transfer speed
D.It eliminates the need for mode registers
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: A binary‑ladder D/A converter translates a binary count into a set of parallel outputs that can directly drive address lines, allowing the DMA controller to step through memory addresses sequentially without additional logic. This scalability is described in option A. Options B and C are not primary reasons; the converter’s main benefit is address generation, not power or speed. Option D is incorrect because mode registers are still required for other control functions. Understanding this role helps designers implement efficient DMA addressing schemes.

Q19. For a memory‑to‑memory DMA operation of 4 KB using channel 3, which mode‑word value and register contents (address and count) must be programmed?

A.Mode word 0x61, address 0x0000, count 0x1000
B.Mode word 0x71, address 0x2000, count 0x1000 ✅
C.Mode word 0x51, address 0x3000, count 0x1000
D.Mode word 0x41, address 0x4000, count 0x1000
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Channel 3 is selected by setting bits D7‑D6 to 11, and a memory‑to‑memory transfer requires D14=1 (peripheral‑to‑memory) with D0=0 for write, giving the mode word 0x710x71. The starting address 0x20000x2000 is loaded into the address registers, and the count for 4 KB is 0x10000x1000. Option B matches all these requirements. Options A, C, and D either use the wrong channel bits or incorrect addresses, leading to misconfigured transfers. Correct programming ensures the DMA moves the full 4 KB block as intended.

🔗 Related Topics (MCQs)