πŸŽ“ BookMCQ
← Back to 8. Programmable Peripheral Interface (PPI) 8255A

πŸ“ Output Control Signals in Mode 1 for 8255A (15 MCQs)

OBF, ACK and INTR Signals in Strobed Output Mode

Mode 1 output uses three control signals for each port to coordinate data transmission with an external peripheral. Output Buffer Full indicates that the 8255A has data waiting for the device, Acknowledge confirms acceptance, and Interrupt Request can notify the processor when the output handshake reaches the required condition. These signals prevent premature replacement of unconsumed output data.

Port C Pin Allocation for Output Handshaking

For Port A output, PC7 provides OBF_A, PC6 receives ACK_A and PC3 provides INTR_A. PC4 and PC5 remain available for general I/O. For Port B output, PC1 provides OBF_B, PC2 receives ACK_B and PC0 provides INTR_B. This allocation supports independent output handshaking for both ports.

Output Buffer Status and Peripheral Acknowledgement

When the processor writes data to an output port, the rising edge of WR sets the output-buffer status and OBF goes low to indicate that data is available. The peripheral receives the byte and activates ACK low. The acknowledgement resets OBF, indicating that the previous output has been accepted.

Example of Transmitting a Byte Through Port A

Assume Port A is configured for Mode 1 output and the accumulator contains 5AH. Executing OUT 80H transfers the byte to the 8255A output latch, and OBF_A goes low on PC7. The peripheral acknowledges reception by activating ACK_A low through PC6, allowing the next byte to be transmitted.

INTE Control and Interrupt Request Generation

INTR can notify the processor that an output device has accepted the transmitted data, provided the appropriate interrupt-enable flip-flop is set. Port A output INTE_A is controlled through BSR selection of PC6, whereas Port B output INTE_B is controlled through PC2. The CPU can then prepare another output byte or perform other operations.

Misconceptions About Mode 1 Output Handshaking

'OBF goes low before the processor writes data' reverses the output-handshake sequence because the write initiates the buffer-full indication. 'ACK is an output from the 8255A' is incorrect because the peripheral supplies acknowledgement. 'INTR is the same signal as OBF' overlooks their separate status and interrupt functions.

Output Handshake Timing and Pin-Function Questions

Identify PC7, PC6 and PC3 as Port A output handshake connections and PC1, PC2 and PC0 as Port B connections. Trace the WR, OBF and ACK transitions and explain when the output buffer becomes available again. Practise identifying the corresponding BSR control bits for enabling output interrupts.

Mode 1 Output-Control and Handshake Terminology

  • OBF - Indicates output data availability.
  • ACK - Confirms peripheral data acceptance.
  • INTR - Signals an interrupt request.
  • WR - Activates output writing.
  • INTE_A - Port A output interrupt enable.
  • INTE_B - Port B output interrupt enable.
3
Easy
7
Medium
5
Hard

πŸ“ All Output Control Signals in Mode 1 for 8255A MCQs

Q1. What is the primary purpose of the ALE (Address Latch Enable) signal in Mode 1 of the 8085 microprocessor?

A.To latch the lower-order address byte
B.To indicate that the address bus contains a valid address βœ…
C.To enable data bus drivers
D.To reset the accumulator
πŸ’‘ Difficulty: easy | βœ… Correct: B

πŸ“– Explanation: The ALE line is asserted to tell external latch circuitry that the address on the bus is valid, allowing the lower-order address byte to be stored for the current operation. Option B correctly states this purpose. Option A confuses ALE with the lower‑order latch function, which is separate. Option C describes the data‑bus enable, not ALE. Option D is unrelated to ALE's role, making B the only accurate choice.

Q2. Why does the 8085 generate the RD (Read) signal after the ALE signal during an opcode fetch in Mode 1?

A.Because the processor needs to read data before address is stable
B.Because ALE must be de‑asserted before any read operation
C.Because the opcode is stored in memory and must be read after the address is latched βœ…
D.Because RD also controls the program counter
πŸ’‘ Difficulty: easy | βœ… Correct: C

πŸ“– Explanation: During an opcode fetch the processor first asserts ALE to latch the address, then asserts RD to read the opcode from that address. Option C captures this sequence. Option A reverses the order, which would attempt to read before a valid address. Option B is incorrect because ALE can stay asserted while RD is low. Option D confuses RD with program‑counter control, which is not its function.

Q3. A program loads a byte from address 2500H, complements it with CMA, and stores the result at 2501H. Which sequence of control signals correctly represents the write cycle for the result in Mode 1?

