English
Language : 

PIC16F627A_05 Datasheet, PDF (17/180 Pages) Microchip Technology – Flash-Based, 8-Bit CMOS Microcontrollers with nanoWatt Technology
PIC16F627A/628A/648A
4.0 MEMORY ORGANIZATION
4.1 Program Memory Organization
The PIC16F627A/628A/648A has a 13-bit program
counter capable of addressing an 8K x 14 program
memory space. Only the first 1K x 14 (0000h-03FFh)
for the PIC16F627A, 2K x 14 (0000h-07FFh) for the
PIC16F628A and 4K x 14 (0000h-0FFFh) for the
PIC16F648A are physically implemented. Accessing a
location above these boundaries will cause a wrap-
around within the first 1K x 14 space (PIC16F627A),
2K x 14 space (PIC16F628A) or 4K x 14 space
(PIC16F648A). The Reset vector is at 0000h and the
interrupt vector is at 0004h (Figure 4-1).
FIGURE 4-1:
PROGRAM MEMORY MAP
AND STACK
PC<12:0>
CALL, RETURN
13
RETFIE, RETLW
Stack Level 1
Stack Level 2
Stack Level 8
Reset Vector
000h
Interrupt Vector
On-chip Program
Memory
PIC16F627A,
PIC16F628A and
PIC16F648A
On-chip Program
Memory
PIC16F628A and
PIC16F648A
On-chip Program
Memory
PIC16F648A only
0004
0005
03FFh
07FFh
0FFFh
4.2 Data Memory Organization
The data memory (Figure 4-2 and Figure 4-3) is
partitioned into four banks, which contain the General
Purpose Registers (GPRs) and the Special Function
Registers (SFRs). The SFRs are located in the first 32
locations of each bank. There are General Purpose
Registers implemented as static RAM in each bank.
Table 4-1 lists the General Purpose Register available
in each of the four banks.
TABLE 4-1: GENERAL PURPOSE STATIC
RAM REGISTERS
PIC16F627A/628A PIC16F648A
Bank0
Bank1
Bank2
Bank3
20-7Fh
A0h-FF
120h-14Fh, 170h-17Fh
1F0h-1FFh
20-7Fh
A0h-FF
120h-17Fh
1F0h-1FFh
Addresses F0h-FFh, 170h-17Fh and 1F0h-1FFh are
implemented as common RAM and mapped back to
addresses 70h-7Fh.
Table 4-2 lists how to access the four banks of registers
via the Status register bits RP1 and RP0.
TABLE 4-2:
Bank
0
1
2
3
ACCESS TO BANKS OF
REGISTERS
RP1
RP0
0
0
0
1
1
0
1
1
4.2.1
GENERAL PURPOSE REGISTER
FILE
The register file is organized as 224 x 8 in the
PIC16F627A/628A and 256 x 8 in the PIC16F648A.
Each is accessed either directly or indirectly through
the File Select Register (FSR), See Section 4.4
“Indirect Addressing, INDF and FSR Registers”.
1FFFh
© 2005 Microchip Technology Inc.
DS40044D-page 15