PIC16F688

Manufacturer Part NumberPIC16F688
ManufacturerMicrochip Technology Inc.
PIC16F688 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
Page 61
62
Page 62
63
Page 63
64
Page 64
65
Page 65
66
Page 66
67
Page 67
68
Page 68
69
Page 69
70
Page 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
Page 65/202

Download datasheet (4Mb)Embed
PrevNext
7.10
Comparator Voltage Reference
The Comparator Voltage Reference module provides
an internally generated voltage reference for the com-
parators. The following features are available:
• Independent from Comparator operation
• Two 16-level voltage ranges
• Output clamped to V
SS
• Ratiometric with V
DD
The VRCON register (Figure 7-3) controls the Voltage
Reference module shown in Figure 7-8.
7.10.1
INDEPENDENT OPERATION
The comparator voltage reference is independent of
the comparator configuration. Setting the VREN bit of
the VRCON register will enable the voltage reference.
7.10.2
OUTPUT VOLTAGE SELECTION
CV
The
voltage reference has 2 ranges with 16
REF
voltage levels in each range. Range selection is
controlled by the VRR bit of the VRCON register. The
16 levels are set with the VR<3:0> bits of the VRCON
register.
The CV
output voltage is determined by the following
REF
equations:
REGISTER 7-3:
VRCON: VOLTAGE REFERENCE CONTROL REGISTER
R/W-0
U-0
R/W-0
VREN
VRR
bit 7
Legend:
R = Readable bit
W = Writable bit
-n = Value at POR
‘1’ = Bit is set
bit 7
VREN: CV
Enable bit
REF
1 = CV
circuit powered on
REF
0 = CV
circuit powered down, no I
REF
bit 6
Unimplemented: Read as ‘0’
bit 5
VRR: CV
Range Selection bit
REF
1 = Low range
0 = High range
bit 4
Unimplemented: Read as ‘0’
Value Selection bits (0 ≤ VR<3:0> ≤ 15)
bit 3-0
VR<3:0>: CV
REF
When VRR = 1: CV
REF
When VRR = 0: CV
REF
© 2007 Microchip Technology Inc.
EQUATION 7-1:
V
=
1 (low range):
RR
CV
REF
V
=
0 (high range):
RR
CV
REF
The full range of V
the construction of the module. See Figure 7-8.
7.10.3
OUTPUT CLAMPED TO V
The CV
output voltage can be set to Vss with no
REF
power consumption by configuring VRCON as follows:
• VREN = 0
• VRR = 1
• VR<3:0> = 0000
This allows the comparator to detect a zero-crossing
while not consuming additional CV
7.10.4
OUTPUT RATIOMETRIC TO VDD
The comparator voltage reference is V
therefore, the CV
V
. The tested absolute accuracy of the Comparator
DD
Voltage Reference can be found in Section 14.0
“Electrical Specifications”.
U-0
R/W-0
R/W-0
VR3
U = Unimplemented bit, read as ‘0’
‘0’ = Bit is cleared
drain and CV
= V
DD
REF
SS
= (VR<3:0>/24) * V
DD
= V
/4 + (VR<3:0>/32) * V
DD
DD
PIC16F688
CV
OUTPUT VOLTAGE
REF
×
=
(VR<3:0>/24)
V
DD
×
(VR<3:0> V
/32)
=
(V
/4) +
DD
DD
to V
cannot be realized due to
SS
DD
SS
module current.
REF
derived and
DD
output changes with fluctuations in
REF
R/W-0
R/W-0
VR2
VR1
VR0
bit 0
x = Bit is unknown
.
DS41203D-page 63