Datasheet

Table Of Contents
© 2008 Microchip Technology Inc. DS39626E-page 53
PIC18F2525/2620/4525/4620
5.0 MEMORY ORGANIZATION
There are three types of memory in PIC18 enhanced
microcontroller devices:
Program Memory
Data RAM
Data EEPROM
As Harvard architecture devices, the data and program
memories use separate busses; this allows for con-
current access of the two memory spaces. The data
EEPROM, for practical purposes, can be regarded as
a peripheral device, since it is addressed and accessed
through a set of control registers.
Additional detailed information on the operation of the
Flash program memory is provided in Section 7.0
“Flash Program Memory”. Data EEPROM is
discussed separately in Section 6.0 “Data EEPROM
Memory.
5.1 Program Memory Organization
PIC18 microcontrollers implement a 21-bit program
counter, which is capable of addressing a 2-Mbyte
program memory space. Accessing a location between
the upper boundary of the physically implemented
memory and the 2-Mbyte address will return all ‘0’s (a
NOP instruction).
The PIC18F2525 and PIC18F4525 each have
48 Kbytes of Flash memory and can store up to 24,576
single-word instructions. The PIC18F2620 and
PIC18F4620 each have 64 Kbytes of Flash memory
and can store up to 32,768 single-word instructions.
PIC18 devices have two interrupt vectors. The Reset
vector address is at 0000h and the interrupt vector
addresses are at 0008h and 0018h.
The program memory maps for PIC18FX525 and
PIC18FX620 devices are shown in Figure 5-1.
FIGURE 5-1: PROGRAM MEMORY MAP AND STACK FOR PIC18F2525/2620/4525/4620 DEVICES
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
C000h
BFFFh
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
10000h
FFFFh
On-Chip
Program Memory
High-Priority Interrupt Vector
0008h
User Memory Space
Read ‘0
1FFFFFh
200000h
PIC18FX525
PIC18FX620