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

📝 Analog to Digital Converter in 8085 Microprocessor (7 MCQs)

Converting External Analog Measurements into 8085 Binary Data

An Analog-to-Digital Converter (ADC) changes a varying analog voltage into a digital code that the 8085 can read and process. Sensors and transducers often produce continuous electrical signals, whereas the microprocessor operates on binary values. The ADC samples an input, quantizes its magnitude into one of a finite number of levels and supplies the corresponding digital representation.

Sampling, Quantization and Binary Encoding

The input signal is compared with reference levels that divide its permitted range into discrete intervals. The selected interval determines the quantized value, which is encoded as a binary number. For an n-bit converter, there are 2 to the power of n possible codes. The reference voltages establish the range and nominal code spacing.

Conversion Completion and Digital Data Transfer

An ADC may use a start signal, clock, comparator and conversion logic to determine the digital result. After conversion, a completion signal indicates that the output is ready. The 8085 can then read the digital byte through an input port or interface circuit and store or process it.

Example of an Eight-Bit Measurement Conversion

Suppose an ideal eight-bit ADC measures a voltage from 0 V to 5 V. Its nominal step is 5/256, or approximately 19.53 mV. An input near 2.5 V produces a code near decimal 128, or 80H, depending on the converter's transition and rounding convention.

Using ADC Data in Monitoring and Control Systems

The 8085 can use converted values to monitor temperature, pressure, light intensity or motor conditions when suitable sensors and signal-conditioning circuits are connected. Software can compare measured codes with stored limits and operate alarms or control outputs. ADC resolution and conversion speed determine how finely and frequently the system can observe an analog quantity.

Clarifying Sampling, Resolution and Conversion Accuracy

'An ADC produces a continuous digital value' is incorrect because its output belongs to a finite set of codes. 'An eight-bit ADC has eight possible results' is incorrect because it has 256 codes. 'Resolution guarantees measurement accuracy' is incorrect because offset, gain, noise and quantization errors also affect the result.

ADC Code Ranges and Interface Operations for Examinations

Determine the number of output codes and calculate the nominal voltage step from the reference range. Distinguish sampling from quantization and encoding, and identify the signals used to start conversion and read its result. In interfacing questions, trace the analog input, ADC output data lines, completion indication and 8085 input operation.

Analog Measurement and Conversion Terms

  • ADC - Converts analog input into digital code.
  • Sampling - Captures an input value at an instant.
  • Quantization - Assigns a value to a discrete level.
  • Resolution - Number of available output codes.
  • Reference Voltage - Defines the conversion range.
  • EOC - Indicates conversion completion.
2
Easy
3
Medium
2
Hard

📝 All Analog to Digital Converter in 8085 Microprocessor MCQs

Q1. What is the hexadecimal address of the Mode Set Register for the 8257 DMA controller in the example provided?

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

📖 Explanation: The correct address is 28H because the example explicitly states that the Mode Set Register resides at 28H. Option B (20H) and C (21H) are the addresses of the DMA address and terminal‑count registers, respectively, while D (78H) belongs to a different device. Writing the mode word to the proper port ensures the DMA controller receives the configuration it needs to manage transfers correctly.

Q2. In the mode word loaded into the Mode Set Register (value 0x41), which bit position indicates that channel 0 is enabled?

A.D0 ✅
B.D1
C.D2
D.D3
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The mode word 0x41 translates to binary 0100 0001, where the least‑significant bit (D0) is set to 1, signalling that channel 0 is enabled. Bits D1‑D3 are zero, so they do not enable any other channel. Selecting D0 as the enable bit matches the documented format, while the other options represent different control functions, making them incorrect.

Q3. To transfer 1024 (0x400) bytes from memory address 0x2000 to a peripheral using channel 2, which of the following register‑loading sequences is correct?

