[SOLVED] Pic 16f877a registers

Status
Not open for further replies.

jjeevan007

Full Member level 5
Joined
Apr 13, 2012
Messages
310
Helped
44
Reputation
88
Reaction score
43
Trophy points
1,308
Location
bangalore
Activity points
2,782
Hi to all,


I am New to PIC

In PIC16F877A few Special Functional Registers(SFRs) have more than one address, why so

example :

Status Register (Addresses are 03h,83h,103h,183h)

OPTION_REG REGISTER (ADDRESSES are 81h, 181h) and

INTCON REGISTER (ADDRESSES are 0Bh, 8Bh, 10Bh, 18Bh).


my doubt is All the Registers are same or not. If i change the valve in one thus it changed in all the
registers of the same.

Thanks and Regards
 

It is just one location visible at different addresses to avoid having to bank switch to get to it. Otherwise, if you were in bank 1 and wanted to look at a status bit you would have to switch to bank zero then back to bank 1 which would be very inefficient.

Also, address 103H is really address 3 while bank 1 is selected. In other words, if you look at address 3 in any bank you will see the STATUS register. The actual address 103H only exists in certain addressing modes - normally you cannot address locations larger than 7F due to the limited processor address bus width - hence the need for bank switching.

Keith
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…