PIC18F2480/2580/4480/4580
6.1
Program Memory Organization
6.0
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
upper boundary of the physically implemented memory
and the 2-Mbyte address will return all ‘0’s (a NOP
instruction).
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.
The PIC18F2480 and PIC18F4480 each have
16 Kbytes of Flash memory and can store up to
8,192 single-word instructions. The PIC18F2580 and
PIC18F4580 each have 32 Kbytes of Flash memory
and can store up to 16,384 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.
Additional detailed information on the operation of the
Flash program memory is provided in Section 7.0
“Flash Program Memory”. Data EEPROM is dis-
cussed separately in Section 8.0 “Data EEPROM
Memory”.
The program memory maps for PIC18FX480 and
PIC18FX580 devices are shown in Figure 6-1.
FIGURE 6-1:
PROGRAM MEMORY MAP AND STACK FOR
PIC18F2480/2580/4480/4580 DEVICES
PIC18FX480
PIC18FX580
PC<20:0>
PC<20:0>
21
21
CALL,RCALL,RETURN
RETFIE,RETLW
CALL,RCALL,RETURN
RETFIE,RETLW
Stack Level 1
Stack Level 1
•
•
•
•
•
•
Stack Level 31
Reset Vector
Stack Level 31
Reset Vector
0000h
0008h
0000h
High-Priority Interrupt Vector
High-Priority Interrupt Vector
Low-Priority Interrupt Vector
0008h
0018h
Low-Priority Interrupt Vector 0018h
On-Chip
Program Memory
3FFFh
4000h
On-Chip
Program Memory
7FFFh
80000h
Read ‘0’
Read ‘0’
1FFFFFh
200000h
1FFFFFh
200000h
© 2009 Microchip Technology Inc.
DS39637D-page 67