PIC16F88

Manufacturer Part NumberPIC16F88
ManufacturerMicrochip Technology Inc.
PIC16F88 datasheet
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
Page 111
112
Page 112
113
Page 113
114
Page 114
115
Page 115
116
Page 116
117
Page 117
118
Page 118
119
Page 119
120
Page 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 115/228:

ANALOG-TO-DIGITAL CONVERTER (A/D) MODULE

Download datasheet (5Mb)Embed
PrevNext
12.0
ANALOG-TO-DIGITAL
CONVERTER (A/D) MODULE
The Analog-to-Digital (A/D) converter module has
seven inputs for 18/20 pin devices (PIC16F88 devices
only).
The conversion of an analog input signal results in a
corresponding 10-bit digital number. The A/D module
has a high and low-voltage reference input that is
software selectable to some combination of V
V
- (RA2) or V
+ (RA3).
REF
REF
The A/D converter has a unique feature of being able
to operate while the device is in Sleep mode. To oper-
ate in Sleep, the A/D conversion clock must be derived
from the A/D’s internal RC oscillator.
REGISTER 12-1:
ANSEL: ANALOG SELECT REGISTER (ADDRESS 9Bh) PIC16F88 DEVICES ONLY
U-0
R/W-1
ANS6
bit 7
bit 7
Unimplemented: Read as ‘0’
bit 6-0
ANS<6:0>: Analog Input Select bits
Bits select input function on corresponding AN<6:0> pins.
(1,2)
1 = Analog I/O
0 = Digital I/O
Note 1:
Setting a pin to an analog input disables the digital input buffer. The corresponding
TRIS bit should be set to input mode when using pins as analog inputs. Only AN2 is
an analog I/O, all other ANx pins are analog inputs.
2:
See the block diagrams for the analog I/O pins to see how ANSEL interacts with the
CHS bits of the ADCON0 register.
Legend:
R = Readable bit
-n = Value at POR
 2005 Microchip Technology Inc.
The A/D module has five registers:
• A/D Result High Register (ADRESH)
• A/D Result Low Register (ADRESL)
• A/D Control Register 0 (ADCON0)
• A/D Control Register 1 (ADCON1)
• Analog Select Register (ANSEL)
The ADCON0 register, shown in Register 12-2,
controls the operation of the A/D module. The ANSEL
, V
,
register, shown in Register 12-1 and the ADCON1
DD
SS
register, shown in Register 12-3, configure the func-
tions of the port pins. The port pins can be configured
as analog inputs (RA3/RA2 can also be voltage
references) or as digital I/O.
Additional information on using the A/D module can be
found in the “PICmicro
Reference Manual” (DS33023).
R/W-1
R/W-1
R/W-1
ANS5
ANS4
ANS3
W = Writable bit
U = Unimplemented bit, read as ‘0’
‘1’ = Bit is set
‘0’ = Bit is cleared
PIC16F87/88
®
Mid-Range MCU Family
R/W-1
R/W-1
R/W-1
ANS2
ANS1
ANS0
bit 0
x = Bit is unknown
DS30487C-page 113