50802941f8f80919da1faba9e283f00640ebdab6
[fw/sdcc] / device / lib / pic16 / libdev / pic18f8680.c
1
2 /*
3  * pic18f8680.c - PIC18F8680 Device Library Source
4  *
5  * This file is part of the GNU PIC Library.
6  *
7  * January, 2004
8  * The GNU PIC Library is maintained by,
9  *      Vangelis Rokas <vrokas@otenet.gr>
10  *
11  * $Id$
12  *
13  */
14
15 #include <pic18f8680.h>
16
17 sfr at 0xf00 RXF0SIDH;
18 sfr at 0xf01 RXF0SIDL;
19 volatile __RXF0SIDLbits_t at 0xf01 RXF0SIDLbits;
20
21 sfr at 0xf02 RXF0EIDH;
22 sfr at 0xf03 RXF0EIDL;
23 sfr at 0xf04 RXF1SIDH;
24 sfr at 0xf05 RXF1SIDL;
25 volatile __RXF1SIDLbits_t at 0xf05 RXF1SIDLbits;
26
27 sfr at 0xf06 RXF1EIDH;
28 sfr at 0xf07 RXF1EIDL;
29 sfr at 0xf08 RXF2SIDH;
30 sfr at 0xf09 RXF2SIDL;
31 sfr at 0xf0a RXF2EIDH;
32 sfr at 0xf0b RXF2EIDL;
33 volatile __RXF2EIDLbits_t at 0xf0b RXF2EIDLbits;
34
35 sfr at 0xf0c RXF3SIDH;
36 sfr at 0xf0d RXF3SIDL;
37 volatile __RXF3SIDLbits_t at 0xf0d RXF3SIDLbits;
38
39 sfr at 0xf0e RXF3EIDH;
40 sfr at 0xf0f RXF3EIDL;
41 sfr at 0xf10 RXF4SIDH;
42 sfr at 0xf11 RXF4SIDL;
43 volatile __RXF4SIDLbits_t at 0xf11 RXF4SIDLbits;
44
45 sfr at 0xf12 RXF4EIDH;
46 sfr at 0xf13 RXF4EIDL;
47 sfr at 0xf14 RXF5SIDH;
48 sfr at 0xf15 RXF5SIDL;
49 volatile __RXF5SIDLbits_t at 0xf15 RXF5SIDLbits;
50
51 sfr at 0xf16 RXF5EIDH;
52 sfr at 0xf17 RXF5EIDL;
53 sfr at 0xf18 RXM0SIDH;
54 sfr at 0xf19 RXM0SIDL;
55 volatile __RXM0SIDLbits_t at 0xf19 RXM0SIDLbits;
56
57 sfr at 0xf1a RXM0EIDH;
58 sfr at 0xf1b RXM0EIDL;
59 sfr at 0xf1c RXM1SIDH;
60 sfr at 0xf1d RXM1SIDL;
61 volatile __RXM1SIDLbits_t at 0xf1d RXM1SIDLbits;
62
63 sfr at 0xf1e RXM1EIDH;
64 sfr at 0xf1f RXM1EIDL;
65 sfr at 0xf20 TXB2CON;
66 volatile __TXB2CONbits_t at 0xf20 TXB2CONbits;
67
68 sfr at 0xf21 TXB2SIDH;
69 sfr at 0xf22 TXB2SIDL;
70 volatile __TXB2SIDLbits_t at 0xf22 TXB2SIDLbits;
71
72 sfr at 0xf23 TXB2EIDH;
73 sfr at 0xf24 TXB2EIDL;
74 sfr at 0xf25 TXB2DLC;
75 volatile __TXB2DLCbits_t at 0xf25 TXB2DLCbits;
76
77 sfr at 0xf26 TXB2D0;
78 sfr at 0xf27 TXB2D1;
79 sfr at 0xf28 TXB2D2;
80 sfr at 0xf29 TXB2D3;
81 sfr at 0xf2a TXB2D4;
82 sfr at 0xf2b TXB2D5;
83 sfr at 0xf2c TXB2D6;
84 sfr at 0xf2d TXB2D7;
85 sfr at 0xf2e CANSTATRO3;
86 sfr at 0xf30 TXB1CON;
87 volatile __TXB1CONbits_t at 0xf30 TXB1CONbits;
88
89 sfr at 0xf31 TXB1SIDH;
90 sfr at 0xf32 TXB1SIDL;
91 volatile __TXB1SIDLbits_t at 0xf32 TXB1SIDLbits;
92
93 sfr at 0xf33 TXB1EIDH;
94 sfr at 0xf34 TXB1EIDL;
95 sfr at 0xf35 TXB1DLC;
96 volatile __TXB1DLCbits_t at 0xf35 TXB1DLCbits;
97
98 sfr at 0xf36 TXB1D0;
99 sfr at 0xf37 TXB1D1;
100 sfr at 0xf38 TXB1D2;
101 sfr at 0xf39 TXB1D3;
102 sfr at 0xf3a TXB1D4;
103 sfr at 0xf3b TXB1D5;
104 sfr at 0xf3c TXB1D6;
105 sfr at 0xf3d TXB1D7;
106 sfr at 0xf3e CANSTATRO2;
107 sfr at 0xf40 TXB0CON;
108 volatile __TXB0CONbits_t at 0xf40 TXB0CONbits;
109
110 sfr at 0xf41 TXB0SIDH;
111 sfr at 0xf42 TXB0SIDL;
112 sfr at 0xf43 TXB0EIDH;
113 sfr at 0xf44 TXB0EIDL;
114 sfr at 0xf45 TXB0DLC;
115 volatile __TXB0DLCbits_t at 0xf45 TXB0DLCbits;
116
117 sfr at 0xf46 TXB0D0;
118 sfr at 0xf47 TXB0D1;
119 sfr at 0xf48 TXB0D2;
120 sfr at 0xf49 TXB0D3;
121 sfr at 0xf4a TXB0D4;
122 sfr at 0xf4b TXB0D5;
123 sfr at 0xf4c TXB0D6;
124 sfr at 0xf4d TXB0D7;
125 sfr at 0xf4e CANSTATRO1;
126 sfr at 0xf50 RXB1CON;
127 volatile __RXB1CONbits_t at 0xf50 RXB1CONbits;
128
129 sfr at 0xf51 RXB1SIDH;
130 sfr at 0xf52 RXB1SIDL;
131 volatile __RXB1SIDLbits_t at 0xf52 RXB1SIDLbits;
132
133 sfr at 0xf53 RXB1EIDH;
134 sfr at 0xf54 RXB1EIDL;
135 sfr at 0xf55 RXB1DLC;
136 volatile __RXB1DLCbits_t at 0xf55 RXB1DLCbits;
137
138 sfr at 0xf56 RXB1D0;
139 sfr at 0xf57 RXB1D1;
140 sfr at 0xf58 RXB1D2;
141 sfr at 0xf59 RXB1D3;
142 sfr at 0xf5a RXB1D4;
143 sfr at 0xf5b RXB1D5;
144 sfr at 0xf5c RXB1D6;
145 sfr at 0xf5d RXB1D7;
146 sfr at 0xf5e CANSTATRO0;
147 sfr at 0xf60 RXB0CON;
148 volatile __RXB0CONbits_t at 0xf60 RXB0CONbits;
149
150 sfr at 0xf61 RXB0SIDH;
151 sfr at 0xf62 RXB0SIDL;
152 volatile __RXB0SIDLbits_t at 0xf62 RXB0SIDLbits;
153
154 sfr at 0xf63 RXB0EIDH;
155 sfr at 0xf64 RXB0EIDL;
156 sfr at 0xf65 RXB0DLC;
157 sfr at 0xf66 RXB0D0;
158 sfr at 0xf67 RXB0D1;
159 sfr at 0xf68 RXB0D2;
160 sfr at 0xf69 RXB0D3;
161 sfr at 0xf6a RXB0D4;
162 sfr at 0xf6b RXB0D5;
163 sfr at 0xf6c RXB0D6;
164 sfr at 0xf6d RXB0D7;
165 sfr at 0xf6e CANSTAT;
166 volatile __CANSTATbits_t at 0xf6e CANSTATbits;
167
168 sfr at 0xf6f CANCON;
169 volatile __CANCONbits_t at 0xf6f CANCONbits;
170
171 sfr at 0xf70 BRGCON1;
172 volatile __BRGCON1bits_t at 0xf70 BRGCON1bits;
173
174 sfr at 0xf71 BRGCON2;
175 volatile __BRGCON2bits_t at 0xf71 BRGCON2bits;
176
177 sfr at 0xf72 BRGCON3;
178 volatile __BRGCON3bits_t at 0xf72 BRGCON3bits;
179
180 sfr at 0xf73 CIOCON;
181 volatile __CIOCONbits_t at 0xf73 CIOCONbits;
182
183 sfr at 0xf74 COMSTAT;
184 volatile __COMSTATbits_t at 0xf74 COMSTATbits;
185
186 sfr at 0xf75 RXERRCNT;
187 volatile __RXERRCNTbits_t at 0xf75 RXERRCNTbits;
188
189 sfr at 0xf76 TXERRCNT;
190 volatile __TXERRCNTbits_t at 0xf76 TXERRCNTbits;
191
192 sfr at 0xf80 PORTA;
193 volatile __PORTAbits_t at 0xf80 PORTAbits;
194
195 sfr at 0xf81 PORTB;
196 volatile __PORTBbits_t at 0xf81 PORTBbits;
197
198 sfr at 0xf82 PORTC;
199 volatile __PORTCbits_t at 0xf82 PORTCbits;
200
201 sfr at 0xf83 PORTD;
202 volatile __PORTDbits_t at 0xf83 PORTDbits;
203
204 sfr at 0xf84 PORTE;
205 volatile __PORTEbits_t at 0xf84 PORTEbits;
206
207 sfr at 0xf85 PORTF;
208 volatile __PORTFbits_t at 0xf85 PORTFbits;
209
210 sfr at 0xf86 PORTG;
211 volatile __PORTGbits_t at 0xf86 PORTGbits;
212
213 sfr at 0xf87 PORTH;
214 volatile __PORTHbits_t at 0xf87 PORTHbits;
215
216 sfr at 0xf88 PORTJ;
217 volatile __PORTJbits_t at 0xf88 PORTJbits;
218
219 sfr at 0xf89 LATA;
220 volatile __LATAbits_t at 0xf89 LATAbits;
221
222 sfr at 0xf8a LATB;
223 volatile __LATBbits_t at 0xf8a LATBbits;
224
225 sfr at 0xf8b LATC;
226 volatile __LATCbits_t at 0xf8b LATCbits;
227
228 sfr at 0xf8c LATD;
229 volatile __LATDbits_t at 0xf8c LATDbits;
230
231 sfr at 0xf8d LATE;
232 volatile __LATEbits_t at 0xf8d LATEbits;
233
234 sfr at 0xf8e LATF;
235 volatile __LATFbits_t at 0xf8e LATFbits;
236
237 sfr at 0xf8f LATG;
238 volatile __LATGbits_t at 0xf8f LATGbits;
239
240 sfr at 0xf90 LATH;
241 volatile __LATHbits_t at 0xf90 LATHbits;
242
243 sfr at 0xf91 LATJ;
244 volatile __LATJbits_t at 0xf91 LATJbits;
245
246 sfr at 0xf92 TRISA;
247 volatile __TRISAbits_t at 0xf92 TRISAbits;
248
249 sfr at 0xf93 TRISB;
250 volatile __TRISBbits_t at 0xf93 TRISBbits;
251
252 sfr at 0xf94 TRISC;
253 volatile __TRISCbits_t at 0xf94 TRISCbits;
254
255 sfr at 0xf95 TRISD;
256 volatile __TRISDbits_t at 0xf95 TRISDbits;
257
258 sfr at 0xf96 TRISE;
259 volatile __TRISEbits_t at 0xf96 TRISEbits;
260
261 sfr at 0xf97 TRISF;
262 volatile __TRISFbits_t at 0xf97 TRISFbits;
263
264 sfr at 0xf98 TRISG;
265 volatile __TRISGbits_t at 0xf98 TRISGbits;
266
267 sfr at 0xf99 TRISH;
268 volatile __TRISHbits_t at 0xf99 TRISHbits;
269
270 sfr at 0xf9a TRISJ;
271 volatile __TRISJbits_t at 0xf9a TRISJbits;
272
273 sfr at 0xf9c MEMCON;
274 volatile __MEMCONbits_t at 0xf9c MEMCONbits;
275
276 sfr at 0xf9d PIE1;
277 volatile __PIE1bits_t at 0xf9d PIE1bits;
278
279 sfr at 0xf9e PIR1;
280 volatile __PIR1bits_t at 0xf9e PIR1bits;
281
282 sfr at 0xf9f IPR1;
283 volatile __IPR1bits_t at 0xf9f IPR1bits;
284
285 sfr at 0xfa0 PIE2;
286 volatile __PIE2bits_t at 0xfa0 PIE2bits;
287
288 sfr at 0xfa1 PIR2;
289 volatile __PIR2bits_t at 0xfa1 PIR2bits;
290
291 sfr at 0xfa2 IPR2;
292 volatile __IPR2bits_t at 0xfa2 IPR2bits;
293
294 sfr at 0xfa3 PIE3;
295 volatile __PIE3bits_t at 0xfa3 PIE3bits;
296
297 sfr at 0xfa4 PIR3;
298 volatile __PIR3bits_t at 0xfa4 PIR3bits;
299
300 sfr at 0xfa5 IPR3;
301 volatile __IPR3bits_t at 0xfa5 IPR3bits;
302
303 sfr at 0xfa6 EECON1;
304 volatile __EECON1bits_t at 0xfa6 EECON1bits;
305
306 sfr at 0xfa7 EECON2;
307 sfr at 0xfa8 EEDATA;
308 sfr at 0xfa9 EEADR;
309 sfr at 0xfaa EEADRH;
310 sfr at 0xfab RCSTA;
311 volatile __RCSTAbits_t at 0xfab RCSTAbits;
312
313 sfr at 0xfac TXSTA;
314 volatile __TXSTAbits_t at 0xfac TXSTAbits;
315
316 sfr at 0xfad TXREG;
317 sfr at 0xfae RCREG;
318 sfr at 0xfaf SPBRG;
319 sfr at 0xfb0 PSPCON;
320 volatile __PSPCONbits_t at 0xfb0 PSPCONbits;
321
322 sfr at 0xfb1 T3CON;
323 volatile __T3CONbits_t at 0xfb1 T3CONbits;
324
325 sfr at 0xfb2 TMR3L;
326 sfr at 0xfb3 TMR3H;
327 sfr at 0xfb4 CMCON;
328 volatile __CMCONbits_t at 0xfb4 CMCONbits;
329
330 sfr at 0xfb5 CVRCON;
331 volatile __CVRCONbits_t at 0xfb5 CVRCONbits;
332
333 sfr at 0xfb6 ECCPAS;
334 volatile __ECCPASbits_t at 0xfb6 ECCPASbits;
335
336 sfr at 0xfb7 ECCP1DEL;
337 volatile __ECCP1DELbits_t at 0xfb7 ECCP1DELbits;
338
339 sfr at 0xfba ECCP1CON;
340 volatile __ECCP1CONbits_t at 0xfba ECCP1CONbits;
341
342 sfr at 0xfba CCP2CON;
343 volatile __CCP2CONbits_t at 0xfba CCP2CONbits;
344
345 sfr at 0xfbb ECCPR1L;
346 sfr at 0xfbb CCPR2L;
347 sfr at 0xfbc ECCPR1H;
348 sfr at 0xfbc CCPR2H;
349 sfr at 0xfc0 ADCON2;
350 volatile __ADCON2bits_t at 0xfc0 ADCON2bits;
351
352 sfr at 0xfc1 ADCON1;
353 volatile __ADCON1bits_t at 0xfc1 ADCON1bits;
354
355 sfr at 0xfc2 ADCON0;
356 volatile __ADCON0bits_t at 0xfc2 ADCON0bits;
357
358 sfr at 0xfc3 ADRESL;
359 sfr at 0xfc4 ADRESH;
360 sfr at 0xfc5 SSPCON2;
361 volatile __SSPCON2bits_t at 0xfc5 SSPCON2bits;
362
363 sfr at 0xfc6 SSPCON1;
364 volatile __SSPCON1bits_t at 0xfc6 SSPCON1bits;
365
366 sfr at 0xfc7 SSPSTAT;
367 volatile __SSPSTATbits_t at 0xfc7 SSPSTATbits;
368
369 sfr at 0xfc8 SSPADD;
370 sfr at 0xfc9 SSPBUF;
371 sfr at 0xfca T2CON;
372 volatile __T2CONbits_t at 0xfca T2CONbits;
373
374 sfr at 0xfcb PR2;
375 sfr at 0xfcc TMR2;
376 sfr at 0xfcd T1CON;
377 volatile __T1CONbits_t at 0xfcd T1CONbits;
378
379 sfr at 0xfce TMR1L;
380 sfr at 0xfcf TMR1H;
381 sfr at 0xfd0 RCON;
382 volatile __RCONbits_t at 0xfd0 RCONbits;
383
384 sfr at 0xfd1 WDTCON;
385 volatile __WDTCONbits_t at 0xfd1 WDTCONbits;
386
387 sfr at 0xfd2 LVDCON;
388 volatile __LVDCONbits_t at 0xfd2 LVDCONbits;
389
390 sfr at 0xfd3 OSCCON;
391 volatile __OSCCONbits_t at 0xfd3 OSCCONbits;
392
393 sfr at 0xfd5 T0CON;
394 sfr at 0xfd6 TMR0L;
395 sfr at 0xfd7 TMR0H;
396 sfr at 0xfd8 STATUS;
397 volatile __STATUSbits_t at 0xfd8 STATUSbits;
398
399 sfr at 0xfd9 FSR2L;
400 sfr at 0xfda FSR2H;
401 sfr at 0xfdb PLUSW2;
402 sfr at 0xfdc PREINC2;
403 sfr at 0xfdd POSTDEC2;
404 sfr at 0xfde POSTINC2;
405 sfr at 0xfdf INDF2;
406 sfr at 0xfe0 BSR;
407 sfr at 0xfe1 FSR1L;
408 sfr at 0xfe2 FSR1H;
409 sfr at 0xfe3 PLUSW1;
410 sfr at 0xfe4 PREINC1;
411 sfr at 0xfe5 POSTDEC1;
412 sfr at 0xfe6 POSTINC1;
413 sfr at 0xfe7 INDF1;
414 sfr at 0xfe8 WREG;
415 sfr at 0xfe9 FSR0L;
416 sfr at 0xfea FSR0H;
417 sfr at 0xfeb PLUSW0;
418 sfr at 0xfec PREINC0;
419 sfr at 0xfed POSTDEC0;
420 sfr at 0xfee POSTINC0;
421 sfr at 0xfef INDF0;
422 sfr at 0xff0 INTCON3;
423 volatile __INTCON3bits_t at 0xff0 INTCON3bits;
424
425 sfr at 0xff1 INTCON2;
426 volatile __INTCON2bits_t at 0xff1 INTCON2bits;
427
428 sfr at 0xff2 INTCON;
429 volatile __INTCONbits_t at 0xff2 INTCONbits;
430
431 sfr at 0xff3 PRODL;
432 sfr at 0xff4 PRODH;
433 sfr at 0xff5 TABLAT;
434 sfr at 0xff6 TBLPTRL;
435 sfr at 0xff7 TBLPTRH;
436 sfr at 0xff8 TBLPTRU;
437 sfr at 0xff9 PCL;
438 sfr at 0xffa PCLATH;
439 sfr at 0xffb PCLATU;
440 sfr at 0xffc STKPTR;
441 volatile __STKPTRbits_t at 0xffc STKPTRbits;
442
443 sfr at 0xffd TOSL;
444 sfr at 0xffe TOSH;
445 sfr at 0xfff TOSU;
446
447