BM Balmiki Mandal 29 Apr 2023 12 views 0 comments 8051 micro-controller

8051, Microcontroller, Register Bank, Functionalities

Register Bank in the 8051

The 8051 microcontroller has four register banks, each containing 8 registers. Each register bank is associated with a certain segment of the program memory and is selected according to the current instruction's segment (Code or Data). The 8051 registers can be categorized into two types: Special Function Registers (SFRs) and General Purpose Registers (GPRs).

Special Function Registers (SFRs)

The 8051 consists of a set of 16 8-bit registers known as Special Function Registers (SFRs). These registers are located in the range of 0x80 to 0xFF. All SFRs have special functions and operations, such as controlling ports and timers, controlling watchdog timers and interrupts, and operating UARTs, etc. All SFRs’ names are preceded by the character "P". For example, P0 is the first SFR, P1 is the second, and so on.

General Purpose Registers (GPRs)

The 8051 contains eight General Purpose Registers (GPRs), which are used for executing instructions. GPRs are 8-bit registers designated as R0, R1, R2,... R7. They are located in the range of 0x00 to 0x7F. Generally, the data transfer instructions such as MOV, MVI, XCH, etc. involve the GPRs.

Switching Between Register Banks

In 8051, there are four register banks, each having 8 registers. The four banks are designated as Bank 0, Bank 1, Bank 2, and Bank 3. By default, the 8051 executes instructions from Bank 0. However, this can be changed by using the PSW (Program Status Word). The PSW contains a register bank select bit (RB0/RB1) which allows us to choose any one of the four register banks.

0 Comments

No comments yet, Be the first to comment.

Post a Comment

Please sign in to post a comment.

Related Posts

Interrupts in 8051 Microcontroller

The 8051 microcontroller has five interrupt sources: External interrupt 0 (INT0): This interrupt is trigg...

BM Balmiki Mandal 30 Apr 2023
Special Function Register (SFR), 8051 Microcontroller, Memory Architecture, Memory Locations, Functions

Special Function Register (SFRS) Types and Memory Origination of 8051 The 8051 microcontroller has numerous r...

BM Balmiki Mandal 29 Apr 2023
8051 Memory Organization – A Comprehensive Guide

8051 Memory Organisation The 8051 family of microcontrollers are built with a variety of internal memory opti...

BM Balmiki Mandal 29 Apr 2023