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
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
Page 191
192
Page 192
193
Page 193
194
Page 194
195
Page 195
196
Page 196
197
Page 197
198
Page 198
199
Page 199
200
Page 200
201
202
Page 195/202

Download datasheet (4Mb)Embed
PrevNext
INDEX
A
A/D
Specifications.................................................... 160, 161
Absolute Maximum Ratings .............................................. 143
AC Characteristics
Industrial and Extended ............................................ 153
Load Conditions ........................................................ 152
ADC .................................................................................... 65
Acquisition Requirements ........................................... 73
Associated registers.................................................... 75
Block Diagram............................................................. 65
Calculating Acquisition Time....................................... 73
Channel Selection....................................................... 66
Configuration............................................................... 66
Configuring Interrupt ................................................... 69
Conversion Clock........................................................ 66
Conversion Procedure ................................................ 69
Internal Sampling Switch (R
) Impedance................ 73
SS
Interrupts..................................................................... 68
Operation .................................................................... 69
Operation During Sleep .............................................. 69
Port Configuration ....................................................... 66
Reference Voltage (V
)........................................... 66
REF
Result Formatting........................................................ 68
Source Impedance...................................................... 73
Starting an A/D Conversion ........................................ 68
ADCON0 Register............................................................... 71
ADCON1 Register............................................................... 71
ADRESH Register (ADFM = 0) ........................................... 72
ADRESH Register (ADFM = 1) ........................................... 72
ADRESL Register (ADFM = 0)............................................ 72
ADRESL Register (ADFM = 1)............................................ 72
Analog Front-end (AFE)
Power-On Reset ....................................................... 113
Analog Input Connection Considerations............................ 55
Analog-to-Digital Converter. See ADC
ANSEL Register .................................................................. 34
Assembler
MPASM Assembler................................................... 140
B
BAUDCTL Register ............................................................. 94
Block Diagrams
ADC ............................................................................ 65
ADC Transfer Function ............................................... 74
Analog Input Model ............................................... 55, 74
Clock Source............................................................... 21
Comparator 1 .............................................................. 54
Comparator 2 .............................................................. 54
Comparator Modes ..................................................... 57
Crystal Operation ........................................................ 24
EUSART Receive ....................................................... 84
EUSART Transmit ...................................................... 83
External RC Mode....................................................... 25
Fail-Safe Clock Monitor (FSCM) ................................. 31
In-Circuit Serial Programming Connections.............. 127
Interrupt Logic ........................................................... 120
MCLR Circuit............................................................. 113
On-Chip Reset Circuit ............................................... 112
PIC16F688.................................................................... 5
RA1 Pins ..................................................................... 38
RA2 Pin....................................................................... 38
RA3 Pin....................................................................... 39
RA4 Pin....................................................................... 39
© 2007 Microchip Technology Inc.
PIC16F688
RA5 Pin ...................................................................... 40
RC0 and RC1 Pins ..................................................... 43
RC2 and RC3 Pins ..................................................... 43
RC4 Pin ...................................................................... 44
RC5 Pin ...................................................................... 44
Resonator Operation .................................................. 24
Timer1 ........................................................................ 48
TMR0/WDT Prescaler ................................................ 45
Watchdog Timer (WDT)............................................ 123
Break Character (12-bit) Transmit and Receive ............... 101
Brown-out Reset (BOR).................................................... 114
Associated ................................................................ 115
Specifications ........................................................... 157
Timing and Characteristics ....................................... 156
C
C Compilers
MPLAB C18.............................................................. 140
MPLAB C30.............................................................. 140
Clock Accuracy with Asynchronous Operation ................... 92
Clock Sources
External Modes........................................................... 23
EC ...................................................................... 23
HS ...................................................................... 24
LP ....................................................................... 24
OST .................................................................... 23
RC ...................................................................... 25
XT ....................................................................... 24
Internal Modes............................................................ 25
Frequency Selection........................................... 27
HFINTOSC ......................................................... 25
INTOSC .............................................................. 25
INTOSCIO .......................................................... 25
LFINTOSC.......................................................... 27
Clock Switching .................................................................. 29
CMCON0 Register.............................................................. 61
CMCON1 Register.............................................................. 62
Code Examples
A/D Conversion .......................................................... 70
Assigning Prescaler to Timer0.................................... 46
Assigning Prescaler to WDT....................................... 46
Indirect Addressing..................................................... 20
Initializing PORTA ...................................................... 33
Initializing PORTC ...................................................... 42
Saving Status and W Registers in RAM ................... 122
Ultra Low-Power Wake-up Initialization...................... 36
Code Protection ................................................................ 126
Comparator......................................................................... 53
C2OUT as T1 Gate..................................................... 62
Configurations ............................................................ 56
Interrupts .................................................................... 59
Operation.............................................................. 53, 58
Operation During Sleep .............................................. 60
Response Time .......................................................... 59
Synchronizing COUT w/Timer1 .................................. 62
Comparator Module
Associated registers ................................................... 64
Comparator Voltage Reference (CV
)
REF
Response Time .......................................................... 59
Comparator Voltage Reference (CV
)............................ 63
REF
Effects of a Reset ....................................................... 60
Specifications ........................................................... 159
Comparators
C2OUT as T1 Gate..................................................... 49
DS41203D-page 193