PIC Registers

Some knowledge of the PIC internal architecture is useful at this point. The MCU operation is controlled by a set of file registers, which contain special function registers (SFRs) in the first 32 locations, followed by some general purpose registers (GPRs). The 16F877 has four banks of 128 registers, as shown in Figure B.2. Some registers are duplicated in more than one bank, so the actual number of distinct GPRs is 192.

Figure B.2. PIC 16F877 File Registers (by permission of Microchip Technology Inc.)

Figure B.3 shows the function of each bit of the SFRs in Bank0 and Figure B.4 the details for the status register, which contains ...

Get Programming 8-bit PIC Microcontrollers in C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.