English
Language : 

PIC16F872_06 Datasheet, PDF (9/168 Pages) Microchip Technology – 28-Pin, 8-Bit CMOS Flash Microcontroller with 10-Bit A/D
2.0 MEMORY ORGANIZATION
There are three memory blocks in the PIC16F872. The
Program Memory and Data Memory have separate
buses so that concurrent access can occur. Data mem-
ory is covered in this section; the EEPROM data mem-
ory and FLASH program memory blocks are detailed in
Section 3.0.
Additional information on device memory may be found
in the PICmicro™ Mid-Range Reference Manual
(DS33023).
2.1 Program Memory Organization
The PIC16F872 has a 13-bit program counter capable
of addressing an 8K word x 14 bit program memory
space. The PIC16F872 device actually has 2K words of
FLASH program memory. Accessing a location above
the physically implemented address will cause a wrap-
around.
The RESET vector is at 0000h and the interrupt vector
is at 0004h.
FIGURE 2-1:
PIC16F872 PROGRAM
MEMORY MAP AND
STACK
PC<12:0>
CALL, RETURN
13
RETFIE, RETLW
Stack Level 1
Stack Level 2
On-Chip
Program
Memory
Stack Level 8
Reset Vector
Interrupt Vector
Page 0
0000h
0004h
0005h
07FFh
PIC16F872
2.2 Data Memory Organization
The data memory is partitioned into multiple banks
which contain the General Purpose Registers and the
Special Function Registers. Bits RP1 (STATUS<6>)
and RP0 (STATUS<5>) are the bank select bits.
RP1:RP0
00
01
10
11
Bank
0
1
2
3
Each bank extends up to 7Fh (128 bytes). The lower
locations of each bank are reserved for the Special
Function Registers. Above the Special Function Regis-
ters are General Purpose Registers, implemented as
static RAM. All implemented banks contain Special
Function Registers. Some frequently used Special
Function Registers from one bank may be mirrored in
another bank for code reduction and quicker access.
Note: EEPROM Data Memory description can be
found in Section 4.0 of this data sheet.
2.2.1
GENERAL PURPOSE REGISTER
FILE
The register file can be accessed either directly, or indi-
rectly through the File Select Register (FSR).
1FFFh
© 2006 Microchip Technology Inc.
DS30221C-page 7