- 2071 Bhadra · 8 marks
Bus timing of OUT 42H
Short answer
OUT 42H outputs accumulator to port 42H. It has opcode fetch (4T), memory read of the port address (3T), and I/O write (3T) = 10 T-states. In I/O write, address 42H appears on A15–A8 and AD7–AD0, WR goes low, and accumulator data is sent.
Draw and explain the bus timing for OUT 42H instruction of 8085 microprocessor.
OUT 42H (opcode D3H) sends the content of the accumulator to the output port whose 8-bit address is 42H. It is a 2-byte instruction with 3 machine cycles: opcode fetch (4T), memory read (3T), I/O write (3T) = 10 T-states. Assume it is stored at 2000H, 2001H.
| M-cycle | T | A15-A8 | AD7-AD0 | ALE | Control | IO/M S1 S0 |
|---|---|---|---|---|---|---|
| M1 (opcode fetch, 4T) | T1 | 20H | 00H (PCL) | 1 | - | 0 1 1 |
| T2 | 20H | Hi-Z (bus floats) | 0 | RD low | 0 1 1 | |
| T3 | 20H | D3H (opcode in) | 0 | RD low, rises at end | 0 1 1 | |
| T4 | - | - | 0 | none (decode) | 0 1 1 | |
| M2 (memory read, 3T) | T1 | 20H | 01H | 1 | - | 0 1 0 |
| T2 | 20H | Hi-Z (bus floats) | 0 | RD low | 0 1 0 | |
| T3 | 20H | 42H (data in) | 0 | RD low, rises at end | 0 1 0 | |
| M3 (I/O write, 3T) | T1 | 42H | 42H | 1 | - | 1 0 1 |
| T2 | 42H | A (data out) | 0 | WR low | 1 0 1 | |
| T3 | 42H | A | 0 | WR low, rises at end | 1 0 1 |
| M1 (OF) | M2 (MR) | M3 (IOW)|
|T1 T2 T3 T4|T1 T2 T3 |T1 T2 T3 |
ALE |HI lo lo lo|HI lo lo |HI lo lo |
RD |hi LO LO hi|hi LO LO |hi hi hi |
WR |hi hi hi hi|hi hi hi |hi LO LO |
IO/M |lo lo lo lo|lo lo lo |HI HI HI |
Explanation
- M1 (opcode fetch): address 2000H on the bus, ALE = 1 in T1, IO/M = 0, S1 = S0 = 1. RD goes low in T2-T3 and D3H is read into IR; decoded in T4.
- M2 (memory read): address 2001H; RD low; the port address 42H is read into registers W and Z.
- M3 (I/O write): IO/M goes high (I/O operation), S1 = 0, S0 = 1. The 8-bit port address 42H is placed on both A15-A8 and AD7-AD0 in T1 (ALE = 1). In T2 the content of A is put on AD7-AD0 and WR goes low; the port latches the data when WR goes high at the end of T3.
Total = 4 + 3 + 3 = 10 T-states. Memory is not accessed in the third cycle because IO/M = 1.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- RIM instruction in 8085 · Microprocessor, chapter 5
- Synchronous/asynchronous bus; LXI timing · Microprocessor, chapter 2 · asked 2×
- Microprocessor based system and bus organization · Microprocessor, chapter 1 · asked 5×
- Timing diagram of STA 8050H · Microprocessor, chapter 2
- Machine cycle, T-states, ANI 55H timing · Microprocessor, chapter 2
- Execution of ANI 4BH with timing · Microprocessor, chapter 2
- 8255 mode 2 operation with timing diagram · Instrumentation II, chapter 2
- 8-channel ADC interface with 8255 and 8085 · Instrumentation II, chapter 4
- Interfacing 8-channel 8-bit ADC with 8085 · Instrumentation II, chapter 4
- 12-bit DAC with 8085 · Instrumentation II, chapter 4 · asked 2×