PIC16F88

Manufacturer Part NumberPIC16F88
ManufacturerMicrochip Technology Inc.
PIC16F88 datasheet
 
1
2
3
4
5
6
7
8
9
10
11
Page 11
12
Page 12
13
Page 13
14
Page 14
15
Page 15
16
Page 16
17
Page 17
18
Page 18
19
Page 19
20
Page 20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
Page 13/228:

Program Memory Organization

Download datasheet (5Mb)Embed
PrevNext
2.0
MEMORY ORGANIZATION
There are two memory blocks in the PIC16F87/88
devices. 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 indi-
rect address pointer specifies the address of the data
EEPROM memory to read/write. The PIC16F87/88
device’s 256 bytes of data EEPROM memory have the
address range of 00h-FFh. More details on the
EEPROM memory can be found in Section 3.0 “Data
EEPROM and Flash Program Memory”.
Additional information on device memory may be found
®
in the “PICmicro
Mid-Range MCU Family Reference
Manual” (DS33023).
2.1

Program Memory Organization

The PIC16F87/88 devices have a 13-bit program
counter capable of addressing an 8K x 14 program
memory space. For the PIC16F87/88, the first 4K x 14
(0000h-0FFFh)
is
physically
implemented
Figure 2-1). Accessing a location above the physically
implemented address will cause a wraparound. For
example, the same instruction 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.
 2005 Microchip Technology Inc.
PIC16F87/88
FIGURE 2-1:
PROGRAM MEMORY MAP
AND STACK: PIC16F87/88
PC<12:0>
CALL, RETURN
RETFIE, RETLW
Stack Level 1
Stack Level 2
Stack Level 8
Reset Vector
Interrupt Vector
On-Chip
Program
Memory
Wraps to
0000h-03FFh
(see
2.2
Data Memory Organization
The data memory is partitioned into multiple banks that
contain the General Purpose Registers and the Special
Function Registers. Bits RP1 (STATUS<6>) and RP0
(STATUS<5>) are the bank select bits.
RP1:RP0
00
01
10
11
Each bank extends up to 7Fh (128 bytes). The lower
locations of each bank are reserved for the Special
Function Registers. Above the Special Function Regis-
ters are General Purpose Registers, implemented as
static RAM. All implemented banks contain SFRs.
Some “high use” SFRs from one bank may be mirrored
in another bank for code reduction and quicker access
(e.g., the STATUS register is in Banks 0-3).
Note:
EEPROM data memory description can be
found in Section 3.0 “Data EEPROM and
Flash Program Memory” of this data
sheet.
13
0000h
0004h
0005h
Page 0
07FFh
0800h
Page 1
0FFFh
1000h
1FFFh
Bank
0
1
2
3
DS30487C-page 11