Page 78 - CITS - Electronic Mechanic - TT - 2024
P. 78
ELECTRONICS MECHANIC - CITS
Types of Registers In 8051 Microcontroller
8051 microcontrollers mainly contain two types of registers
1 General-purpose registers (Byte addressable registers)
2 Special function registers (Bit addressable registers)
Microcontrollers basically consist of 256 bytes of RAM (Random Access Memory), which is divided into two parts,
first part contain 128 bytes for general purpose Register these are byte addressable registers and second part
contain 128 bytes for special function registers (SFR) memory these are bit addressable registers.
The part of memory which is used for general purpose is called as RAM, and the memory used for Special
Function Register (SFR) contains all the peripheral related registers like Accumulator, ‘B’ register, Timers or
Counters, and interrupt related registers.
General Purpose Registers
We know that a register is a storage element that can store bits of information.
8051 microcontrollers have 4 registers bank. These are B0, B1, B2, and B3 stand for Bank0, Bank1, Bank2,
Bank3 respectively and each bank contains eight general purpose registers ranging from ‘R0’ to ‘R7’.
These are 32 general purpose registers address from 00h to 1Fh.
The address range of Register Bank 0 (00 h to 07 h)
The address range of Register Bank 1 (08 h to F h)
The address range of Register Bank 2 (10 h to 17 h)
The address range of Register Bank 3 (18 h to 1F h)
These Register Banks are selected with the help of PSW (Program Status Word) Register bits i.e. RS0, RS1.
63
CITS : E & H - Electronics Mechanic - Lesson 34 - 42