Electronic – Why does PIC MCU have (and needs) duplicate registers

microcontrollerpic

I have Recently been working on PIC16F84. In PIC16F84 the RAM is divided into two bank. I noticed some of the registers have duplicates in bank1 and bank2. Examples are PCL, STATUS etc. Can any one please explain why these duplicates are needed?
Dataset link.

Best Answer

There are a number of reasons for this.

Speed - Registers that need to be accessed frequently are always available whatever bank you have selected, which saves on having to constantly switch banks to get to them.

Necessity - The register that controls which bank you use has to be available all the time. If it was in just one bank you would be unable to access it once you'd switched to another bank, and you'd be stuck there!

Economy - If you don't require all of your address space to hold the memory, you can ignore some of the address lines to save on decoding logic and use the chip space for something else.

Related Topic