English
Language : 

PIC18F2331_10 Datasheet, PDF (61/392 Pages) Microchip Technology – 28/40/44-Pin Enhanced Flash Microcontrollers with nanoWatt Technology, High-Performance PWM and A/D
PIC18F2331/2431/4331/4431
6.0 MEMORY ORGANIZATION
There are three memory types in enhanced MCU
devices. These memory types are:
• Program Memory
• Data RAM
• Data EEPROM
As Harvard architecture devices, the data and program
memories use separate buses, enabling concurrent
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 8.0
“Flash Program Memory”. Data EEPROM is
discussed separately in Section 7.0 “Data EEPROM
Memory”.
FIGURE 6-1:
PROGRAM MEMORY MAP
AND STACK FOR
PIC18F2331/4331
PC<20:0>
CALL,RCALL,RETURN
21
RETFIE,RETLW
Stack Level 1



Stack Level 31
Reset Vector LSb
000000h
High-Priority Interrupt Vector LSb 000008h
Low-Priority Interrupt Vector LSb 000018h
On-Chip Flash
Program Memory
001FFFh
002000h
Unused
Read ‘0’s
6.1 Program Memory Organization
PIC18 microcontrollers implement a 21-bit program
counter that can address a 2-Mbyte program memory
space. Accessing a location between the upper bound-
ary of the physically implemented memory and the
2-Mbyte address will return all ‘0’s (a NOP instruction).
The PIC18F2331/4331 devices each have 8 Kbytes of
Flash memory and can store up to 4,096 single-word
instructions.
The PIC18F2431/4431 devices each have 16 Kbytes
of Flash memory and can store up to 8,192 single-word
instructions.
PIC18 devices have two interrupt vectors. The Reset
vector address is at 000000h and the interrupt vector
addresses are at 000008h and 000018h.
The program memory maps for PIC18F2331/4331 and
PIC18F2431/4431 devices are shown in Figure 6-1
and Figure 6-2, respectively.
FIGURE 6-2:
PROGRAM MEMORY MAP
AND STACK FOR
PIC18F2431/4431
PC<20:0>
CALL,RCALL,RETURN
21
RETFIE,RETLW
Stack Level 1



Stack Level 31
Reset Vector LSb
000000h
High-Priority Interrupt Vector LSb 000008h
Low-Priority Interrupt Vector LSb 000018h
On-Chip Flash
Program Memory
003FFFh
004000h
Unused
Read ‘0’s
1FFFFFh
1FFFFFh
 2010 Microchip Technology Inc.
DS39616D-page 61