PIC12F635/PIC16F636/639
FIGURE 2-1: PROGRAM MEMORY MAP AND
STACK OF THE PIC12F635
2.0
2.1
MEMORY ORGANIZATION
Program Memory Organization
PC<12:0>
CALL, RETURN
RETFIE, RETLW
The PIC12F635/PIC16F636/639 devices have 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 PIC12F635) and 2K x 14
(0000h-07FFh, for the PIC16F636/639) is physically
implemented. Accessing a location above these
boundaries will cause a wraparound within the first
2K x 14 space. The Reset vector is at 0000h and the
interrupt vector is at 0004h (see Figure 2-1).
13
Stack Level 1
Stack Level 8
Reset Vector
0000h
2.2
Data Memory Organization
Interrupt Vector
0004h
0005h
The data memory (see Figure 2-2) is partitioned into
two banks, which contain the General Purpose
Registers (GPR) and the Special Function Registers
(SFR). The Special Function Registers are located in
the first 32 locations of each bank. Register locations
20h-7Fh in Bank 0 and A0h-BFh in Bank 1 are GPRs,
implemented as static RAM for the PIC16F636/639.
For the PIC12F635, register locations 40h through 7Fh
are GPRs implemented as static RAM. Register
locations F0h-FFh in Bank 1 point to addresses
70h-7Fh in Bank 0. All other RAM is unimplemented
and returns ‘0’ when read. RP0 of the STATUS register
is the bank select bit.
On-chip Program
Memory
03FFh
0400h
Access 0-3FFh
1FFFh
FIGURE 2-2: PROGRAM MEMORY MAP AND
STACK OF THE PIC16F636/639
RP1
0
RP0
0
PC<12:0>
→
→
→
→
Bank 0 is selected
Bank 1 is selected
Bank 2 is selected
Bank 3 is selected
CALL, RETURN
RETFIE, RETLW
13
0
1
1
0
Stack Level 1
Stack Level 8
1
1
Reset Vector
0000h
0004h
0005h
Interrupt Vector
On-chip Program
Memory
07FFh
0800h
Access 0-7FFh
1FFFh
© 2007 Microchip Technology Inc.
DS41232D-page 17