A.ALE β†’ Address β†’ RD low β†’ Data β†’ WR low
B.ALE β†’ Address β†’ WR low β†’ Data β†’ RD low
C.ALE β†’ Address β†’ WR low β†’ Data β†’ WR high
D.ALE β†’ Address β†’ Data β†’ WR low β†’ WR high βœ…
πŸ’‘ Difficulty: medium | βœ… Correct: D

πŸ“– Explanation: The write cycle begins with ALE to latch the address, followed by placing the data on the bus, then asserting WR low to write and finally de‑asserting WR high. Option D follows this exact order. Option A mixes a read operation, which is not part of a write. Option B swaps WR and Data, violating timing. Option C omits the final WR high transition, leaving the bus in an undefined state.

Q4. When implementing a loop that copies 10 bytes from location 3000H to 3100H, which control signal must remain asserted throughout each iteration to ensure the source address is correctly presented to memory?

A.IO/M
B.ALE βœ…
C.WR
D.RD
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: During each iteration the source address must be latched before the memory is accessed, which is achieved by keeping ALE asserted for the address phase. Option B correctly identifies ALE. IO/M (Option A) selects I/O versus memory but does not latch the address. WR (Option C) is used only for write operations, not for presenting the address. RD (Option D) indicates a read operation but does not control address latching.

Q5. How does the relationship between the RD and WR signals affect data transfer direction in Mode 1?

A.Both low simultaneously indicate a bidirectional transfer
B.RD low means data is being read from memory, WR low means data is being written to memory βœ…
C.RD high and WR high both enable data transfer
D.RD and WR are unrelated to data direction
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: In Mode 1, a low RD signal tells the memory that the processor wants to read data, while a low WR signal tells the memory that the processor wants to write data. Option B correctly describes this directional behavior. Option A is false because RD and WR are never asserted together for a single transfer. Option C misstates the active‑low nature of the signals. Option D ignores their essential role, making B the only accurate answer.

Q6. If the ALE signal is inadvertently held low for two consecutive cycles, what immediate effect will the 8085 experience during instruction execution in Mode 1?

A.The address bus will contain undefined values causing wrong memory accesses βœ…
B.The accumulator will be forced to zero
C.The program counter will skip an instruction
D.The IO/M line will toggle
πŸ’‘ Difficulty: medium | βœ… Correct: A

πŸ“– Explanation: Holding ALE low prevents the external latch from capturing the address, so the address bus retains whatever value was previously present, leading to incorrect memory accesses. Option A captures this outcome. Option B is unrelated to ALE. Option C describes a program‑counter issue not caused by ALE. Option D involves the IO/M line, which ALE does not directly control. Therefore, A is the correct consequence.

Q7. What role does the IO/M line play in distinguishing between memory and I/O operations in Mode 1?

A.It selects whether the address bus refers to an I/O port or a memory location βœ…
B.It enables the clock generator
C.It controls the power supply to the processor
D.It resets the stack pointer
πŸ’‘ Difficulty: easy | βœ… Correct: A

πŸ“– Explanation: The IO/M line is asserted high for memory cycles and low for I/O cycles, allowing external circuitry to differentiate the type of operation. Option A correctly states this function. Options B, C, and D describe unrelated processor functions, making them incorrect.

Q8. During a DMA‑like operation where the 8085 writes a byte to an external peripheral, which control signal must be asserted first to ensure the peripheral correctly latches the address in Mode 1?

A.WR
B.RD
C.ALE βœ…
D.IO/M
πŸ’‘ Difficulty: hard | βœ… Correct: C

πŸ“– Explanation: The peripheral needs the address to be latched before data is presented, and ALE is the signal that triggers the external address latch. Option C is therefore correct. WR (Option A) is used after the address has been latched to write data. RD (Option B) is for reading, not writing. IO/M (Option D) merely indicates I/O versus memory and does not latch the address, so C remains the only valid choice.

Q9. Given the timing diagram where ALE goes high in the first half of T1, the address bus is stable during T2, and WR goes low in T3, which cycle corresponds to the opcode fetch of the next instruction?

A.T1
B.T2 βœ…
C.T3
D.T4
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: Opcode fetch requires the address to be latched first (ALE high) and then the processor reads the opcode from that address. The address becomes valid in T2, making it the appropriate cycle for fetching the opcode. Option B therefore matches the fetch phase. T1 only latches the address, T3 initiates a write, and T4 is beyond the fetch window, so they are incorrect.

