8085, 8086, 8051 and interfacing
Topics: 8085 architecture, pins, registers, flags, addressing modes, instructions, timing, interrupts; memory and I/O interfacing, 8255, 8253; 8086 basics; 8051 microcontroller, ports, timers, serial; embedded systems.
8085 architecture
The 8085 is an 8-bit processor with a 16-bit address bus (64 KB) and a multiplexed lower address/data bus (AD0–AD7, separated with ALE). Registers: accumulator A, B, C, D, E, H, L (pairs BC, DE, HL), stack pointer and program counter; flags S, Z, AC, P, CY. A 6 MHz crystal gives a 3 MHz clock, so one T-state is about 0.33 µs.
- 8-bit data, 16-bit address (64 KB)
- Flags: S Z AC P CY
- 3 MHz: T-state ≈ 0.333 µs
Example: An instruction takes 7 T-states at 3 MHz. How long does it take?
- One T-state = 1/3 µs.
- 7/3 ≈ 2.33 µs.
Answer: ≈ 2.33 µs
Example: MVI A, 32H then ADI CEH. Give A and the carry and zero flags.
- 32H + CEH = 100H.
- A = 00H, CY = 1, Z = 1.
Answer: A = 00H, CY = 1, Z = 1
Instructions, addressing modes and interrupts
Addressing modes: immediate (MVI A, 05H), register (MOV A, B), direct (LDA 2050H), register indirect (MOV A, M using HL) and implied (CMA). Interrupts in priority order: TRAP (non-maskable), RST 7.5, RST 6.5, RST 5.5, INTR. A restart RST n jumps to address 8n (in hex: RST 7.5 → 003CH).
- LDA: direct; MOV A, M: indirect
- TRAP: highest priority, non-maskable
- RST n vector = 8n
Example: Which addressing mode does LDA 2050H use?
- The address is given in the instruction itself.
- Direct addressing.
Answer: Direct
Example: Find the vector address of RST 7.5.
- 8 × 7.5 = 60.
- 60 = 003CH.
Answer: 003CH
Interfacing, the 8086 and the 8051
Peripheral chips: 8255 programmable peripheral interface (three 8-bit ports), 8253/8254 timer, 8259 interrupt controller, 8251 serial. The 8086 is 16-bit with a 20-bit address (1 MB); physical address = segment × 16 + offset. The 8051 microcontroller has 4 KB ROM, 128 bytes RAM, four 8-bit ports, two timers and a serial port; one machine cycle is 12 clock periods.
- 8086 physical = segment × 10H + offset
- 8051: 4 ports, 2 timers
- 8051 machine cycle = 12 clocks
Example: Find the physical address for segment 1000H and offset 0020H.
- 1000H × 10H = 10000H.
- + 0020H = 10020H.
Answer: 10020H
Example: An 8051 runs from a 12 MHz crystal. Find the machine-cycle time.
- 12 clocks per machine cycle.
- 12/12 MHz = 1 µs.
Answer: 1 µs
The 8085 is an 8-bit processor with 16-bit address bus (64 kB), multiplexed lower address/data lines AD0–AD7, separated by ALE. Registers are A, B, C, D, E, H, L, SP and PC; flags are S, Z, AC, P, CY. TRAP is the highest priority interrupt and non-maskable. The 8086 is 16-bit with a 20-bit address bus (1 MB) and segmented memory. The 8051 microcontroller has 4 kB ROM, 128 bytes RAM, 4 I/O ports, 2 timers and a serial port; the 8255 is a programmable peripheral interface, and the 8253/8254 a programmable timer. A microcontroller integrates CPU, memory and I/O on one chip.
- Addressing modes: immediate, register, direct, indirect, implicit.
- MVI A, 32H is immediate; MOV A, B is register.
- 8085 interrupts: TRAP, RST 7.5, 6.5, 5.5, INTR.
- 8051: Port 0 needs pull-ups; SFRs at 80H–FFH.
- Embedded systems run dedicated real-time tasks.
Key formulas
- Memory = 2^(address lines) bytes
- T = 1/f
- Physical address = segment × 10H + offset
Practice questions
The 8085 address bus is
- 8 bits
- 16 bits
- 20 bits
- 32 bits
Show the answer
Answer: B. 16 bits 64 kB.
ALE in the 8085 is used to
- separate address and data
- stop the clock
- reset
- raise interrupts
Show the answer
Answer: A. separate address and data Demultiplex AD0–AD7.
The highest priority 8085 interrupt is
- TRAP
- RST 7.5
- INTR
- RST 5.5
Show the answer
Answer: A. TRAP Non-maskable.
The 8086 address bus is
- 16 bits
- 20 bits
- 24 bits
- 8 bits
Show the answer
Answer: B. 20 bits 1 MB.
The 8051 has on-chip RAM of
- 128 bytes
- 4 kB
- 64 kB
- 1 MB
Show the answer
Answer: A. 128 bytes 8051 base.
The 8255 is a
- timer
- PPI
- DMA controller
- UART
Show the answer
Answer: B. PPI Programmable peripheral interface.
MVI A, 32H uses
- register addressing
- immediate addressing
- direct addressing
- indirect addressing
Show the answer
Answer: B. immediate addressing Data in the instruction.
The accumulator is
- 16 bits
- 8 bits in 8085
- 20 bits
- 4 bits
Show the answer
Answer: B. 8 bits in 8085 Register A.
Port count of the 8051 is
- 2
- 3
- 4
- 8
Show the answer
Answer: C. 4 P0–P3.
A microcontroller differs from a microprocessor in having
- on-chip memory and I/O
- no CPU
- no program
- only analogue circuits
Show the answer
Answer: A. on-chip memory and I/O Single-chip computer.
The practice questions were written for this studio; they are not copied from ASTU papers. ASTU publishes no topic syllabus for these exams, so the topics are an informed guide based on diploma courses, not an official list.