Microprocessor Class Notes - CO4K
Semester (Diploma in Computer
Engineering)
1. Introduction to Microprocessors:
- Microprocessor Definition: A microprocessor is a central processing unit (CPU) on a
single chip that performs the processing of data, instructions, and controls the computer's
functions.
- History:
- The first microprocessor, Intel 4004, was introduced in 1971.
- Progressed to more advanced processors like 8085, 8086, 80286, Pentium, and modern
processors.
- Functions of Microprocessor:
- Executes instructions stored in memory.
- Fetches, decodes, and executes instructions.
- Controls data flow between memory, input/output devices, and processing units.
2. Architecture of Microprocessor:
- Basic Components:
- ALU (Arithmetic and Logic Unit): Performs arithmetic and logical operations.
- Registers: Temporary storage locations used for holding data and instructions.
- Control Unit (CU): Coordinates all activities within the microprocessor.
- Bus: Data, Address, and Control Buses for transferring data and control signals.
- Internal Architecture of Microprocessor (e.g., 8085, 8086):
- 8085 Microprocessor:
- 8-bit processor with 5 functional units (ALU, Registers, Stack Pointer, Program
Counter, and Control Unit).
- 40-pin IC with 16-bit address bus and 8-bit data bus.
- 8086 Microprocessor:
- 16-bit processor with a 20-bit address bus and 16-bit data bus.
- Segmented memory architecture (Code, Data, Stack, Extra).
3. Instruction Set and Addressing Modes:
- Instruction Set:
- Data Transfer Instructions: Move data between registers or between memory and
registers.
- Arithmetic Instructions: Perform addition, subtraction, multiplication, and division.
- Logical Instructions: Perform logical operations like AND, OR, NOT, etc.
- Control Instructions: Control program flow (JUMP, CALL, etc.)
- Addressing Modes:
- Immediate Addressing: Operand is directly specified in the instruction.
- Register Addressing: Operand is in a register.
- Direct Addressing: Operand is in memory at a specified address.
- Indirect Addressing: Operand is accessed through a register that holds the address.
4. Interrupts:
- Definition: Interrupts are signals that temporarily halt the CPU's current execution and
direct it to a predefined location to process an event.
- Types of Interrupts:
- Maskable Interrupts: Can be disabled (e.g., INTR).
- Non-Maskable Interrupts (NMI): Cannot be disabled (e.g., hardware failures).
- Interrupt Handling:
- Interrupt Vector Table (IVT): Holds addresses for interrupt service routines (ISR).
- Priority of Interrupts: Interrupts have priorities to determine which one is processed
first.
5. Programming with Microprocessors:
- Assembly Language Programming:
- Using mnemonics to represent instructions (e.g., MOV, ADD, SUB).
- Writing simple programs for arithmetic, logical operations, loops, etc.
- Example (8085 Assembly Code):
MVI A, 05H ; Load 5 into register A
MVI B, 03H ; Load 3 into register B
ADD B ; Add contents of register B to A
HLT ; Halt program execution
6. Timing Diagrams:
- Clock Cycle: The time required for one complete cycle of the microprocessor to fetch,
decode, and execute an instruction.
- Machine Cycle: A machine cycle consists of several clock cycles.
- Timing Diagram of 8085: Understanding how the signals change with the clock cycle.
7. Interfacing and I/O Devices:
- Input Devices: Devices like keyboard, mouse, sensors that provide data to the
microprocessor.
- Output Devices: Devices like displays, printers, actuators that receive data from the
microprocessor.
- I/O Port Interfacing:
- Memory-Mapped I/O: Uses address space for I/O devices.
- I/O-Mapped I/O: Uses separate address space for I/O devices.
8. Microprocessor System Design:
- Basic Design: The design involves integrating the microprocessor, memory, I/O devices,
and other peripherals into a working system.
- Peripheral Devices: Printer, display, sensors, etc., connected to the microprocessor for
interaction.
9. Advanced Microprocessor Concepts:
- Pipelining: Process of overlapping the fetch, decode, and execute phases to improve
processing speed.
- Multiprocessing: Using multiple processors to handle different tasks or improve
processing power.
- Microcontroller vs Microprocessor:
- Microcontrollers are embedded systems with microprocessors, memory, and I/O built
into a single chip.
- Microprocessors are focused on processing tasks and often need external memory and
I/O devices.
10. Applications of Microprocessors:
- Computers: Microprocessors are used in PCs, laptops, and servers.
- Embedded Systems: Used in appliances, automotive systems, and medical devices.
- Communication Systems: Cellular phones, modems, etc.
- Robotics: Microprocessors control robots for processing data from sensors and
actuators.