Datasheet
© 2007 Microchip Technology Inc. DS39599G-page 53
PIC18F2220/2320/4220/4320
5.0 MEMORY ORGANIZATION
There are three memory types in enhanced MCU
devices. These memory types are:
• Program Memory
• Data RAM
• Data EEPROM
Data and program memory use separate busses which
allow for concurrent access of these types.
Additional detailed information for Flash program mem-
ory and data EEPROM is provided in Section 6.0
“Flash Program Memory” and Section 7.0 “Data
EEPROM Memory”, respectively.
FIGURE 5-1: PROGRAM MEMORY MAP
AND STACK FOR
PIC18F2220/4220
5.1 Program Memory Organization
A 21-bit program counter is capable of addressing the
2-Mbyte program memory space. Accessing a location
between the physically implemented memory and the
2-Mbyte address will cause a read of all ‘0’s (a NOP
instruction).
The PIC18F2220 and PIC18F4220 each have
4 Kbytes of Flash memory and can store up to 2,048
single-word instructions.
The PIC18F2320 and PIC18F4320 each have
8 Kbytes of Flash memory and can store up to 4,096
single-word instructions.
The Reset vector address is at 0000h and the interrupt
vector addresses are at 0008h and 0018h.
The Program Memory Maps for PIC18F2220/4220 and
PIC18F2320/4320 devices are shown in Figure 5-1
and Figure 5-2, respectively.
FIGURE 5-2: PROGRAM MEMORY MAP
AND STACK FOR
PIC18F2320/4320
PC<20:0>
Stack Level 1
•
Stack Level 31
Reset Vector
Low-Priority Interrupt Vector
•
•
CALL,RCALL,RETURN
RETFIE,RETLW
21
0000h
0018h
On-Chip
Program Memory
High-Priority Interrupt Vector
0008h
User Memory Space
1FFFFFh
1000h
0FFFh
Read ‘0’
200000h
PC<20:0>
Stack Level 1
•
Stack Level 31
Reset Vector
Low-Priority Interrupt Vector
•
•
CALL,RCALL,RETURN
RETFIE,RETLW
21
0000h
0018h
2000h
1FFFh
On-Chip
Program Memory
High-Priority Interrupt Vector
0008h
User Memory Space
Read ‘0’
1FFFFFh
200000h