A.Mode word → LS count → MS count → LS address → MS address ✅
B.LS address → MS address → Mode word → LS count → MS count
C.LS count → MS count → Mode word → LS address → MS address
D.Mode word → LS address → MS address → LS count → MS count
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The proper sequence follows the controller’s protocol: first write the mode word to select channel 2 and set transfer direction, then load the terminal‑count low byte (00H) and high byte (04H) so the DMA knows 0x400 bytes are required, and finally load the start address low (00H) and high (20H) bytes. Any other ordering violates the required initialization order, causing incorrect transfer length or start location.

Q4. Why must the terminal‑count register be loaded with the least‑significant byte first followed by the most‑significant byte?

A.The bus operates in little‑endian order, matching the controller’s expectation ✅
B.The controller only begins counting after the MS byte is received
C.Hardware latches the LS byte first, then uses it as the lower half of the count
D.There is no specific reason; either order works
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The 8257 DMA controller follows a little‑endian convention, meaning the least‑significant byte is transferred first. Loading LS then MS ensures the full 16‑bit count is assembled correctly inside the device. If the order were reversed, the controller would interpret the bytes incorrectly, leading to an erroneous transfer size. The other options describe behaviors that do not reflect the hardware’s design.

Q5. If the Mode Set Register is mistakenly programmed with 0x00, what is the most likely outcome for a DMA transfer on channel 0?

A.The transfer will not start because the channel is disabled
B.The transfer will read from an incorrect memory location ✅
C.The transfer will be forced into read‑only mode
D.The transfer will automatically re‑initialize after completion
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A value of 0x00 clears all control bits, including the enable bit for channel 0, so the DMA engine will not commence the transfer. Option B suggests an address error, which depends on the address registers, not the mode word. Option C implies a direction change that is not encoded by 0x00, and D describes auto‑initialization, which also requires specific bits to be set. Therefore, the transfer simply does not start.

Q6. Which code snippet correctly initializes the 8257 to move 512 bytes from memory location 0x3000 to a floppy using channel 0, given Mode Set Register at 0x28, DMA address register at 0x20, and Terminal Count register at 0x21?

A.MVI A,0x41; OUT 0x28 MVI A,0x00; OUT 0x21 MVI A,0x02; OUT 0x21 MVI A,0x00; OUT 0x20 MVI A,0x30; OUT 0x20
B.MVI A,0x00; OUT 0x28 MVI A,0x02; OUT 0x21 MVI A,0x00; OUT 0x21 MVI A,0x30; OUT 0x20 MVI A,0x00; OUT 0x20
C.MVI A,0x41; OUT 0x28 MVI A,0x00; OUT 0x21 MVI A,0x02; OUT 0x21 MVI A,0x00; OUT 0x20 MVI A,0x30; OUT 0x20 ✅
D.MVI A,0x41; OUT 0x28 MVI A,0x02; OUT 0x21 MVI A,0x00; OUT 0x21 MVI A,0x30; OUT 0x20 MVI A,0x00; OUT 0x20
💡 Difficulty: hard | ✅ Correct: C

📖 Explanation: The correct snippet follows the required order: write the mode word (0x41) to port 0x28 to enable channel 0, then load the terminal‑count low byte (00H) and high byte (02H) to port 0x21, establishing a count of 0x200 (512) bytes. Finally, load the start address low byte (00H) and high byte (30H) to port 0x20, pointing to 0x3000. Options A and D misorder the count and address bytes, while B omits the essential mode‑word write, preventing the DMA channel from being activated.

Q7. Which setting of bits D7–D0 in the Mode Set Register configures a peripheral‑to‑memory (read) operation that automatically re‑initializes after completing the transfer?

A.65
B.72 ✅
C.80
D.96
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Bit pattern 0x48 (0100 1000) sets D6 = 1 to enable channel 0, D5 = 0 to select a read (peripheral‑to‑memory) direction, and D3 = 1 to request auto‑initialization after the transfer finishes. The remaining bits keep normal operation and disable unnecessary features. 0x41 lacks the auto‑initialize bit, 0x50 would select a write direction, and 0x60 sets an incorrect combination of control bits, so they do not meet the required configuration. This pattern ensures the DMA controller repeats the transfer without additional software intervention.

🔗 Related Topics (MCQs)