Sunday 8 March 2015

PIC16F877A Basics (Continued)


Data Memory Organization:

In PIC16F877A the data memory is partitioned into four banks which contain the General Purpose Registers and the Special Function Registers. Number of banks may vary depending on the microcontroller.

Each bank extends up to 7Fh (128 bytes). The Above locations are for SFR and lower locations of each bank are reserved for the General Purpose Registers, implemented as static RAM. While program is being executed, it is working with the particular bank. The default bank is BANK0. Some frequently used Special Function Registers from one bank may be mirrored in another bank for code reduction and quicker access.

To access a register that is located in another bank, one should access it inside the program. There are special registers which can be accessed from any bank, such as STATUS register.


Status Register:

The Status register contains the arithmetic status of the ALU, the Reset status and the bank select bits for data memory.

Setting for RP0, RP1 for bank switching









No comments:

Post a Comment