Q10. Why does Mode 1 require the IO/M line to be driven externally, whereas Mode 2 generates it internally?

A.Mode 1 supports only memory operations
B.Mode 1 allows flexible interfacing with external devices that may need separate control βœ…
C.Mode 2 does not use the address bus
D.Mode 1 lacks a program counter
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: Mode 1 is designed for systems where the designer may need to control the distinction between memory and I/O independently, so the IO/M line is provided as an external pin. Option B captures this flexibility. Option A is false because Mode 1 can handle both memory and I/O. Option C misstates Mode 2's capabilities, and Option D is unrelated to the IO/M function, leaving B as the correct explanation.

Q11. In a routine that increments the value stored at address 4000H, which control signal transition indicates that the new value is being written back to memory in Mode 1?

A.ALE goes high
B.RD goes low
C.WR goes low βœ…
D.IO/M goes low
πŸ’‘ Difficulty: medium | βœ… Correct: C

πŸ“– Explanation: Writing back to memory requires the processor to assert WR low after the address has been latched, signalling the memory to accept the data. Option C correctly identifies this transition. ALE (Option A) is used earlier to latch the address. RD (Option B) indicates a read, not a write. IO/M (Option D) merely selects memory versus I/O and does not perform the write, so C is the right answer.

Q12. How does the timing of ALE relative to the address bus differ between the opcode fetch cycle and a memory write cycle in Mode 1?

A.ALE is asserted only during opcode fetch
B.ALE is asserted at the beginning of both cycles, but the address bus is used later in the write cycle βœ…
C.ALE is never used in a write cycle
D.ALE timing is identical for both cycles
πŸ’‘ Difficulty: medium | βœ… Correct: B

πŸ“– Explanation: In both cycles ALE is asserted early to latch the address, but during a write cycle the processor holds the address longer while data is prepared for the WR pulse. Option B accurately describes this nuance. Option A incorrectly limits ALE to fetch cycles. Option C denies ALE's role in writes, which is false. Option D ignores the later use of the address bus in the write cycle, making B the correct choice.

Q13. When interfacing the 8085 with a 16‑Kbyte ROM using Mode 1, which control signal must be held low to enable a write operation, and what would happen if it were mistakenly left high?

A.RD; the ROM would output undefined data
B.WR; the write would be ignored and the ROM contents unchanged βœ…
C.ALE; the address would not be latched
D.IO/M; the operation would be treated as I/O
πŸ’‘ Difficulty: hard | βœ… Correct: B

πŸ“– Explanation: ROMs are read‑only, so a write requires the WR line to be asserted low; if WR remains high, the write pulse never occurs and the ROM remains unchanged. Option B correctly states this behavior. RD (Option A) is for reading, not writing. ALE (Option C) only latches the address and does not affect write permission. IO/M (Option D) merely selects I/O versus memory and would not cause a write to be ignored, so B is the accurate answer.

Q14. Explain why the 8085 requires separate RD and WR signals instead of a single bidirectional data enable line in Mode 1.

A.To simplify circuit design
B.Because the processor cannot differentiate read and write without them
C.To allow simultaneous read and write on the same bus
D.Because external devices need distinct timing for reading and writing βœ…
πŸ’‘ Difficulty: hard | βœ… Correct: D

πŸ“– Explanation: External memory and I/O devices often need different timing constraints for read versus write cycles; having separate RD and WR lines lets designers meet those constraints independently. Option D captures this requirement. Option A is oppositeβ€”using two lines adds complexity. Option B is inaccurate because the processor could use a single line with additional logic. Option C is false because the bus is not bidirectional simultaneously. Therefore, D is the correct explanation.

Q15. A designer wants to use Mode 1 to read a byte from an I/O port at address 00H. Which combination of control signals must be correctly set during the read cycle?

A.ALE high, IO/M low, RD low, WR high
B.ALE low, IO/M high, RD low, WR high
C.ALE high, IO/M high, RD low, WR high βœ…
D.ALE low, IO/M low, RD high, WR low
πŸ’‘ Difficulty: medium | βœ… Correct: C

πŸ“– Explanation: For an I/O read, ALE must be asserted to latch the address, IO/M must be high to indicate an I/O operation, RD must be low to initiate the read, and WR must remain high because no write occurs. Option C matches this exact combination. Option A incorrectly sets IO/M low, which would select memory. Option B omits ALE, preventing address latching. Option D asserts WR low and RD high, which would attempt a write, not a read. Hence, C is the correct choice.

πŸ”— Related Topics (MCQs)