Microcontroller and Embedded Systems
Microcontroller and Embedded Systems
UNIT-1
Working Registers:
- In the first 128B of RAM (from 00H to 7FH), the first 32B i.e. memory
from addresses 00H to 1FH consists of 32 Working Registers that are
organized as four banks with 8 Registers in each Bank.
- The 4 banks are named as Bank0, Bank1, Bank2 and Bank3. Each Bank
consists of 8 registers named as R0 – R7.
- Each Register can be addressed in two ways: either by name or by
address.
- To address the register by name, first the corresponding Bank must be
selected. In order to select the bank, we have to use the RS0 and RS1
bits of the Program Status Word (PSW) Register (RS0 and RS1 are 3rd
and 4th bits in the PSW Register).
- When addressing the Register using its address i.e. 12H for example,
the corresponding Bank may or may not be selected. (12H corresponds
to R2 in Bank2). The following addresses can be used to select register
banks.
Prepared by
Shweta Sharma