Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16lf1526.h
blob0b9d9f72c054766c1abcb14113123a09570ff8ba
1 /*
2 * This declarations of the PIC16LF1526 MCU.
4 * This file is part of the GNU PIC library for SDCC, originally
5 * created by Molnar Karoly <molnarkaroly@users.sf.net> 2016.
7 * This file is generated automatically by the cinc2h.pl, 2016-04-13 17:23:07 UTC.
9 * SDCC is licensed under the GNU Public license (GPL) v2. Note that
10 * this license covers the code to the compiler and other executables,
11 * but explicitly does not cover any code or objects generated by sdcc.
13 * For pic device libraries and header files which are derived from
14 * Microchip header (.inc) and linker script (.lkr) files Microchip
15 * requires that "The header files should state that they are only to be
16 * used with authentic Microchip devices" which makes them incompatible
17 * with the GPL. Pic device libraries and header files are located at
18 * non-free/lib and non-free/include directories respectively.
19 * Sdcc should be run with the --use-non-free command line option in
20 * order to include non-free header files and libraries.
22 * See http://sdcc.sourceforge.net/ for the latest information on sdcc.
25 #ifndef __PIC16LF1526_H__
26 #define __PIC16LF1526_H__
28 //==============================================================================
30 // Register Addresses
32 //==============================================================================
34 #ifndef NO_ADDR_DEFINES
36 #define INDF0_ADDR 0x0000
37 #define INDF1_ADDR 0x0001
38 #define PCL_ADDR 0x0002
39 #define STATUS_ADDR 0x0003
40 #define FSR0_ADDR 0x0004
41 #define FSR0L_ADDR 0x0004
42 #define FSR0H_ADDR 0x0005
43 #define FSR1_ADDR 0x0006
44 #define FSR1L_ADDR 0x0006
45 #define FSR1H_ADDR 0x0007
46 #define BSR_ADDR 0x0008
47 #define WREG_ADDR 0x0009
48 #define PCLATH_ADDR 0x000A
49 #define INTCON_ADDR 0x000B
50 #define PORTA_ADDR 0x000C
51 #define PORTB_ADDR 0x000D
52 #define PORTC_ADDR 0x000E
53 #define PORTD_ADDR 0x000F
54 #define PORTE_ADDR 0x0010
55 #define PIR1_ADDR 0x0011
56 #define PIR2_ADDR 0x0012
57 #define PIR3_ADDR 0x0013
58 #define PIR4_ADDR 0x0014
59 #define TMR0_ADDR 0x0015
60 #define TMR1_ADDR 0x0016
61 #define TMR1L_ADDR 0x0016
62 #define TMR1H_ADDR 0x0017
63 #define T1CON_ADDR 0x0018
64 #define T1GCON_ADDR 0x0019
65 #define TMR2_ADDR 0x001A
66 #define PR2_ADDR 0x001B
67 #define T2CON_ADDR 0x001C
68 #define TRISA_ADDR 0x008C
69 #define TRISB_ADDR 0x008D
70 #define TRISC_ADDR 0x008E
71 #define TRISD_ADDR 0x008F
72 #define TRISE_ADDR 0x0090
73 #define PIE1_ADDR 0x0091
74 #define PIE2_ADDR 0x0092
75 #define PIE3_ADDR 0x0093
76 #define PIE4_ADDR 0x0094
77 #define OPTION_REG_ADDR 0x0095
78 #define PCON_ADDR 0x0096
79 #define WDTCON_ADDR 0x0097
80 #define OSCCON_ADDR 0x0099
81 #define OSCSTAT_ADDR 0x009A
82 #define ADRES_ADDR 0x009B
83 #define ADRESL_ADDR 0x009B
84 #define ADRESH_ADDR 0x009C
85 #define ADCON0_ADDR 0x009D
86 #define ADCON1_ADDR 0x009E
87 #define LATA_ADDR 0x010C
88 #define LATB_ADDR 0x010D
89 #define LATC_ADDR 0x010E
90 #define LATD_ADDR 0x010F
91 #define LATE_ADDR 0x0110
92 #define BORCON_ADDR 0x0116
93 #define FVRCON_ADDR 0x0117
94 #define APFCON_ADDR 0x011D
95 #define ANSELA_ADDR 0x018C
96 #define ANSELB_ADDR 0x018D
97 #define ANSELD_ADDR 0x018F
98 #define ANSELE_ADDR 0x0190
99 #define PMADR_ADDR 0x0191
100 #define PMADRL_ADDR 0x0191
101 #define PMADRH_ADDR 0x0192
102 #define PMDAT_ADDR 0x0193
103 #define PMDATL_ADDR 0x0193
104 #define PMDATH_ADDR 0x0194
105 #define PMCON1_ADDR 0x0195
106 #define PMCON2_ADDR 0x0196
107 #define RC1REG_ADDR 0x0199
108 #define RCREG_ADDR 0x0199
109 #define RCREG1_ADDR 0x0199
110 #define TX1REG_ADDR 0x019A
111 #define TXREG_ADDR 0x019A
112 #define TXREG1_ADDR 0x019A
113 #define SP1BRG_ADDR 0x019B
114 #define SP1BRGL_ADDR 0x019B
115 #define SPBRG_ADDR 0x019B
116 #define SPBRGL_ADDR 0x019B
117 #define SPBRGL1_ADDR 0x019B
118 #define SP1BRGH_ADDR 0x019C
119 #define SPBRGH_ADDR 0x019C
120 #define SPBRGH1_ADDR 0x019C
121 #define RC1STA_ADDR 0x019D
122 #define RCSTA_ADDR 0x019D
123 #define RCSTA1_ADDR 0x019D
124 #define TX1STA_ADDR 0x019E
125 #define TXSTA_ADDR 0x019E
126 #define TXSTA1_ADDR 0x019E
127 #define BAUD1CON_ADDR 0x019F
128 #define BAUDCON_ADDR 0x019F
129 #define BAUDCON1_ADDR 0x019F
130 #define WPUB_ADDR 0x020D
131 #define WPUD_ADDR 0x020F
132 #define WPUE_ADDR 0x0210
133 #define SSP1BUF_ADDR 0x0211
134 #define SSPBUF_ADDR 0x0211
135 #define SSP1ADD_ADDR 0x0212
136 #define SSPADD_ADDR 0x0212
137 #define SSP1MSK_ADDR 0x0213
138 #define SSPMSK_ADDR 0x0213
139 #define SSP1STAT_ADDR 0x0214
140 #define SSPSTAT_ADDR 0x0214
141 #define SSP1CON1_ADDR 0x0215
142 #define SSPCON_ADDR 0x0215
143 #define SSPCON1_ADDR 0x0215
144 #define SSP1CON2_ADDR 0x0216
145 #define SSPCON2_ADDR 0x0216
146 #define SSP1CON3_ADDR 0x0217
147 #define SSPCON3_ADDR 0x0217
148 #define SSP2BUF_ADDR 0x0219
149 #define SSP2ADD_ADDR 0x021A
150 #define SSP2MSK_ADDR 0x021B
151 #define SSP2STAT_ADDR 0x021C
152 #define SSP2CON1_ADDR 0x021D
153 #define SSP2CON2_ADDR 0x021E
154 #define SSP2CON3_ADDR 0x021F
155 #define PORTF_ADDR 0x028C
156 #define PORTG_ADDR 0x028D
157 #define CCPR1_ADDR 0x0291
158 #define CCPR1L_ADDR 0x0291
159 #define CCPR1H_ADDR 0x0292
160 #define CCP1CON_ADDR 0x0293
161 #define CCPR2_ADDR 0x0298
162 #define CCPR2L_ADDR 0x0298
163 #define CCPR2H_ADDR 0x0299
164 #define CCP2CON_ADDR 0x029A
165 #define CCPTMRS0_ADDR 0x029D
166 #define CCPTMRS1_ADDR 0x029E
167 #define CCPTMRS2_ADDR 0x029F
168 #define TRISF_ADDR 0x030C
169 #define TRISG_ADDR 0x030D
170 #define CCPR3_ADDR 0x0311
171 #define CCPR3L_ADDR 0x0311
172 #define CCPR3H_ADDR 0x0312
173 #define CCP3CON_ADDR 0x0313
174 #define CCPR4_ADDR 0x0318
175 #define CCPR4L_ADDR 0x0318
176 #define CCPR4H_ADDR 0x0319
177 #define CCP4CON_ADDR 0x031A
178 #define CCPR5_ADDR 0x031C
179 #define CCPR5L_ADDR 0x031C
180 #define CCPR5H_ADDR 0x031D
181 #define CCP5CON_ADDR 0x031E
182 #define LATF_ADDR 0x038C
183 #define LATG_ADDR 0x038D
184 #define IOCBP_ADDR 0x0394
185 #define IOCBN_ADDR 0x0395
186 #define IOCBF_ADDR 0x0396
187 #define ANSELF_ADDR 0x040C
188 #define ANSELG_ADDR 0x040D
189 #define TMR3_ADDR 0x0411
190 #define TMR3L_ADDR 0x0411
191 #define TMR3H_ADDR 0x0412
192 #define T3CON_ADDR 0x0413
193 #define T3GCON_ADDR 0x0414
194 #define TMR4_ADDR 0x0415
195 #define PR4_ADDR 0x0416
196 #define T4CON_ADDR 0x0417
197 #define TMR5_ADDR 0x0418
198 #define TMR5L_ADDR 0x0418
199 #define TMR5H_ADDR 0x0419
200 #define T5CON_ADDR 0x041A
201 #define T5GCON_ADDR 0x041B
202 #define TMR6_ADDR 0x041C
203 #define PR6_ADDR 0x041D
204 #define T6CON_ADDR 0x041E
205 #define WPUG_ADDR 0x048D
206 #define RC2REG_ADDR 0x0491
207 #define RCREG2_ADDR 0x0491
208 #define TX2REG_ADDR 0x0492
209 #define TXREG2_ADDR 0x0492
210 #define SP2BRG_ADDR 0x0493
211 #define SP2BRGL_ADDR 0x0493
212 #define SPBRGL2_ADDR 0x0493
213 #define SP2BRGH_ADDR 0x0494
214 #define SPBRGH2_ADDR 0x0494
215 #define RC2STA_ADDR 0x0495
216 #define RCSTA2_ADDR 0x0495
217 #define TX2STA_ADDR 0x0496
218 #define TXSTA2_ADDR 0x0496
219 #define BAUD2CON_ADDR 0x0497
220 #define BAUDCON2_ADDR 0x0497
221 #define TMR8_ADDR 0x0595
222 #define PR8_ADDR 0x0596
223 #define T8CON_ADDR 0x0597
224 #define TMR10_ADDR 0x059C
225 #define PR10_ADDR 0x059D
226 #define T10CON_ADDR 0x059E
227 #define CCPR6_ADDR 0x0611
228 #define CCPR6L_ADDR 0x0611
229 #define CCPR6H_ADDR 0x0612
230 #define CCP6CON_ADDR 0x0613
231 #define CCPR7_ADDR 0x0614
232 #define CCPR7L_ADDR 0x0614
233 #define CCPR7H_ADDR 0x0615
234 #define CCP7CON_ADDR 0x0616
235 #define CCPR8_ADDR 0x0617
236 #define CCPR8L_ADDR 0x0617
237 #define CCPR8H_ADDR 0x0618
238 #define CCP8CON_ADDR 0x0619
239 #define CCPR9_ADDR 0x061A
240 #define CCPR9L_ADDR 0x061A
241 #define CCPR9H_ADDR 0x061B
242 #define CCP9CON_ADDR 0x061C
243 #define CCPR10_ADDR 0x061D
244 #define CCPR10L_ADDR 0x061D
245 #define CCPR10H_ADDR 0x061E
246 #define CCP10CON_ADDR 0x061F
247 #define STATUS_SHAD_ADDR 0x0FE4
248 #define WREG_SHAD_ADDR 0x0FE5
249 #define BSR_SHAD_ADDR 0x0FE6
250 #define PCLATH_SHAD_ADDR 0x0FE7
251 #define FSR0L_SHAD_ADDR 0x0FE8
252 #define FSR0H_SHAD_ADDR 0x0FE9
253 #define FSR1L_SHAD_ADDR 0x0FEA
254 #define FSR1H_SHAD_ADDR 0x0FEB
255 #define STKPTR_ADDR 0x0FED
256 #define TOSL_ADDR 0x0FEE
257 #define TOSH_ADDR 0x0FEF
259 #endif // #ifndef NO_ADDR_DEFINES
261 //==============================================================================
263 // Register Definitions
265 //==============================================================================
267 extern __at(0x0000) __sfr INDF0;
268 extern __at(0x0001) __sfr INDF1;
269 extern __at(0x0002) __sfr PCL;
271 //==============================================================================
272 // STATUS Bits
274 extern __at(0x0003) __sfr STATUS;
276 typedef struct
278 unsigned C : 1;
279 unsigned DC : 1;
280 unsigned Z : 1;
281 unsigned NOT_PD : 1;
282 unsigned NOT_TO : 1;
283 unsigned : 1;
284 unsigned : 1;
285 unsigned : 1;
286 } __STATUSbits_t;
288 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
290 #define _C 0x01
291 #define _DC 0x02
292 #define _Z 0x04
293 #define _NOT_PD 0x08
294 #define _NOT_TO 0x10
296 //==============================================================================
298 extern __at(0x0004) __sfr FSR0;
299 extern __at(0x0004) __sfr FSR0L;
300 extern __at(0x0005) __sfr FSR0H;
301 extern __at(0x0006) __sfr FSR1;
302 extern __at(0x0006) __sfr FSR1L;
303 extern __at(0x0007) __sfr FSR1H;
305 //==============================================================================
306 // BSR Bits
308 extern __at(0x0008) __sfr BSR;
310 typedef union
312 struct
314 unsigned BSR0 : 1;
315 unsigned BSR1 : 1;
316 unsigned BSR2 : 1;
317 unsigned BSR3 : 1;
318 unsigned BSR4 : 1;
319 unsigned : 1;
320 unsigned : 1;
321 unsigned : 1;
324 struct
326 unsigned BSR : 5;
327 unsigned : 3;
329 } __BSRbits_t;
331 extern __at(0x0008) volatile __BSRbits_t BSRbits;
333 #define _BSR0 0x01
334 #define _BSR1 0x02
335 #define _BSR2 0x04
336 #define _BSR3 0x08
337 #define _BSR4 0x10
339 //==============================================================================
341 extern __at(0x0009) __sfr WREG;
342 extern __at(0x000A) __sfr PCLATH;
344 //==============================================================================
345 // INTCON Bits
347 extern __at(0x000B) __sfr INTCON;
349 typedef union
351 struct
353 unsigned IOCIF : 1;
354 unsigned INTF : 1;
355 unsigned TMR0IF : 1;
356 unsigned IOCIE : 1;
357 unsigned INTE : 1;
358 unsigned TMR0IE : 1;
359 unsigned PEIE : 1;
360 unsigned GIE : 1;
363 struct
365 unsigned : 1;
366 unsigned : 1;
367 unsigned T0IF : 1;
368 unsigned : 1;
369 unsigned : 1;
370 unsigned T0IE : 1;
371 unsigned : 1;
372 unsigned : 1;
374 } __INTCONbits_t;
376 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
378 #define _IOCIF 0x01
379 #define _INTF 0x02
380 #define _TMR0IF 0x04
381 #define _T0IF 0x04
382 #define _IOCIE 0x08
383 #define _INTE 0x10
384 #define _TMR0IE 0x20
385 #define _T0IE 0x20
386 #define _PEIE 0x40
387 #define _GIE 0x80
389 //==============================================================================
392 //==============================================================================
393 // PORTA Bits
395 extern __at(0x000C) __sfr PORTA;
397 typedef struct
399 unsigned RA0 : 1;
400 unsigned RA1 : 1;
401 unsigned RA2 : 1;
402 unsigned RA3 : 1;
403 unsigned RA4 : 1;
404 unsigned RA5 : 1;
405 unsigned RA6 : 1;
406 unsigned RA7 : 1;
407 } __PORTAbits_t;
409 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
411 #define _RA0 0x01
412 #define _RA1 0x02
413 #define _RA2 0x04
414 #define _RA3 0x08
415 #define _RA4 0x10
416 #define _RA5 0x20
417 #define _RA6 0x40
418 #define _RA7 0x80
420 //==============================================================================
423 //==============================================================================
424 // PORTB Bits
426 extern __at(0x000D) __sfr PORTB;
428 typedef struct
430 unsigned RB0 : 1;
431 unsigned RB1 : 1;
432 unsigned RB2 : 1;
433 unsigned RB3 : 1;
434 unsigned RB4 : 1;
435 unsigned RB5 : 1;
436 unsigned RB6 : 1;
437 unsigned RB7 : 1;
438 } __PORTBbits_t;
440 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
442 #define _RB0 0x01
443 #define _RB1 0x02
444 #define _RB2 0x04
445 #define _RB3 0x08
446 #define _RB4 0x10
447 #define _RB5 0x20
448 #define _RB6 0x40
449 #define _RB7 0x80
451 //==============================================================================
454 //==============================================================================
455 // PORTC Bits
457 extern __at(0x000E) __sfr PORTC;
459 typedef struct
461 unsigned RC0 : 1;
462 unsigned RC1 : 1;
463 unsigned RC2 : 1;
464 unsigned RC3 : 1;
465 unsigned RC4 : 1;
466 unsigned RC5 : 1;
467 unsigned RC6 : 1;
468 unsigned RC7 : 1;
469 } __PORTCbits_t;
471 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
473 #define _RC0 0x01
474 #define _RC1 0x02
475 #define _RC2 0x04
476 #define _RC3 0x08
477 #define _RC4 0x10
478 #define _RC5 0x20
479 #define _RC6 0x40
480 #define _RC7 0x80
482 //==============================================================================
485 //==============================================================================
486 // PORTD Bits
488 extern __at(0x000F) __sfr PORTD;
490 typedef struct
492 unsigned RD0 : 1;
493 unsigned RD1 : 1;
494 unsigned RD2 : 1;
495 unsigned RD3 : 1;
496 unsigned RD4 : 1;
497 unsigned RD5 : 1;
498 unsigned RD6 : 1;
499 unsigned RD7 : 1;
500 } __PORTDbits_t;
502 extern __at(0x000F) volatile __PORTDbits_t PORTDbits;
504 #define _RD0 0x01
505 #define _RD1 0x02
506 #define _RD2 0x04
507 #define _RD3 0x08
508 #define _RD4 0x10
509 #define _RD5 0x20
510 #define _RD6 0x40
511 #define _RD7 0x80
513 //==============================================================================
516 //==============================================================================
517 // PORTE Bits
519 extern __at(0x0010) __sfr PORTE;
521 typedef struct
523 unsigned RE0 : 1;
524 unsigned RE1 : 1;
525 unsigned RE2 : 1;
526 unsigned RE3 : 1;
527 unsigned RE4 : 1;
528 unsigned RE5 : 1;
529 unsigned RE6 : 1;
530 unsigned RE7 : 1;
531 } __PORTEbits_t;
533 extern __at(0x0010) volatile __PORTEbits_t PORTEbits;
535 #define _RE0 0x01
536 #define _RE1 0x02
537 #define _RE2 0x04
538 #define _RE3 0x08
539 #define _RE4 0x10
540 #define _RE5 0x20
541 #define _RE6 0x40
542 #define _RE7 0x80
544 //==============================================================================
547 //==============================================================================
548 // PIR1 Bits
550 extern __at(0x0011) __sfr PIR1;
552 typedef union
554 struct
556 unsigned TMR1IF : 1;
557 unsigned TMR2IF : 1;
558 unsigned CCP1IF : 1;
559 unsigned SSP1IF : 1;
560 unsigned TX1IF : 1;
561 unsigned RC1IF : 1;
562 unsigned ADIF : 1;
563 unsigned TMR1GIF : 1;
566 struct
568 unsigned : 1;
569 unsigned : 1;
570 unsigned : 1;
571 unsigned SSPIF : 1;
572 unsigned TXIF : 1;
573 unsigned RCIF : 1;
574 unsigned : 1;
575 unsigned : 1;
577 } __PIR1bits_t;
579 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
581 #define _TMR1IF 0x01
582 #define _TMR2IF 0x02
583 #define _CCP1IF 0x04
584 #define _SSP1IF 0x08
585 #define _SSPIF 0x08
586 #define _TX1IF 0x10
587 #define _TXIF 0x10
588 #define _RC1IF 0x20
589 #define _RCIF 0x20
590 #define _ADIF 0x40
591 #define _TMR1GIF 0x80
593 //==============================================================================
596 //==============================================================================
597 // PIR2 Bits
599 extern __at(0x0012) __sfr PIR2;
601 typedef union
603 struct
605 unsigned CCP2IF : 1;
606 unsigned TMR8IF : 1;
607 unsigned TMR10IF : 1;
608 unsigned BCL1IF : 1;
609 unsigned : 1;
610 unsigned TMR3GIF : 1;
611 unsigned TMR5GIF : 1;
612 unsigned OSFIF : 1;
615 struct
617 unsigned : 1;
618 unsigned : 1;
619 unsigned : 1;
620 unsigned BCLIF : 1;
621 unsigned : 1;
622 unsigned : 1;
623 unsigned : 1;
624 unsigned : 1;
626 } __PIR2bits_t;
628 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
630 #define _CCP2IF 0x01
631 #define _TMR8IF 0x02
632 #define _TMR10IF 0x04
633 #define _BCL1IF 0x08
634 #define _BCLIF 0x08
635 #define _TMR3GIF 0x20
636 #define _TMR5GIF 0x40
637 #define _OSFIF 0x80
639 //==============================================================================
642 //==============================================================================
643 // PIR3 Bits
645 extern __at(0x0013) __sfr PIR3;
647 typedef struct
649 unsigned TMR3IF : 1;
650 unsigned TMR4IF : 1;
651 unsigned TMR5IF : 1;
652 unsigned TMR6IF : 1;
653 unsigned CCP3IF : 1;
654 unsigned CCP4IF : 1;
655 unsigned CCP5IF : 1;
656 unsigned CCP6IF : 1;
657 } __PIR3bits_t;
659 extern __at(0x0013) volatile __PIR3bits_t PIR3bits;
661 #define _TMR3IF 0x01
662 #define _TMR4IF 0x02
663 #define _TMR5IF 0x04
664 #define _TMR6IF 0x08
665 #define _CCP3IF 0x10
666 #define _CCP4IF 0x20
667 #define _CCP5IF 0x40
668 #define _CCP6IF 0x80
670 //==============================================================================
673 //==============================================================================
674 // PIR4 Bits
676 extern __at(0x0014) __sfr PIR4;
678 typedef struct
680 unsigned SSP2IF : 1;
681 unsigned BCL2IF : 1;
682 unsigned CCP7IF : 1;
683 unsigned CCP8IF : 1;
684 unsigned TX2IF : 1;
685 unsigned RC2IF : 1;
686 unsigned CCP9IF : 1;
687 unsigned CCP10IF : 1;
688 } __PIR4bits_t;
690 extern __at(0x0014) volatile __PIR4bits_t PIR4bits;
692 #define _SSP2IF 0x01
693 #define _BCL2IF 0x02
694 #define _CCP7IF 0x04
695 #define _CCP8IF 0x08
696 #define _TX2IF 0x10
697 #define _RC2IF 0x20
698 #define _CCP9IF 0x40
699 #define _CCP10IF 0x80
701 //==============================================================================
703 extern __at(0x0015) __sfr TMR0;
704 extern __at(0x0016) __sfr TMR1;
705 extern __at(0x0016) __sfr TMR1L;
706 extern __at(0x0017) __sfr TMR1H;
708 //==============================================================================
709 // T1CON Bits
711 extern __at(0x0018) __sfr T1CON;
713 typedef union
715 struct
717 unsigned TMR1ON : 1;
718 unsigned : 1;
719 unsigned NOT_T1SYNC : 1;
720 unsigned SOSCEN : 1;
721 unsigned T1CKPS0 : 1;
722 unsigned T1CKPS1 : 1;
723 unsigned TMR1CS0 : 1;
724 unsigned TMR1CS1 : 1;
727 struct
729 unsigned : 1;
730 unsigned : 1;
731 unsigned : 1;
732 unsigned T1OSCEN : 1;
733 unsigned : 1;
734 unsigned : 1;
735 unsigned : 1;
736 unsigned : 1;
739 struct
741 unsigned : 4;
742 unsigned T1CKPS : 2;
743 unsigned : 2;
746 struct
748 unsigned : 6;
749 unsigned TMR1CS : 2;
751 } __T1CONbits_t;
753 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
755 #define _TMR1ON 0x01
756 #define _NOT_T1SYNC 0x04
757 #define _SOSCEN 0x08
758 #define _T1OSCEN 0x08
759 #define _T1CKPS0 0x10
760 #define _T1CKPS1 0x20
761 #define _TMR1CS0 0x40
762 #define _TMR1CS1 0x80
764 //==============================================================================
767 //==============================================================================
768 // T1GCON Bits
770 extern __at(0x0019) __sfr T1GCON;
772 typedef union
774 struct
776 unsigned T1GSS0 : 1;
777 unsigned T1GSS1 : 1;
778 unsigned T1GVAL : 1;
779 unsigned T1GGO_NOT_DONE : 1;
780 unsigned T1GSPM : 1;
781 unsigned T1GTM : 1;
782 unsigned T1GPOL : 1;
783 unsigned TMR1GE : 1;
786 struct
788 unsigned T1GSS : 2;
789 unsigned : 6;
791 } __T1GCONbits_t;
793 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
795 #define _T1GSS0 0x01
796 #define _T1GSS1 0x02
797 #define _T1GVAL 0x04
798 #define _T1GGO_NOT_DONE 0x08
799 #define _T1GSPM 0x10
800 #define _T1GTM 0x20
801 #define _T1GPOL 0x40
802 #define _TMR1GE 0x80
804 //==============================================================================
806 extern __at(0x001A) __sfr TMR2;
807 extern __at(0x001B) __sfr PR2;
809 //==============================================================================
810 // T2CON Bits
812 extern __at(0x001C) __sfr T2CON;
814 typedef union
816 struct
818 unsigned T2CKPS0 : 1;
819 unsigned T2CKPS1 : 1;
820 unsigned TMR2ON : 1;
821 unsigned T2OUTPS0 : 1;
822 unsigned T2OUTPS1 : 1;
823 unsigned T2OUTPS2 : 1;
824 unsigned T2OUTPS3 : 1;
825 unsigned : 1;
828 struct
830 unsigned T2CKPS : 2;
831 unsigned : 6;
834 struct
836 unsigned : 3;
837 unsigned T2OUTPS : 4;
838 unsigned : 1;
840 } __T2CONbits_t;
842 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
844 #define _T2CKPS0 0x01
845 #define _T2CKPS1 0x02
846 #define _TMR2ON 0x04
847 #define _T2OUTPS0 0x08
848 #define _T2OUTPS1 0x10
849 #define _T2OUTPS2 0x20
850 #define _T2OUTPS3 0x40
852 //==============================================================================
855 //==============================================================================
856 // TRISA Bits
858 extern __at(0x008C) __sfr TRISA;
860 typedef struct
862 unsigned TRISA0 : 1;
863 unsigned TRISA1 : 1;
864 unsigned TRISA2 : 1;
865 unsigned TRISA3 : 1;
866 unsigned TRISA4 : 1;
867 unsigned TRISA5 : 1;
868 unsigned TRISA6 : 1;
869 unsigned TRISA7 : 1;
870 } __TRISAbits_t;
872 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
874 #define _TRISA0 0x01
875 #define _TRISA1 0x02
876 #define _TRISA2 0x04
877 #define _TRISA3 0x08
878 #define _TRISA4 0x10
879 #define _TRISA5 0x20
880 #define _TRISA6 0x40
881 #define _TRISA7 0x80
883 //==============================================================================
886 //==============================================================================
887 // TRISB Bits
889 extern __at(0x008D) __sfr TRISB;
891 typedef struct
893 unsigned TRISB0 : 1;
894 unsigned TRISB1 : 1;
895 unsigned TRISB2 : 1;
896 unsigned TRISB3 : 1;
897 unsigned TRISB4 : 1;
898 unsigned TRISB5 : 1;
899 unsigned TRISB6 : 1;
900 unsigned TRISB7 : 1;
901 } __TRISBbits_t;
903 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
905 #define _TRISB0 0x01
906 #define _TRISB1 0x02
907 #define _TRISB2 0x04
908 #define _TRISB3 0x08
909 #define _TRISB4 0x10
910 #define _TRISB5 0x20
911 #define _TRISB6 0x40
912 #define _TRISB7 0x80
914 //==============================================================================
917 //==============================================================================
918 // TRISC Bits
920 extern __at(0x008E) __sfr TRISC;
922 typedef struct
924 unsigned TRISC0 : 1;
925 unsigned TRISC1 : 1;
926 unsigned TRISC2 : 1;
927 unsigned TRISC3 : 1;
928 unsigned TRISC4 : 1;
929 unsigned TRISC5 : 1;
930 unsigned TRISC6 : 1;
931 unsigned TRISC7 : 1;
932 } __TRISCbits_t;
934 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
936 #define _TRISC0 0x01
937 #define _TRISC1 0x02
938 #define _TRISC2 0x04
939 #define _TRISC3 0x08
940 #define _TRISC4 0x10
941 #define _TRISC5 0x20
942 #define _TRISC6 0x40
943 #define _TRISC7 0x80
945 //==============================================================================
948 //==============================================================================
949 // TRISD Bits
951 extern __at(0x008F) __sfr TRISD;
953 typedef struct
955 unsigned TRISD0 : 1;
956 unsigned TRISD1 : 1;
957 unsigned TRISD2 : 1;
958 unsigned TRISD3 : 1;
959 unsigned TRISD4 : 1;
960 unsigned TRISD5 : 1;
961 unsigned TRISD6 : 1;
962 unsigned TRISD7 : 1;
963 } __TRISDbits_t;
965 extern __at(0x008F) volatile __TRISDbits_t TRISDbits;
967 #define _TRISD0 0x01
968 #define _TRISD1 0x02
969 #define _TRISD2 0x04
970 #define _TRISD3 0x08
971 #define _TRISD4 0x10
972 #define _TRISD5 0x20
973 #define _TRISD6 0x40
974 #define _TRISD7 0x80
976 //==============================================================================
979 //==============================================================================
980 // TRISE Bits
982 extern __at(0x0090) __sfr TRISE;
984 typedef struct
986 unsigned TRISE0 : 1;
987 unsigned TRISE1 : 1;
988 unsigned TRISE2 : 1;
989 unsigned TRISE3 : 1;
990 unsigned TRISE4 : 1;
991 unsigned TRISE5 : 1;
992 unsigned TRISE6 : 1;
993 unsigned TRISE7 : 1;
994 } __TRISEbits_t;
996 extern __at(0x0090) volatile __TRISEbits_t TRISEbits;
998 #define _TRISE0 0x01
999 #define _TRISE1 0x02
1000 #define _TRISE2 0x04
1001 #define _TRISE3 0x08
1002 #define _TRISE4 0x10
1003 #define _TRISE5 0x20
1004 #define _TRISE6 0x40
1005 #define _TRISE7 0x80
1007 //==============================================================================
1010 //==============================================================================
1011 // PIE1 Bits
1013 extern __at(0x0091) __sfr PIE1;
1015 typedef union
1017 struct
1019 unsigned TMR1IE : 1;
1020 unsigned TMR2IE : 1;
1021 unsigned CCP1IE : 1;
1022 unsigned SSP1IE : 1;
1023 unsigned TX1IE : 1;
1024 unsigned RC1IE : 1;
1025 unsigned ADIE : 1;
1026 unsigned TMR1GIE : 1;
1029 struct
1031 unsigned : 1;
1032 unsigned : 1;
1033 unsigned : 1;
1034 unsigned SSPIE : 1;
1035 unsigned TXIE : 1;
1036 unsigned RCIE : 1;
1037 unsigned : 1;
1038 unsigned : 1;
1040 } __PIE1bits_t;
1042 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
1044 #define _TMR1IE 0x01
1045 #define _TMR2IE 0x02
1046 #define _CCP1IE 0x04
1047 #define _SSP1IE 0x08
1048 #define _SSPIE 0x08
1049 #define _TX1IE 0x10
1050 #define _TXIE 0x10
1051 #define _RC1IE 0x20
1052 #define _RCIE 0x20
1053 #define _ADIE 0x40
1054 #define _TMR1GIE 0x80
1056 //==============================================================================
1059 //==============================================================================
1060 // PIE2 Bits
1062 extern __at(0x0092) __sfr PIE2;
1064 typedef union
1066 struct
1068 unsigned CCP2IE : 1;
1069 unsigned TMR8IE : 1;
1070 unsigned TMR10IE : 1;
1071 unsigned BCL1IE : 1;
1072 unsigned : 1;
1073 unsigned TMR3GIE : 1;
1074 unsigned TMR5GIE : 1;
1075 unsigned OSFIE : 1;
1078 struct
1080 unsigned : 1;
1081 unsigned : 1;
1082 unsigned : 1;
1083 unsigned BCLIE : 1;
1084 unsigned : 1;
1085 unsigned : 1;
1086 unsigned : 1;
1087 unsigned : 1;
1089 } __PIE2bits_t;
1091 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
1093 #define _CCP2IE 0x01
1094 #define _TMR8IE 0x02
1095 #define _TMR10IE 0x04
1096 #define _BCL1IE 0x08
1097 #define _BCLIE 0x08
1098 #define _TMR3GIE 0x20
1099 #define _TMR5GIE 0x40
1100 #define _OSFIE 0x80
1102 //==============================================================================
1105 //==============================================================================
1106 // PIE3 Bits
1108 extern __at(0x0093) __sfr PIE3;
1110 typedef struct
1112 unsigned TMR3IE : 1;
1113 unsigned TMR4IE : 1;
1114 unsigned TMR5IE : 1;
1115 unsigned TMR6IE : 1;
1116 unsigned CCP3IE : 1;
1117 unsigned CCP4IE : 1;
1118 unsigned CCP5IE : 1;
1119 unsigned CCP6IE : 1;
1120 } __PIE3bits_t;
1122 extern __at(0x0093) volatile __PIE3bits_t PIE3bits;
1124 #define _TMR3IE 0x01
1125 #define _TMR4IE 0x02
1126 #define _TMR5IE 0x04
1127 #define _TMR6IE 0x08
1128 #define _CCP3IE 0x10
1129 #define _CCP4IE 0x20
1130 #define _CCP5IE 0x40
1131 #define _CCP6IE 0x80
1133 //==============================================================================
1136 //==============================================================================
1137 // PIE4 Bits
1139 extern __at(0x0094) __sfr PIE4;
1141 typedef struct
1143 unsigned SSP2IE : 1;
1144 unsigned BCL2IE : 1;
1145 unsigned CCP7IE : 1;
1146 unsigned CCP8IE : 1;
1147 unsigned TX2IE : 1;
1148 unsigned RC2IE : 1;
1149 unsigned CCP9IE : 1;
1150 unsigned CCP10IE : 1;
1151 } __PIE4bits_t;
1153 extern __at(0x0094) volatile __PIE4bits_t PIE4bits;
1155 #define _SSP2IE 0x01
1156 #define _BCL2IE 0x02
1157 #define _CCP7IE 0x04
1158 #define _CCP8IE 0x08
1159 #define _TX2IE 0x10
1160 #define _RC2IE 0x20
1161 #define _CCP9IE 0x40
1162 #define _CCP10IE 0x80
1164 //==============================================================================
1167 //==============================================================================
1168 // OPTION_REG Bits
1170 extern __at(0x0095) __sfr OPTION_REG;
1172 typedef union
1174 struct
1176 unsigned PS0 : 1;
1177 unsigned PS1 : 1;
1178 unsigned PS2 : 1;
1179 unsigned PSA : 1;
1180 unsigned TMR0SE : 1;
1181 unsigned TMR0CS : 1;
1182 unsigned INTEDG : 1;
1183 unsigned NOT_WPUEN : 1;
1186 struct
1188 unsigned : 1;
1189 unsigned : 1;
1190 unsigned : 1;
1191 unsigned : 1;
1192 unsigned T0SE : 1;
1193 unsigned T0CS : 1;
1194 unsigned : 1;
1195 unsigned : 1;
1198 struct
1200 unsigned PS : 3;
1201 unsigned : 5;
1203 } __OPTION_REGbits_t;
1205 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
1207 #define _PS0 0x01
1208 #define _PS1 0x02
1209 #define _PS2 0x04
1210 #define _PSA 0x08
1211 #define _TMR0SE 0x10
1212 #define _T0SE 0x10
1213 #define _TMR0CS 0x20
1214 #define _T0CS 0x20
1215 #define _INTEDG 0x40
1216 #define _NOT_WPUEN 0x80
1218 //==============================================================================
1221 //==============================================================================
1222 // PCON Bits
1224 extern __at(0x0096) __sfr PCON;
1226 typedef struct
1228 unsigned NOT_BOR : 1;
1229 unsigned NOT_POR : 1;
1230 unsigned NOT_RI : 1;
1231 unsigned NOT_RMCLR : 1;
1232 unsigned NOT_RWDT : 1;
1233 unsigned : 1;
1234 unsigned STKUNF : 1;
1235 unsigned STKOVF : 1;
1236 } __PCONbits_t;
1238 extern __at(0x0096) volatile __PCONbits_t PCONbits;
1240 #define _NOT_BOR 0x01
1241 #define _NOT_POR 0x02
1242 #define _NOT_RI 0x04
1243 #define _NOT_RMCLR 0x08
1244 #define _NOT_RWDT 0x10
1245 #define _STKUNF 0x40
1246 #define _STKOVF 0x80
1248 //==============================================================================
1251 //==============================================================================
1252 // WDTCON Bits
1254 extern __at(0x0097) __sfr WDTCON;
1256 typedef union
1258 struct
1260 unsigned SWDTEN : 1;
1261 unsigned WDTPS0 : 1;
1262 unsigned WDTPS1 : 1;
1263 unsigned WDTPS2 : 1;
1264 unsigned WDTPS3 : 1;
1265 unsigned WDTPS4 : 1;
1266 unsigned : 1;
1267 unsigned : 1;
1270 struct
1272 unsigned : 1;
1273 unsigned WDTPS : 5;
1274 unsigned : 2;
1276 } __WDTCONbits_t;
1278 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
1280 #define _SWDTEN 0x01
1281 #define _WDTPS0 0x02
1282 #define _WDTPS1 0x04
1283 #define _WDTPS2 0x08
1284 #define _WDTPS3 0x10
1285 #define _WDTPS4 0x20
1287 //==============================================================================
1290 //==============================================================================
1291 // OSCCON Bits
1293 extern __at(0x0099) __sfr OSCCON;
1295 typedef union
1297 struct
1299 unsigned SCS0 : 1;
1300 unsigned SCS1 : 1;
1301 unsigned : 1;
1302 unsigned IRCF0 : 1;
1303 unsigned IRCF1 : 1;
1304 unsigned IRCF2 : 1;
1305 unsigned IRCF3 : 1;
1306 unsigned : 1;
1309 struct
1311 unsigned SCS : 2;
1312 unsigned : 6;
1315 struct
1317 unsigned : 3;
1318 unsigned IRCF : 4;
1319 unsigned : 1;
1321 } __OSCCONbits_t;
1323 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1325 #define _SCS0 0x01
1326 #define _SCS1 0x02
1327 #define _IRCF0 0x08
1328 #define _IRCF1 0x10
1329 #define _IRCF2 0x20
1330 #define _IRCF3 0x40
1332 //==============================================================================
1335 //==============================================================================
1336 // OSCSTAT Bits
1338 extern __at(0x009A) __sfr OSCSTAT;
1340 typedef union
1342 struct
1344 unsigned HFIOFS : 1;
1345 unsigned LFIOFR : 1;
1346 unsigned : 1;
1347 unsigned : 1;
1348 unsigned HFIOFR : 1;
1349 unsigned OSTS : 1;
1350 unsigned : 1;
1351 unsigned SOSCR : 1;
1354 struct
1356 unsigned : 1;
1357 unsigned : 1;
1358 unsigned : 1;
1359 unsigned : 1;
1360 unsigned : 1;
1361 unsigned : 1;
1362 unsigned : 1;
1363 unsigned T1OSCR : 1;
1365 } __OSCSTATbits_t;
1367 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1369 #define _HFIOFS 0x01
1370 #define _LFIOFR 0x02
1371 #define _HFIOFR 0x10
1372 #define _OSTS 0x20
1373 #define _SOSCR 0x80
1374 #define _T1OSCR 0x80
1376 //==============================================================================
1378 extern __at(0x009B) __sfr ADRES;
1379 extern __at(0x009B) __sfr ADRESL;
1380 extern __at(0x009C) __sfr ADRESH;
1382 //==============================================================================
1383 // ADCON0 Bits
1385 extern __at(0x009D) __sfr ADCON0;
1387 typedef union
1389 struct
1391 unsigned ADON : 1;
1392 unsigned GO_NOT_DONE : 1;
1393 unsigned CHS0 : 1;
1394 unsigned CHS1 : 1;
1395 unsigned CHS2 : 1;
1396 unsigned CHS3 : 1;
1397 unsigned CHS4 : 1;
1398 unsigned : 1;
1401 struct
1403 unsigned : 1;
1404 unsigned ADGO : 1;
1405 unsigned : 1;
1406 unsigned : 1;
1407 unsigned : 1;
1408 unsigned : 1;
1409 unsigned : 1;
1410 unsigned : 1;
1413 struct
1415 unsigned : 1;
1416 unsigned GO : 1;
1417 unsigned : 1;
1418 unsigned : 1;
1419 unsigned : 1;
1420 unsigned : 1;
1421 unsigned : 1;
1422 unsigned : 1;
1425 struct
1427 unsigned : 2;
1428 unsigned CHS : 5;
1429 unsigned : 1;
1431 } __ADCON0bits_t;
1433 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1435 #define _ADON 0x01
1436 #define _GO_NOT_DONE 0x02
1437 #define _ADGO 0x02
1438 #define _GO 0x02
1439 #define _CHS0 0x04
1440 #define _CHS1 0x08
1441 #define _CHS2 0x10
1442 #define _CHS3 0x20
1443 #define _CHS4 0x40
1445 //==============================================================================
1448 //==============================================================================
1449 // ADCON1 Bits
1451 extern __at(0x009E) __sfr ADCON1;
1453 typedef union
1455 struct
1457 unsigned ADPREF0 : 1;
1458 unsigned ADPREF1 : 1;
1459 unsigned : 1;
1460 unsigned : 1;
1461 unsigned ADCS0 : 1;
1462 unsigned ADCS1 : 1;
1463 unsigned ADCS2 : 1;
1464 unsigned ADFM : 1;
1467 struct
1469 unsigned ADPREF : 2;
1470 unsigned : 6;
1473 struct
1475 unsigned : 4;
1476 unsigned ADCS : 3;
1477 unsigned : 1;
1479 } __ADCON1bits_t;
1481 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1483 #define _ADPREF0 0x01
1484 #define _ADPREF1 0x02
1485 #define _ADCS0 0x10
1486 #define _ADCS1 0x20
1487 #define _ADCS2 0x40
1488 #define _ADFM 0x80
1490 //==============================================================================
1493 //==============================================================================
1494 // LATA Bits
1496 extern __at(0x010C) __sfr LATA;
1498 typedef struct
1500 unsigned LATA0 : 1;
1501 unsigned LATA1 : 1;
1502 unsigned LATA2 : 1;
1503 unsigned LATA3 : 1;
1504 unsigned LATA4 : 1;
1505 unsigned LATA5 : 1;
1506 unsigned LATA6 : 1;
1507 unsigned LATA7 : 1;
1508 } __LATAbits_t;
1510 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1512 #define _LATA0 0x01
1513 #define _LATA1 0x02
1514 #define _LATA2 0x04
1515 #define _LATA3 0x08
1516 #define _LATA4 0x10
1517 #define _LATA5 0x20
1518 #define _LATA6 0x40
1519 #define _LATA7 0x80
1521 //==============================================================================
1524 //==============================================================================
1525 // LATB Bits
1527 extern __at(0x010D) __sfr LATB;
1529 typedef struct
1531 unsigned LATB0 : 1;
1532 unsigned LATB1 : 1;
1533 unsigned LATB2 : 1;
1534 unsigned LATB3 : 1;
1535 unsigned LATB4 : 1;
1536 unsigned LATB5 : 1;
1537 unsigned LATB6 : 1;
1538 unsigned LATB7 : 1;
1539 } __LATBbits_t;
1541 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1543 #define _LATB0 0x01
1544 #define _LATB1 0x02
1545 #define _LATB2 0x04
1546 #define _LATB3 0x08
1547 #define _LATB4 0x10
1548 #define _LATB5 0x20
1549 #define _LATB6 0x40
1550 #define _LATB7 0x80
1552 //==============================================================================
1555 //==============================================================================
1556 // LATC Bits
1558 extern __at(0x010E) __sfr LATC;
1560 typedef struct
1562 unsigned LATC0 : 1;
1563 unsigned LATC1 : 1;
1564 unsigned LATC2 : 1;
1565 unsigned LATC3 : 1;
1566 unsigned LATC4 : 1;
1567 unsigned LATC5 : 1;
1568 unsigned LATC6 : 1;
1569 unsigned LATC7 : 1;
1570 } __LATCbits_t;
1572 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1574 #define _LATC0 0x01
1575 #define _LATC1 0x02
1576 #define _LATC2 0x04
1577 #define _LATC3 0x08
1578 #define _LATC4 0x10
1579 #define _LATC5 0x20
1580 #define _LATC6 0x40
1581 #define _LATC7 0x80
1583 //==============================================================================
1586 //==============================================================================
1587 // LATD Bits
1589 extern __at(0x010F) __sfr LATD;
1591 typedef struct
1593 unsigned LATD0 : 1;
1594 unsigned LATD1 : 1;
1595 unsigned LATD2 : 1;
1596 unsigned LATD3 : 1;
1597 unsigned LATD4 : 1;
1598 unsigned LATD5 : 1;
1599 unsigned LATD6 : 1;
1600 unsigned LATD7 : 1;
1601 } __LATDbits_t;
1603 extern __at(0x010F) volatile __LATDbits_t LATDbits;
1605 #define _LATD0 0x01
1606 #define _LATD1 0x02
1607 #define _LATD2 0x04
1608 #define _LATD3 0x08
1609 #define _LATD4 0x10
1610 #define _LATD5 0x20
1611 #define _LATD6 0x40
1612 #define _LATD7 0x80
1614 //==============================================================================
1617 //==============================================================================
1618 // LATE Bits
1620 extern __at(0x0110) __sfr LATE;
1622 typedef struct
1624 unsigned LATE0 : 1;
1625 unsigned LATE1 : 1;
1626 unsigned LATE2 : 1;
1627 unsigned LATE3 : 1;
1628 unsigned LATE4 : 1;
1629 unsigned LATE5 : 1;
1630 unsigned LATE6 : 1;
1631 unsigned LATE7 : 1;
1632 } __LATEbits_t;
1634 extern __at(0x0110) volatile __LATEbits_t LATEbits;
1636 #define _LATE0 0x01
1637 #define _LATE1 0x02
1638 #define _LATE2 0x04
1639 #define _LATE3 0x08
1640 #define _LATE4 0x10
1641 #define _LATE5 0x20
1642 #define _LATE6 0x40
1643 #define _LATE7 0x80
1645 //==============================================================================
1648 //==============================================================================
1649 // BORCON Bits
1651 extern __at(0x0116) __sfr BORCON;
1653 typedef struct
1655 unsigned BORRDY : 1;
1656 unsigned : 1;
1657 unsigned : 1;
1658 unsigned : 1;
1659 unsigned : 1;
1660 unsigned : 1;
1661 unsigned BORFS : 1;
1662 unsigned SBOREN : 1;
1663 } __BORCONbits_t;
1665 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1667 #define _BORRDY 0x01
1668 #define _BORFS 0x40
1669 #define _SBOREN 0x80
1671 //==============================================================================
1674 //==============================================================================
1675 // FVRCON Bits
1677 extern __at(0x0117) __sfr FVRCON;
1679 typedef union
1681 struct
1683 unsigned ADFVR0 : 1;
1684 unsigned ADFVR1 : 1;
1685 unsigned : 1;
1686 unsigned : 1;
1687 unsigned TSRNG : 1;
1688 unsigned TSEN : 1;
1689 unsigned FVRRDY : 1;
1690 unsigned FVREN : 1;
1693 struct
1695 unsigned ADFVR : 2;
1696 unsigned : 6;
1698 } __FVRCONbits_t;
1700 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1702 #define _ADFVR0 0x01
1703 #define _ADFVR1 0x02
1704 #define _TSRNG 0x10
1705 #define _TSEN 0x20
1706 #define _FVRRDY 0x40
1707 #define _FVREN 0x80
1709 //==============================================================================
1712 //==============================================================================
1713 // APFCON Bits
1715 extern __at(0x011D) __sfr APFCON;
1717 typedef struct
1719 unsigned CCP2SEL : 1;
1720 unsigned T3CKISEL : 1;
1721 unsigned : 1;
1722 unsigned : 1;
1723 unsigned : 1;
1724 unsigned : 1;
1725 unsigned : 1;
1726 unsigned : 1;
1727 } __APFCONbits_t;
1729 extern __at(0x011D) volatile __APFCONbits_t APFCONbits;
1731 #define _CCP2SEL 0x01
1732 #define _T3CKISEL 0x02
1734 //==============================================================================
1737 //==============================================================================
1738 // ANSELA Bits
1740 extern __at(0x018C) __sfr ANSELA;
1742 typedef struct
1744 unsigned ANSA0 : 1;
1745 unsigned ANSA1 : 1;
1746 unsigned ANSA2 : 1;
1747 unsigned ANSA3 : 1;
1748 unsigned : 1;
1749 unsigned ANSA5 : 1;
1750 unsigned : 1;
1751 unsigned : 1;
1752 } __ANSELAbits_t;
1754 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1756 #define _ANSA0 0x01
1757 #define _ANSA1 0x02
1758 #define _ANSA2 0x04
1759 #define _ANSA3 0x08
1760 #define _ANSA5 0x20
1762 //==============================================================================
1765 //==============================================================================
1766 // ANSELB Bits
1768 extern __at(0x018D) __sfr ANSELB;
1770 typedef union
1772 struct
1774 unsigned ANSB0 : 1;
1775 unsigned ANSB1 : 1;
1776 unsigned ANSB2 : 1;
1777 unsigned ANSB3 : 1;
1778 unsigned ANSB4 : 1;
1779 unsigned ANSB5 : 1;
1780 unsigned : 1;
1781 unsigned : 1;
1784 struct
1786 unsigned ANSB : 6;
1787 unsigned : 2;
1789 } __ANSELBbits_t;
1791 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1793 #define _ANSB0 0x01
1794 #define _ANSB1 0x02
1795 #define _ANSB2 0x04
1796 #define _ANSB3 0x08
1797 #define _ANSB4 0x10
1798 #define _ANSB5 0x20
1800 //==============================================================================
1803 //==============================================================================
1804 // ANSELD Bits
1806 extern __at(0x018F) __sfr ANSELD;
1808 typedef union
1810 struct
1812 unsigned ANSD0 : 1;
1813 unsigned ANSD1 : 1;
1814 unsigned ANSD2 : 1;
1815 unsigned ANSD3 : 1;
1816 unsigned : 1;
1817 unsigned : 1;
1818 unsigned : 1;
1819 unsigned : 1;
1822 struct
1824 unsigned ANSD : 4;
1825 unsigned : 4;
1827 } __ANSELDbits_t;
1829 extern __at(0x018F) volatile __ANSELDbits_t ANSELDbits;
1831 #define _ANSD0 0x01
1832 #define _ANSD1 0x02
1833 #define _ANSD2 0x04
1834 #define _ANSD3 0x08
1836 //==============================================================================
1839 //==============================================================================
1840 // ANSELE Bits
1842 extern __at(0x0190) __sfr ANSELE;
1844 typedef union
1846 struct
1848 unsigned ANSE0 : 1;
1849 unsigned ANSE1 : 1;
1850 unsigned ANSE2 : 1;
1851 unsigned : 1;
1852 unsigned : 1;
1853 unsigned : 1;
1854 unsigned : 1;
1855 unsigned : 1;
1858 struct
1860 unsigned ANSE : 3;
1861 unsigned : 5;
1863 } __ANSELEbits_t;
1865 extern __at(0x0190) volatile __ANSELEbits_t ANSELEbits;
1867 #define _ANSE0 0x01
1868 #define _ANSE1 0x02
1869 #define _ANSE2 0x04
1871 //==============================================================================
1873 extern __at(0x0191) __sfr PMADR;
1874 extern __at(0x0191) __sfr PMADRL;
1875 extern __at(0x0192) __sfr PMADRH;
1876 extern __at(0x0193) __sfr PMDAT;
1877 extern __at(0x0193) __sfr PMDATL;
1878 extern __at(0x0194) __sfr PMDATH;
1880 //==============================================================================
1881 // PMCON1 Bits
1883 extern __at(0x0195) __sfr PMCON1;
1885 typedef struct
1887 unsigned RD : 1;
1888 unsigned WR : 1;
1889 unsigned WREN : 1;
1890 unsigned WRERR : 1;
1891 unsigned FREE : 1;
1892 unsigned LWLO : 1;
1893 unsigned CFGS : 1;
1894 unsigned : 1;
1895 } __PMCON1bits_t;
1897 extern __at(0x0195) volatile __PMCON1bits_t PMCON1bits;
1899 #define _RD 0x01
1900 #define _WR 0x02
1901 #define _WREN 0x04
1902 #define _WRERR 0x08
1903 #define _FREE 0x10
1904 #define _LWLO 0x20
1905 #define _CFGS 0x40
1907 //==============================================================================
1909 extern __at(0x0196) __sfr PMCON2;
1910 extern __at(0x0199) __sfr RC1REG;
1911 extern __at(0x0199) __sfr RCREG;
1912 extern __at(0x0199) __sfr RCREG1;
1913 extern __at(0x019A) __sfr TX1REG;
1914 extern __at(0x019A) __sfr TXREG;
1915 extern __at(0x019A) __sfr TXREG1;
1916 extern __at(0x019B) __sfr SP1BRG;
1917 extern __at(0x019B) __sfr SP1BRGL;
1918 extern __at(0x019B) __sfr SPBRG;
1919 extern __at(0x019B) __sfr SPBRGL;
1920 extern __at(0x019B) __sfr SPBRGL1;
1921 extern __at(0x019C) __sfr SP1BRGH;
1922 extern __at(0x019C) __sfr SPBRGH;
1923 extern __at(0x019C) __sfr SPBRGH1;
1925 //==============================================================================
1926 // RC1STA Bits
1928 extern __at(0x019D) __sfr RC1STA;
1930 typedef struct
1932 unsigned RX9D : 1;
1933 unsigned OERR : 1;
1934 unsigned FERR : 1;
1935 unsigned ADDEN : 1;
1936 unsigned CREN : 1;
1937 unsigned SREN : 1;
1938 unsigned RX9 : 1;
1939 unsigned SPEN : 1;
1940 } __RC1STAbits_t;
1942 extern __at(0x019D) volatile __RC1STAbits_t RC1STAbits;
1944 #define _RX9D 0x01
1945 #define _OERR 0x02
1946 #define _FERR 0x04
1947 #define _ADDEN 0x08
1948 #define _CREN 0x10
1949 #define _SREN 0x20
1950 #define _RX9 0x40
1951 #define _SPEN 0x80
1953 //==============================================================================
1956 //==============================================================================
1957 // RCSTA Bits
1959 extern __at(0x019D) __sfr RCSTA;
1961 typedef struct
1963 unsigned RX9D : 1;
1964 unsigned OERR : 1;
1965 unsigned FERR : 1;
1966 unsigned ADDEN : 1;
1967 unsigned CREN : 1;
1968 unsigned SREN : 1;
1969 unsigned RX9 : 1;
1970 unsigned SPEN : 1;
1971 } __RCSTAbits_t;
1973 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
1975 #define _RCSTA_RX9D 0x01
1976 #define _RCSTA_OERR 0x02
1977 #define _RCSTA_FERR 0x04
1978 #define _RCSTA_ADDEN 0x08
1979 #define _RCSTA_CREN 0x10
1980 #define _RCSTA_SREN 0x20
1981 #define _RCSTA_RX9 0x40
1982 #define _RCSTA_SPEN 0x80
1984 //==============================================================================
1987 //==============================================================================
1988 // RCSTA1 Bits
1990 extern __at(0x019D) __sfr RCSTA1;
1992 typedef struct
1994 unsigned RX9D : 1;
1995 unsigned OERR : 1;
1996 unsigned FERR : 1;
1997 unsigned ADDEN : 1;
1998 unsigned CREN : 1;
1999 unsigned SREN : 1;
2000 unsigned RX9 : 1;
2001 unsigned SPEN : 1;
2002 } __RCSTA1bits_t;
2004 extern __at(0x019D) volatile __RCSTA1bits_t RCSTA1bits;
2006 #define _RCSTA1_RX9D 0x01
2007 #define _RCSTA1_OERR 0x02
2008 #define _RCSTA1_FERR 0x04
2009 #define _RCSTA1_ADDEN 0x08
2010 #define _RCSTA1_CREN 0x10
2011 #define _RCSTA1_SREN 0x20
2012 #define _RCSTA1_RX9 0x40
2013 #define _RCSTA1_SPEN 0x80
2015 //==============================================================================
2018 //==============================================================================
2019 // TX1STA Bits
2021 extern __at(0x019E) __sfr TX1STA;
2023 typedef struct
2025 unsigned TX9D : 1;
2026 unsigned TRMT : 1;
2027 unsigned BRGH : 1;
2028 unsigned SENDB : 1;
2029 unsigned SYNC : 1;
2030 unsigned TXEN : 1;
2031 unsigned TX9 : 1;
2032 unsigned CSRC : 1;
2033 } __TX1STAbits_t;
2035 extern __at(0x019E) volatile __TX1STAbits_t TX1STAbits;
2037 #define _TX9D 0x01
2038 #define _TRMT 0x02
2039 #define _BRGH 0x04
2040 #define _SENDB 0x08
2041 #define _SYNC 0x10
2042 #define _TXEN 0x20
2043 #define _TX9 0x40
2044 #define _CSRC 0x80
2046 //==============================================================================
2049 //==============================================================================
2050 // TXSTA Bits
2052 extern __at(0x019E) __sfr TXSTA;
2054 typedef struct
2056 unsigned TX9D : 1;
2057 unsigned TRMT : 1;
2058 unsigned BRGH : 1;
2059 unsigned SENDB : 1;
2060 unsigned SYNC : 1;
2061 unsigned TXEN : 1;
2062 unsigned TX9 : 1;
2063 unsigned CSRC : 1;
2064 } __TXSTAbits_t;
2066 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
2068 #define _TXSTA_TX9D 0x01
2069 #define _TXSTA_TRMT 0x02
2070 #define _TXSTA_BRGH 0x04
2071 #define _TXSTA_SENDB 0x08
2072 #define _TXSTA_SYNC 0x10
2073 #define _TXSTA_TXEN 0x20
2074 #define _TXSTA_TX9 0x40
2075 #define _TXSTA_CSRC 0x80
2077 //==============================================================================
2080 //==============================================================================
2081 // TXSTA1 Bits
2083 extern __at(0x019E) __sfr TXSTA1;
2085 typedef struct
2087 unsigned TX9D : 1;
2088 unsigned TRMT : 1;
2089 unsigned BRGH : 1;
2090 unsigned SENDB : 1;
2091 unsigned SYNC : 1;
2092 unsigned TXEN : 1;
2093 unsigned TX9 : 1;
2094 unsigned CSRC : 1;
2095 } __TXSTA1bits_t;
2097 extern __at(0x019E) volatile __TXSTA1bits_t TXSTA1bits;
2099 #define _TXSTA1_TX9D 0x01
2100 #define _TXSTA1_TRMT 0x02
2101 #define _TXSTA1_BRGH 0x04
2102 #define _TXSTA1_SENDB 0x08
2103 #define _TXSTA1_SYNC 0x10
2104 #define _TXSTA1_TXEN 0x20
2105 #define _TXSTA1_TX9 0x40
2106 #define _TXSTA1_CSRC 0x80
2108 //==============================================================================
2111 //==============================================================================
2112 // BAUD1CON Bits
2114 extern __at(0x019F) __sfr BAUD1CON;
2116 typedef struct
2118 unsigned ABDEN : 1;
2119 unsigned WUE : 1;
2120 unsigned : 1;
2121 unsigned BRG16 : 1;
2122 unsigned SCKP : 1;
2123 unsigned : 1;
2124 unsigned RCIDL : 1;
2125 unsigned ABDOVF : 1;
2126 } __BAUD1CONbits_t;
2128 extern __at(0x019F) volatile __BAUD1CONbits_t BAUD1CONbits;
2130 #define _ABDEN 0x01
2131 #define _WUE 0x02
2132 #define _BRG16 0x08
2133 #define _SCKP 0x10
2134 #define _RCIDL 0x40
2135 #define _ABDOVF 0x80
2137 //==============================================================================
2140 //==============================================================================
2141 // BAUDCON Bits
2143 extern __at(0x019F) __sfr BAUDCON;
2145 typedef struct
2147 unsigned ABDEN : 1;
2148 unsigned WUE : 1;
2149 unsigned : 1;
2150 unsigned BRG16 : 1;
2151 unsigned SCKP : 1;
2152 unsigned : 1;
2153 unsigned RCIDL : 1;
2154 unsigned ABDOVF : 1;
2155 } __BAUDCONbits_t;
2157 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
2159 #define _BAUDCON_ABDEN 0x01
2160 #define _BAUDCON_WUE 0x02
2161 #define _BAUDCON_BRG16 0x08
2162 #define _BAUDCON_SCKP 0x10
2163 #define _BAUDCON_RCIDL 0x40
2164 #define _BAUDCON_ABDOVF 0x80
2166 //==============================================================================
2169 //==============================================================================
2170 // BAUDCON1 Bits
2172 extern __at(0x019F) __sfr BAUDCON1;
2174 typedef struct
2176 unsigned ABDEN : 1;
2177 unsigned WUE : 1;
2178 unsigned : 1;
2179 unsigned BRG16 : 1;
2180 unsigned SCKP : 1;
2181 unsigned : 1;
2182 unsigned RCIDL : 1;
2183 unsigned ABDOVF : 1;
2184 } __BAUDCON1bits_t;
2186 extern __at(0x019F) volatile __BAUDCON1bits_t BAUDCON1bits;
2188 #define _BAUDCON1_ABDEN 0x01
2189 #define _BAUDCON1_WUE 0x02
2190 #define _BAUDCON1_BRG16 0x08
2191 #define _BAUDCON1_SCKP 0x10
2192 #define _BAUDCON1_RCIDL 0x40
2193 #define _BAUDCON1_ABDOVF 0x80
2195 //==============================================================================
2198 //==============================================================================
2199 // WPUB Bits
2201 extern __at(0x020D) __sfr WPUB;
2203 typedef struct
2205 unsigned WPUB0 : 1;
2206 unsigned WPUB1 : 1;
2207 unsigned WPUB2 : 1;
2208 unsigned WPUB3 : 1;
2209 unsigned WPUB4 : 1;
2210 unsigned WPUB5 : 1;
2211 unsigned WPUB6 : 1;
2212 unsigned WPUB7 : 1;
2213 } __WPUBbits_t;
2215 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
2217 #define _WPUB0 0x01
2218 #define _WPUB1 0x02
2219 #define _WPUB2 0x04
2220 #define _WPUB3 0x08
2221 #define _WPUB4 0x10
2222 #define _WPUB5 0x20
2223 #define _WPUB6 0x40
2224 #define _WPUB7 0x80
2226 //==============================================================================
2229 //==============================================================================
2230 // WPUD Bits
2232 extern __at(0x020F) __sfr WPUD;
2234 typedef struct
2236 unsigned WPUD0 : 1;
2237 unsigned WPUD1 : 1;
2238 unsigned WPUD2 : 1;
2239 unsigned WPUD3 : 1;
2240 unsigned WPUD4 : 1;
2241 unsigned WPUD5 : 1;
2242 unsigned WPUD6 : 1;
2243 unsigned WPUD7 : 1;
2244 } __WPUDbits_t;
2246 extern __at(0x020F) volatile __WPUDbits_t WPUDbits;
2248 #define _WPUD0 0x01
2249 #define _WPUD1 0x02
2250 #define _WPUD2 0x04
2251 #define _WPUD3 0x08
2252 #define _WPUD4 0x10
2253 #define _WPUD5 0x20
2254 #define _WPUD6 0x40
2255 #define _WPUD7 0x80
2257 //==============================================================================
2260 //==============================================================================
2261 // WPUE Bits
2263 extern __at(0x0210) __sfr WPUE;
2265 typedef struct
2267 unsigned WPUE0 : 1;
2268 unsigned WPUE1 : 1;
2269 unsigned WPUE2 : 1;
2270 unsigned WPUE3 : 1;
2271 unsigned WPUE4 : 1;
2272 unsigned WPUE5 : 1;
2273 unsigned WPUE6 : 1;
2274 unsigned WPUE7 : 1;
2275 } __WPUEbits_t;
2277 extern __at(0x0210) volatile __WPUEbits_t WPUEbits;
2279 #define _WPUE0 0x01
2280 #define _WPUE1 0x02
2281 #define _WPUE2 0x04
2282 #define _WPUE3 0x08
2283 #define _WPUE4 0x10
2284 #define _WPUE5 0x20
2285 #define _WPUE6 0x40
2286 #define _WPUE7 0x80
2288 //==============================================================================
2290 extern __at(0x0211) __sfr SSP1BUF;
2291 extern __at(0x0211) __sfr SSPBUF;
2292 extern __at(0x0212) __sfr SSP1ADD;
2293 extern __at(0x0212) __sfr SSPADD;
2294 extern __at(0x0213) __sfr SSP1MSK;
2295 extern __at(0x0213) __sfr SSPMSK;
2297 //==============================================================================
2298 // SSP1STAT Bits
2300 extern __at(0x0214) __sfr SSP1STAT;
2302 typedef struct
2304 unsigned BF : 1;
2305 unsigned UA : 1;
2306 unsigned R_NOT_W : 1;
2307 unsigned S : 1;
2308 unsigned P : 1;
2309 unsigned D_NOT_A : 1;
2310 unsigned CKE : 1;
2311 unsigned SMP : 1;
2312 } __SSP1STATbits_t;
2314 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
2316 #define _BF 0x01
2317 #define _UA 0x02
2318 #define _R_NOT_W 0x04
2319 #define _S 0x08
2320 #define _P 0x10
2321 #define _D_NOT_A 0x20
2322 #define _CKE 0x40
2323 #define _SMP 0x80
2325 //==============================================================================
2328 //==============================================================================
2329 // SSPSTAT Bits
2331 extern __at(0x0214) __sfr SSPSTAT;
2333 typedef struct
2335 unsigned BF : 1;
2336 unsigned UA : 1;
2337 unsigned R_NOT_W : 1;
2338 unsigned S : 1;
2339 unsigned P : 1;
2340 unsigned D_NOT_A : 1;
2341 unsigned CKE : 1;
2342 unsigned SMP : 1;
2343 } __SSPSTATbits_t;
2345 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
2347 #define _SSPSTAT_BF 0x01
2348 #define _SSPSTAT_UA 0x02
2349 #define _SSPSTAT_R_NOT_W 0x04
2350 #define _SSPSTAT_S 0x08
2351 #define _SSPSTAT_P 0x10
2352 #define _SSPSTAT_D_NOT_A 0x20
2353 #define _SSPSTAT_CKE 0x40
2354 #define _SSPSTAT_SMP 0x80
2356 //==============================================================================
2359 //==============================================================================
2360 // SSP1CON1 Bits
2362 extern __at(0x0215) __sfr SSP1CON1;
2364 typedef union
2366 struct
2368 unsigned SSPM0 : 1;
2369 unsigned SSPM1 : 1;
2370 unsigned SSPM2 : 1;
2371 unsigned SSPM3 : 1;
2372 unsigned CKP : 1;
2373 unsigned SSPEN : 1;
2374 unsigned SSPOV : 1;
2375 unsigned WCOL : 1;
2378 struct
2380 unsigned SSPM : 4;
2381 unsigned : 4;
2383 } __SSP1CON1bits_t;
2385 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
2387 #define _SSPM0 0x01
2388 #define _SSPM1 0x02
2389 #define _SSPM2 0x04
2390 #define _SSPM3 0x08
2391 #define _CKP 0x10
2392 #define _SSPEN 0x20
2393 #define _SSPOV 0x40
2394 #define _WCOL 0x80
2396 //==============================================================================
2399 //==============================================================================
2400 // SSPCON Bits
2402 extern __at(0x0215) __sfr SSPCON;
2404 typedef union
2406 struct
2408 unsigned SSPM0 : 1;
2409 unsigned SSPM1 : 1;
2410 unsigned SSPM2 : 1;
2411 unsigned SSPM3 : 1;
2412 unsigned CKP : 1;
2413 unsigned SSPEN : 1;
2414 unsigned SSPOV : 1;
2415 unsigned WCOL : 1;
2418 struct
2420 unsigned SSPM : 4;
2421 unsigned : 4;
2423 } __SSPCONbits_t;
2425 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
2427 #define _SSPCON_SSPM0 0x01
2428 #define _SSPCON_SSPM1 0x02
2429 #define _SSPCON_SSPM2 0x04
2430 #define _SSPCON_SSPM3 0x08
2431 #define _SSPCON_CKP 0x10
2432 #define _SSPCON_SSPEN 0x20
2433 #define _SSPCON_SSPOV 0x40
2434 #define _SSPCON_WCOL 0x80
2436 //==============================================================================
2439 //==============================================================================
2440 // SSPCON1 Bits
2442 extern __at(0x0215) __sfr SSPCON1;
2444 typedef union
2446 struct
2448 unsigned SSPM0 : 1;
2449 unsigned SSPM1 : 1;
2450 unsigned SSPM2 : 1;
2451 unsigned SSPM3 : 1;
2452 unsigned CKP : 1;
2453 unsigned SSPEN : 1;
2454 unsigned SSPOV : 1;
2455 unsigned WCOL : 1;
2458 struct
2460 unsigned SSPM : 4;
2461 unsigned : 4;
2463 } __SSPCON1bits_t;
2465 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
2467 #define _SSPCON1_SSPM0 0x01
2468 #define _SSPCON1_SSPM1 0x02
2469 #define _SSPCON1_SSPM2 0x04
2470 #define _SSPCON1_SSPM3 0x08
2471 #define _SSPCON1_CKP 0x10
2472 #define _SSPCON1_SSPEN 0x20
2473 #define _SSPCON1_SSPOV 0x40
2474 #define _SSPCON1_WCOL 0x80
2476 //==============================================================================
2479 //==============================================================================
2480 // SSP1CON2 Bits
2482 extern __at(0x0216) __sfr SSP1CON2;
2484 typedef struct
2486 unsigned SEN : 1;
2487 unsigned RSEN : 1;
2488 unsigned PEN : 1;
2489 unsigned RCEN : 1;
2490 unsigned ACKEN : 1;
2491 unsigned ACKDT : 1;
2492 unsigned ACKSTAT : 1;
2493 unsigned GCEN : 1;
2494 } __SSP1CON2bits_t;
2496 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
2498 #define _SEN 0x01
2499 #define _RSEN 0x02
2500 #define _PEN 0x04
2501 #define _RCEN 0x08
2502 #define _ACKEN 0x10
2503 #define _ACKDT 0x20
2504 #define _ACKSTAT 0x40
2505 #define _GCEN 0x80
2507 //==============================================================================
2510 //==============================================================================
2511 // SSPCON2 Bits
2513 extern __at(0x0216) __sfr SSPCON2;
2515 typedef struct
2517 unsigned SEN : 1;
2518 unsigned RSEN : 1;
2519 unsigned PEN : 1;
2520 unsigned RCEN : 1;
2521 unsigned ACKEN : 1;
2522 unsigned ACKDT : 1;
2523 unsigned ACKSTAT : 1;
2524 unsigned GCEN : 1;
2525 } __SSPCON2bits_t;
2527 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
2529 #define _SSPCON2_SEN 0x01
2530 #define _SSPCON2_RSEN 0x02
2531 #define _SSPCON2_PEN 0x04
2532 #define _SSPCON2_RCEN 0x08
2533 #define _SSPCON2_ACKEN 0x10
2534 #define _SSPCON2_ACKDT 0x20
2535 #define _SSPCON2_ACKSTAT 0x40
2536 #define _SSPCON2_GCEN 0x80
2538 //==============================================================================
2541 //==============================================================================
2542 // SSP1CON3 Bits
2544 extern __at(0x0217) __sfr SSP1CON3;
2546 typedef struct
2548 unsigned DHEN : 1;
2549 unsigned AHEN : 1;
2550 unsigned SBCDE : 1;
2551 unsigned SDAHT : 1;
2552 unsigned BOEN : 1;
2553 unsigned SCIE : 1;
2554 unsigned PCIE : 1;
2555 unsigned ACKTIM : 1;
2556 } __SSP1CON3bits_t;
2558 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
2560 #define _DHEN 0x01
2561 #define _AHEN 0x02
2562 #define _SBCDE 0x04
2563 #define _SDAHT 0x08
2564 #define _BOEN 0x10
2565 #define _SCIE 0x20
2566 #define _PCIE 0x40
2567 #define _ACKTIM 0x80
2569 //==============================================================================
2572 //==============================================================================
2573 // SSPCON3 Bits
2575 extern __at(0x0217) __sfr SSPCON3;
2577 typedef struct
2579 unsigned DHEN : 1;
2580 unsigned AHEN : 1;
2581 unsigned SBCDE : 1;
2582 unsigned SDAHT : 1;
2583 unsigned BOEN : 1;
2584 unsigned SCIE : 1;
2585 unsigned PCIE : 1;
2586 unsigned ACKTIM : 1;
2587 } __SSPCON3bits_t;
2589 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
2591 #define _SSPCON3_DHEN 0x01
2592 #define _SSPCON3_AHEN 0x02
2593 #define _SSPCON3_SBCDE 0x04
2594 #define _SSPCON3_SDAHT 0x08
2595 #define _SSPCON3_BOEN 0x10
2596 #define _SSPCON3_SCIE 0x20
2597 #define _SSPCON3_PCIE 0x40
2598 #define _SSPCON3_ACKTIM 0x80
2600 //==============================================================================
2602 extern __at(0x0219) __sfr SSP2BUF;
2603 extern __at(0x021A) __sfr SSP2ADD;
2604 extern __at(0x021B) __sfr SSP2MSK;
2606 //==============================================================================
2607 // SSP2STAT Bits
2609 extern __at(0x021C) __sfr SSP2STAT;
2611 typedef struct
2613 unsigned BF : 1;
2614 unsigned UA : 1;
2615 unsigned R_NOT_W : 1;
2616 unsigned S : 1;
2617 unsigned P : 1;
2618 unsigned D_NOT_A : 1;
2619 unsigned CKE : 1;
2620 unsigned SMP : 1;
2621 } __SSP2STATbits_t;
2623 extern __at(0x021C) volatile __SSP2STATbits_t SSP2STATbits;
2625 #define _SSP2STAT_BF 0x01
2626 #define _SSP2STAT_UA 0x02
2627 #define _SSP2STAT_R_NOT_W 0x04
2628 #define _SSP2STAT_S 0x08
2629 #define _SSP2STAT_P 0x10
2630 #define _SSP2STAT_D_NOT_A 0x20
2631 #define _SSP2STAT_CKE 0x40
2632 #define _SSP2STAT_SMP 0x80
2634 //==============================================================================
2637 //==============================================================================
2638 // SSP2CON1 Bits
2640 extern __at(0x021D) __sfr SSP2CON1;
2642 typedef union
2644 struct
2646 unsigned SSPM0 : 1;
2647 unsigned SSPM1 : 1;
2648 unsigned SSPM2 : 1;
2649 unsigned SSPM3 : 1;
2650 unsigned CKP : 1;
2651 unsigned SSPEN : 1;
2652 unsigned SSPOV : 1;
2653 unsigned WCOL : 1;
2656 struct
2658 unsigned SSPM : 4;
2659 unsigned : 4;
2661 } __SSP2CON1bits_t;
2663 extern __at(0x021D) volatile __SSP2CON1bits_t SSP2CON1bits;
2665 #define _SSP2CON1_SSPM0 0x01
2666 #define _SSP2CON1_SSPM1 0x02
2667 #define _SSP2CON1_SSPM2 0x04
2668 #define _SSP2CON1_SSPM3 0x08
2669 #define _SSP2CON1_CKP 0x10
2670 #define _SSP2CON1_SSPEN 0x20
2671 #define _SSP2CON1_SSPOV 0x40
2672 #define _SSP2CON1_WCOL 0x80
2674 //==============================================================================
2677 //==============================================================================
2678 // SSP2CON2 Bits
2680 extern __at(0x021E) __sfr SSP2CON2;
2682 typedef struct
2684 unsigned SEN : 1;
2685 unsigned RSEN : 1;
2686 unsigned PEN : 1;
2687 unsigned RCEN : 1;
2688 unsigned ACKEN : 1;
2689 unsigned ACKDT : 1;
2690 unsigned ACKSTAT : 1;
2691 unsigned GCEN : 1;
2692 } __SSP2CON2bits_t;
2694 extern __at(0x021E) volatile __SSP2CON2bits_t SSP2CON2bits;
2696 #define _SSP2CON2_SEN 0x01
2697 #define _SSP2CON2_RSEN 0x02
2698 #define _SSP2CON2_PEN 0x04
2699 #define _SSP2CON2_RCEN 0x08
2700 #define _SSP2CON2_ACKEN 0x10
2701 #define _SSP2CON2_ACKDT 0x20
2702 #define _SSP2CON2_ACKSTAT 0x40
2703 #define _SSP2CON2_GCEN 0x80
2705 //==============================================================================
2708 //==============================================================================
2709 // SSP2CON3 Bits
2711 extern __at(0x021F) __sfr SSP2CON3;
2713 typedef struct
2715 unsigned DHEN : 1;
2716 unsigned AHEN : 1;
2717 unsigned SBCDE : 1;
2718 unsigned SDAHT : 1;
2719 unsigned BOEN : 1;
2720 unsigned SCIE : 1;
2721 unsigned PCIE : 1;
2722 unsigned ACKTIM : 1;
2723 } __SSP2CON3bits_t;
2725 extern __at(0x021F) volatile __SSP2CON3bits_t SSP2CON3bits;
2727 #define _SSP2CON3_DHEN 0x01
2728 #define _SSP2CON3_AHEN 0x02
2729 #define _SSP2CON3_SBCDE 0x04
2730 #define _SSP2CON3_SDAHT 0x08
2731 #define _SSP2CON3_BOEN 0x10
2732 #define _SSP2CON3_SCIE 0x20
2733 #define _SSP2CON3_PCIE 0x40
2734 #define _SSP2CON3_ACKTIM 0x80
2736 //==============================================================================
2739 //==============================================================================
2740 // PORTF Bits
2742 extern __at(0x028C) __sfr PORTF;
2744 typedef struct
2746 unsigned RF0 : 1;
2747 unsigned RF1 : 1;
2748 unsigned RF2 : 1;
2749 unsigned RF3 : 1;
2750 unsigned RF4 : 1;
2751 unsigned RF5 : 1;
2752 unsigned RF6 : 1;
2753 unsigned RF7 : 1;
2754 } __PORTFbits_t;
2756 extern __at(0x028C) volatile __PORTFbits_t PORTFbits;
2758 #define _RF0 0x01
2759 #define _RF1 0x02
2760 #define _RF2 0x04
2761 #define _RF3 0x08
2762 #define _RF4 0x10
2763 #define _RF5 0x20
2764 #define _RF6 0x40
2765 #define _RF7 0x80
2767 //==============================================================================
2770 //==============================================================================
2771 // PORTG Bits
2773 extern __at(0x028D) __sfr PORTG;
2775 typedef union
2777 struct
2779 unsigned RG0 : 1;
2780 unsigned RG1 : 1;
2781 unsigned RG2 : 1;
2782 unsigned RG3 : 1;
2783 unsigned RG4 : 1;
2784 unsigned RG5 : 1;
2785 unsigned : 1;
2786 unsigned : 1;
2789 struct
2791 unsigned RG : 6;
2792 unsigned : 2;
2794 } __PORTGbits_t;
2796 extern __at(0x028D) volatile __PORTGbits_t PORTGbits;
2798 #define _RG0 0x01
2799 #define _RG1 0x02
2800 #define _RG2 0x04
2801 #define _RG3 0x08
2802 #define _RG4 0x10
2803 #define _RG5 0x20
2805 //==============================================================================
2807 extern __at(0x0291) __sfr CCPR1;
2808 extern __at(0x0291) __sfr CCPR1L;
2809 extern __at(0x0292) __sfr CCPR1H;
2811 //==============================================================================
2812 // CCP1CON Bits
2814 extern __at(0x0293) __sfr CCP1CON;
2816 typedef union
2818 struct
2820 unsigned CCP1M0 : 1;
2821 unsigned CCP1M1 : 1;
2822 unsigned CCP1M2 : 1;
2823 unsigned CCP1M3 : 1;
2824 unsigned DC1B0 : 1;
2825 unsigned DC1B1 : 1;
2826 unsigned : 1;
2827 unsigned : 1;
2830 struct
2832 unsigned CCP1M : 4;
2833 unsigned : 4;
2836 struct
2838 unsigned : 4;
2839 unsigned DC1B : 2;
2840 unsigned : 2;
2842 } __CCP1CONbits_t;
2844 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
2846 #define _CCP1M0 0x01
2847 #define _CCP1M1 0x02
2848 #define _CCP1M2 0x04
2849 #define _CCP1M3 0x08
2850 #define _DC1B0 0x10
2851 #define _DC1B1 0x20
2853 //==============================================================================
2855 extern __at(0x0298) __sfr CCPR2;
2856 extern __at(0x0298) __sfr CCPR2L;
2857 extern __at(0x0299) __sfr CCPR2H;
2859 //==============================================================================
2860 // CCP2CON Bits
2862 extern __at(0x029A) __sfr CCP2CON;
2864 typedef union
2866 struct
2868 unsigned CCP2M0 : 1;
2869 unsigned CCP2M1 : 1;
2870 unsigned CCP2M2 : 1;
2871 unsigned CCP2M3 : 1;
2872 unsigned DC2B0 : 1;
2873 unsigned DC2B1 : 1;
2874 unsigned : 1;
2875 unsigned : 1;
2878 struct
2880 unsigned CCP2M : 4;
2881 unsigned : 4;
2884 struct
2886 unsigned : 4;
2887 unsigned DC2B : 2;
2888 unsigned : 2;
2890 } __CCP2CONbits_t;
2892 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
2894 #define _CCP2M0 0x01
2895 #define _CCP2M1 0x02
2896 #define _CCP2M2 0x04
2897 #define _CCP2M3 0x08
2898 #define _DC2B0 0x10
2899 #define _DC2B1 0x20
2901 //==============================================================================
2904 //==============================================================================
2905 // CCPTMRS0 Bits
2907 extern __at(0x029D) __sfr CCPTMRS0;
2909 typedef union
2911 struct
2913 unsigned C1TSEL0 : 1;
2914 unsigned C1TSEL1 : 1;
2915 unsigned C2TSEL0 : 1;
2916 unsigned C2TSEL1 : 1;
2917 unsigned C3TSEL0 : 1;
2918 unsigned C3TSEL1 : 1;
2919 unsigned C4TSEL0 : 1;
2920 unsigned C4TSEL1 : 1;
2923 struct
2925 unsigned C1TSEL : 2;
2926 unsigned : 6;
2929 struct
2931 unsigned : 2;
2932 unsigned C2TSEL : 2;
2933 unsigned : 4;
2936 struct
2938 unsigned : 4;
2939 unsigned C3TSEL : 2;
2940 unsigned : 2;
2943 struct
2945 unsigned : 6;
2946 unsigned C4TSEL : 2;
2948 } __CCPTMRS0bits_t;
2950 extern __at(0x029D) volatile __CCPTMRS0bits_t CCPTMRS0bits;
2952 #define _C1TSEL0 0x01
2953 #define _C1TSEL1 0x02
2954 #define _C2TSEL0 0x04
2955 #define _C2TSEL1 0x08
2956 #define _C3TSEL0 0x10
2957 #define _C3TSEL1 0x20
2958 #define _C4TSEL0 0x40
2959 #define _C4TSEL1 0x80
2961 //==============================================================================
2964 //==============================================================================
2965 // CCPTMRS1 Bits
2967 extern __at(0x029E) __sfr CCPTMRS1;
2969 typedef union
2971 struct
2973 unsigned C5TSEL0 : 1;
2974 unsigned C5TSEL1 : 1;
2975 unsigned C6TSEL0 : 1;
2976 unsigned C6TSEL1 : 1;
2977 unsigned C7TSEL0 : 1;
2978 unsigned C7TSEL1 : 1;
2979 unsigned C8TSEL0 : 1;
2980 unsigned C8TSEL1 : 1;
2983 struct
2985 unsigned C5TSEL : 2;
2986 unsigned : 6;
2989 struct
2991 unsigned : 2;
2992 unsigned C6TSEL : 2;
2993 unsigned : 4;
2996 struct
2998 unsigned : 4;
2999 unsigned C7TSEL : 2;
3000 unsigned : 2;
3003 struct
3005 unsigned : 6;
3006 unsigned C8TSEL : 2;
3008 } __CCPTMRS1bits_t;
3010 extern __at(0x029E) volatile __CCPTMRS1bits_t CCPTMRS1bits;
3012 #define _C5TSEL0 0x01
3013 #define _C5TSEL1 0x02
3014 #define _C6TSEL0 0x04
3015 #define _C6TSEL1 0x08
3016 #define _C7TSEL0 0x10
3017 #define _C7TSEL1 0x20
3018 #define _C8TSEL0 0x40
3019 #define _C8TSEL1 0x80
3021 //==============================================================================
3024 //==============================================================================
3025 // CCPTMRS2 Bits
3027 extern __at(0x029F) __sfr CCPTMRS2;
3029 typedef union
3031 struct
3033 unsigned C9TSEL0 : 1;
3034 unsigned C9TSEL1 : 1;
3035 unsigned C10TSEL0 : 1;
3036 unsigned C10TSEL1 : 1;
3037 unsigned : 1;
3038 unsigned : 1;
3039 unsigned : 1;
3040 unsigned : 1;
3043 struct
3045 unsigned C9TSEL : 2;
3046 unsigned : 6;
3049 struct
3051 unsigned : 2;
3052 unsigned C10TSEL : 2;
3053 unsigned : 4;
3055 } __CCPTMRS2bits_t;
3057 extern __at(0x029F) volatile __CCPTMRS2bits_t CCPTMRS2bits;
3059 #define _C9TSEL0 0x01
3060 #define _C9TSEL1 0x02
3061 #define _C10TSEL0 0x04
3062 #define _C10TSEL1 0x08
3064 //==============================================================================
3067 //==============================================================================
3068 // TRISF Bits
3070 extern __at(0x030C) __sfr TRISF;
3072 typedef struct
3074 unsigned TRISF0 : 1;
3075 unsigned TRISF1 : 1;
3076 unsigned TRISF2 : 1;
3077 unsigned TRISF3 : 1;
3078 unsigned TRISF4 : 1;
3079 unsigned TRISF5 : 1;
3080 unsigned TRISF6 : 1;
3081 unsigned TRISF7 : 1;
3082 } __TRISFbits_t;
3084 extern __at(0x030C) volatile __TRISFbits_t TRISFbits;
3086 #define _TRISF0 0x01
3087 #define _TRISF1 0x02
3088 #define _TRISF2 0x04
3089 #define _TRISF3 0x08
3090 #define _TRISF4 0x10
3091 #define _TRISF5 0x20
3092 #define _TRISF6 0x40
3093 #define _TRISF7 0x80
3095 //==============================================================================
3098 //==============================================================================
3099 // TRISG Bits
3101 extern __at(0x030D) __sfr TRISG;
3103 typedef union
3105 struct
3107 unsigned TRISG0 : 1;
3108 unsigned TRISG1 : 1;
3109 unsigned TRISG2 : 1;
3110 unsigned TRISG3 : 1;
3111 unsigned TRISG4 : 1;
3112 unsigned : 1;
3113 unsigned : 1;
3114 unsigned : 1;
3117 struct
3119 unsigned TRISG : 5;
3120 unsigned : 3;
3122 } __TRISGbits_t;
3124 extern __at(0x030D) volatile __TRISGbits_t TRISGbits;
3126 #define _TRISG0 0x01
3127 #define _TRISG1 0x02
3128 #define _TRISG2 0x04
3129 #define _TRISG3 0x08
3130 #define _TRISG4 0x10
3132 //==============================================================================
3134 extern __at(0x0311) __sfr CCPR3;
3135 extern __at(0x0311) __sfr CCPR3L;
3136 extern __at(0x0312) __sfr CCPR3H;
3138 //==============================================================================
3139 // CCP3CON Bits
3141 extern __at(0x0313) __sfr CCP3CON;
3143 typedef union
3145 struct
3147 unsigned CCP3M0 : 1;
3148 unsigned CCP3M1 : 1;
3149 unsigned CCP3M2 : 1;
3150 unsigned CCP3M3 : 1;
3151 unsigned DC3B0 : 1;
3152 unsigned DC3B1 : 1;
3153 unsigned : 1;
3154 unsigned : 1;
3157 struct
3159 unsigned CCP3M : 4;
3160 unsigned : 4;
3163 struct
3165 unsigned : 4;
3166 unsigned DC3B : 2;
3167 unsigned : 2;
3169 } __CCP3CONbits_t;
3171 extern __at(0x0313) volatile __CCP3CONbits_t CCP3CONbits;
3173 #define _CCP3M0 0x01
3174 #define _CCP3M1 0x02
3175 #define _CCP3M2 0x04
3176 #define _CCP3M3 0x08
3177 #define _DC3B0 0x10
3178 #define _DC3B1 0x20
3180 //==============================================================================
3182 extern __at(0x0318) __sfr CCPR4;
3183 extern __at(0x0318) __sfr CCPR4L;
3184 extern __at(0x0319) __sfr CCPR4H;
3186 //==============================================================================
3187 // CCP4CON Bits
3189 extern __at(0x031A) __sfr CCP4CON;
3191 typedef union
3193 struct
3195 unsigned CCP4M0 : 1;
3196 unsigned CCP4M1 : 1;
3197 unsigned CCP4M2 : 1;
3198 unsigned CCP4M3 : 1;
3199 unsigned DC4B0 : 1;
3200 unsigned DC4B1 : 1;
3201 unsigned : 1;
3202 unsigned : 1;
3205 struct
3207 unsigned CCP4M : 4;
3208 unsigned : 4;
3211 struct
3213 unsigned : 4;
3214 unsigned DC4B : 2;
3215 unsigned : 2;
3217 } __CCP4CONbits_t;
3219 extern __at(0x031A) volatile __CCP4CONbits_t CCP4CONbits;
3221 #define _CCP4M0 0x01
3222 #define _CCP4M1 0x02
3223 #define _CCP4M2 0x04
3224 #define _CCP4M3 0x08
3225 #define _DC4B0 0x10
3226 #define _DC4B1 0x20
3228 //==============================================================================
3230 extern __at(0x031C) __sfr CCPR5;
3231 extern __at(0x031C) __sfr CCPR5L;
3232 extern __at(0x031D) __sfr CCPR5H;
3234 //==============================================================================
3235 // CCP5CON Bits
3237 extern __at(0x031E) __sfr CCP5CON;
3239 typedef union
3241 struct
3243 unsigned CCP5M0 : 1;
3244 unsigned CCP5M1 : 1;
3245 unsigned CCP5M2 : 1;
3246 unsigned CCP5M3 : 1;
3247 unsigned DC5B0 : 1;
3248 unsigned DC5B1 : 1;
3249 unsigned : 1;
3250 unsigned : 1;
3253 struct
3255 unsigned CCP5M : 4;
3256 unsigned : 4;
3259 struct
3261 unsigned : 4;
3262 unsigned DC5B : 2;
3263 unsigned : 2;
3265 } __CCP5CONbits_t;
3267 extern __at(0x031E) volatile __CCP5CONbits_t CCP5CONbits;
3269 #define _CCP5M0 0x01
3270 #define _CCP5M1 0x02
3271 #define _CCP5M2 0x04
3272 #define _CCP5M3 0x08
3273 #define _DC5B0 0x10
3274 #define _DC5B1 0x20
3276 //==============================================================================
3279 //==============================================================================
3280 // LATF Bits
3282 extern __at(0x038C) __sfr LATF;
3284 typedef struct
3286 unsigned LATF0 : 1;
3287 unsigned LATF1 : 1;
3288 unsigned LATF2 : 1;
3289 unsigned LATF3 : 1;
3290 unsigned LATF4 : 1;
3291 unsigned LATF5 : 1;
3292 unsigned LATF6 : 1;
3293 unsigned LATF7 : 1;
3294 } __LATFbits_t;
3296 extern __at(0x038C) volatile __LATFbits_t LATFbits;
3298 #define _LATF0 0x01
3299 #define _LATF1 0x02
3300 #define _LATF2 0x04
3301 #define _LATF3 0x08
3302 #define _LATF4 0x10
3303 #define _LATF5 0x20
3304 #define _LATF6 0x40
3305 #define _LATF7 0x80
3307 //==============================================================================
3310 //==============================================================================
3311 // LATG Bits
3313 extern __at(0x038D) __sfr LATG;
3315 typedef union
3317 struct
3319 unsigned LATG0 : 1;
3320 unsigned LATG1 : 1;
3321 unsigned LATG2 : 1;
3322 unsigned LATG3 : 1;
3323 unsigned LATG4 : 1;
3324 unsigned : 1;
3325 unsigned : 1;
3326 unsigned : 1;
3329 struct
3331 unsigned LATG : 5;
3332 unsigned : 3;
3334 } __LATGbits_t;
3336 extern __at(0x038D) volatile __LATGbits_t LATGbits;
3338 #define _LATG0 0x01
3339 #define _LATG1 0x02
3340 #define _LATG2 0x04
3341 #define _LATG3 0x08
3342 #define _LATG4 0x10
3344 //==============================================================================
3347 //==============================================================================
3348 // IOCBP Bits
3350 extern __at(0x0394) __sfr IOCBP;
3352 typedef struct
3354 unsigned IOCBP0 : 1;
3355 unsigned IOCBP1 : 1;
3356 unsigned IOCBP2 : 1;
3357 unsigned IOCBP3 : 1;
3358 unsigned IOCBP4 : 1;
3359 unsigned IOCBP5 : 1;
3360 unsigned IOCBP6 : 1;
3361 unsigned IOCBP7 : 1;
3362 } __IOCBPbits_t;
3364 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
3366 #define _IOCBP0 0x01
3367 #define _IOCBP1 0x02
3368 #define _IOCBP2 0x04
3369 #define _IOCBP3 0x08
3370 #define _IOCBP4 0x10
3371 #define _IOCBP5 0x20
3372 #define _IOCBP6 0x40
3373 #define _IOCBP7 0x80
3375 //==============================================================================
3378 //==============================================================================
3379 // IOCBN Bits
3381 extern __at(0x0395) __sfr IOCBN;
3383 typedef struct
3385 unsigned IOCBN0 : 1;
3386 unsigned IOCBN1 : 1;
3387 unsigned IOCBN2 : 1;
3388 unsigned IOCBN3 : 1;
3389 unsigned IOCBN4 : 1;
3390 unsigned IOCBN5 : 1;
3391 unsigned IOCBN6 : 1;
3392 unsigned IOCBN7 : 1;
3393 } __IOCBNbits_t;
3395 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
3397 #define _IOCBN0 0x01
3398 #define _IOCBN1 0x02
3399 #define _IOCBN2 0x04
3400 #define _IOCBN3 0x08
3401 #define _IOCBN4 0x10
3402 #define _IOCBN5 0x20
3403 #define _IOCBN6 0x40
3404 #define _IOCBN7 0x80
3406 //==============================================================================
3409 //==============================================================================
3410 // IOCBF Bits
3412 extern __at(0x0396) __sfr IOCBF;
3414 typedef struct
3416 unsigned IOCBF0 : 1;
3417 unsigned IOCBF1 : 1;
3418 unsigned IOCBF2 : 1;
3419 unsigned IOCBF3 : 1;
3420 unsigned IOCBF4 : 1;
3421 unsigned IOCBF5 : 1;
3422 unsigned IOCBF6 : 1;
3423 unsigned IOCBF7 : 1;
3424 } __IOCBFbits_t;
3426 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
3428 #define _IOCBF0 0x01
3429 #define _IOCBF1 0x02
3430 #define _IOCBF2 0x04
3431 #define _IOCBF3 0x08
3432 #define _IOCBF4 0x10
3433 #define _IOCBF5 0x20
3434 #define _IOCBF6 0x40
3435 #define _IOCBF7 0x80
3437 //==============================================================================
3440 //==============================================================================
3441 // ANSELF Bits
3443 extern __at(0x040C) __sfr ANSELF;
3445 typedef struct
3447 unsigned ANSF0 : 1;
3448 unsigned ANSF1 : 1;
3449 unsigned ANSF2 : 1;
3450 unsigned ANSF3 : 1;
3451 unsigned ANSF4 : 1;
3452 unsigned ANSF5 : 1;
3453 unsigned ANSF6 : 1;
3454 unsigned ANSF7 : 1;
3455 } __ANSELFbits_t;
3457 extern __at(0x040C) volatile __ANSELFbits_t ANSELFbits;
3459 #define _ANSF0 0x01
3460 #define _ANSF1 0x02
3461 #define _ANSF2 0x04
3462 #define _ANSF3 0x08
3463 #define _ANSF4 0x10
3464 #define _ANSF5 0x20
3465 #define _ANSF6 0x40
3466 #define _ANSF7 0x80
3468 //==============================================================================
3471 //==============================================================================
3472 // ANSELG Bits
3474 extern __at(0x040D) __sfr ANSELG;
3476 typedef struct
3478 unsigned : 1;
3479 unsigned ANSG1 : 1;
3480 unsigned ANSG2 : 1;
3481 unsigned ANSG3 : 1;
3482 unsigned ANSG4 : 1;
3483 unsigned : 1;
3484 unsigned : 1;
3485 unsigned : 1;
3486 } __ANSELGbits_t;
3488 extern __at(0x040D) volatile __ANSELGbits_t ANSELGbits;
3490 #define _ANSG1 0x02
3491 #define _ANSG2 0x04
3492 #define _ANSG3 0x08
3493 #define _ANSG4 0x10
3495 //==============================================================================
3497 extern __at(0x0411) __sfr TMR3;
3498 extern __at(0x0411) __sfr TMR3L;
3499 extern __at(0x0412) __sfr TMR3H;
3501 //==============================================================================
3502 // T3CON Bits
3504 extern __at(0x0413) __sfr T3CON;
3506 typedef union
3508 struct
3510 unsigned TMR3ON : 1;
3511 unsigned : 1;
3512 unsigned NOT_T3SYNC : 1;
3513 unsigned SOSCEN : 1;
3514 unsigned T3CKPS0 : 1;
3515 unsigned T3CKPS1 : 1;
3516 unsigned TMR3CS0 : 1;
3517 unsigned TMR3CS1 : 1;
3520 struct
3522 unsigned : 1;
3523 unsigned : 1;
3524 unsigned : 1;
3525 unsigned T3OSCEN : 1;
3526 unsigned : 1;
3527 unsigned : 1;
3528 unsigned : 1;
3529 unsigned : 1;
3532 struct
3534 unsigned : 4;
3535 unsigned T3CKPS : 2;
3536 unsigned : 2;
3539 struct
3541 unsigned : 6;
3542 unsigned TMR3CS : 2;
3544 } __T3CONbits_t;
3546 extern __at(0x0413) volatile __T3CONbits_t T3CONbits;
3548 #define _T3CON_TMR3ON 0x01
3549 #define _T3CON_NOT_T3SYNC 0x04
3550 #define _T3CON_SOSCEN 0x08
3551 #define _T3CON_T3OSCEN 0x08
3552 #define _T3CON_T3CKPS0 0x10
3553 #define _T3CON_T3CKPS1 0x20
3554 #define _T3CON_TMR3CS0 0x40
3555 #define _T3CON_TMR3CS1 0x80
3557 //==============================================================================
3560 //==============================================================================
3561 // T3GCON Bits
3563 extern __at(0x0414) __sfr T3GCON;
3565 typedef union
3567 struct
3569 unsigned T3GSS0 : 1;
3570 unsigned T3GSS1 : 1;
3571 unsigned T3GVAL : 1;
3572 unsigned T3GGO_NOT_DONE : 1;
3573 unsigned T3GSPM : 1;
3574 unsigned T3GTM : 1;
3575 unsigned T3GPOL : 1;
3576 unsigned TMR3GE : 1;
3579 struct
3581 unsigned T3GSS : 2;
3582 unsigned : 6;
3584 } __T3GCONbits_t;
3586 extern __at(0x0414) volatile __T3GCONbits_t T3GCONbits;
3588 #define _T3GSS0 0x01
3589 #define _T3GSS1 0x02
3590 #define _T3GVAL 0x04
3591 #define _T3GGO_NOT_DONE 0x08
3592 #define _T3GSPM 0x10
3593 #define _T3GTM 0x20
3594 #define _T3GPOL 0x40
3595 #define _TMR3GE 0x80
3597 //==============================================================================
3599 extern __at(0x0415) __sfr TMR4;
3600 extern __at(0x0416) __sfr PR4;
3602 //==============================================================================
3603 // T4CON Bits
3605 extern __at(0x0417) __sfr T4CON;
3607 typedef union
3609 struct
3611 unsigned T4CKPS0 : 1;
3612 unsigned T4CKPS1 : 1;
3613 unsigned TMR4ON : 1;
3614 unsigned T4OUTPS0 : 1;
3615 unsigned T4OUTPS1 : 1;
3616 unsigned T4OUTPS2 : 1;
3617 unsigned T4OUTPS3 : 1;
3618 unsigned : 1;
3621 struct
3623 unsigned T4CKPS : 2;
3624 unsigned : 6;
3627 struct
3629 unsigned : 3;
3630 unsigned T4OUTPS : 4;
3631 unsigned : 1;
3633 } __T4CONbits_t;
3635 extern __at(0x0417) volatile __T4CONbits_t T4CONbits;
3637 #define _T4CKPS0 0x01
3638 #define _T4CKPS1 0x02
3639 #define _TMR4ON 0x04
3640 #define _T4OUTPS0 0x08
3641 #define _T4OUTPS1 0x10
3642 #define _T4OUTPS2 0x20
3643 #define _T4OUTPS3 0x40
3645 //==============================================================================
3647 extern __at(0x0418) __sfr TMR5;
3648 extern __at(0x0418) __sfr TMR5L;
3649 extern __at(0x0419) __sfr TMR5H;
3651 //==============================================================================
3652 // T5CON Bits
3654 extern __at(0x041A) __sfr T5CON;
3656 typedef union
3658 struct
3660 unsigned TMR5ON : 1;
3661 unsigned : 1;
3662 unsigned NOT_T5SYNC : 1;
3663 unsigned SOSCEN : 1;
3664 unsigned T5CKPS0 : 1;
3665 unsigned T5CKPS1 : 1;
3666 unsigned TMR5CS0 : 1;
3667 unsigned TMR5CS1 : 1;
3670 struct
3672 unsigned : 1;
3673 unsigned : 1;
3674 unsigned : 1;
3675 unsigned T5OSCEN : 1;
3676 unsigned : 1;
3677 unsigned : 1;
3678 unsigned : 1;
3679 unsigned : 1;
3682 struct
3684 unsigned : 4;
3685 unsigned T5CKPS : 2;
3686 unsigned : 2;
3689 struct
3691 unsigned : 6;
3692 unsigned TMR5CS : 2;
3694 } __T5CONbits_t;
3696 extern __at(0x041A) volatile __T5CONbits_t T5CONbits;
3698 #define _T5CON_TMR5ON 0x01
3699 #define _T5CON_NOT_T5SYNC 0x04
3700 #define _T5CON_SOSCEN 0x08
3701 #define _T5CON_T5OSCEN 0x08
3702 #define _T5CON_T5CKPS0 0x10
3703 #define _T5CON_T5CKPS1 0x20
3704 #define _T5CON_TMR5CS0 0x40
3705 #define _T5CON_TMR5CS1 0x80
3707 //==============================================================================
3710 //==============================================================================
3711 // T5GCON Bits
3713 extern __at(0x041B) __sfr T5GCON;
3715 typedef union
3717 struct
3719 unsigned T5GSS0 : 1;
3720 unsigned T5GSS1 : 1;
3721 unsigned T5GVAL : 1;
3722 unsigned T5GGO_NOT_DONE : 1;
3723 unsigned T5GSPM : 1;
3724 unsigned T5GTM : 1;
3725 unsigned T5GPOL : 1;
3726 unsigned TMR5GE : 1;
3729 struct
3731 unsigned T5GSS : 2;
3732 unsigned : 6;
3734 } __T5GCONbits_t;
3736 extern __at(0x041B) volatile __T5GCONbits_t T5GCONbits;
3738 #define _T5GSS0 0x01
3739 #define _T5GSS1 0x02
3740 #define _T5GVAL 0x04
3741 #define _T5GGO_NOT_DONE 0x08
3742 #define _T5GSPM 0x10
3743 #define _T5GTM 0x20
3744 #define _T5GPOL 0x40
3745 #define _TMR5GE 0x80
3747 //==============================================================================
3749 extern __at(0x041C) __sfr TMR6;
3750 extern __at(0x041D) __sfr PR6;
3752 //==============================================================================
3753 // T6CON Bits
3755 extern __at(0x041E) __sfr T6CON;
3757 typedef union
3759 struct
3761 unsigned T6CKPS0 : 1;
3762 unsigned T6CKPS1 : 1;
3763 unsigned TMR6ON : 1;
3764 unsigned T6OUTPS0 : 1;
3765 unsigned T6OUTPS1 : 1;
3766 unsigned T6OUTPS2 : 1;
3767 unsigned T6OUTPS3 : 1;
3768 unsigned : 1;
3771 struct
3773 unsigned T6CKPS : 2;
3774 unsigned : 6;
3777 struct
3779 unsigned : 3;
3780 unsigned T6OUTPS : 4;
3781 unsigned : 1;
3783 } __T6CONbits_t;
3785 extern __at(0x041E) volatile __T6CONbits_t T6CONbits;
3787 #define _T6CKPS0 0x01
3788 #define _T6CKPS1 0x02
3789 #define _TMR6ON 0x04
3790 #define _T6OUTPS0 0x08
3791 #define _T6OUTPS1 0x10
3792 #define _T6OUTPS2 0x20
3793 #define _T6OUTPS3 0x40
3795 //==============================================================================
3798 //==============================================================================
3799 // WPUG Bits
3801 extern __at(0x048D) __sfr WPUG;
3803 typedef struct
3805 unsigned : 1;
3806 unsigned : 1;
3807 unsigned : 1;
3808 unsigned : 1;
3809 unsigned : 1;
3810 unsigned WPUG5 : 1;
3811 unsigned : 1;
3812 unsigned : 1;
3813 } __WPUGbits_t;
3815 extern __at(0x048D) volatile __WPUGbits_t WPUGbits;
3817 #define _WPUG5 0x20
3819 //==============================================================================
3821 extern __at(0x0491) __sfr RC2REG;
3822 extern __at(0x0491) __sfr RCREG2;
3823 extern __at(0x0492) __sfr TX2REG;
3824 extern __at(0x0492) __sfr TXREG2;
3825 extern __at(0x0493) __sfr SP2BRG;
3826 extern __at(0x0493) __sfr SP2BRGL;
3827 extern __at(0x0493) __sfr SPBRGL2;
3828 extern __at(0x0494) __sfr SP2BRGH;
3829 extern __at(0x0494) __sfr SPBRGH2;
3831 //==============================================================================
3832 // RC2STA Bits
3834 extern __at(0x0495) __sfr RC2STA;
3836 typedef struct
3838 unsigned RX9D : 1;
3839 unsigned OERR : 1;
3840 unsigned FERR : 1;
3841 unsigned ADDEN : 1;
3842 unsigned CREN : 1;
3843 unsigned SREN : 1;
3844 unsigned RX9 : 1;
3845 unsigned SPEN : 1;
3846 } __RC2STAbits_t;
3848 extern __at(0x0495) volatile __RC2STAbits_t RC2STAbits;
3850 #define _RC2STA_RX9D 0x01
3851 #define _RC2STA_OERR 0x02
3852 #define _RC2STA_FERR 0x04
3853 #define _RC2STA_ADDEN 0x08
3854 #define _RC2STA_CREN 0x10
3855 #define _RC2STA_SREN 0x20
3856 #define _RC2STA_RX9 0x40
3857 #define _RC2STA_SPEN 0x80
3859 //==============================================================================
3862 //==============================================================================
3863 // RCSTA2 Bits
3865 extern __at(0x0495) __sfr RCSTA2;
3867 typedef struct
3869 unsigned RX9D : 1;
3870 unsigned OERR : 1;
3871 unsigned FERR : 1;
3872 unsigned ADDEN : 1;
3873 unsigned CREN : 1;
3874 unsigned SREN : 1;
3875 unsigned RX9 : 1;
3876 unsigned SPEN : 1;
3877 } __RCSTA2bits_t;
3879 extern __at(0x0495) volatile __RCSTA2bits_t RCSTA2bits;
3881 #define _RCSTA2_RX9D 0x01
3882 #define _RCSTA2_OERR 0x02
3883 #define _RCSTA2_FERR 0x04
3884 #define _RCSTA2_ADDEN 0x08
3885 #define _RCSTA2_CREN 0x10
3886 #define _RCSTA2_SREN 0x20
3887 #define _RCSTA2_RX9 0x40
3888 #define _RCSTA2_SPEN 0x80
3890 //==============================================================================
3893 //==============================================================================
3894 // TX2STA Bits
3896 extern __at(0x0496) __sfr TX2STA;
3898 typedef struct
3900 unsigned TX9D : 1;
3901 unsigned TRMT : 1;
3902 unsigned BRGH : 1;
3903 unsigned SENDB : 1;
3904 unsigned SYNC : 1;
3905 unsigned TXEN : 1;
3906 unsigned TX9 : 1;
3907 unsigned CSRC : 1;
3908 } __TX2STAbits_t;
3910 extern __at(0x0496) volatile __TX2STAbits_t TX2STAbits;
3912 #define _TX2STA_TX9D 0x01
3913 #define _TX2STA_TRMT 0x02
3914 #define _TX2STA_BRGH 0x04
3915 #define _TX2STA_SENDB 0x08
3916 #define _TX2STA_SYNC 0x10
3917 #define _TX2STA_TXEN 0x20
3918 #define _TX2STA_TX9 0x40
3919 #define _TX2STA_CSRC 0x80
3921 //==============================================================================
3924 //==============================================================================
3925 // TXSTA2 Bits
3927 extern __at(0x0496) __sfr TXSTA2;
3929 typedef struct
3931 unsigned TX9D : 1;
3932 unsigned TRMT : 1;
3933 unsigned BRGH : 1;
3934 unsigned SENDB : 1;
3935 unsigned SYNC : 1;
3936 unsigned TXEN : 1;
3937 unsigned TX9 : 1;
3938 unsigned CSRC : 1;
3939 } __TXSTA2bits_t;
3941 extern __at(0x0496) volatile __TXSTA2bits_t TXSTA2bits;
3943 #define _TXSTA2_TX9D 0x01
3944 #define _TXSTA2_TRMT 0x02
3945 #define _TXSTA2_BRGH 0x04
3946 #define _TXSTA2_SENDB 0x08
3947 #define _TXSTA2_SYNC 0x10
3948 #define _TXSTA2_TXEN 0x20
3949 #define _TXSTA2_TX9 0x40
3950 #define _TXSTA2_CSRC 0x80
3952 //==============================================================================
3955 //==============================================================================
3956 // BAUD2CON Bits
3958 extern __at(0x0497) __sfr BAUD2CON;
3960 typedef struct
3962 unsigned ABDEN : 1;
3963 unsigned WUE : 1;
3964 unsigned : 1;
3965 unsigned BRG16 : 1;
3966 unsigned SCKP : 1;
3967 unsigned : 1;
3968 unsigned RCIDL : 1;
3969 unsigned ABDOVF : 1;
3970 } __BAUD2CONbits_t;
3972 extern __at(0x0497) volatile __BAUD2CONbits_t BAUD2CONbits;
3974 #define _BAUD2CON_ABDEN 0x01
3975 #define _BAUD2CON_WUE 0x02
3976 #define _BAUD2CON_BRG16 0x08
3977 #define _BAUD2CON_SCKP 0x10
3978 #define _BAUD2CON_RCIDL 0x40
3979 #define _BAUD2CON_ABDOVF 0x80
3981 //==============================================================================
3984 //==============================================================================
3985 // BAUDCON2 Bits
3987 extern __at(0x0497) __sfr BAUDCON2;
3989 typedef struct
3991 unsigned ABDEN : 1;
3992 unsigned WUE : 1;
3993 unsigned : 1;
3994 unsigned BRG16 : 1;
3995 unsigned SCKP : 1;
3996 unsigned : 1;
3997 unsigned RCIDL : 1;
3998 unsigned ABDOVF : 1;
3999 } __BAUDCON2bits_t;
4001 extern __at(0x0497) volatile __BAUDCON2bits_t BAUDCON2bits;
4003 #define _BAUDCON2_ABDEN 0x01
4004 #define _BAUDCON2_WUE 0x02
4005 #define _BAUDCON2_BRG16 0x08
4006 #define _BAUDCON2_SCKP 0x10
4007 #define _BAUDCON2_RCIDL 0x40
4008 #define _BAUDCON2_ABDOVF 0x80
4010 //==============================================================================
4012 extern __at(0x0595) __sfr TMR8;
4013 extern __at(0x0596) __sfr PR8;
4015 //==============================================================================
4016 // T8CON Bits
4018 extern __at(0x0597) __sfr T8CON;
4020 typedef union
4022 struct
4024 unsigned T8CKPS0 : 1;
4025 unsigned T8CKPS1 : 1;
4026 unsigned TMR8ON : 1;
4027 unsigned T8OUTPS0 : 1;
4028 unsigned T8OUTPS1 : 1;
4029 unsigned T8OUTPS2 : 1;
4030 unsigned T8OUTPS3 : 1;
4031 unsigned : 1;
4034 struct
4036 unsigned T8CKPS : 2;
4037 unsigned : 6;
4040 struct
4042 unsigned : 3;
4043 unsigned T8OUTPS : 4;
4044 unsigned : 1;
4046 } __T8CONbits_t;
4048 extern __at(0x0597) volatile __T8CONbits_t T8CONbits;
4050 #define _T8CKPS0 0x01
4051 #define _T8CKPS1 0x02
4052 #define _TMR8ON 0x04
4053 #define _T8OUTPS0 0x08
4054 #define _T8OUTPS1 0x10
4055 #define _T8OUTPS2 0x20
4056 #define _T8OUTPS3 0x40
4058 //==============================================================================
4060 extern __at(0x059C) __sfr TMR10;
4061 extern __at(0x059D) __sfr PR10;
4063 //==============================================================================
4064 // T10CON Bits
4066 extern __at(0x059E) __sfr T10CON;
4068 typedef union
4070 struct
4072 unsigned T10CKPS0 : 1;
4073 unsigned T10CKPS1 : 1;
4074 unsigned TMR10ON : 1;
4075 unsigned T10OUTPS0 : 1;
4076 unsigned T10OUTPS1 : 1;
4077 unsigned T10OUTPS2 : 1;
4078 unsigned T10OUTPS3 : 1;
4079 unsigned : 1;
4082 struct
4084 unsigned T10CKPS : 2;
4085 unsigned : 6;
4088 struct
4090 unsigned : 3;
4091 unsigned T10OUTPS : 4;
4092 unsigned : 1;
4094 } __T10CONbits_t;
4096 extern __at(0x059E) volatile __T10CONbits_t T10CONbits;
4098 #define _T10CKPS0 0x01
4099 #define _T10CKPS1 0x02
4100 #define _TMR10ON 0x04
4101 #define _T10OUTPS0 0x08
4102 #define _T10OUTPS1 0x10
4103 #define _T10OUTPS2 0x20
4104 #define _T10OUTPS3 0x40
4106 //==============================================================================
4108 extern __at(0x0611) __sfr CCPR6;
4109 extern __at(0x0611) __sfr CCPR6L;
4110 extern __at(0x0612) __sfr CCPR6H;
4112 //==============================================================================
4113 // CCP6CON Bits
4115 extern __at(0x0613) __sfr CCP6CON;
4117 typedef union
4119 struct
4121 unsigned CCP6M0 : 1;
4122 unsigned CCP6M1 : 1;
4123 unsigned CCP6M2 : 1;
4124 unsigned CCP6M3 : 1;
4125 unsigned DC6B0 : 1;
4126 unsigned DC6B1 : 1;
4127 unsigned : 1;
4128 unsigned : 1;
4131 struct
4133 unsigned CCP6M : 4;
4134 unsigned : 4;
4137 struct
4139 unsigned : 4;
4140 unsigned DC6B : 2;
4141 unsigned : 2;
4143 } __CCP6CONbits_t;
4145 extern __at(0x0613) volatile __CCP6CONbits_t CCP6CONbits;
4147 #define _CCP6M0 0x01
4148 #define _CCP6M1 0x02
4149 #define _CCP6M2 0x04
4150 #define _CCP6M3 0x08
4151 #define _DC6B0 0x10
4152 #define _DC6B1 0x20
4154 //==============================================================================
4156 extern __at(0x0614) __sfr CCPR7;
4157 extern __at(0x0614) __sfr CCPR7L;
4158 extern __at(0x0615) __sfr CCPR7H;
4160 //==============================================================================
4161 // CCP7CON Bits
4163 extern __at(0x0616) __sfr CCP7CON;
4165 typedef union
4167 struct
4169 unsigned CCP7M0 : 1;
4170 unsigned CCP7M1 : 1;
4171 unsigned CCP7M2 : 1;
4172 unsigned CCP7M3 : 1;
4173 unsigned DC7B0 : 1;
4174 unsigned DC7B1 : 1;
4175 unsigned : 1;
4176 unsigned : 1;
4179 struct
4181 unsigned CCP7M : 4;
4182 unsigned : 4;
4185 struct
4187 unsigned : 4;
4188 unsigned DC7B : 2;
4189 unsigned : 2;
4191 } __CCP7CONbits_t;
4193 extern __at(0x0616) volatile __CCP7CONbits_t CCP7CONbits;
4195 #define _CCP7M0 0x01
4196 #define _CCP7M1 0x02
4197 #define _CCP7M2 0x04
4198 #define _CCP7M3 0x08
4199 #define _DC7B0 0x10
4200 #define _DC7B1 0x20
4202 //==============================================================================
4204 extern __at(0x0617) __sfr CCPR8;
4205 extern __at(0x0617) __sfr CCPR8L;
4206 extern __at(0x0618) __sfr CCPR8H;
4208 //==============================================================================
4209 // CCP8CON Bits
4211 extern __at(0x0619) __sfr CCP8CON;
4213 typedef union
4215 struct
4217 unsigned CCP8M0 : 1;
4218 unsigned CCP8M1 : 1;
4219 unsigned CCP8M2 : 1;
4220 unsigned CCP8M3 : 1;
4221 unsigned DC8B0 : 1;
4222 unsigned DC8B1 : 1;
4223 unsigned : 1;
4224 unsigned : 1;
4227 struct
4229 unsigned CCP8M : 4;
4230 unsigned : 4;
4233 struct
4235 unsigned : 4;
4236 unsigned DC8B : 2;
4237 unsigned : 2;
4239 } __CCP8CONbits_t;
4241 extern __at(0x0619) volatile __CCP8CONbits_t CCP8CONbits;
4243 #define _CCP8M0 0x01
4244 #define _CCP8M1 0x02
4245 #define _CCP8M2 0x04
4246 #define _CCP8M3 0x08
4247 #define _DC8B0 0x10
4248 #define _DC8B1 0x20
4250 //==============================================================================
4252 extern __at(0x061A) __sfr CCPR9;
4253 extern __at(0x061A) __sfr CCPR9L;
4254 extern __at(0x061B) __sfr CCPR9H;
4256 //==============================================================================
4257 // CCP9CON Bits
4259 extern __at(0x061C) __sfr CCP9CON;
4261 typedef union
4263 struct
4265 unsigned CCP9M0 : 1;
4266 unsigned CCP9M1 : 1;
4267 unsigned CCP9M2 : 1;
4268 unsigned CCP9M3 : 1;
4269 unsigned DC9B0 : 1;
4270 unsigned DC9B1 : 1;
4271 unsigned : 1;
4272 unsigned : 1;
4275 struct
4277 unsigned CCP9M : 4;
4278 unsigned : 4;
4281 struct
4283 unsigned : 4;
4284 unsigned DC9B : 2;
4285 unsigned : 2;
4287 } __CCP9CONbits_t;
4289 extern __at(0x061C) volatile __CCP9CONbits_t CCP9CONbits;
4291 #define _CCP9M0 0x01
4292 #define _CCP9M1 0x02
4293 #define _CCP9M2 0x04
4294 #define _CCP9M3 0x08
4295 #define _DC9B0 0x10
4296 #define _DC9B1 0x20
4298 //==============================================================================
4300 extern __at(0x061D) __sfr CCPR10;
4301 extern __at(0x061D) __sfr CCPR10L;
4302 extern __at(0x061E) __sfr CCPR10H;
4304 //==============================================================================
4305 // CCP10CON Bits
4307 extern __at(0x061F) __sfr CCP10CON;
4309 typedef union
4311 struct
4313 unsigned CCP10M0 : 1;
4314 unsigned CCP10M1 : 1;
4315 unsigned CCP10M2 : 1;
4316 unsigned CCP10M3 : 1;
4317 unsigned DC10B0 : 1;
4318 unsigned DC10B1 : 1;
4319 unsigned : 1;
4320 unsigned : 1;
4323 struct
4325 unsigned CCP10M : 4;
4326 unsigned : 4;
4329 struct
4331 unsigned : 4;
4332 unsigned DC10B : 2;
4333 unsigned : 2;
4335 } __CCP10CONbits_t;
4337 extern __at(0x061F) volatile __CCP10CONbits_t CCP10CONbits;
4339 #define _CCP10M0 0x01
4340 #define _CCP10M1 0x02
4341 #define _CCP10M2 0x04
4342 #define _CCP10M3 0x08
4343 #define _DC10B0 0x10
4344 #define _DC10B1 0x20
4346 //==============================================================================
4349 //==============================================================================
4350 // STATUS_SHAD Bits
4352 extern __at(0x0FE4) __sfr STATUS_SHAD;
4354 typedef struct
4356 unsigned C_SHAD : 1;
4357 unsigned DC_SHAD : 1;
4358 unsigned Z_SHAD : 1;
4359 unsigned : 1;
4360 unsigned : 1;
4361 unsigned : 1;
4362 unsigned : 1;
4363 unsigned : 1;
4364 } __STATUS_SHADbits_t;
4366 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
4368 #define _C_SHAD 0x01
4369 #define _DC_SHAD 0x02
4370 #define _Z_SHAD 0x04
4372 //==============================================================================
4374 extern __at(0x0FE5) __sfr WREG_SHAD;
4375 extern __at(0x0FE6) __sfr BSR_SHAD;
4376 extern __at(0x0FE7) __sfr PCLATH_SHAD;
4377 extern __at(0x0FE8) __sfr FSR0L_SHAD;
4378 extern __at(0x0FE9) __sfr FSR0H_SHAD;
4379 extern __at(0x0FEA) __sfr FSR1L_SHAD;
4380 extern __at(0x0FEB) __sfr FSR1H_SHAD;
4381 extern __at(0x0FED) __sfr STKPTR;
4382 extern __at(0x0FEE) __sfr TOSL;
4383 extern __at(0x0FEF) __sfr TOSH;
4385 //==============================================================================
4387 // Configuration Bits
4389 //==============================================================================
4391 #define _CONFIG1 0x8007
4392 #define _CONFIG2 0x8008
4394 //----------------------------- CONFIG1 Options -------------------------------
4396 #define _FOSC_LP 0x3FF8 // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins.
4397 #define _FOSC_XT 0x3FF9 // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins.
4398 #define _FOSC_HS 0x3FFA // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins.
4399 #define _FOSC_EXTRC 0x3FFB // EXTRC oscillator: External RC circuit connected to CLKIN pin.
4400 #define _FOSC_INTOSC 0x3FFC // INTOSC oscillator: I/O function on CLKIN pin.
4401 #define _FOSC_ECL 0x3FFD // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin.
4402 #define _FOSC_ECM 0x3FFE // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin.
4403 #define _FOSC_ECH 0x3FFF // ECH, External Clock, High Power Mode (4-20 MHz): device clock supplied to CLKIN pin.
4404 #define _WDTE_OFF 0x3FE7 // WDT disabled.
4405 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
4406 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep.
4407 #define _WDTE_ON 0x3FFF // WDT enabled.
4408 #define _PWRTE_ON 0x3FDF // PWRT enabled.
4409 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
4410 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
4411 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
4412 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
4413 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
4414 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled.
4415 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
4416 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep.
4417 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
4418 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
4419 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
4420 #define _IESO_OFF 0x2FFF // Internal/External Switchover mode is disabled.
4421 #define _IESO_ON 0x3FFF // Internal/External Switchover mode is enabled.
4422 #define _FCMEN_OFF 0x1FFF // Fail-Safe Clock Monitor is disabled.
4423 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor is enabled.
4425 //----------------------------- CONFIG2 Options -------------------------------
4427 #define _WRT_ALL 0x3FFC // 000h to 3FFFh write protected, no addresses may be modified by PMCON control.
4428 #define _WRT_HALF 0x3FFD // 000h to FFFh write protected, 2000h to 3FFFh may be modified by PMCON control.
4429 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to 3FFFh may be modified by PMCON control.
4430 #define _WRT_OFF 0x3FFF // Write protection off.
4431 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
4432 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
4433 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
4434 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
4435 #define _BORV_19 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
4436 #define _LPBOR_ON 0x37FF // Low-Power BOR is enabled.
4437 #define _LPBOR_OFF 0x3FFF // Low-Power BOR is disabled.
4438 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
4439 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
4440 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
4441 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
4443 //==============================================================================
4445 #define _DEVID1 0x8006
4447 #define _IDLOC0 0x8000
4448 #define _IDLOC1 0x8001
4449 #define _IDLOC2 0x8002
4450 #define _IDLOC3 0x8003
4452 //==============================================================================
4454 #ifndef NO_BIT_DEFINES
4456 #define ADON ADCON0bits.ADON // bit 0
4457 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
4458 #define ADGO ADCON0bits.ADGO // bit 1, shadows bit in ADCON0bits
4459 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
4460 #define CHS0 ADCON0bits.CHS0 // bit 2
4461 #define CHS1 ADCON0bits.CHS1 // bit 3
4462 #define CHS2 ADCON0bits.CHS2 // bit 4
4463 #define CHS3 ADCON0bits.CHS3 // bit 5
4464 #define CHS4 ADCON0bits.CHS4 // bit 6
4466 #define ADPREF0 ADCON1bits.ADPREF0 // bit 0
4467 #define ADPREF1 ADCON1bits.ADPREF1 // bit 1
4468 #define ADCS0 ADCON1bits.ADCS0 // bit 4
4469 #define ADCS1 ADCON1bits.ADCS1 // bit 5
4470 #define ADCS2 ADCON1bits.ADCS2 // bit 6
4471 #define ADFM ADCON1bits.ADFM // bit 7
4473 #define ANSA0 ANSELAbits.ANSA0 // bit 0
4474 #define ANSA1 ANSELAbits.ANSA1 // bit 1
4475 #define ANSA2 ANSELAbits.ANSA2 // bit 2
4476 #define ANSA3 ANSELAbits.ANSA3 // bit 3
4477 #define ANSA5 ANSELAbits.ANSA5 // bit 5
4479 #define ANSB0 ANSELBbits.ANSB0 // bit 0
4480 #define ANSB1 ANSELBbits.ANSB1 // bit 1
4481 #define ANSB2 ANSELBbits.ANSB2 // bit 2
4482 #define ANSB3 ANSELBbits.ANSB3 // bit 3
4483 #define ANSB4 ANSELBbits.ANSB4 // bit 4
4484 #define ANSB5 ANSELBbits.ANSB5 // bit 5
4486 #define ANSD0 ANSELDbits.ANSD0 // bit 0
4487 #define ANSD1 ANSELDbits.ANSD1 // bit 1
4488 #define ANSD2 ANSELDbits.ANSD2 // bit 2
4489 #define ANSD3 ANSELDbits.ANSD3 // bit 3
4491 #define ANSE0 ANSELEbits.ANSE0 // bit 0
4492 #define ANSE1 ANSELEbits.ANSE1 // bit 1
4493 #define ANSE2 ANSELEbits.ANSE2 // bit 2
4495 #define ANSF0 ANSELFbits.ANSF0 // bit 0
4496 #define ANSF1 ANSELFbits.ANSF1 // bit 1
4497 #define ANSF2 ANSELFbits.ANSF2 // bit 2
4498 #define ANSF3 ANSELFbits.ANSF3 // bit 3
4499 #define ANSF4 ANSELFbits.ANSF4 // bit 4
4500 #define ANSF5 ANSELFbits.ANSF5 // bit 5
4501 #define ANSF6 ANSELFbits.ANSF6 // bit 6
4502 #define ANSF7 ANSELFbits.ANSF7 // bit 7
4504 #define ANSG1 ANSELGbits.ANSG1 // bit 1
4505 #define ANSG2 ANSELGbits.ANSG2 // bit 2
4506 #define ANSG3 ANSELGbits.ANSG3 // bit 3
4507 #define ANSG4 ANSELGbits.ANSG4 // bit 4
4509 #define CCP2SEL APFCONbits.CCP2SEL // bit 0
4510 #define T3CKISEL APFCONbits.T3CKISEL // bit 1
4512 #define ABDEN BAUD1CONbits.ABDEN // bit 0
4513 #define WUE BAUD1CONbits.WUE // bit 1
4514 #define BRG16 BAUD1CONbits.BRG16 // bit 3
4515 #define SCKP BAUD1CONbits.SCKP // bit 4
4516 #define RCIDL BAUD1CONbits.RCIDL // bit 6
4517 #define ABDOVF BAUD1CONbits.ABDOVF // bit 7
4519 #define BORRDY BORCONbits.BORRDY // bit 0
4520 #define BORFS BORCONbits.BORFS // bit 6
4521 #define SBOREN BORCONbits.SBOREN // bit 7
4523 #define BSR0 BSRbits.BSR0 // bit 0
4524 #define BSR1 BSRbits.BSR1 // bit 1
4525 #define BSR2 BSRbits.BSR2 // bit 2
4526 #define BSR3 BSRbits.BSR3 // bit 3
4527 #define BSR4 BSRbits.BSR4 // bit 4
4529 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
4530 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
4531 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
4532 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
4533 #define DC1B0 CCP1CONbits.DC1B0 // bit 4
4534 #define DC1B1 CCP1CONbits.DC1B1 // bit 5
4536 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
4537 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
4538 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
4539 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
4540 #define DC2B0 CCP2CONbits.DC2B0 // bit 4
4541 #define DC2B1 CCP2CONbits.DC2B1 // bit 5
4543 #define CCP3M0 CCP3CONbits.CCP3M0 // bit 0
4544 #define CCP3M1 CCP3CONbits.CCP3M1 // bit 1
4545 #define CCP3M2 CCP3CONbits.CCP3M2 // bit 2
4546 #define CCP3M3 CCP3CONbits.CCP3M3 // bit 3
4547 #define DC3B0 CCP3CONbits.DC3B0 // bit 4
4548 #define DC3B1 CCP3CONbits.DC3B1 // bit 5
4550 #define CCP4M0 CCP4CONbits.CCP4M0 // bit 0
4551 #define CCP4M1 CCP4CONbits.CCP4M1 // bit 1
4552 #define CCP4M2 CCP4CONbits.CCP4M2 // bit 2
4553 #define CCP4M3 CCP4CONbits.CCP4M3 // bit 3
4554 #define DC4B0 CCP4CONbits.DC4B0 // bit 4
4555 #define DC4B1 CCP4CONbits.DC4B1 // bit 5
4557 #define CCP5M0 CCP5CONbits.CCP5M0 // bit 0
4558 #define CCP5M1 CCP5CONbits.CCP5M1 // bit 1
4559 #define CCP5M2 CCP5CONbits.CCP5M2 // bit 2
4560 #define CCP5M3 CCP5CONbits.CCP5M3 // bit 3
4561 #define DC5B0 CCP5CONbits.DC5B0 // bit 4
4562 #define DC5B1 CCP5CONbits.DC5B1 // bit 5
4564 #define CCP6M0 CCP6CONbits.CCP6M0 // bit 0
4565 #define CCP6M1 CCP6CONbits.CCP6M1 // bit 1
4566 #define CCP6M2 CCP6CONbits.CCP6M2 // bit 2
4567 #define CCP6M3 CCP6CONbits.CCP6M3 // bit 3
4568 #define DC6B0 CCP6CONbits.DC6B0 // bit 4
4569 #define DC6B1 CCP6CONbits.DC6B1 // bit 5
4571 #define CCP7M0 CCP7CONbits.CCP7M0 // bit 0
4572 #define CCP7M1 CCP7CONbits.CCP7M1 // bit 1
4573 #define CCP7M2 CCP7CONbits.CCP7M2 // bit 2
4574 #define CCP7M3 CCP7CONbits.CCP7M3 // bit 3
4575 #define DC7B0 CCP7CONbits.DC7B0 // bit 4
4576 #define DC7B1 CCP7CONbits.DC7B1 // bit 5
4578 #define CCP8M0 CCP8CONbits.CCP8M0 // bit 0
4579 #define CCP8M1 CCP8CONbits.CCP8M1 // bit 1
4580 #define CCP8M2 CCP8CONbits.CCP8M2 // bit 2
4581 #define CCP8M3 CCP8CONbits.CCP8M3 // bit 3
4582 #define DC8B0 CCP8CONbits.DC8B0 // bit 4
4583 #define DC8B1 CCP8CONbits.DC8B1 // bit 5
4585 #define CCP9M0 CCP9CONbits.CCP9M0 // bit 0
4586 #define CCP9M1 CCP9CONbits.CCP9M1 // bit 1
4587 #define CCP9M2 CCP9CONbits.CCP9M2 // bit 2
4588 #define CCP9M3 CCP9CONbits.CCP9M3 // bit 3
4589 #define DC9B0 CCP9CONbits.DC9B0 // bit 4
4590 #define DC9B1 CCP9CONbits.DC9B1 // bit 5
4592 #define CCP10M0 CCP10CONbits.CCP10M0 // bit 0
4593 #define CCP10M1 CCP10CONbits.CCP10M1 // bit 1
4594 #define CCP10M2 CCP10CONbits.CCP10M2 // bit 2
4595 #define CCP10M3 CCP10CONbits.CCP10M3 // bit 3
4596 #define DC10B0 CCP10CONbits.DC10B0 // bit 4
4597 #define DC10B1 CCP10CONbits.DC10B1 // bit 5
4599 #define C1TSEL0 CCPTMRS0bits.C1TSEL0 // bit 0
4600 #define C1TSEL1 CCPTMRS0bits.C1TSEL1 // bit 1
4601 #define C2TSEL0 CCPTMRS0bits.C2TSEL0 // bit 2
4602 #define C2TSEL1 CCPTMRS0bits.C2TSEL1 // bit 3
4603 #define C3TSEL0 CCPTMRS0bits.C3TSEL0 // bit 4
4604 #define C3TSEL1 CCPTMRS0bits.C3TSEL1 // bit 5
4605 #define C4TSEL0 CCPTMRS0bits.C4TSEL0 // bit 6
4606 #define C4TSEL1 CCPTMRS0bits.C4TSEL1 // bit 7
4608 #define C5TSEL0 CCPTMRS1bits.C5TSEL0 // bit 0
4609 #define C5TSEL1 CCPTMRS1bits.C5TSEL1 // bit 1
4610 #define C6TSEL0 CCPTMRS1bits.C6TSEL0 // bit 2
4611 #define C6TSEL1 CCPTMRS1bits.C6TSEL1 // bit 3
4612 #define C7TSEL0 CCPTMRS1bits.C7TSEL0 // bit 4
4613 #define C7TSEL1 CCPTMRS1bits.C7TSEL1 // bit 5
4614 #define C8TSEL0 CCPTMRS1bits.C8TSEL0 // bit 6
4615 #define C8TSEL1 CCPTMRS1bits.C8TSEL1 // bit 7
4617 #define C9TSEL0 CCPTMRS2bits.C9TSEL0 // bit 0
4618 #define C9TSEL1 CCPTMRS2bits.C9TSEL1 // bit 1
4619 #define C10TSEL0 CCPTMRS2bits.C10TSEL0 // bit 2
4620 #define C10TSEL1 CCPTMRS2bits.C10TSEL1 // bit 3
4622 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
4623 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
4624 #define TSRNG FVRCONbits.TSRNG // bit 4
4625 #define TSEN FVRCONbits.TSEN // bit 5
4626 #define FVRRDY FVRCONbits.FVRRDY // bit 6
4627 #define FVREN FVRCONbits.FVREN // bit 7
4629 #define IOCIF INTCONbits.IOCIF // bit 0
4630 #define INTF INTCONbits.INTF // bit 1
4631 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
4632 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
4633 #define IOCIE INTCONbits.IOCIE // bit 3
4634 #define INTE INTCONbits.INTE // bit 4
4635 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
4636 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
4637 #define PEIE INTCONbits.PEIE // bit 6
4638 #define GIE INTCONbits.GIE // bit 7
4640 #define IOCBF0 IOCBFbits.IOCBF0 // bit 0
4641 #define IOCBF1 IOCBFbits.IOCBF1 // bit 1
4642 #define IOCBF2 IOCBFbits.IOCBF2 // bit 2
4643 #define IOCBF3 IOCBFbits.IOCBF3 // bit 3
4644 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
4645 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
4646 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
4647 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
4649 #define IOCBN0 IOCBNbits.IOCBN0 // bit 0
4650 #define IOCBN1 IOCBNbits.IOCBN1 // bit 1
4651 #define IOCBN2 IOCBNbits.IOCBN2 // bit 2
4652 #define IOCBN3 IOCBNbits.IOCBN3 // bit 3
4653 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
4654 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
4655 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
4656 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
4658 #define IOCBP0 IOCBPbits.IOCBP0 // bit 0
4659 #define IOCBP1 IOCBPbits.IOCBP1 // bit 1
4660 #define IOCBP2 IOCBPbits.IOCBP2 // bit 2
4661 #define IOCBP3 IOCBPbits.IOCBP3 // bit 3
4662 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
4663 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
4664 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
4665 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
4667 #define LATA0 LATAbits.LATA0 // bit 0
4668 #define LATA1 LATAbits.LATA1 // bit 1
4669 #define LATA2 LATAbits.LATA2 // bit 2
4670 #define LATA3 LATAbits.LATA3 // bit 3
4671 #define LATA4 LATAbits.LATA4 // bit 4
4672 #define LATA5 LATAbits.LATA5 // bit 5
4673 #define LATA6 LATAbits.LATA6 // bit 6
4674 #define LATA7 LATAbits.LATA7 // bit 7
4676 #define LATB0 LATBbits.LATB0 // bit 0
4677 #define LATB1 LATBbits.LATB1 // bit 1
4678 #define LATB2 LATBbits.LATB2 // bit 2
4679 #define LATB3 LATBbits.LATB3 // bit 3
4680 #define LATB4 LATBbits.LATB4 // bit 4
4681 #define LATB5 LATBbits.LATB5 // bit 5
4682 #define LATB6 LATBbits.LATB6 // bit 6
4683 #define LATB7 LATBbits.LATB7 // bit 7
4685 #define LATC0 LATCbits.LATC0 // bit 0
4686 #define LATC1 LATCbits.LATC1 // bit 1
4687 #define LATC2 LATCbits.LATC2 // bit 2
4688 #define LATC3 LATCbits.LATC3 // bit 3
4689 #define LATC4 LATCbits.LATC4 // bit 4
4690 #define LATC5 LATCbits.LATC5 // bit 5
4691 #define LATC6 LATCbits.LATC6 // bit 6
4692 #define LATC7 LATCbits.LATC7 // bit 7
4694 #define LATD0 LATDbits.LATD0 // bit 0
4695 #define LATD1 LATDbits.LATD1 // bit 1
4696 #define LATD2 LATDbits.LATD2 // bit 2
4697 #define LATD3 LATDbits.LATD3 // bit 3
4698 #define LATD4 LATDbits.LATD4 // bit 4
4699 #define LATD5 LATDbits.LATD5 // bit 5
4700 #define LATD6 LATDbits.LATD6 // bit 6
4701 #define LATD7 LATDbits.LATD7 // bit 7
4703 #define LATE0 LATEbits.LATE0 // bit 0
4704 #define LATE1 LATEbits.LATE1 // bit 1
4705 #define LATE2 LATEbits.LATE2 // bit 2
4706 #define LATE3 LATEbits.LATE3 // bit 3
4707 #define LATE4 LATEbits.LATE4 // bit 4
4708 #define LATE5 LATEbits.LATE5 // bit 5
4709 #define LATE6 LATEbits.LATE6 // bit 6
4710 #define LATE7 LATEbits.LATE7 // bit 7
4712 #define LATF0 LATFbits.LATF0 // bit 0
4713 #define LATF1 LATFbits.LATF1 // bit 1
4714 #define LATF2 LATFbits.LATF2 // bit 2
4715 #define LATF3 LATFbits.LATF3 // bit 3
4716 #define LATF4 LATFbits.LATF4 // bit 4
4717 #define LATF5 LATFbits.LATF5 // bit 5
4718 #define LATF6 LATFbits.LATF6 // bit 6
4719 #define LATF7 LATFbits.LATF7 // bit 7
4721 #define LATG0 LATGbits.LATG0 // bit 0
4722 #define LATG1 LATGbits.LATG1 // bit 1
4723 #define LATG2 LATGbits.LATG2 // bit 2
4724 #define LATG3 LATGbits.LATG3 // bit 3
4725 #define LATG4 LATGbits.LATG4 // bit 4
4727 #define PS0 OPTION_REGbits.PS0 // bit 0
4728 #define PS1 OPTION_REGbits.PS1 // bit 1
4729 #define PS2 OPTION_REGbits.PS2 // bit 2
4730 #define PSA OPTION_REGbits.PSA // bit 3
4731 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
4732 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
4733 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
4734 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
4735 #define INTEDG OPTION_REGbits.INTEDG // bit 6
4736 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
4738 #define SCS0 OSCCONbits.SCS0 // bit 0
4739 #define SCS1 OSCCONbits.SCS1 // bit 1
4740 #define IRCF0 OSCCONbits.IRCF0 // bit 3
4741 #define IRCF1 OSCCONbits.IRCF1 // bit 4
4742 #define IRCF2 OSCCONbits.IRCF2 // bit 5
4743 #define IRCF3 OSCCONbits.IRCF3 // bit 6
4745 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
4746 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
4747 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
4748 #define OSTS OSCSTATbits.OSTS // bit 5
4749 #define SOSCR OSCSTATbits.SOSCR // bit 7, shadows bit in OSCSTATbits
4750 #define T1OSCR OSCSTATbits.T1OSCR // bit 7, shadows bit in OSCSTATbits
4752 #define NOT_BOR PCONbits.NOT_BOR // bit 0
4753 #define NOT_POR PCONbits.NOT_POR // bit 1
4754 #define NOT_RI PCONbits.NOT_RI // bit 2
4755 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
4756 #define NOT_RWDT PCONbits.NOT_RWDT // bit 4
4757 #define STKUNF PCONbits.STKUNF // bit 6
4758 #define STKOVF PCONbits.STKOVF // bit 7
4760 #define TMR1IE PIE1bits.TMR1IE // bit 0
4761 #define TMR2IE PIE1bits.TMR2IE // bit 1
4762 #define CCP1IE PIE1bits.CCP1IE // bit 2
4763 #define SSP1IE PIE1bits.SSP1IE // bit 3, shadows bit in PIE1bits
4764 #define SSPIE PIE1bits.SSPIE // bit 3, shadows bit in PIE1bits
4765 #define TX1IE PIE1bits.TX1IE // bit 4, shadows bit in PIE1bits
4766 #define TXIE PIE1bits.TXIE // bit 4, shadows bit in PIE1bits
4767 #define RC1IE PIE1bits.RC1IE // bit 5, shadows bit in PIE1bits
4768 #define RCIE PIE1bits.RCIE // bit 5, shadows bit in PIE1bits
4769 #define ADIE PIE1bits.ADIE // bit 6
4770 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
4772 #define CCP2IE PIE2bits.CCP2IE // bit 0
4773 #define TMR8IE PIE2bits.TMR8IE // bit 1
4774 #define TMR10IE PIE2bits.TMR10IE // bit 2
4775 #define BCL1IE PIE2bits.BCL1IE // bit 3, shadows bit in PIE2bits
4776 #define BCLIE PIE2bits.BCLIE // bit 3, shadows bit in PIE2bits
4777 #define TMR3GIE PIE2bits.TMR3GIE // bit 5
4778 #define TMR5GIE PIE2bits.TMR5GIE // bit 6
4779 #define OSFIE PIE2bits.OSFIE // bit 7
4781 #define TMR3IE PIE3bits.TMR3IE // bit 0
4782 #define TMR4IE PIE3bits.TMR4IE // bit 1
4783 #define TMR5IE PIE3bits.TMR5IE // bit 2
4784 #define TMR6IE PIE3bits.TMR6IE // bit 3
4785 #define CCP3IE PIE3bits.CCP3IE // bit 4
4786 #define CCP4IE PIE3bits.CCP4IE // bit 5
4787 #define CCP5IE PIE3bits.CCP5IE // bit 6
4788 #define CCP6IE PIE3bits.CCP6IE // bit 7
4790 #define SSP2IE PIE4bits.SSP2IE // bit 0
4791 #define BCL2IE PIE4bits.BCL2IE // bit 1
4792 #define CCP7IE PIE4bits.CCP7IE // bit 2
4793 #define CCP8IE PIE4bits.CCP8IE // bit 3
4794 #define TX2IE PIE4bits.TX2IE // bit 4
4795 #define RC2IE PIE4bits.RC2IE // bit 5
4796 #define CCP9IE PIE4bits.CCP9IE // bit 6
4797 #define CCP10IE PIE4bits.CCP10IE // bit 7
4799 #define TMR1IF PIR1bits.TMR1IF // bit 0
4800 #define TMR2IF PIR1bits.TMR2IF // bit 1
4801 #define CCP1IF PIR1bits.CCP1IF // bit 2
4802 #define SSP1IF PIR1bits.SSP1IF // bit 3, shadows bit in PIR1bits
4803 #define SSPIF PIR1bits.SSPIF // bit 3, shadows bit in PIR1bits
4804 #define TX1IF PIR1bits.TX1IF // bit 4, shadows bit in PIR1bits
4805 #define TXIF PIR1bits.TXIF // bit 4, shadows bit in PIR1bits
4806 #define RC1IF PIR1bits.RC1IF // bit 5, shadows bit in PIR1bits
4807 #define RCIF PIR1bits.RCIF // bit 5, shadows bit in PIR1bits
4808 #define ADIF PIR1bits.ADIF // bit 6
4809 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
4811 #define CCP2IF PIR2bits.CCP2IF // bit 0
4812 #define TMR8IF PIR2bits.TMR8IF // bit 1
4813 #define TMR10IF PIR2bits.TMR10IF // bit 2
4814 #define BCL1IF PIR2bits.BCL1IF // bit 3, shadows bit in PIR2bits
4815 #define BCLIF PIR2bits.BCLIF // bit 3, shadows bit in PIR2bits
4816 #define TMR3GIF PIR2bits.TMR3GIF // bit 5
4817 #define TMR5GIF PIR2bits.TMR5GIF // bit 6
4818 #define OSFIF PIR2bits.OSFIF // bit 7
4820 #define TMR3IF PIR3bits.TMR3IF // bit 0
4821 #define TMR4IF PIR3bits.TMR4IF // bit 1
4822 #define TMR5IF PIR3bits.TMR5IF // bit 2
4823 #define TMR6IF PIR3bits.TMR6IF // bit 3
4824 #define CCP3IF PIR3bits.CCP3IF // bit 4
4825 #define CCP4IF PIR3bits.CCP4IF // bit 5
4826 #define CCP5IF PIR3bits.CCP5IF // bit 6
4827 #define CCP6IF PIR3bits.CCP6IF // bit 7
4829 #define SSP2IF PIR4bits.SSP2IF // bit 0
4830 #define BCL2IF PIR4bits.BCL2IF // bit 1
4831 #define CCP7IF PIR4bits.CCP7IF // bit 2
4832 #define CCP8IF PIR4bits.CCP8IF // bit 3
4833 #define TX2IF PIR4bits.TX2IF // bit 4
4834 #define RC2IF PIR4bits.RC2IF // bit 5
4835 #define CCP9IF PIR4bits.CCP9IF // bit 6
4836 #define CCP10IF PIR4bits.CCP10IF // bit 7
4838 #define RD PMCON1bits.RD // bit 0
4839 #define WR PMCON1bits.WR // bit 1
4840 #define WREN PMCON1bits.WREN // bit 2
4841 #define WRERR PMCON1bits.WRERR // bit 3
4842 #define FREE PMCON1bits.FREE // bit 4
4843 #define LWLO PMCON1bits.LWLO // bit 5
4844 #define CFGS PMCON1bits.CFGS // bit 6
4846 #define RA0 PORTAbits.RA0 // bit 0
4847 #define RA1 PORTAbits.RA1 // bit 1
4848 #define RA2 PORTAbits.RA2 // bit 2
4849 #define RA3 PORTAbits.RA3 // bit 3
4850 #define RA4 PORTAbits.RA4 // bit 4
4851 #define RA5 PORTAbits.RA5 // bit 5
4852 #define RA6 PORTAbits.RA6 // bit 6
4853 #define RA7 PORTAbits.RA7 // bit 7
4855 #define RB0 PORTBbits.RB0 // bit 0
4856 #define RB1 PORTBbits.RB1 // bit 1
4857 #define RB2 PORTBbits.RB2 // bit 2
4858 #define RB3 PORTBbits.RB3 // bit 3
4859 #define RB4 PORTBbits.RB4 // bit 4
4860 #define RB5 PORTBbits.RB5 // bit 5
4861 #define RB6 PORTBbits.RB6 // bit 6
4862 #define RB7 PORTBbits.RB7 // bit 7
4864 #define RC0 PORTCbits.RC0 // bit 0
4865 #define RC1 PORTCbits.RC1 // bit 1
4866 #define RC2 PORTCbits.RC2 // bit 2
4867 #define RC3 PORTCbits.RC3 // bit 3
4868 #define RC4 PORTCbits.RC4 // bit 4
4869 #define RC5 PORTCbits.RC5 // bit 5
4870 #define RC6 PORTCbits.RC6 // bit 6
4871 #define RC7 PORTCbits.RC7 // bit 7
4873 #define RD0 PORTDbits.RD0 // bit 0
4874 #define RD1 PORTDbits.RD1 // bit 1
4875 #define RD2 PORTDbits.RD2 // bit 2
4876 #define RD3 PORTDbits.RD3 // bit 3
4877 #define RD4 PORTDbits.RD4 // bit 4
4878 #define RD5 PORTDbits.RD5 // bit 5
4879 #define RD6 PORTDbits.RD6 // bit 6
4880 #define RD7 PORTDbits.RD7 // bit 7
4882 #define RE0 PORTEbits.RE0 // bit 0
4883 #define RE1 PORTEbits.RE1 // bit 1
4884 #define RE2 PORTEbits.RE2 // bit 2
4885 #define RE3 PORTEbits.RE3 // bit 3
4886 #define RE4 PORTEbits.RE4 // bit 4
4887 #define RE5 PORTEbits.RE5 // bit 5
4888 #define RE6 PORTEbits.RE6 // bit 6
4889 #define RE7 PORTEbits.RE7 // bit 7
4891 #define RF0 PORTFbits.RF0 // bit 0
4892 #define RF1 PORTFbits.RF1 // bit 1
4893 #define RF2 PORTFbits.RF2 // bit 2
4894 #define RF3 PORTFbits.RF3 // bit 3
4895 #define RF4 PORTFbits.RF4 // bit 4
4896 #define RF5 PORTFbits.RF5 // bit 5
4897 #define RF6 PORTFbits.RF6 // bit 6
4898 #define RF7 PORTFbits.RF7 // bit 7
4900 #define RG0 PORTGbits.RG0 // bit 0
4901 #define RG1 PORTGbits.RG1 // bit 1
4902 #define RG2 PORTGbits.RG2 // bit 2
4903 #define RG3 PORTGbits.RG3 // bit 3
4904 #define RG4 PORTGbits.RG4 // bit 4
4905 #define RG5 PORTGbits.RG5 // bit 5
4907 #define RX9D RC1STAbits.RX9D // bit 0
4908 #define OERR RC1STAbits.OERR // bit 1
4909 #define FERR RC1STAbits.FERR // bit 2
4910 #define ADDEN RC1STAbits.ADDEN // bit 3
4911 #define CREN RC1STAbits.CREN // bit 4
4912 #define SREN RC1STAbits.SREN // bit 5
4913 #define RX9 RC1STAbits.RX9 // bit 6
4914 #define SPEN RC1STAbits.SPEN // bit 7
4916 #define SSPM0 SSP1CON1bits.SSPM0 // bit 0
4917 #define SSPM1 SSP1CON1bits.SSPM1 // bit 1
4918 #define SSPM2 SSP1CON1bits.SSPM2 // bit 2
4919 #define SSPM3 SSP1CON1bits.SSPM3 // bit 3
4920 #define CKP SSP1CON1bits.CKP // bit 4
4921 #define SSPEN SSP1CON1bits.SSPEN // bit 5
4922 #define SSPOV SSP1CON1bits.SSPOV // bit 6
4923 #define WCOL SSP1CON1bits.WCOL // bit 7
4925 #define SEN SSP1CON2bits.SEN // bit 0
4926 #define RSEN SSP1CON2bits.RSEN // bit 1
4927 #define PEN SSP1CON2bits.PEN // bit 2
4928 #define RCEN SSP1CON2bits.RCEN // bit 3
4929 #define ACKEN SSP1CON2bits.ACKEN // bit 4
4930 #define ACKDT SSP1CON2bits.ACKDT // bit 5
4931 #define ACKSTAT SSP1CON2bits.ACKSTAT // bit 6
4932 #define GCEN SSP1CON2bits.GCEN // bit 7
4934 #define DHEN SSP1CON3bits.DHEN // bit 0
4935 #define AHEN SSP1CON3bits.AHEN // bit 1
4936 #define SBCDE SSP1CON3bits.SBCDE // bit 2
4937 #define SDAHT SSP1CON3bits.SDAHT // bit 3
4938 #define BOEN SSP1CON3bits.BOEN // bit 4
4939 #define SCIE SSP1CON3bits.SCIE // bit 5
4940 #define PCIE SSP1CON3bits.PCIE // bit 6
4941 #define ACKTIM SSP1CON3bits.ACKTIM // bit 7
4943 #define BF SSP1STATbits.BF // bit 0
4944 #define UA SSP1STATbits.UA // bit 1
4945 #define R_NOT_W SSP1STATbits.R_NOT_W // bit 2
4946 #define S SSP1STATbits.S // bit 3
4947 #define P SSP1STATbits.P // bit 4
4948 #define D_NOT_A SSP1STATbits.D_NOT_A // bit 5
4949 #define CKE SSP1STATbits.CKE // bit 6
4950 #define SMP SSP1STATbits.SMP // bit 7
4952 #define C STATUSbits.C // bit 0
4953 #define DC STATUSbits.DC // bit 1
4954 #define Z STATUSbits.Z // bit 2
4955 #define NOT_PD STATUSbits.NOT_PD // bit 3
4956 #define NOT_TO STATUSbits.NOT_TO // bit 4
4958 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
4959 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
4960 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
4962 #define TMR1ON T1CONbits.TMR1ON // bit 0
4963 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
4964 #define SOSCEN T1CONbits.SOSCEN // bit 3, shadows bit in T1CONbits
4965 #define T1OSCEN T1CONbits.T1OSCEN // bit 3, shadows bit in T1CONbits
4966 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
4967 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
4968 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
4969 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
4971 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
4972 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
4973 #define T1GVAL T1GCONbits.T1GVAL // bit 2
4974 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3
4975 #define T1GSPM T1GCONbits.T1GSPM // bit 4
4976 #define T1GTM T1GCONbits.T1GTM // bit 5
4977 #define T1GPOL T1GCONbits.T1GPOL // bit 6
4978 #define TMR1GE T1GCONbits.TMR1GE // bit 7
4980 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
4981 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
4982 #define TMR2ON T2CONbits.TMR2ON // bit 2
4983 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
4984 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
4985 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
4986 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
4988 #define T3GSS0 T3GCONbits.T3GSS0 // bit 0
4989 #define T3GSS1 T3GCONbits.T3GSS1 // bit 1
4990 #define T3GVAL T3GCONbits.T3GVAL // bit 2
4991 #define T3GGO_NOT_DONE T3GCONbits.T3GGO_NOT_DONE // bit 3
4992 #define T3GSPM T3GCONbits.T3GSPM // bit 4
4993 #define T3GTM T3GCONbits.T3GTM // bit 5
4994 #define T3GPOL T3GCONbits.T3GPOL // bit 6
4995 #define TMR3GE T3GCONbits.TMR3GE // bit 7
4997 #define T4CKPS0 T4CONbits.T4CKPS0 // bit 0
4998 #define T4CKPS1 T4CONbits.T4CKPS1 // bit 1
4999 #define TMR4ON T4CONbits.TMR4ON // bit 2
5000 #define T4OUTPS0 T4CONbits.T4OUTPS0 // bit 3
5001 #define T4OUTPS1 T4CONbits.T4OUTPS1 // bit 4
5002 #define T4OUTPS2 T4CONbits.T4OUTPS2 // bit 5
5003 #define T4OUTPS3 T4CONbits.T4OUTPS3 // bit 6
5005 #define T5GSS0 T5GCONbits.T5GSS0 // bit 0
5006 #define T5GSS1 T5GCONbits.T5GSS1 // bit 1
5007 #define T5GVAL T5GCONbits.T5GVAL // bit 2
5008 #define T5GGO_NOT_DONE T5GCONbits.T5GGO_NOT_DONE // bit 3
5009 #define T5GSPM T5GCONbits.T5GSPM // bit 4
5010 #define T5GTM T5GCONbits.T5GTM // bit 5
5011 #define T5GPOL T5GCONbits.T5GPOL // bit 6
5012 #define TMR5GE T5GCONbits.TMR5GE // bit 7
5014 #define T6CKPS0 T6CONbits.T6CKPS0 // bit 0
5015 #define T6CKPS1 T6CONbits.T6CKPS1 // bit 1
5016 #define TMR6ON T6CONbits.TMR6ON // bit 2
5017 #define T6OUTPS0 T6CONbits.T6OUTPS0 // bit 3
5018 #define T6OUTPS1 T6CONbits.T6OUTPS1 // bit 4
5019 #define T6OUTPS2 T6CONbits.T6OUTPS2 // bit 5
5020 #define T6OUTPS3 T6CONbits.T6OUTPS3 // bit 6
5022 #define T8CKPS0 T8CONbits.T8CKPS0 // bit 0
5023 #define T8CKPS1 T8CONbits.T8CKPS1 // bit 1
5024 #define TMR8ON T8CONbits.TMR8ON // bit 2
5025 #define T8OUTPS0 T8CONbits.T8OUTPS0 // bit 3
5026 #define T8OUTPS1 T8CONbits.T8OUTPS1 // bit 4
5027 #define T8OUTPS2 T8CONbits.T8OUTPS2 // bit 5
5028 #define T8OUTPS3 T8CONbits.T8OUTPS3 // bit 6
5030 #define T10CKPS0 T10CONbits.T10CKPS0 // bit 0
5031 #define T10CKPS1 T10CONbits.T10CKPS1 // bit 1
5032 #define TMR10ON T10CONbits.TMR10ON // bit 2
5033 #define T10OUTPS0 T10CONbits.T10OUTPS0 // bit 3
5034 #define T10OUTPS1 T10CONbits.T10OUTPS1 // bit 4
5035 #define T10OUTPS2 T10CONbits.T10OUTPS2 // bit 5
5036 #define T10OUTPS3 T10CONbits.T10OUTPS3 // bit 6
5038 #define TRISA0 TRISAbits.TRISA0 // bit 0
5039 #define TRISA1 TRISAbits.TRISA1 // bit 1
5040 #define TRISA2 TRISAbits.TRISA2 // bit 2
5041 #define TRISA3 TRISAbits.TRISA3 // bit 3
5042 #define TRISA4 TRISAbits.TRISA4 // bit 4
5043 #define TRISA5 TRISAbits.TRISA5 // bit 5
5044 #define TRISA6 TRISAbits.TRISA6 // bit 6
5045 #define TRISA7 TRISAbits.TRISA7 // bit 7
5047 #define TRISB0 TRISBbits.TRISB0 // bit 0
5048 #define TRISB1 TRISBbits.TRISB1 // bit 1
5049 #define TRISB2 TRISBbits.TRISB2 // bit 2
5050 #define TRISB3 TRISBbits.TRISB3 // bit 3
5051 #define TRISB4 TRISBbits.TRISB4 // bit 4
5052 #define TRISB5 TRISBbits.TRISB5 // bit 5
5053 #define TRISB6 TRISBbits.TRISB6 // bit 6
5054 #define TRISB7 TRISBbits.TRISB7 // bit 7
5056 #define TRISC0 TRISCbits.TRISC0 // bit 0
5057 #define TRISC1 TRISCbits.TRISC1 // bit 1
5058 #define TRISC2 TRISCbits.TRISC2 // bit 2
5059 #define TRISC3 TRISCbits.TRISC3 // bit 3
5060 #define TRISC4 TRISCbits.TRISC4 // bit 4
5061 #define TRISC5 TRISCbits.TRISC5 // bit 5
5062 #define TRISC6 TRISCbits.TRISC6 // bit 6
5063 #define TRISC7 TRISCbits.TRISC7 // bit 7
5065 #define TRISD0 TRISDbits.TRISD0 // bit 0
5066 #define TRISD1 TRISDbits.TRISD1 // bit 1
5067 #define TRISD2 TRISDbits.TRISD2 // bit 2
5068 #define TRISD3 TRISDbits.TRISD3 // bit 3
5069 #define TRISD4 TRISDbits.TRISD4 // bit 4
5070 #define TRISD5 TRISDbits.TRISD5 // bit 5
5071 #define TRISD6 TRISDbits.TRISD6 // bit 6
5072 #define TRISD7 TRISDbits.TRISD7 // bit 7
5074 #define TRISE0 TRISEbits.TRISE0 // bit 0
5075 #define TRISE1 TRISEbits.TRISE1 // bit 1
5076 #define TRISE2 TRISEbits.TRISE2 // bit 2
5077 #define TRISE3 TRISEbits.TRISE3 // bit 3
5078 #define TRISE4 TRISEbits.TRISE4 // bit 4
5079 #define TRISE5 TRISEbits.TRISE5 // bit 5
5080 #define TRISE6 TRISEbits.TRISE6 // bit 6
5081 #define TRISE7 TRISEbits.TRISE7 // bit 7
5083 #define TRISF0 TRISFbits.TRISF0 // bit 0
5084 #define TRISF1 TRISFbits.TRISF1 // bit 1
5085 #define TRISF2 TRISFbits.TRISF2 // bit 2
5086 #define TRISF3 TRISFbits.TRISF3 // bit 3
5087 #define TRISF4 TRISFbits.TRISF4 // bit 4
5088 #define TRISF5 TRISFbits.TRISF5 // bit 5
5089 #define TRISF6 TRISFbits.TRISF6 // bit 6
5090 #define TRISF7 TRISFbits.TRISF7 // bit 7
5092 #define TRISG0 TRISGbits.TRISG0 // bit 0
5093 #define TRISG1 TRISGbits.TRISG1 // bit 1
5094 #define TRISG2 TRISGbits.TRISG2 // bit 2
5095 #define TRISG3 TRISGbits.TRISG3 // bit 3
5096 #define TRISG4 TRISGbits.TRISG4 // bit 4
5098 #define TX9D TX1STAbits.TX9D // bit 0
5099 #define TRMT TX1STAbits.TRMT // bit 1
5100 #define BRGH TX1STAbits.BRGH // bit 2
5101 #define SENDB TX1STAbits.SENDB // bit 3
5102 #define SYNC TX1STAbits.SYNC // bit 4
5103 #define TXEN TX1STAbits.TXEN // bit 5
5104 #define TX9 TX1STAbits.TX9 // bit 6
5105 #define CSRC TX1STAbits.CSRC // bit 7
5107 #define SWDTEN WDTCONbits.SWDTEN // bit 0
5108 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
5109 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
5110 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
5111 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
5112 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
5114 #define WPUB0 WPUBbits.WPUB0 // bit 0
5115 #define WPUB1 WPUBbits.WPUB1 // bit 1
5116 #define WPUB2 WPUBbits.WPUB2 // bit 2
5117 #define WPUB3 WPUBbits.WPUB3 // bit 3
5118 #define WPUB4 WPUBbits.WPUB4 // bit 4
5119 #define WPUB5 WPUBbits.WPUB5 // bit 5
5120 #define WPUB6 WPUBbits.WPUB6 // bit 6
5121 #define WPUB7 WPUBbits.WPUB7 // bit 7
5123 #define WPUD0 WPUDbits.WPUD0 // bit 0
5124 #define WPUD1 WPUDbits.WPUD1 // bit 1
5125 #define WPUD2 WPUDbits.WPUD2 // bit 2
5126 #define WPUD3 WPUDbits.WPUD3 // bit 3
5127 #define WPUD4 WPUDbits.WPUD4 // bit 4
5128 #define WPUD5 WPUDbits.WPUD5 // bit 5
5129 #define WPUD6 WPUDbits.WPUD6 // bit 6
5130 #define WPUD7 WPUDbits.WPUD7 // bit 7
5132 #define WPUE0 WPUEbits.WPUE0 // bit 0
5133 #define WPUE1 WPUEbits.WPUE1 // bit 1
5134 #define WPUE2 WPUEbits.WPUE2 // bit 2
5135 #define WPUE3 WPUEbits.WPUE3 // bit 3
5136 #define WPUE4 WPUEbits.WPUE4 // bit 4
5137 #define WPUE5 WPUEbits.WPUE5 // bit 5
5138 #define WPUE6 WPUEbits.WPUE6 // bit 6
5139 #define WPUE7 WPUEbits.WPUE7 // bit 7
5141 #define WPUG5 WPUGbits.WPUG5 // bit 5
5143 #endif // #ifndef NO_BIT_DEFINES
5145 #endif // #ifndef __PIC16LF1526_H__