Unit I: Introduction to Microcontroller 8051
Introduction to Microcontroller 8051
-----------------------------------
1. Architecture of Microcontroller 8051:
- The 8051 microcontroller is an 8-bit microcontroller designed by Intel in 1980.
- It has an 8-bit data bus, 16-bit address bus, and 4 KB ROM and 128 bytes RAM.
- Key components include the ALU, registers, timers, serial communication, I/O ports, and interrupt
system.
2. General-Purpose and Special-Purpose Registers:
- General-Purpose Registers:
a. Accumulator (A): Used in arithmetic and logical operations.
b. B Register: Used in multiplication and division operations.
- Special-Purpose Registers:
a. Program Status Word (PSW): Indicates the status of the program.
b. Stack Pointer (SP): Points to the top of the stack.
c. Data Pointer (DPTR): Used in data addressing.
3. Memory Organization:
- Program Memory (ROM): Stores the program code.
- Data Memory (RAM): Divided into general-purpose RAM and special function registers.
4. Stack Operations:
- The stack is used for temporary data storage during function calls and interrupts.
- Stack Pointer (SP) manages stack memory, which grows upward by default.
5. Addressing Modes:
- Immediate Addressing: Operand is a constant.
- Direct Addressing: Access data using its address.
- Indirect Addressing: Use a pointer register to access data.
- Register Addressing: Operands are in registers.
6. Interrupts:
- The 8051 supports five interrupts: Timer 0, Timer 1, External Interrupt 0, External Interrupt 1, and
Serial Communication Interrupt.
- Interrupt priorities determine the sequence of servicing multiple interrupts.