MicroprocessorUnit 115 min read
Microprocessors & 8085 Architecture: Definitions, Systems, Blocks, Evolution
Unit 1 of Microprocessor covers the foundational concepts of microprocessors (vs. microcontrollers), the organization of microprocessor-based systems, and a detailed exploration of the 8085 architecture—its block diagram, internal components, signal types, and key features compared to predecessors.
TAKEAWAYS:
- A microprocessor is a programmable IC that executes instructions, while a microcontroller integrates a microprocessor with memory, I/O, and peripherals on a single chip.
- A microprocessor-based system follows a layered architecture: CPU → Memory → I/O → System Bus, with the CPU as the central processing unit (ALU, CU, Registers) and support chips (e.g., 8255 PPI, 8259 PIC) for extended functionality.
- The 8085 is an 8-bit microprocessor with 26 address lines (64KB memory), 8 data lines, and 5 control signals (e.g.,
READ,WRITE,HLDA). Its block diagram includes the Arithmetic Logic Unit (ALU), Control Unit (CU), Register Array, Timing and Control Unit, and Address/Data Bus Interface. - The 8085 architecture supports three types of signals: Address Bus (A0–A15), Data Bus (D0–D7), and Control Bus (e.g.,
RESET IN,INTR,TRAP). The stack pointer (SP) and program counter (PC) are critical registers for program execution. - The 8085 introduced serial communication (SID/SOUT), interrupt-driven I/O, and direct memory access (DMA) capabilities, setting the stage for modern microprocessors.
- Real-world applications: The 8085 is used in industrial control systems (e.g., traffic light controllers), embedded systems (e.g., old ATMs, medical devices), and educational kits (e.g., 8085 trainer boards).
1. Microprocessor vs. Microcontroller: Key Differences
Microprocessors and microcontrollers are both programmable ICs, but they differ in architecture, functionality, and applications.
Comparison Table
| Feature | Microprocessor | Microcontroller |
|---|---|---|
| Definition | A general-purpose CPU on a chip. | A complete embedded system on a chip. |
| Components | Requires external memory, I/O, clocks. | Integrates CPU, memory, I/O, timers. |
| Flexibility | High (used in PCs, servers). | Low (dedicated tasks). |
| Power Consumption | Higher (active cooling often needed). | Lower (optimized for battery use). |
| Examples | Intel 8085, 8086, ARM Cortex-A. | Arduino (ATmega328), PIC16F877A. |
| Applications | Desktops, laptops, networking. | Washing machines, microwaves, IoT. |
Why the Distinction Matters
- Microprocessors are used where general-purpose computing is needed (e.g., PCs, servers).
- Microcontrollers dominate embedded systems (e.g., Khalti payment terminals, Pathao bike tracking, NTC smart meters).
(Shows the actual 8085 chip with pins for address, data, and control buses.)
2. Organization of a Microprocessor-Based System
A microprocessor-based system follows a hierarchical architecture with four main layers:
graph TD
A["System Bus"] --> B["CPU"]
A --> C["Memory"]
A --> D["I/O Devices"]
B --> E["ALU"]
B --> F["Control Unit"]
B --> G["Registers"]
C --> H["RAM/ROM"]
D --> I["Peripherals: Keyboard, Display, etc."]Key Components
CPU (Central Processing Unit)
- ALU (Arithmetic Logic Unit): Performs arithmetic (
ADD,SUB) and logical (AND,OR) operations. - Control Unit (CU): Decodes instructions and controls data flow.
- Registers: Temporary storage (e.g., Accumulator (A), Program Counter (PC), Stack Pointer (SP)).
- ALU (Arithmetic Logic Unit): Performs arithmetic (
Memory
- RAM (Read-Write Memory): Volatile, used for temporary data.
- ROM (Read-Only Memory): Non-volatile, stores firmware (e.g., BIOS).
I/O Devices
- Input: Keyboard, sensors.
- Output: Display, printers.
System Bus
- Address Bus: Carries memory addresses (8085 has 16 lines → 64KB address space).
- Data Bus: Transfers data (8085 has 8 lines → 8-bit data).
- Control Bus: Manages signals like
READ,WRITE,RESET.
Real-World Example: eSewa Payment System
- The eSewa app on your phone uses a microcontroller (e.g., ARM Cortex-M) in the payment terminal to:
- Read the QR code (input via camera).
- Process the transaction (CPU + ALU).
- Send confirmation to the server (via serial communication).
- The 8085-like architecture is simplified in modern systems but follows the same bus-based communication principle.
3. 8085 Microprocessor Architecture: Block Diagram
The 8085 is an 8-bit microprocessor with 26 pins, categorized into three buses:
Pin Configuration
Internal Block Diagram
graph TD
A["Address Bus"] --> B["Address Latch"]
B --> C["Address Buffer"]
C --> D["Memory/IO"]
E["Data Bus"] --> F["Data Buffer"]
F --> G["Accumulator"]
F --> H["General Registers"]
I["Control Unit"] --> J["Instruction Register"]
J --> K["Program Counter"]
K --> L["Memory"]
M["ALU"] --> N["Flags"]
N --> O["Condition Codes: Z, S, CY, AC, P"]Key Registers
| Register | Size (bits) | Purpose |
|---|---|---|
| PC | 16 | Holds the address of the next instruction. |
| SP | 16 | Points to the top of the stack (used for CALL, RET, PUSH). |
| PSW | 8 | Program Status Word: Contains flags (Z, S, CY, AC, P). |
| A | 8 | Accumulator: Used in most arithmetic/logical operations. |
| B, C, D, E, H, L | 8 each | General-purpose registers (e.g., HL pairs for 16-bit operations). |
Flags in 8085
| Flag | Name | Set When... |
|---|---|---|
| Z | Zero | Result of an operation is zero. |
| S | Sign | Result is negative (MSB = 1). |
| CY | Carry | Overflow in addition/subtraction or shift/rotate operation. |
| AC | Auxiliary | Half-carry in BCD operations (e.g., adding two hex digits). |
| P | Parity | Even parity in the result (even number of 1s). |
Example: Adding Two Numbers
MVI A, 0x56 ; Load A with 56h (86 in decimal)
MVI B, 0x3A ; Load B with 3Ah (58 in decimal)
ADD B ; A = A + B (86 + 58 = 144)
- After
ADD B:- A = 0x90 (144 in decimal).
- Flags:
Z = 0(result ≠ 0).S = 0(result is positive).CY = 1(carry generated, since 86 + 58 = 144 > 255).AC = 1(half-carry occurred in the lower nibble: 6 + A = 10 → carry to next nibble).
4. Signal Types in 8085
The 8085 uses three types of signals:
| Bus Type | Direction | Purpose |
|---|---|---|
| Address Bus | Output (CPU → Memory/IO) | Selects memory location or I/O device. |
| Data Bus | Bidirectional | Transfers data between CPU, memory, and I/O. |
| Control Bus | Input/Output | Manages operations like READ, WRITE, RESET, INTR. |
Control Signals
| Signal | Description |
|---|---|
RESET IN |
Resets the CPU (asynchronous). |
HLDA |
Hold Acknowledge: Acknowledges DMA request. |
INTR |
Maskable Interrupt: Can be ignored if EI (Enable Interrupt) is not set. |
TRAP |
Non-maskable Interrupt: Cannot be disabled (highest priority). |
READ |
CPU reads data from memory/IO. |
WRITE |
CPU writes data to memory/IO. |
5. 8085 vs. 8086: Key Differences
While Unit 2 covers the 8086, here’s a quick comparison to highlight the evolution:
| Feature | 8085 (8-bit) | 8086 (16-bit) |
|---|---|---|
| Data Bus | 8-bit | 16-bit |
| Address Bus | 16-bit (64KB memory) | 20-bit (1MB memory) |
| Architecture | Von Neumann (shared bus) | Harvard-like (separate data/address buses) |
| Interrupts | 5 (TRAP, RST 7.5, RST 6.5, RST 5.5, INTR) | 256 (vectored) |
| Stack | 16-bit (SP) | 16-bit (SP) + segment registers (CS, DS, SS) |
| Flags | 5 (Z, S, CY, AC, P) | 9 (added: TF, IF, DF, OF) |
| Clock Speed | 3 MHz | 5–10 MHz |
| Applications | Embedded systems, trainers | PCs, servers |
Real-World Tie-In: NTC Smart Meters
- Older NTC meters used 8085-like microcontrollers for basic metering.
- Modern smart meters use 8086-like architectures (or ARM) for two-way communication, data encryption, and cloud connectivity.
6. Evolution of Microprocessors (Brief Overview)
The 8085 was part of the first generation of microprocessors. Here’s how it fits into the timeline:
timeline
title Evolution of Microprocessors
1971 : Intel 4004 (4-bit, first microprocessor)
1972 : Intel 8008 (8-bit)
1974 : Intel 8080 (8-bit, 20-pin)
1976 : Intel 8085 (8-bit, improved 8080)
1978 : Intel 8086 (16-bit, first x86)
1982 : Intel 80286 (16-bit, protected mode)
1985 : Intel 80386 (32-bit)
1993 : Intel Pentium (32-bit superscalar)
2000s : x86-64 (64-bit), ARM (mobile)Why This Matters for Exams
- The 8085 introduced serial communication, interrupts, and DMA, which are still relevant in modern systems.
- Understanding its limitations (e.g., 8-bit data bus) helps explain why 8086 improved with 16-bit architecture.
7. Worked Example: 8085 Program to Check Number Sign
Problem: Write an 8085 assembly program to check if a number stored in memory location 2000h is positive or negative.
Solution
MVI A, 00h ; Clear accumulator
LDA 2000h ; Load number from memory
JM NEGATIVE ; Jump if negative (MSB = 1)
POSITIVE:
MVI C, 01h ; Set C = 1 (positive)
JMP DONE
NEGATIVE:
MVI C, 00h ; Set C = 0 (negative)
DONE:
HLT ; Halt
Explanation
LDA 2000h: Loads the number from memory into the Accumulator (A).JM NEGATIVE: Jumps toNEGATIVEif the Sign Flag (S) is set (MSB = 1).MVI C, 01h: Sets registerCto1if positive.MVI C, 00h: Sets registerCto0if negative.
Real-World Tie-In: Bank Loan Approval
- A bank’s loan approval system might use a similar logic:
- If credit score (stored in memory) is ≥ 600, approve (
JM APPROVE). - Else, reject (
JM REJECT).
- If credit score (stored in memory) is ≥ 600, approve (
8. Common Exam Pitfalls & How to Avoid Them
❌ Mistake 1: Confusing Microprocessor and Microcontroller
- Wrong Answer: "Both are the same."
- Correct Answer:
- Microprocessor: Needs external memory/I/O (e.g., 8085 in a PC).
- Microcontroller: Integrated system (e.g., Arduino in a robot).
❌ Mistake 2: Incorrect Flag Explanation
- Wrong Answer: "The Zero Flag is set when the result is odd."
- Correct Answer: "The Zero Flag is set when the result of an operation is zero."
❌ Mistake 3: Drawing Wrong Block Diagram
- Common Error: Missing the Address Latch or Data Buffer.
- Fix: Always include:
- ALU, CU, Registers, Address/Data Bus Interface.
❌ Mistake 4: Ignoring Signal Directions
- Wrong: "The Data Bus is unidirectional."
- Correct: "The Data Bus is bidirectional (CPU ↔ Memory/I/O)."
In the Real World
eSewa/Khalti Payment Terminals
- Uses a microcontroller (e.g., STM32 or ARM Cortex-M) with an 8085-like architecture for:
- Reading QR codes (input via camera).
- Processing transactions (ALU for arithmetic).
- Sending data to the server (serial communication via UART).
- Key Idea: The bus-based communication (address, data, control) is identical to the 8085’s design, just optimized for speed and power.
- Uses a microcontroller (e.g., STM32 or ARM Cortex-M) with an 8085-like architecture for:
NTC Smart Meters
- Older meters used 8085-based systems for:
- Reading analog signals (voltage/current sensors).
- Storing consumption data in memory.
- Sending readings via RS-232/RS-485 (serial communication).
- Key Idea: The interrupt-driven I/O (e.g.,
INTRfor sensor data) is a direct application of 8085’s interrupt system.
- Older meters used 8085-based systems for:
Pathao Bike Tracking
- The GPS module in Pathao bikes uses a microcontroller to:
- Read GPS coordinates (serial input).
- Process location data (ALU for distance calculations).
- Send updates to the server (UART/USART).
- Key Idea: The serial communication (USART) in Pathao’s system is an evolution of the 8085’s SID/SOUT pins.
- The GPS module in Pathao bikes uses a microcontroller to:
Exam Tip
For Block Diagrams:
- Always label ALU, CU, Registers, Address/Data Bus Interface.
- Show bidirectional arrows for the Data Bus.
- Include control signals like
RESET IN,HLDA,INTR.
For Microprocessor vs. Microcontroller:
- Use the memory/I/O integration as the key difference.
- Example: "A microprocessor needs external RAM/ROM, while a microcontroller has it built-in."
For Flags:
- Remember the mnemonic: Zero, Sign, Carry, Auxiliary, Parity.
- Example: After
SUB B, ifCY=1, it means overflow occurred.
For Programs:
- Always comment each instruction.
- Use memory references (e.g.,
LDA 2000h) to show data loading.
For Evolution:
- Know the year and key feature of each chip (e.g., 8086 introduced 16-bit architecture).
Final Note: The 8085 is the foundation for understanding modern microprocessors. Focus on its architecture, signals, and limitations—these concepts appear in every microprocessor course and are tested in PU exams. Practice drawing the block diagram and writing simple programs to score full marks.
Based on the PU BE Computer (PU) syllabus for Microprocessor, unit 1.
Discussion
Loading…