English
Language : 

PIC18F258 Datasheet, PDF (39/384 Pages) Microchip Technology – High Performance, 28/40-Pin Enhanced FLASH Microcontrollers with CAN
4.0 MEMORY ORGANIZATION
There are three memory blocks in Enhanced MCU
devices. These memory blocks are:
• Enhanced FLASH Program Memory
• Data Memory
• EEPROM Data Memory
Data and program memory use separate busses,
which allows concurrent access of these blocks. Addi-
tional detailed information on Data EEPROM and
FLASH program memory is provided in Section 5.0 and
Section 6.0, respectively.
4.1 Program Memory Organization
The PIC18F258/458 devices have a 21-bit program
counter that is capable of addressing a 2 Mbyte
program memory space.
The RESET vector address is at 0000h and the
interrupt vector addresses are at 0008h and 0018h.
FIGURE 4-1:
PROGRAM MEMORY MAP
AND STACK FOR
PIC18F258/458
PC<20:0>
CALL,RCALL,RETURN
21
RETFIE,RETLW
Stack Level 1
•
•
•
Stack Level 31
RESET Vector
0000h
High Priority Interrupt Vector 0008h
Low Priority Interrupt Vector 0018h
On-Chip
Program Memory
PIC18FXX8
Figure 4-1 shows the diagram for program memory
map and stack for the PIC18F258 and PIC18F458.
Figure 4-2 shows the the diagram for the program
memory map and stack for the PIC18F248 and
PIC18F448.
4.1.1
INTERNAL PROGRAM MEMORY
OPERATION
The PIC18F258 and the PIC18F458 have 32 Kbytes of
internal Enhanced FLASH program memory. This
means that the PIC18F258 and the PIC18F458 can
store up to 16K of single word instructions. The
PIC18F248 and PIC18F448 have 16 Kbytes of
Enhanced FLASH program memory. This translates
into 8192 single-word instructions, which can be stored
in the Program memory. Accessing a location between
the physically implemented memory and the 2 Mbyte
address will cause a read of all '0's (a NOP instruction).
FIGURE 4-2:
PROGRAM MEMORY MAP
AND STACK FOR
PIC18F248/448
PC<20:0>
CALL,RCALL,RETURN
21
RETFIE,RETLW
Stack Level 1
•
•
•
Stack Level 31
RESET Vector
0000h
High Priority Interrupt Vector 0008h
Low Priority Interrupt Vector 0018h
On-Chip
Program Memory
3FFFh
4000h
7FFFh
8000h
Read ’0’
1FFFFFh
200000h
 2002 Microchip Technology Inc.
Preliminary
Read ’0’
1FFFFFh
200000h
DS41159B-page 37