Datasheet

2002 Microchip Technology Inc. Preliminary DS39598C-page 9
PIC16F818/819
2.0 MEMORY ORGANIZATION
There are two memory blocks in the PIC16F818/819.
These are the program memory and the data memory.
Each block has its own bus, so access to each block
can occur during the same oscillator cycle.
The data memory can be further broken down into the
general purpose RAM and the Special Function
Registers (SFRs). The operation of the SFRs that
control the “core” are described here. The SFRs used
to control the peripheral modules are described in the
section discussing each individual peripheral module.
The data memory area also contains the data
EEPROM memory. This memory is not directly
mapped into the data memory, but is indirectly
mapped. That is, an indirect address pointer specifies
the address of the data EEPROM memory to read/
write. The PIC16F818’s 128 bytes of data EEPROM
memory have the address range 00h-7Fh, and the
PIC16F819’s 256 bytes of data EEPROM memory
have the address range 00h-FFh. More details on the
EEPROM memory can be found in Section 3.0.
Additional information on device memory may be found
in the PICmicro™ Mid-Range Reference Manual,
(DS33023).
FIGURE 2-1: PROGRAM MEMORY MAP
AND STACK FOR
PIC16F818
2.1 Program Memory Organization
The PIC16F818/819 devices have a 13-bit program
counter capable of addressing an 8K x 14 program
memory space. For the PIC16F818, the first 1K x 14
(0000h-03FFh) is physically implemented (see
Figure 2-1). For the PIC16F819, the first 2K x 14 is
located at 0000h-07FFh (see Figure 2-2). Accessing a
location above the physically implemented address will
cause a wraparound. For example, the same instruc-
tion will be accessed at locations 020h, 420h, 820h,
C20h, 1020h, 1420h, 1820h, and 1C20h.
The RESET vector is at 0000h and the interrupt vector
is at 0004h.
FIGURE 2-2: PROGRAM MEMORY MAP
AND STACK FOR
PIC16F819
PC<12:0>
13
0000h
0004h
0005h
Stack Level 1
Stack Level 8
RESET Vector
Interrupt Vector
On-Chip
CALL, RETURN
RETFIE, RETLW
1FFFh
Stack Level 2
Program
Memory
Page 0
03FFh
0400h
Wraps to
0000h - 03FFh
PC<12:0>
13
0000h
0004h
0005h
Stack Level 1
Stack Level 8
RESET Vector
Interrupt Vector
On-Chip
CALL, RETURN
RETFIE, RETLW
1FFFh
Stack Level 2
Program
Memory
Page 0
07FFh
0800h
Wraps to
0000h - 07FFh