Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16f1828.h
blobfa8120d0b3799aa841c8fbe36014ac56fd56cc55
1 /*
2 * This declarations of the PIC16F1828 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:20 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 __PIC16F1828_H__
26 #define __PIC16F1828_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 PIR1_ADDR 0x0011
54 #define PIR2_ADDR 0x0012
55 #define PIR3_ADDR 0x0013
56 #define TMR0_ADDR 0x0015
57 #define TMR1_ADDR 0x0016
58 #define TMR1L_ADDR 0x0016
59 #define TMR1H_ADDR 0x0017
60 #define T1CON_ADDR 0x0018
61 #define T1GCON_ADDR 0x0019
62 #define TMR2_ADDR 0x001A
63 #define PR2_ADDR 0x001B
64 #define T2CON_ADDR 0x001C
65 #define CPSCON0_ADDR 0x001E
66 #define CPSCON1_ADDR 0x001F
67 #define TRISA_ADDR 0x008C
68 #define TRISB_ADDR 0x008D
69 #define TRISC_ADDR 0x008E
70 #define PIE1_ADDR 0x0091
71 #define PIE2_ADDR 0x0092
72 #define PIE3_ADDR 0x0093
73 #define OPTION_REG_ADDR 0x0095
74 #define PCON_ADDR 0x0096
75 #define WDTCON_ADDR 0x0097
76 #define OSCTUNE_ADDR 0x0098
77 #define OSCCON_ADDR 0x0099
78 #define OSCSTAT_ADDR 0x009A
79 #define ADRES_ADDR 0x009B
80 #define ADRESL_ADDR 0x009B
81 #define ADRESH_ADDR 0x009C
82 #define ADCON0_ADDR 0x009D
83 #define ADCON1_ADDR 0x009E
84 #define LATA_ADDR 0x010C
85 #define LATB_ADDR 0x010D
86 #define LATC_ADDR 0x010E
87 #define CM1CON0_ADDR 0x0111
88 #define CM1CON1_ADDR 0x0112
89 #define CM2CON0_ADDR 0x0113
90 #define CM2CON1_ADDR 0x0114
91 #define CMOUT_ADDR 0x0115
92 #define BORCON_ADDR 0x0116
93 #define FVRCON_ADDR 0x0117
94 #define DACCON0_ADDR 0x0118
95 #define DACCON1_ADDR 0x0119
96 #define SRCON0_ADDR 0x011A
97 #define SRCON1_ADDR 0x011B
98 #define APFCON0_ADDR 0x011D
99 #define APFCON1_ADDR 0x011E
100 #define ANSELA_ADDR 0x018C
101 #define ANSELB_ADDR 0x018D
102 #define ANSELC_ADDR 0x018E
103 #define EEADR_ADDR 0x0191
104 #define EEADRL_ADDR 0x0191
105 #define EEADRH_ADDR 0x0192
106 #define EEDAT_ADDR 0x0193
107 #define EEDATL_ADDR 0x0193
108 #define EEDATH_ADDR 0x0194
109 #define EECON1_ADDR 0x0195
110 #define EECON2_ADDR 0x0196
111 #define RCREG_ADDR 0x0199
112 #define TXREG_ADDR 0x019A
113 #define SP1BRG_ADDR 0x019B
114 #define SP1BRGL_ADDR 0x019B
115 #define SPBRG_ADDR 0x019B
116 #define SPBRGL_ADDR 0x019B
117 #define SP1BRGH_ADDR 0x019C
118 #define SPBRGH_ADDR 0x019C
119 #define RCSTA_ADDR 0x019D
120 #define TXSTA_ADDR 0x019E
121 #define BAUDCON_ADDR 0x019F
122 #define WPUA_ADDR 0x020C
123 #define WPUB_ADDR 0x020D
124 #define WPUC_ADDR 0x020E
125 #define SSP1BUF_ADDR 0x0211
126 #define SSPBUF_ADDR 0x0211
127 #define SSP1ADD_ADDR 0x0212
128 #define SSPADD_ADDR 0x0212
129 #define SSP1MSK_ADDR 0x0213
130 #define SSPMSK_ADDR 0x0213
131 #define SSP1STAT_ADDR 0x0214
132 #define SSPSTAT_ADDR 0x0214
133 #define SSP1CON_ADDR 0x0215
134 #define SSP1CON1_ADDR 0x0215
135 #define SSPCON_ADDR 0x0215
136 #define SSPCON1_ADDR 0x0215
137 #define SSP1CON2_ADDR 0x0216
138 #define SSPCON2_ADDR 0x0216
139 #define SSP1CON3_ADDR 0x0217
140 #define SSPCON3_ADDR 0x0217
141 #define CCPR1_ADDR 0x0291
142 #define CCPR1L_ADDR 0x0291
143 #define CCPR1H_ADDR 0x0292
144 #define CCP1CON_ADDR 0x0293
145 #define PWM1CON_ADDR 0x0294
146 #define CCP1AS_ADDR 0x0295
147 #define ECCP1AS_ADDR 0x0295
148 #define PSTR1CON_ADDR 0x0296
149 #define CCPR2_ADDR 0x0298
150 #define CCPR2L_ADDR 0x0298
151 #define CCPR2H_ADDR 0x0299
152 #define CCP2CON_ADDR 0x029A
153 #define PWM2CON_ADDR 0x029B
154 #define CCP2AS_ADDR 0x029C
155 #define PSTR2CON_ADDR 0x029D
156 #define CCPTMRS_ADDR 0x029E
157 #define CCPTMRS0_ADDR 0x029E
158 #define CCPR3_ADDR 0x0311
159 #define CCPR3L_ADDR 0x0311
160 #define CCPR3H_ADDR 0x0312
161 #define CCP3CON_ADDR 0x0313
162 #define CCPR4_ADDR 0x0318
163 #define CCPR4L_ADDR 0x0318
164 #define CCPR4H_ADDR 0x0319
165 #define CCP4CON_ADDR 0x031A
166 #define INLVLA_ADDR 0x038C
167 #define INLVLB_ADDR 0x038D
168 #define INLVLC_ADDR 0x038E
169 #define IOCAP_ADDR 0x0391
170 #define IOCAN_ADDR 0x0392
171 #define IOCAF_ADDR 0x0393
172 #define IOCBP_ADDR 0x0394
173 #define IOCBN_ADDR 0x0395
174 #define IOCBF_ADDR 0x0396
175 #define CLKRCON_ADDR 0x039A
176 #define MDCON_ADDR 0x039C
177 #define MDSRC_ADDR 0x039D
178 #define MDCARL_ADDR 0x039E
179 #define MDCARH_ADDR 0x039F
180 #define TMR4_ADDR 0x0415
181 #define PR4_ADDR 0x0416
182 #define T4CON_ADDR 0x0417
183 #define TMR6_ADDR 0x041C
184 #define PR6_ADDR 0x041D
185 #define T6CON_ADDR 0x041E
186 #define STATUS_SHAD_ADDR 0x0FE4
187 #define WREG_SHAD_ADDR 0x0FE5
188 #define BSR_SHAD_ADDR 0x0FE6
189 #define PCLATH_SHAD_ADDR 0x0FE7
190 #define FSR0L_SHAD_ADDR 0x0FE8
191 #define FSR0H_SHAD_ADDR 0x0FE9
192 #define FSR1L_SHAD_ADDR 0x0FEA
193 #define FSR1H_SHAD_ADDR 0x0FEB
194 #define STKPTR_ADDR 0x0FED
195 #define TOSL_ADDR 0x0FEE
196 #define TOSH_ADDR 0x0FEF
198 #endif // #ifndef NO_ADDR_DEFINES
200 //==============================================================================
202 // Register Definitions
204 //==============================================================================
206 extern __at(0x0000) __sfr INDF0;
207 extern __at(0x0001) __sfr INDF1;
208 extern __at(0x0002) __sfr PCL;
210 //==============================================================================
211 // STATUS Bits
213 extern __at(0x0003) __sfr STATUS;
215 typedef struct
217 unsigned C : 1;
218 unsigned DC : 1;
219 unsigned Z : 1;
220 unsigned NOT_PD : 1;
221 unsigned NOT_TO : 1;
222 unsigned : 1;
223 unsigned : 1;
224 unsigned : 1;
225 } __STATUSbits_t;
227 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
229 #define _C 0x01
230 #define _DC 0x02
231 #define _Z 0x04
232 #define _NOT_PD 0x08
233 #define _NOT_TO 0x10
235 //==============================================================================
237 extern __at(0x0004) __sfr FSR0;
238 extern __at(0x0004) __sfr FSR0L;
239 extern __at(0x0005) __sfr FSR0H;
240 extern __at(0x0006) __sfr FSR1;
241 extern __at(0x0006) __sfr FSR1L;
242 extern __at(0x0007) __sfr FSR1H;
244 //==============================================================================
245 // BSR Bits
247 extern __at(0x0008) __sfr BSR;
249 typedef union
251 struct
253 unsigned BSR0 : 1;
254 unsigned BSR1 : 1;
255 unsigned BSR2 : 1;
256 unsigned BSR3 : 1;
257 unsigned BSR4 : 1;
258 unsigned : 1;
259 unsigned : 1;
260 unsigned : 1;
263 struct
265 unsigned BSR : 5;
266 unsigned : 3;
268 } __BSRbits_t;
270 extern __at(0x0008) volatile __BSRbits_t BSRbits;
272 #define _BSR0 0x01
273 #define _BSR1 0x02
274 #define _BSR2 0x04
275 #define _BSR3 0x08
276 #define _BSR4 0x10
278 //==============================================================================
280 extern __at(0x0009) __sfr WREG;
281 extern __at(0x000A) __sfr PCLATH;
283 //==============================================================================
284 // INTCON Bits
286 extern __at(0x000B) __sfr INTCON;
288 typedef union
290 struct
292 unsigned IOCIF : 1;
293 unsigned INTF : 1;
294 unsigned TMR0IF : 1;
295 unsigned IOCIE : 1;
296 unsigned INTE : 1;
297 unsigned TMR0IE : 1;
298 unsigned PEIE : 1;
299 unsigned GIE : 1;
302 struct
304 unsigned : 1;
305 unsigned : 1;
306 unsigned T0IF : 1;
307 unsigned : 1;
308 unsigned : 1;
309 unsigned T0IE : 1;
310 unsigned : 1;
311 unsigned : 1;
313 } __INTCONbits_t;
315 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
317 #define _IOCIF 0x01
318 #define _INTF 0x02
319 #define _TMR0IF 0x04
320 #define _T0IF 0x04
321 #define _IOCIE 0x08
322 #define _INTE 0x10
323 #define _TMR0IE 0x20
324 #define _T0IE 0x20
325 #define _PEIE 0x40
326 #define _GIE 0x80
328 //==============================================================================
331 //==============================================================================
332 // PORTA Bits
334 extern __at(0x000C) __sfr PORTA;
336 typedef union
338 struct
340 unsigned RA0 : 1;
341 unsigned RA1 : 1;
342 unsigned RA2 : 1;
343 unsigned RA3 : 1;
344 unsigned RA4 : 1;
345 unsigned RA5 : 1;
346 unsigned : 1;
347 unsigned : 1;
350 struct
352 unsigned RA : 6;
353 unsigned : 2;
355 } __PORTAbits_t;
357 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
359 #define _RA0 0x01
360 #define _RA1 0x02
361 #define _RA2 0x04
362 #define _RA3 0x08
363 #define _RA4 0x10
364 #define _RA5 0x20
366 //==============================================================================
369 //==============================================================================
370 // PORTB Bits
372 extern __at(0x000D) __sfr PORTB;
374 typedef struct
376 unsigned : 1;
377 unsigned : 1;
378 unsigned : 1;
379 unsigned : 1;
380 unsigned RB4 : 1;
381 unsigned RB5 : 1;
382 unsigned RB6 : 1;
383 unsigned RB7 : 1;
384 } __PORTBbits_t;
386 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
388 #define _RB4 0x10
389 #define _RB5 0x20
390 #define _RB6 0x40
391 #define _RB7 0x80
393 //==============================================================================
396 //==============================================================================
397 // PORTC Bits
399 extern __at(0x000E) __sfr PORTC;
401 typedef struct
403 unsigned RC0 : 1;
404 unsigned RC1 : 1;
405 unsigned RC2 : 1;
406 unsigned RC3 : 1;
407 unsigned RC4 : 1;
408 unsigned RC5 : 1;
409 unsigned RC6 : 1;
410 unsigned RC7 : 1;
411 } __PORTCbits_t;
413 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
415 #define _RC0 0x01
416 #define _RC1 0x02
417 #define _RC2 0x04
418 #define _RC3 0x08
419 #define _RC4 0x10
420 #define _RC5 0x20
421 #define _RC6 0x40
422 #define _RC7 0x80
424 //==============================================================================
427 //==============================================================================
428 // PIR1 Bits
430 extern __at(0x0011) __sfr PIR1;
432 typedef struct
434 unsigned TMR1IF : 1;
435 unsigned TMR2IF : 1;
436 unsigned CCP1IF : 1;
437 unsigned SSP1IF : 1;
438 unsigned TXIF : 1;
439 unsigned RCIF : 1;
440 unsigned ADIF : 1;
441 unsigned TMR1GIF : 1;
442 } __PIR1bits_t;
444 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
446 #define _TMR1IF 0x01
447 #define _TMR2IF 0x02
448 #define _CCP1IF 0x04
449 #define _SSP1IF 0x08
450 #define _TXIF 0x10
451 #define _RCIF 0x20
452 #define _ADIF 0x40
453 #define _TMR1GIF 0x80
455 //==============================================================================
458 //==============================================================================
459 // PIR2 Bits
461 extern __at(0x0012) __sfr PIR2;
463 typedef struct
465 unsigned CCP2IF : 1;
466 unsigned : 1;
467 unsigned : 1;
468 unsigned BCL1IF : 1;
469 unsigned EEIF : 1;
470 unsigned C1IF : 1;
471 unsigned C2IF : 1;
472 unsigned OSFIF : 1;
473 } __PIR2bits_t;
475 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
477 #define _CCP2IF 0x01
478 #define _BCL1IF 0x08
479 #define _EEIF 0x10
480 #define _C1IF 0x20
481 #define _C2IF 0x40
482 #define _OSFIF 0x80
484 //==============================================================================
487 //==============================================================================
488 // PIR3 Bits
490 extern __at(0x0013) __sfr PIR3;
492 typedef struct
494 unsigned : 1;
495 unsigned TMR4IF : 1;
496 unsigned : 1;
497 unsigned TMR6IF : 1;
498 unsigned CCP3IF : 1;
499 unsigned CCP4IF : 1;
500 unsigned : 1;
501 unsigned : 1;
502 } __PIR3bits_t;
504 extern __at(0x0013) volatile __PIR3bits_t PIR3bits;
506 #define _TMR4IF 0x02
507 #define _TMR6IF 0x08
508 #define _CCP3IF 0x10
509 #define _CCP4IF 0x20
511 //==============================================================================
513 extern __at(0x0015) __sfr TMR0;
514 extern __at(0x0016) __sfr TMR1;
515 extern __at(0x0016) __sfr TMR1L;
516 extern __at(0x0017) __sfr TMR1H;
518 //==============================================================================
519 // T1CON Bits
521 extern __at(0x0018) __sfr T1CON;
523 typedef union
525 struct
527 unsigned TMR1ON : 1;
528 unsigned : 1;
529 unsigned NOT_T1SYNC : 1;
530 unsigned T1OSCEN : 1;
531 unsigned T1CKPS0 : 1;
532 unsigned T1CKPS1 : 1;
533 unsigned TMR1CS0 : 1;
534 unsigned TMR1CS1 : 1;
537 struct
539 unsigned : 4;
540 unsigned T1CKPS : 2;
541 unsigned : 2;
544 struct
546 unsigned : 6;
547 unsigned TMR1CS : 2;
549 } __T1CONbits_t;
551 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
553 #define _TMR1ON 0x01
554 #define _NOT_T1SYNC 0x04
555 #define _T1OSCEN 0x08
556 #define _T1CKPS0 0x10
557 #define _T1CKPS1 0x20
558 #define _TMR1CS0 0x40
559 #define _TMR1CS1 0x80
561 //==============================================================================
564 //==============================================================================
565 // T1GCON Bits
567 extern __at(0x0019) __sfr T1GCON;
569 typedef union
571 struct
573 unsigned T1GSS0 : 1;
574 unsigned T1GSS1 : 1;
575 unsigned T1GVAL : 1;
576 unsigned T1GGO_NOT_DONE : 1;
577 unsigned T1GSPM : 1;
578 unsigned T1GTM : 1;
579 unsigned T1GPOL : 1;
580 unsigned TMR1GE : 1;
583 struct
585 unsigned : 1;
586 unsigned : 1;
587 unsigned : 1;
588 unsigned T1GGO : 1;
589 unsigned : 1;
590 unsigned : 1;
591 unsigned : 1;
592 unsigned : 1;
595 struct
597 unsigned T1GSS : 2;
598 unsigned : 6;
600 } __T1GCONbits_t;
602 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
604 #define _T1GSS0 0x01
605 #define _T1GSS1 0x02
606 #define _T1GVAL 0x04
607 #define _T1GGO_NOT_DONE 0x08
608 #define _T1GGO 0x08
609 #define _T1GSPM 0x10
610 #define _T1GTM 0x20
611 #define _T1GPOL 0x40
612 #define _TMR1GE 0x80
614 //==============================================================================
616 extern __at(0x001A) __sfr TMR2;
617 extern __at(0x001B) __sfr PR2;
619 //==============================================================================
620 // T2CON Bits
622 extern __at(0x001C) __sfr T2CON;
624 typedef union
626 struct
628 unsigned T2CKPS0 : 1;
629 unsigned T2CKPS1 : 1;
630 unsigned TMR2ON : 1;
631 unsigned T2OUTPS0 : 1;
632 unsigned T2OUTPS1 : 1;
633 unsigned T2OUTPS2 : 1;
634 unsigned T2OUTPS3 : 1;
635 unsigned : 1;
638 struct
640 unsigned T2CKPS : 2;
641 unsigned : 6;
644 struct
646 unsigned : 3;
647 unsigned T2OUTPS : 4;
648 unsigned : 1;
650 } __T2CONbits_t;
652 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
654 #define _T2CKPS0 0x01
655 #define _T2CKPS1 0x02
656 #define _TMR2ON 0x04
657 #define _T2OUTPS0 0x08
658 #define _T2OUTPS1 0x10
659 #define _T2OUTPS2 0x20
660 #define _T2OUTPS3 0x40
662 //==============================================================================
665 //==============================================================================
666 // CPSCON0 Bits
668 extern __at(0x001E) __sfr CPSCON0;
670 typedef union
672 struct
674 unsigned T0XCS : 1;
675 unsigned CPSOUT : 1;
676 unsigned CPSRNG0 : 1;
677 unsigned CPSRNG1 : 1;
678 unsigned : 1;
679 unsigned : 1;
680 unsigned CPSRM : 1;
681 unsigned CPSON : 1;
684 struct
686 unsigned : 2;
687 unsigned CPSRNG : 2;
688 unsigned : 4;
690 } __CPSCON0bits_t;
692 extern __at(0x001E) volatile __CPSCON0bits_t CPSCON0bits;
694 #define _T0XCS 0x01
695 #define _CPSOUT 0x02
696 #define _CPSRNG0 0x04
697 #define _CPSRNG1 0x08
698 #define _CPSRM 0x40
699 #define _CPSON 0x80
701 //==============================================================================
704 //==============================================================================
705 // CPSCON1 Bits
707 extern __at(0x001F) __sfr CPSCON1;
709 typedef union
711 struct
713 unsigned CPSCH0 : 1;
714 unsigned CPSCH1 : 1;
715 unsigned CPSCH2 : 1;
716 unsigned CPSCH3 : 1;
717 unsigned : 1;
718 unsigned : 1;
719 unsigned : 1;
720 unsigned : 1;
723 struct
725 unsigned CPSCH : 4;
726 unsigned : 4;
728 } __CPSCON1bits_t;
730 extern __at(0x001F) volatile __CPSCON1bits_t CPSCON1bits;
732 #define _CPSCH0 0x01
733 #define _CPSCH1 0x02
734 #define _CPSCH2 0x04
735 #define _CPSCH3 0x08
737 //==============================================================================
740 //==============================================================================
741 // TRISA Bits
743 extern __at(0x008C) __sfr TRISA;
745 typedef union
747 struct
749 unsigned TRISA0 : 1;
750 unsigned TRISA1 : 1;
751 unsigned TRISA2 : 1;
752 unsigned TRISA3 : 1;
753 unsigned TRISA4 : 1;
754 unsigned TRISA5 : 1;
755 unsigned : 1;
756 unsigned : 1;
759 struct
761 unsigned TRISA : 6;
762 unsigned : 2;
764 } __TRISAbits_t;
766 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
768 #define _TRISA0 0x01
769 #define _TRISA1 0x02
770 #define _TRISA2 0x04
771 #define _TRISA3 0x08
772 #define _TRISA4 0x10
773 #define _TRISA5 0x20
775 //==============================================================================
778 //==============================================================================
779 // TRISB Bits
781 extern __at(0x008D) __sfr TRISB;
783 typedef struct
785 unsigned : 1;
786 unsigned : 1;
787 unsigned : 1;
788 unsigned : 1;
789 unsigned TRISB4 : 1;
790 unsigned TRISB5 : 1;
791 unsigned TRISB6 : 1;
792 unsigned TRISB7 : 1;
793 } __TRISBbits_t;
795 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
797 #define _TRISB4 0x10
798 #define _TRISB5 0x20
799 #define _TRISB6 0x40
800 #define _TRISB7 0x80
802 //==============================================================================
805 //==============================================================================
806 // TRISC Bits
808 extern __at(0x008E) __sfr TRISC;
810 typedef struct
812 unsigned TRISC0 : 1;
813 unsigned TRISC1 : 1;
814 unsigned TRISC2 : 1;
815 unsigned TRISC3 : 1;
816 unsigned TRISC4 : 1;
817 unsigned TRISC5 : 1;
818 unsigned TRISC6 : 1;
819 unsigned TRISC7 : 1;
820 } __TRISCbits_t;
822 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
824 #define _TRISC0 0x01
825 #define _TRISC1 0x02
826 #define _TRISC2 0x04
827 #define _TRISC3 0x08
828 #define _TRISC4 0x10
829 #define _TRISC5 0x20
830 #define _TRISC6 0x40
831 #define _TRISC7 0x80
833 //==============================================================================
836 //==============================================================================
837 // PIE1 Bits
839 extern __at(0x0091) __sfr PIE1;
841 typedef struct
843 unsigned TMR1IE : 1;
844 unsigned TMR2IE : 1;
845 unsigned CCP1IE : 1;
846 unsigned SSP1IE : 1;
847 unsigned TXIE : 1;
848 unsigned RCIE : 1;
849 unsigned ADIE : 1;
850 unsigned TMR1GIE : 1;
851 } __PIE1bits_t;
853 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
855 #define _TMR1IE 0x01
856 #define _TMR2IE 0x02
857 #define _CCP1IE 0x04
858 #define _SSP1IE 0x08
859 #define _TXIE 0x10
860 #define _RCIE 0x20
861 #define _ADIE 0x40
862 #define _TMR1GIE 0x80
864 //==============================================================================
867 //==============================================================================
868 // PIE2 Bits
870 extern __at(0x0092) __sfr PIE2;
872 typedef struct
874 unsigned CCP2IE : 1;
875 unsigned : 1;
876 unsigned : 1;
877 unsigned BCL1IE : 1;
878 unsigned EEIE : 1;
879 unsigned C1IE : 1;
880 unsigned C2IE : 1;
881 unsigned OSFIE : 1;
882 } __PIE2bits_t;
884 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
886 #define _CCP2IE 0x01
887 #define _BCL1IE 0x08
888 #define _EEIE 0x10
889 #define _C1IE 0x20
890 #define _C2IE 0x40
891 #define _OSFIE 0x80
893 //==============================================================================
896 //==============================================================================
897 // PIE3 Bits
899 extern __at(0x0093) __sfr PIE3;
901 typedef struct
903 unsigned : 1;
904 unsigned TMR4IE : 1;
905 unsigned : 1;
906 unsigned TMR6IE : 1;
907 unsigned CCP3IE : 1;
908 unsigned CCP4IE : 1;
909 unsigned : 1;
910 unsigned : 1;
911 } __PIE3bits_t;
913 extern __at(0x0093) volatile __PIE3bits_t PIE3bits;
915 #define _TMR4IE 0x02
916 #define _TMR6IE 0x08
917 #define _CCP3IE 0x10
918 #define _CCP4IE 0x20
920 //==============================================================================
923 //==============================================================================
924 // OPTION_REG Bits
926 extern __at(0x0095) __sfr OPTION_REG;
928 typedef union
930 struct
932 unsigned PS0 : 1;
933 unsigned PS1 : 1;
934 unsigned PS2 : 1;
935 unsigned PSA : 1;
936 unsigned TMR0SE : 1;
937 unsigned TMR0CS : 1;
938 unsigned INTEDG : 1;
939 unsigned NOT_WPUEN : 1;
942 struct
944 unsigned : 1;
945 unsigned : 1;
946 unsigned : 1;
947 unsigned : 1;
948 unsigned T0SE : 1;
949 unsigned T0CS : 1;
950 unsigned : 1;
951 unsigned : 1;
954 struct
956 unsigned PS : 3;
957 unsigned : 5;
959 } __OPTION_REGbits_t;
961 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
963 #define _PS0 0x01
964 #define _PS1 0x02
965 #define _PS2 0x04
966 #define _PSA 0x08
967 #define _TMR0SE 0x10
968 #define _T0SE 0x10
969 #define _TMR0CS 0x20
970 #define _T0CS 0x20
971 #define _INTEDG 0x40
972 #define _NOT_WPUEN 0x80
974 //==============================================================================
977 //==============================================================================
978 // PCON Bits
980 extern __at(0x0096) __sfr PCON;
982 typedef struct
984 unsigned NOT_BOR : 1;
985 unsigned NOT_POR : 1;
986 unsigned NOT_RI : 1;
987 unsigned NOT_RMCLR : 1;
988 unsigned : 1;
989 unsigned : 1;
990 unsigned STKUNF : 1;
991 unsigned STKOVF : 1;
992 } __PCONbits_t;
994 extern __at(0x0096) volatile __PCONbits_t PCONbits;
996 #define _NOT_BOR 0x01
997 #define _NOT_POR 0x02
998 #define _NOT_RI 0x04
999 #define _NOT_RMCLR 0x08
1000 #define _STKUNF 0x40
1001 #define _STKOVF 0x80
1003 //==============================================================================
1006 //==============================================================================
1007 // WDTCON Bits
1009 extern __at(0x0097) __sfr WDTCON;
1011 typedef union
1013 struct
1015 unsigned SWDTEN : 1;
1016 unsigned WDTPS0 : 1;
1017 unsigned WDTPS1 : 1;
1018 unsigned WDTPS2 : 1;
1019 unsigned WDTPS3 : 1;
1020 unsigned WDTPS4 : 1;
1021 unsigned : 1;
1022 unsigned : 1;
1025 struct
1027 unsigned : 1;
1028 unsigned WDTPS : 5;
1029 unsigned : 2;
1031 } __WDTCONbits_t;
1033 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
1035 #define _SWDTEN 0x01
1036 #define _WDTPS0 0x02
1037 #define _WDTPS1 0x04
1038 #define _WDTPS2 0x08
1039 #define _WDTPS3 0x10
1040 #define _WDTPS4 0x20
1042 //==============================================================================
1045 //==============================================================================
1046 // OSCTUNE Bits
1048 extern __at(0x0098) __sfr OSCTUNE;
1050 typedef union
1052 struct
1054 unsigned TUN0 : 1;
1055 unsigned TUN1 : 1;
1056 unsigned TUN2 : 1;
1057 unsigned TUN3 : 1;
1058 unsigned TUN4 : 1;
1059 unsigned TUN5 : 1;
1060 unsigned : 1;
1061 unsigned : 1;
1064 struct
1066 unsigned TUN : 6;
1067 unsigned : 2;
1069 } __OSCTUNEbits_t;
1071 extern __at(0x0098) volatile __OSCTUNEbits_t OSCTUNEbits;
1073 #define _TUN0 0x01
1074 #define _TUN1 0x02
1075 #define _TUN2 0x04
1076 #define _TUN3 0x08
1077 #define _TUN4 0x10
1078 #define _TUN5 0x20
1080 //==============================================================================
1083 //==============================================================================
1084 // OSCCON Bits
1086 extern __at(0x0099) __sfr OSCCON;
1088 typedef union
1090 struct
1092 unsigned SCS0 : 1;
1093 unsigned SCS1 : 1;
1094 unsigned : 1;
1095 unsigned IRCF0 : 1;
1096 unsigned IRCF1 : 1;
1097 unsigned IRCF2 : 1;
1098 unsigned IRCF3 : 1;
1099 unsigned SPLLEN : 1;
1102 struct
1104 unsigned SCS : 2;
1105 unsigned : 6;
1108 struct
1110 unsigned : 3;
1111 unsigned IRCF : 4;
1112 unsigned : 1;
1114 } __OSCCONbits_t;
1116 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1118 #define _SCS0 0x01
1119 #define _SCS1 0x02
1120 #define _IRCF0 0x08
1121 #define _IRCF1 0x10
1122 #define _IRCF2 0x20
1123 #define _IRCF3 0x40
1124 #define _SPLLEN 0x80
1126 //==============================================================================
1129 //==============================================================================
1130 // OSCSTAT Bits
1132 extern __at(0x009A) __sfr OSCSTAT;
1134 typedef struct
1136 unsigned HFIOFS : 1;
1137 unsigned LFIOFR : 1;
1138 unsigned MFIOFR : 1;
1139 unsigned HFIOFL : 1;
1140 unsigned HFIOFR : 1;
1141 unsigned OSTS : 1;
1142 unsigned PLLR : 1;
1143 unsigned T1OSCR : 1;
1144 } __OSCSTATbits_t;
1146 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1148 #define _HFIOFS 0x01
1149 #define _LFIOFR 0x02
1150 #define _MFIOFR 0x04
1151 #define _HFIOFL 0x08
1152 #define _HFIOFR 0x10
1153 #define _OSTS 0x20
1154 #define _PLLR 0x40
1155 #define _T1OSCR 0x80
1157 //==============================================================================
1159 extern __at(0x009B) __sfr ADRES;
1160 extern __at(0x009B) __sfr ADRESL;
1161 extern __at(0x009C) __sfr ADRESH;
1163 //==============================================================================
1164 // ADCON0 Bits
1166 extern __at(0x009D) __sfr ADCON0;
1168 typedef union
1170 struct
1172 unsigned ADON : 1;
1173 unsigned GO_NOT_DONE : 1;
1174 unsigned CHS0 : 1;
1175 unsigned CHS1 : 1;
1176 unsigned CHS2 : 1;
1177 unsigned CHS3 : 1;
1178 unsigned CHS4 : 1;
1179 unsigned : 1;
1182 struct
1184 unsigned : 1;
1185 unsigned ADGO : 1;
1186 unsigned : 1;
1187 unsigned : 1;
1188 unsigned : 1;
1189 unsigned : 1;
1190 unsigned : 1;
1191 unsigned : 1;
1194 struct
1196 unsigned : 1;
1197 unsigned GO : 1;
1198 unsigned : 1;
1199 unsigned : 1;
1200 unsigned : 1;
1201 unsigned : 1;
1202 unsigned : 1;
1203 unsigned : 1;
1206 struct
1208 unsigned : 2;
1209 unsigned CHS : 5;
1210 unsigned : 1;
1212 } __ADCON0bits_t;
1214 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1216 #define _ADON 0x01
1217 #define _GO_NOT_DONE 0x02
1218 #define _ADGO 0x02
1219 #define _GO 0x02
1220 #define _CHS0 0x04
1221 #define _CHS1 0x08
1222 #define _CHS2 0x10
1223 #define _CHS3 0x20
1224 #define _CHS4 0x40
1226 //==============================================================================
1229 //==============================================================================
1230 // ADCON1 Bits
1232 extern __at(0x009E) __sfr ADCON1;
1234 typedef union
1236 struct
1238 unsigned ADPREF0 : 1;
1239 unsigned ADPREF1 : 1;
1240 unsigned ADNREF : 1;
1241 unsigned : 1;
1242 unsigned ADCS0 : 1;
1243 unsigned ADCS1 : 1;
1244 unsigned ADCS2 : 1;
1245 unsigned ADFM : 1;
1248 struct
1250 unsigned ADPREF : 2;
1251 unsigned : 6;
1254 struct
1256 unsigned : 4;
1257 unsigned ADCS : 3;
1258 unsigned : 1;
1260 } __ADCON1bits_t;
1262 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1264 #define _ADPREF0 0x01
1265 #define _ADPREF1 0x02
1266 #define _ADNREF 0x04
1267 #define _ADCS0 0x10
1268 #define _ADCS1 0x20
1269 #define _ADCS2 0x40
1270 #define _ADFM 0x80
1272 //==============================================================================
1275 //==============================================================================
1276 // LATA Bits
1278 extern __at(0x010C) __sfr LATA;
1280 typedef struct
1282 unsigned LATA0 : 1;
1283 unsigned LATA1 : 1;
1284 unsigned LATA2 : 1;
1285 unsigned : 1;
1286 unsigned LATA4 : 1;
1287 unsigned LATA5 : 1;
1288 unsigned : 1;
1289 unsigned : 1;
1290 } __LATAbits_t;
1292 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1294 #define _LATA0 0x01
1295 #define _LATA1 0x02
1296 #define _LATA2 0x04
1297 #define _LATA4 0x10
1298 #define _LATA5 0x20
1300 //==============================================================================
1303 //==============================================================================
1304 // LATB Bits
1306 extern __at(0x010D) __sfr LATB;
1308 typedef struct
1310 unsigned : 1;
1311 unsigned : 1;
1312 unsigned : 1;
1313 unsigned : 1;
1314 unsigned LATB4 : 1;
1315 unsigned LATB5 : 1;
1316 unsigned LATB6 : 1;
1317 unsigned LATB7 : 1;
1318 } __LATBbits_t;
1320 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1322 #define _LATB4 0x10
1323 #define _LATB5 0x20
1324 #define _LATB6 0x40
1325 #define _LATB7 0x80
1327 //==============================================================================
1330 //==============================================================================
1331 // LATC Bits
1333 extern __at(0x010E) __sfr LATC;
1335 typedef struct
1337 unsigned LATC0 : 1;
1338 unsigned LATC1 : 1;
1339 unsigned LATC2 : 1;
1340 unsigned LATC3 : 1;
1341 unsigned LATC4 : 1;
1342 unsigned LATC5 : 1;
1343 unsigned LATC6 : 1;
1344 unsigned LATC7 : 1;
1345 } __LATCbits_t;
1347 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1349 #define _LATC0 0x01
1350 #define _LATC1 0x02
1351 #define _LATC2 0x04
1352 #define _LATC3 0x08
1353 #define _LATC4 0x10
1354 #define _LATC5 0x20
1355 #define _LATC6 0x40
1356 #define _LATC7 0x80
1358 //==============================================================================
1361 //==============================================================================
1362 // CM1CON0 Bits
1364 extern __at(0x0111) __sfr CM1CON0;
1366 typedef struct
1368 unsigned C1SYNC : 1;
1369 unsigned C1HYS : 1;
1370 unsigned C1SP : 1;
1371 unsigned : 1;
1372 unsigned C1POL : 1;
1373 unsigned C1OE : 1;
1374 unsigned C1OUT : 1;
1375 unsigned C1ON : 1;
1376 } __CM1CON0bits_t;
1378 extern __at(0x0111) volatile __CM1CON0bits_t CM1CON0bits;
1380 #define _C1SYNC 0x01
1381 #define _C1HYS 0x02
1382 #define _C1SP 0x04
1383 #define _C1POL 0x10
1384 #define _C1OE 0x20
1385 #define _C1OUT 0x40
1386 #define _C1ON 0x80
1388 //==============================================================================
1391 //==============================================================================
1392 // CM1CON1 Bits
1394 extern __at(0x0112) __sfr CM1CON1;
1396 typedef union
1398 struct
1400 unsigned C1NCH0 : 1;
1401 unsigned C1NCH1 : 1;
1402 unsigned : 1;
1403 unsigned : 1;
1404 unsigned C1PCH0 : 1;
1405 unsigned C1PCH1 : 1;
1406 unsigned C1INTN : 1;
1407 unsigned C1INTP : 1;
1410 struct
1412 unsigned C1NCH : 2;
1413 unsigned : 6;
1416 struct
1418 unsigned : 4;
1419 unsigned C1PCH : 2;
1420 unsigned : 2;
1422 } __CM1CON1bits_t;
1424 extern __at(0x0112) volatile __CM1CON1bits_t CM1CON1bits;
1426 #define _C1NCH0 0x01
1427 #define _C1NCH1 0x02
1428 #define _C1PCH0 0x10
1429 #define _C1PCH1 0x20
1430 #define _C1INTN 0x40
1431 #define _C1INTP 0x80
1433 //==============================================================================
1436 //==============================================================================
1437 // CM2CON0 Bits
1439 extern __at(0x0113) __sfr CM2CON0;
1441 typedef struct
1443 unsigned C2SYNC : 1;
1444 unsigned C2HYS : 1;
1445 unsigned C2SP : 1;
1446 unsigned : 1;
1447 unsigned C2POL : 1;
1448 unsigned C2OE : 1;
1449 unsigned C2OUT : 1;
1450 unsigned C2ON : 1;
1451 } __CM2CON0bits_t;
1453 extern __at(0x0113) volatile __CM2CON0bits_t CM2CON0bits;
1455 #define _C2SYNC 0x01
1456 #define _C2HYS 0x02
1457 #define _C2SP 0x04
1458 #define _C2POL 0x10
1459 #define _C2OE 0x20
1460 #define _C2OUT 0x40
1461 #define _C2ON 0x80
1463 //==============================================================================
1466 //==============================================================================
1467 // CM2CON1 Bits
1469 extern __at(0x0114) __sfr CM2CON1;
1471 typedef union
1473 struct
1475 unsigned C2NCH0 : 1;
1476 unsigned C2NCH1 : 1;
1477 unsigned : 1;
1478 unsigned : 1;
1479 unsigned C2PCH0 : 1;
1480 unsigned C2PCH1 : 1;
1481 unsigned C2INTN : 1;
1482 unsigned C2INTP : 1;
1485 struct
1487 unsigned C2NCH : 2;
1488 unsigned : 6;
1491 struct
1493 unsigned : 4;
1494 unsigned C2PCH : 2;
1495 unsigned : 2;
1497 } __CM2CON1bits_t;
1499 extern __at(0x0114) volatile __CM2CON1bits_t CM2CON1bits;
1501 #define _C2NCH0 0x01
1502 #define _C2NCH1 0x02
1503 #define _C2PCH0 0x10
1504 #define _C2PCH1 0x20
1505 #define _C2INTN 0x40
1506 #define _C2INTP 0x80
1508 //==============================================================================
1511 //==============================================================================
1512 // CMOUT Bits
1514 extern __at(0x0115) __sfr CMOUT;
1516 typedef struct
1518 unsigned MC1OUT : 1;
1519 unsigned MC2OUT : 1;
1520 unsigned : 1;
1521 unsigned : 1;
1522 unsigned : 1;
1523 unsigned : 1;
1524 unsigned : 1;
1525 unsigned : 1;
1526 } __CMOUTbits_t;
1528 extern __at(0x0115) volatile __CMOUTbits_t CMOUTbits;
1530 #define _MC1OUT 0x01
1531 #define _MC2OUT 0x02
1533 //==============================================================================
1536 //==============================================================================
1537 // BORCON Bits
1539 extern __at(0x0116) __sfr BORCON;
1541 typedef struct
1543 unsigned BORRDY : 1;
1544 unsigned : 1;
1545 unsigned : 1;
1546 unsigned : 1;
1547 unsigned : 1;
1548 unsigned : 1;
1549 unsigned : 1;
1550 unsigned SBOREN : 1;
1551 } __BORCONbits_t;
1553 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1555 #define _BORRDY 0x01
1556 #define _SBOREN 0x80
1558 //==============================================================================
1561 //==============================================================================
1562 // FVRCON Bits
1564 extern __at(0x0117) __sfr FVRCON;
1566 typedef union
1568 struct
1570 unsigned ADFVR0 : 1;
1571 unsigned ADFVR1 : 1;
1572 unsigned CDAFVR0 : 1;
1573 unsigned CDAFVR1 : 1;
1574 unsigned TSRNG : 1;
1575 unsigned TSEN : 1;
1576 unsigned FVRRDY : 1;
1577 unsigned FVREN : 1;
1580 struct
1582 unsigned ADFVR : 2;
1583 unsigned : 6;
1586 struct
1588 unsigned : 2;
1589 unsigned CDAFVR : 2;
1590 unsigned : 4;
1592 } __FVRCONbits_t;
1594 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1596 #define _ADFVR0 0x01
1597 #define _ADFVR1 0x02
1598 #define _CDAFVR0 0x04
1599 #define _CDAFVR1 0x08
1600 #define _TSRNG 0x10
1601 #define _TSEN 0x20
1602 #define _FVRRDY 0x40
1603 #define _FVREN 0x80
1605 //==============================================================================
1608 //==============================================================================
1609 // DACCON0 Bits
1611 extern __at(0x0118) __sfr DACCON0;
1613 typedef union
1615 struct
1617 unsigned DACNSS : 1;
1618 unsigned : 1;
1619 unsigned DACPSS0 : 1;
1620 unsigned DACPSS1 : 1;
1621 unsigned : 1;
1622 unsigned DACOE : 1;
1623 unsigned DACLPS : 1;
1624 unsigned DACEN : 1;
1627 struct
1629 unsigned : 2;
1630 unsigned DACPSS : 2;
1631 unsigned : 4;
1633 } __DACCON0bits_t;
1635 extern __at(0x0118) volatile __DACCON0bits_t DACCON0bits;
1637 #define _DACNSS 0x01
1638 #define _DACPSS0 0x04
1639 #define _DACPSS1 0x08
1640 #define _DACOE 0x20
1641 #define _DACLPS 0x40
1642 #define _DACEN 0x80
1644 //==============================================================================
1647 //==============================================================================
1648 // DACCON1 Bits
1650 extern __at(0x0119) __sfr DACCON1;
1652 typedef union
1654 struct
1656 unsigned DACR0 : 1;
1657 unsigned DACR1 : 1;
1658 unsigned DACR2 : 1;
1659 unsigned DACR3 : 1;
1660 unsigned DACR4 : 1;
1661 unsigned : 1;
1662 unsigned : 1;
1663 unsigned : 1;
1666 struct
1668 unsigned DACR : 5;
1669 unsigned : 3;
1671 } __DACCON1bits_t;
1673 extern __at(0x0119) volatile __DACCON1bits_t DACCON1bits;
1675 #define _DACR0 0x01
1676 #define _DACR1 0x02
1677 #define _DACR2 0x04
1678 #define _DACR3 0x08
1679 #define _DACR4 0x10
1681 //==============================================================================
1684 //==============================================================================
1685 // SRCON0 Bits
1687 extern __at(0x011A) __sfr SRCON0;
1689 typedef union
1691 struct
1693 unsigned SRPR : 1;
1694 unsigned SRPS : 1;
1695 unsigned SRNQEN : 1;
1696 unsigned SRQEN : 1;
1697 unsigned SRCLK0 : 1;
1698 unsigned SRCLK1 : 1;
1699 unsigned SRCLK2 : 1;
1700 unsigned SRLEN : 1;
1703 struct
1705 unsigned : 4;
1706 unsigned SRCLK : 3;
1707 unsigned : 1;
1709 } __SRCON0bits_t;
1711 extern __at(0x011A) volatile __SRCON0bits_t SRCON0bits;
1713 #define _SRPR 0x01
1714 #define _SRPS 0x02
1715 #define _SRNQEN 0x04
1716 #define _SRQEN 0x08
1717 #define _SRCLK0 0x10
1718 #define _SRCLK1 0x20
1719 #define _SRCLK2 0x40
1720 #define _SRLEN 0x80
1722 //==============================================================================
1725 //==============================================================================
1726 // SRCON1 Bits
1728 extern __at(0x011B) __sfr SRCON1;
1730 typedef struct
1732 unsigned SRRC1E : 1;
1733 unsigned SRRC2E : 1;
1734 unsigned SRRCKE : 1;
1735 unsigned SRRPE : 1;
1736 unsigned SRSC1E : 1;
1737 unsigned SRSC2E : 1;
1738 unsigned SRSCKE : 1;
1739 unsigned SRSPE : 1;
1740 } __SRCON1bits_t;
1742 extern __at(0x011B) volatile __SRCON1bits_t SRCON1bits;
1744 #define _SRRC1E 0x01
1745 #define _SRRC2E 0x02
1746 #define _SRRCKE 0x04
1747 #define _SRRPE 0x08
1748 #define _SRSC1E 0x10
1749 #define _SRSC2E 0x20
1750 #define _SRSCKE 0x40
1751 #define _SRSPE 0x80
1753 //==============================================================================
1756 //==============================================================================
1757 // APFCON0 Bits
1759 extern __at(0x011D) __sfr APFCON0;
1761 typedef struct
1763 unsigned : 1;
1764 unsigned : 1;
1765 unsigned TXCKSEL : 1;
1766 unsigned T1GSEL : 1;
1767 unsigned : 1;
1768 unsigned : 1;
1769 unsigned : 1;
1770 unsigned RXDTSEL : 1;
1771 } __APFCON0bits_t;
1773 extern __at(0x011D) volatile __APFCON0bits_t APFCON0bits;
1775 #define _TXCKSEL 0x04
1776 #define _T1GSEL 0x08
1777 #define _RXDTSEL 0x80
1779 //==============================================================================
1782 //==============================================================================
1783 // APFCON1 Bits
1785 extern __at(0x011E) __sfr APFCON1;
1787 typedef struct
1789 unsigned CCP2SEL : 1;
1790 unsigned P2BSEL : 1;
1791 unsigned P1CSEL : 1;
1792 unsigned P1DSEL : 1;
1793 unsigned : 1;
1794 unsigned : 1;
1795 unsigned : 1;
1796 unsigned : 1;
1797 } __APFCON1bits_t;
1799 extern __at(0x011E) volatile __APFCON1bits_t APFCON1bits;
1801 #define _CCP2SEL 0x01
1802 #define _P2BSEL 0x02
1803 #define _P1CSEL 0x04
1804 #define _P1DSEL 0x08
1806 //==============================================================================
1809 //==============================================================================
1810 // ANSELA Bits
1812 extern __at(0x018C) __sfr ANSELA;
1814 typedef struct
1816 unsigned ANSA0 : 1;
1817 unsigned ANSA1 : 1;
1818 unsigned ANSA2 : 1;
1819 unsigned : 1;
1820 unsigned ANSA4 : 1;
1821 unsigned : 1;
1822 unsigned : 1;
1823 unsigned : 1;
1824 } __ANSELAbits_t;
1826 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1828 #define _ANSA0 0x01
1829 #define _ANSA1 0x02
1830 #define _ANSA2 0x04
1831 #define _ANSA4 0x10
1833 //==============================================================================
1836 //==============================================================================
1837 // ANSELB Bits
1839 extern __at(0x018D) __sfr ANSELB;
1841 typedef struct
1843 unsigned : 1;
1844 unsigned : 1;
1845 unsigned : 1;
1846 unsigned : 1;
1847 unsigned ANSB4 : 1;
1848 unsigned ANSB5 : 1;
1849 unsigned : 1;
1850 unsigned : 1;
1851 } __ANSELBbits_t;
1853 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1855 #define _ANSB4 0x10
1856 #define _ANSB5 0x20
1858 //==============================================================================
1861 //==============================================================================
1862 // ANSELC Bits
1864 extern __at(0x018E) __sfr ANSELC;
1866 typedef struct
1868 unsigned ANSC0 : 1;
1869 unsigned ANSC1 : 1;
1870 unsigned ANSC2 : 1;
1871 unsigned ANSC3 : 1;
1872 unsigned : 1;
1873 unsigned : 1;
1874 unsigned ANSC6 : 1;
1875 unsigned ANSC7 : 1;
1876 } __ANSELCbits_t;
1878 extern __at(0x018E) volatile __ANSELCbits_t ANSELCbits;
1880 #define _ANSC0 0x01
1881 #define _ANSC1 0x02
1882 #define _ANSC2 0x04
1883 #define _ANSC3 0x08
1884 #define _ANSC6 0x40
1885 #define _ANSC7 0x80
1887 //==============================================================================
1889 extern __at(0x0191) __sfr EEADR;
1890 extern __at(0x0191) __sfr EEADRL;
1891 extern __at(0x0192) __sfr EEADRH;
1892 extern __at(0x0193) __sfr EEDAT;
1893 extern __at(0x0193) __sfr EEDATL;
1894 extern __at(0x0194) __sfr EEDATH;
1896 //==============================================================================
1897 // EECON1 Bits
1899 extern __at(0x0195) __sfr EECON1;
1901 typedef struct
1903 unsigned RD : 1;
1904 unsigned WR : 1;
1905 unsigned WREN : 1;
1906 unsigned WRERR : 1;
1907 unsigned FREE : 1;
1908 unsigned LWLO : 1;
1909 unsigned CFGS : 1;
1910 unsigned EEPGD : 1;
1911 } __EECON1bits_t;
1913 extern __at(0x0195) volatile __EECON1bits_t EECON1bits;
1915 #define _RD 0x01
1916 #define _WR 0x02
1917 #define _WREN 0x04
1918 #define _WRERR 0x08
1919 #define _FREE 0x10
1920 #define _LWLO 0x20
1921 #define _CFGS 0x40
1922 #define _EEPGD 0x80
1924 //==============================================================================
1926 extern __at(0x0196) __sfr EECON2;
1927 extern __at(0x0199) __sfr RCREG;
1928 extern __at(0x019A) __sfr TXREG;
1929 extern __at(0x019B) __sfr SP1BRG;
1930 extern __at(0x019B) __sfr SP1BRGL;
1931 extern __at(0x019B) __sfr SPBRG;
1932 extern __at(0x019B) __sfr SPBRGL;
1933 extern __at(0x019C) __sfr SP1BRGH;
1934 extern __at(0x019C) __sfr SPBRGH;
1936 //==============================================================================
1937 // RCSTA Bits
1939 extern __at(0x019D) __sfr RCSTA;
1941 typedef struct
1943 unsigned RX9D : 1;
1944 unsigned OERR : 1;
1945 unsigned FERR : 1;
1946 unsigned ADDEN : 1;
1947 unsigned CREN : 1;
1948 unsigned SREN : 1;
1949 unsigned RX9 : 1;
1950 unsigned SPEN : 1;
1951 } __RCSTAbits_t;
1953 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
1955 #define _RX9D 0x01
1956 #define _OERR 0x02
1957 #define _FERR 0x04
1958 #define _ADDEN 0x08
1959 #define _CREN 0x10
1960 #define _SREN 0x20
1961 #define _RX9 0x40
1962 #define _SPEN 0x80
1964 //==============================================================================
1967 //==============================================================================
1968 // TXSTA Bits
1970 extern __at(0x019E) __sfr TXSTA;
1972 typedef struct
1974 unsigned TX9D : 1;
1975 unsigned TRMT : 1;
1976 unsigned BRGH : 1;
1977 unsigned SENDB : 1;
1978 unsigned SYNC : 1;
1979 unsigned TXEN : 1;
1980 unsigned TX9 : 1;
1981 unsigned CSRC : 1;
1982 } __TXSTAbits_t;
1984 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
1986 #define _TX9D 0x01
1987 #define _TRMT 0x02
1988 #define _BRGH 0x04
1989 #define _SENDB 0x08
1990 #define _SYNC 0x10
1991 #define _TXEN 0x20
1992 #define _TX9 0x40
1993 #define _CSRC 0x80
1995 //==============================================================================
1998 //==============================================================================
1999 // BAUDCON Bits
2001 extern __at(0x019F) __sfr BAUDCON;
2003 typedef struct
2005 unsigned ABDEN : 1;
2006 unsigned WUE : 1;
2007 unsigned : 1;
2008 unsigned BRG16 : 1;
2009 unsigned SCKP : 1;
2010 unsigned : 1;
2011 unsigned RCIDL : 1;
2012 unsigned ABDOVF : 1;
2013 } __BAUDCONbits_t;
2015 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
2017 #define _ABDEN 0x01
2018 #define _WUE 0x02
2019 #define _BRG16 0x08
2020 #define _SCKP 0x10
2021 #define _RCIDL 0x40
2022 #define _ABDOVF 0x80
2024 //==============================================================================
2027 //==============================================================================
2028 // WPUA Bits
2030 extern __at(0x020C) __sfr WPUA;
2032 typedef union
2034 struct
2036 unsigned WPUA0 : 1;
2037 unsigned WPUA1 : 1;
2038 unsigned WPUA2 : 1;
2039 unsigned WPUA3 : 1;
2040 unsigned WPUA4 : 1;
2041 unsigned WPUA5 : 1;
2042 unsigned : 1;
2043 unsigned : 1;
2046 struct
2048 unsigned WPUA : 6;
2049 unsigned : 2;
2051 } __WPUAbits_t;
2053 extern __at(0x020C) volatile __WPUAbits_t WPUAbits;
2055 #define _WPUA0 0x01
2056 #define _WPUA1 0x02
2057 #define _WPUA2 0x04
2058 #define _WPUA3 0x08
2059 #define _WPUA4 0x10
2060 #define _WPUA5 0x20
2062 //==============================================================================
2065 //==============================================================================
2066 // WPUB Bits
2068 extern __at(0x020D) __sfr WPUB;
2070 typedef struct
2072 unsigned : 1;
2073 unsigned : 1;
2074 unsigned : 1;
2075 unsigned : 1;
2076 unsigned WPUB4 : 1;
2077 unsigned WPUB5 : 1;
2078 unsigned WPUB6 : 1;
2079 unsigned WPUB7 : 1;
2080 } __WPUBbits_t;
2082 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
2084 #define _WPUB4 0x10
2085 #define _WPUB5 0x20
2086 #define _WPUB6 0x40
2087 #define _WPUB7 0x80
2089 //==============================================================================
2092 //==============================================================================
2093 // WPUC Bits
2095 extern __at(0x020E) __sfr WPUC;
2097 typedef struct
2099 unsigned WPUC0 : 1;
2100 unsigned WPUC1 : 1;
2101 unsigned WPUC2 : 1;
2102 unsigned WPUC3 : 1;
2103 unsigned WPUC4 : 1;
2104 unsigned WPUC5 : 1;
2105 unsigned WPUC6 : 1;
2106 unsigned WPUC7 : 1;
2107 } __WPUCbits_t;
2109 extern __at(0x020E) volatile __WPUCbits_t WPUCbits;
2111 #define _WPUC0 0x01
2112 #define _WPUC1 0x02
2113 #define _WPUC2 0x04
2114 #define _WPUC3 0x08
2115 #define _WPUC4 0x10
2116 #define _WPUC5 0x20
2117 #define _WPUC6 0x40
2118 #define _WPUC7 0x80
2120 //==============================================================================
2122 extern __at(0x0211) __sfr SSP1BUF;
2123 extern __at(0x0211) __sfr SSPBUF;
2124 extern __at(0x0212) __sfr SSP1ADD;
2125 extern __at(0x0212) __sfr SSPADD;
2126 extern __at(0x0213) __sfr SSP1MSK;
2127 extern __at(0x0213) __sfr SSPMSK;
2129 //==============================================================================
2130 // SSP1STAT Bits
2132 extern __at(0x0214) __sfr SSP1STAT;
2134 typedef struct
2136 unsigned BF : 1;
2137 unsigned UA : 1;
2138 unsigned R_NOT_W : 1;
2139 unsigned S : 1;
2140 unsigned P : 1;
2141 unsigned D_NOT_A : 1;
2142 unsigned CKE : 1;
2143 unsigned SMP : 1;
2144 } __SSP1STATbits_t;
2146 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
2148 #define _BF 0x01
2149 #define _UA 0x02
2150 #define _R_NOT_W 0x04
2151 #define _S 0x08
2152 #define _P 0x10
2153 #define _D_NOT_A 0x20
2154 #define _CKE 0x40
2155 #define _SMP 0x80
2157 //==============================================================================
2160 //==============================================================================
2161 // SSPSTAT Bits
2163 extern __at(0x0214) __sfr SSPSTAT;
2165 typedef struct
2167 unsigned BF : 1;
2168 unsigned UA : 1;
2169 unsigned R_NOT_W : 1;
2170 unsigned S : 1;
2171 unsigned P : 1;
2172 unsigned D_NOT_A : 1;
2173 unsigned CKE : 1;
2174 unsigned SMP : 1;
2175 } __SSPSTATbits_t;
2177 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
2179 #define _SSPSTAT_BF 0x01
2180 #define _SSPSTAT_UA 0x02
2181 #define _SSPSTAT_R_NOT_W 0x04
2182 #define _SSPSTAT_S 0x08
2183 #define _SSPSTAT_P 0x10
2184 #define _SSPSTAT_D_NOT_A 0x20
2185 #define _SSPSTAT_CKE 0x40
2186 #define _SSPSTAT_SMP 0x80
2188 //==============================================================================
2191 //==============================================================================
2192 // SSP1CON Bits
2194 extern __at(0x0215) __sfr SSP1CON;
2196 typedef union
2198 struct
2200 unsigned SSPM0 : 1;
2201 unsigned SSPM1 : 1;
2202 unsigned SSPM2 : 1;
2203 unsigned SSPM3 : 1;
2204 unsigned CKP : 1;
2205 unsigned SSPEN : 1;
2206 unsigned SSPOV : 1;
2207 unsigned WCOL : 1;
2210 struct
2212 unsigned SSPM : 4;
2213 unsigned : 4;
2215 } __SSP1CONbits_t;
2217 extern __at(0x0215) volatile __SSP1CONbits_t SSP1CONbits;
2219 #define _SSPM0 0x01
2220 #define _SSPM1 0x02
2221 #define _SSPM2 0x04
2222 #define _SSPM3 0x08
2223 #define _CKP 0x10
2224 #define _SSPEN 0x20
2225 #define _SSPOV 0x40
2226 #define _WCOL 0x80
2228 //==============================================================================
2231 //==============================================================================
2232 // SSP1CON1 Bits
2234 extern __at(0x0215) __sfr SSP1CON1;
2236 typedef union
2238 struct
2240 unsigned SSPM0 : 1;
2241 unsigned SSPM1 : 1;
2242 unsigned SSPM2 : 1;
2243 unsigned SSPM3 : 1;
2244 unsigned CKP : 1;
2245 unsigned SSPEN : 1;
2246 unsigned SSPOV : 1;
2247 unsigned WCOL : 1;
2250 struct
2252 unsigned SSPM : 4;
2253 unsigned : 4;
2255 } __SSP1CON1bits_t;
2257 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
2259 #define _SSP1CON1_SSPM0 0x01
2260 #define _SSP1CON1_SSPM1 0x02
2261 #define _SSP1CON1_SSPM2 0x04
2262 #define _SSP1CON1_SSPM3 0x08
2263 #define _SSP1CON1_CKP 0x10
2264 #define _SSP1CON1_SSPEN 0x20
2265 #define _SSP1CON1_SSPOV 0x40
2266 #define _SSP1CON1_WCOL 0x80
2268 //==============================================================================
2271 //==============================================================================
2272 // SSPCON Bits
2274 extern __at(0x0215) __sfr SSPCON;
2276 typedef union
2278 struct
2280 unsigned SSPM0 : 1;
2281 unsigned SSPM1 : 1;
2282 unsigned SSPM2 : 1;
2283 unsigned SSPM3 : 1;
2284 unsigned CKP : 1;
2285 unsigned SSPEN : 1;
2286 unsigned SSPOV : 1;
2287 unsigned WCOL : 1;
2290 struct
2292 unsigned SSPM : 4;
2293 unsigned : 4;
2295 } __SSPCONbits_t;
2297 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
2299 #define _SSPCON_SSPM0 0x01
2300 #define _SSPCON_SSPM1 0x02
2301 #define _SSPCON_SSPM2 0x04
2302 #define _SSPCON_SSPM3 0x08
2303 #define _SSPCON_CKP 0x10
2304 #define _SSPCON_SSPEN 0x20
2305 #define _SSPCON_SSPOV 0x40
2306 #define _SSPCON_WCOL 0x80
2308 //==============================================================================
2311 //==============================================================================
2312 // SSPCON1 Bits
2314 extern __at(0x0215) __sfr SSPCON1;
2316 typedef union
2318 struct
2320 unsigned SSPM0 : 1;
2321 unsigned SSPM1 : 1;
2322 unsigned SSPM2 : 1;
2323 unsigned SSPM3 : 1;
2324 unsigned CKP : 1;
2325 unsigned SSPEN : 1;
2326 unsigned SSPOV : 1;
2327 unsigned WCOL : 1;
2330 struct
2332 unsigned SSPM : 4;
2333 unsigned : 4;
2335 } __SSPCON1bits_t;
2337 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
2339 #define _SSPCON1_SSPM0 0x01
2340 #define _SSPCON1_SSPM1 0x02
2341 #define _SSPCON1_SSPM2 0x04
2342 #define _SSPCON1_SSPM3 0x08
2343 #define _SSPCON1_CKP 0x10
2344 #define _SSPCON1_SSPEN 0x20
2345 #define _SSPCON1_SSPOV 0x40
2346 #define _SSPCON1_WCOL 0x80
2348 //==============================================================================
2351 //==============================================================================
2352 // SSP1CON2 Bits
2354 extern __at(0x0216) __sfr SSP1CON2;
2356 typedef struct
2358 unsigned SEN : 1;
2359 unsigned RSEN : 1;
2360 unsigned PEN : 1;
2361 unsigned RCEN : 1;
2362 unsigned ACKEN : 1;
2363 unsigned ACKDT : 1;
2364 unsigned ACKSTAT : 1;
2365 unsigned GCEN : 1;
2366 } __SSP1CON2bits_t;
2368 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
2370 #define _SEN 0x01
2371 #define _RSEN 0x02
2372 #define _PEN 0x04
2373 #define _RCEN 0x08
2374 #define _ACKEN 0x10
2375 #define _ACKDT 0x20
2376 #define _ACKSTAT 0x40
2377 #define _GCEN 0x80
2379 //==============================================================================
2382 //==============================================================================
2383 // SSPCON2 Bits
2385 extern __at(0x0216) __sfr SSPCON2;
2387 typedef struct
2389 unsigned SEN : 1;
2390 unsigned RSEN : 1;
2391 unsigned PEN : 1;
2392 unsigned RCEN : 1;
2393 unsigned ACKEN : 1;
2394 unsigned ACKDT : 1;
2395 unsigned ACKSTAT : 1;
2396 unsigned GCEN : 1;
2397 } __SSPCON2bits_t;
2399 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
2401 #define _SSPCON2_SEN 0x01
2402 #define _SSPCON2_RSEN 0x02
2403 #define _SSPCON2_PEN 0x04
2404 #define _SSPCON2_RCEN 0x08
2405 #define _SSPCON2_ACKEN 0x10
2406 #define _SSPCON2_ACKDT 0x20
2407 #define _SSPCON2_ACKSTAT 0x40
2408 #define _SSPCON2_GCEN 0x80
2410 //==============================================================================
2413 //==============================================================================
2414 // SSP1CON3 Bits
2416 extern __at(0x0217) __sfr SSP1CON3;
2418 typedef struct
2420 unsigned DHEN : 1;
2421 unsigned AHEN : 1;
2422 unsigned SBCDE : 1;
2423 unsigned SDAHT : 1;
2424 unsigned BOEN : 1;
2425 unsigned SCIE : 1;
2426 unsigned PCIE : 1;
2427 unsigned ACKTIM : 1;
2428 } __SSP1CON3bits_t;
2430 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
2432 #define _DHEN 0x01
2433 #define _AHEN 0x02
2434 #define _SBCDE 0x04
2435 #define _SDAHT 0x08
2436 #define _BOEN 0x10
2437 #define _SCIE 0x20
2438 #define _PCIE 0x40
2439 #define _ACKTIM 0x80
2441 //==============================================================================
2444 //==============================================================================
2445 // SSPCON3 Bits
2447 extern __at(0x0217) __sfr SSPCON3;
2449 typedef struct
2451 unsigned DHEN : 1;
2452 unsigned AHEN : 1;
2453 unsigned SBCDE : 1;
2454 unsigned SDAHT : 1;
2455 unsigned BOEN : 1;
2456 unsigned SCIE : 1;
2457 unsigned PCIE : 1;
2458 unsigned ACKTIM : 1;
2459 } __SSPCON3bits_t;
2461 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
2463 #define _SSPCON3_DHEN 0x01
2464 #define _SSPCON3_AHEN 0x02
2465 #define _SSPCON3_SBCDE 0x04
2466 #define _SSPCON3_SDAHT 0x08
2467 #define _SSPCON3_BOEN 0x10
2468 #define _SSPCON3_SCIE 0x20
2469 #define _SSPCON3_PCIE 0x40
2470 #define _SSPCON3_ACKTIM 0x80
2472 //==============================================================================
2474 extern __at(0x0291) __sfr CCPR1;
2475 extern __at(0x0291) __sfr CCPR1L;
2476 extern __at(0x0292) __sfr CCPR1H;
2478 //==============================================================================
2479 // CCP1CON Bits
2481 extern __at(0x0293) __sfr CCP1CON;
2483 typedef union
2485 struct
2487 unsigned CCP1M0 : 1;
2488 unsigned CCP1M1 : 1;
2489 unsigned CCP1M2 : 1;
2490 unsigned CCP1M3 : 1;
2491 unsigned DC1B0 : 1;
2492 unsigned DC1B1 : 1;
2493 unsigned P1M0 : 1;
2494 unsigned P1M1 : 1;
2497 struct
2499 unsigned CCP1M : 4;
2500 unsigned : 4;
2503 struct
2505 unsigned : 4;
2506 unsigned DC1B : 2;
2507 unsigned : 2;
2510 struct
2512 unsigned : 6;
2513 unsigned P1M : 2;
2515 } __CCP1CONbits_t;
2517 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
2519 #define _CCP1M0 0x01
2520 #define _CCP1M1 0x02
2521 #define _CCP1M2 0x04
2522 #define _CCP1M3 0x08
2523 #define _DC1B0 0x10
2524 #define _DC1B1 0x20
2525 #define _P1M0 0x40
2526 #define _P1M1 0x80
2528 //==============================================================================
2531 //==============================================================================
2532 // PWM1CON Bits
2534 extern __at(0x0294) __sfr PWM1CON;
2536 typedef union
2538 struct
2540 unsigned P1DC0 : 1;
2541 unsigned P1DC1 : 1;
2542 unsigned P1DC2 : 1;
2543 unsigned P1DC3 : 1;
2544 unsigned P1DC4 : 1;
2545 unsigned P1DC5 : 1;
2546 unsigned P1DC6 : 1;
2547 unsigned P1RSEN : 1;
2550 struct
2552 unsigned P1DC : 7;
2553 unsigned : 1;
2555 } __PWM1CONbits_t;
2557 extern __at(0x0294) volatile __PWM1CONbits_t PWM1CONbits;
2559 #define _P1DC0 0x01
2560 #define _P1DC1 0x02
2561 #define _P1DC2 0x04
2562 #define _P1DC3 0x08
2563 #define _P1DC4 0x10
2564 #define _P1DC5 0x20
2565 #define _P1DC6 0x40
2566 #define _P1RSEN 0x80
2568 //==============================================================================
2571 //==============================================================================
2572 // CCP1AS Bits
2574 extern __at(0x0295) __sfr CCP1AS;
2576 typedef union
2578 struct
2580 unsigned PSS1BD0 : 1;
2581 unsigned PSS1BD1 : 1;
2582 unsigned PSS1AC0 : 1;
2583 unsigned PSS1AC1 : 1;
2584 unsigned CCP1AS0 : 1;
2585 unsigned CCP1AS1 : 1;
2586 unsigned CCP1AS2 : 1;
2587 unsigned CCP1ASE : 1;
2590 struct
2592 unsigned PSS1BD : 2;
2593 unsigned : 6;
2596 struct
2598 unsigned : 2;
2599 unsigned PSS1AC : 2;
2600 unsigned : 4;
2603 struct
2605 unsigned : 4;
2606 unsigned CCP1AS : 3;
2607 unsigned : 1;
2609 } __CCP1ASbits_t;
2611 extern __at(0x0295) volatile __CCP1ASbits_t CCP1ASbits;
2613 #define _PSS1BD0 0x01
2614 #define _PSS1BD1 0x02
2615 #define _PSS1AC0 0x04
2616 #define _PSS1AC1 0x08
2617 #define _CCP1AS0 0x10
2618 #define _CCP1AS1 0x20
2619 #define _CCP1AS2 0x40
2620 #define _CCP1ASE 0x80
2622 //==============================================================================
2625 //==============================================================================
2626 // ECCP1AS Bits
2628 extern __at(0x0295) __sfr ECCP1AS;
2630 typedef union
2632 struct
2634 unsigned PSS1BD0 : 1;
2635 unsigned PSS1BD1 : 1;
2636 unsigned PSS1AC0 : 1;
2637 unsigned PSS1AC1 : 1;
2638 unsigned CCP1AS0 : 1;
2639 unsigned CCP1AS1 : 1;
2640 unsigned CCP1AS2 : 1;
2641 unsigned CCP1ASE : 1;
2644 struct
2646 unsigned PSS1BD : 2;
2647 unsigned : 6;
2650 struct
2652 unsigned : 2;
2653 unsigned PSS1AC : 2;
2654 unsigned : 4;
2657 struct
2659 unsigned : 4;
2660 unsigned CCP1AS : 3;
2661 unsigned : 1;
2663 } __ECCP1ASbits_t;
2665 extern __at(0x0295) volatile __ECCP1ASbits_t ECCP1ASbits;
2667 #define _ECCP1AS_PSS1BD0 0x01
2668 #define _ECCP1AS_PSS1BD1 0x02
2669 #define _ECCP1AS_PSS1AC0 0x04
2670 #define _ECCP1AS_PSS1AC1 0x08
2671 #define _ECCP1AS_CCP1AS0 0x10
2672 #define _ECCP1AS_CCP1AS1 0x20
2673 #define _ECCP1AS_CCP1AS2 0x40
2674 #define _ECCP1AS_CCP1ASE 0x80
2676 //==============================================================================
2679 //==============================================================================
2680 // PSTR1CON Bits
2682 extern __at(0x0296) __sfr PSTR1CON;
2684 typedef struct
2686 unsigned STR1A : 1;
2687 unsigned STR1B : 1;
2688 unsigned STR1C : 1;
2689 unsigned STR1D : 1;
2690 unsigned STR1SYNC : 1;
2691 unsigned : 1;
2692 unsigned : 1;
2693 unsigned : 1;
2694 } __PSTR1CONbits_t;
2696 extern __at(0x0296) volatile __PSTR1CONbits_t PSTR1CONbits;
2698 #define _STR1A 0x01
2699 #define _STR1B 0x02
2700 #define _STR1C 0x04
2701 #define _STR1D 0x08
2702 #define _STR1SYNC 0x10
2704 //==============================================================================
2706 extern __at(0x0298) __sfr CCPR2;
2707 extern __at(0x0298) __sfr CCPR2L;
2708 extern __at(0x0299) __sfr CCPR2H;
2710 //==============================================================================
2711 // CCP2CON Bits
2713 extern __at(0x029A) __sfr CCP2CON;
2715 typedef union
2717 struct
2719 unsigned CCP2M0 : 1;
2720 unsigned CCP2M1 : 1;
2721 unsigned CCP2M2 : 1;
2722 unsigned CCP2M3 : 1;
2723 unsigned DC2B0 : 1;
2724 unsigned DC2B1 : 1;
2725 unsigned P2M0 : 1;
2726 unsigned P2M1 : 1;
2729 struct
2731 unsigned CCP2M : 4;
2732 unsigned : 4;
2735 struct
2737 unsigned : 4;
2738 unsigned DC2B : 2;
2739 unsigned : 2;
2742 struct
2744 unsigned : 6;
2745 unsigned P2M : 2;
2747 } __CCP2CONbits_t;
2749 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
2751 #define _CCP2M0 0x01
2752 #define _CCP2M1 0x02
2753 #define _CCP2M2 0x04
2754 #define _CCP2M3 0x08
2755 #define _DC2B0 0x10
2756 #define _DC2B1 0x20
2757 #define _P2M0 0x40
2758 #define _P2M1 0x80
2760 //==============================================================================
2763 //==============================================================================
2764 // PWM2CON Bits
2766 extern __at(0x029B) __sfr PWM2CON;
2768 typedef union
2770 struct
2772 unsigned P2DC0 : 1;
2773 unsigned P2DC1 : 1;
2774 unsigned P2DC2 : 1;
2775 unsigned P2DC3 : 1;
2776 unsigned P2DC4 : 1;
2777 unsigned P2DC5 : 1;
2778 unsigned P2DC6 : 1;
2779 unsigned P2RSEN : 1;
2782 struct
2784 unsigned P2DC : 7;
2785 unsigned : 1;
2787 } __PWM2CONbits_t;
2789 extern __at(0x029B) volatile __PWM2CONbits_t PWM2CONbits;
2791 #define _P2DC0 0x01
2792 #define _P2DC1 0x02
2793 #define _P2DC2 0x04
2794 #define _P2DC3 0x08
2795 #define _P2DC4 0x10
2796 #define _P2DC5 0x20
2797 #define _P2DC6 0x40
2798 #define _P2RSEN 0x80
2800 //==============================================================================
2803 //==============================================================================
2804 // CCP2AS Bits
2806 extern __at(0x029C) __sfr CCP2AS;
2808 typedef union
2810 struct
2812 unsigned PSS2BD0 : 1;
2813 unsigned PSS2BD1 : 1;
2814 unsigned PSS2AC0 : 1;
2815 unsigned PSS2AC1 : 1;
2816 unsigned CCP2AS0 : 1;
2817 unsigned CCP2AS1 : 1;
2818 unsigned CCP2AS2 : 1;
2819 unsigned CCP2ASE : 1;
2822 struct
2824 unsigned PSS2BD : 2;
2825 unsigned : 6;
2828 struct
2830 unsigned : 2;
2831 unsigned PSS2AC : 2;
2832 unsigned : 4;
2835 struct
2837 unsigned : 4;
2838 unsigned CCP2AS : 3;
2839 unsigned : 1;
2841 } __CCP2ASbits_t;
2843 extern __at(0x029C) volatile __CCP2ASbits_t CCP2ASbits;
2845 #define _PSS2BD0 0x01
2846 #define _PSS2BD1 0x02
2847 #define _PSS2AC0 0x04
2848 #define _PSS2AC1 0x08
2849 #define _CCP2AS0 0x10
2850 #define _CCP2AS1 0x20
2851 #define _CCP2AS2 0x40
2852 #define _CCP2ASE 0x80
2854 //==============================================================================
2857 //==============================================================================
2858 // PSTR2CON Bits
2860 extern __at(0x029D) __sfr PSTR2CON;
2862 typedef struct
2864 unsigned STR2A : 1;
2865 unsigned STR2B : 1;
2866 unsigned STR2C : 1;
2867 unsigned STR2D : 1;
2868 unsigned STR2SYNC : 1;
2869 unsigned : 1;
2870 unsigned : 1;
2871 unsigned : 1;
2872 } __PSTR2CONbits_t;
2874 extern __at(0x029D) volatile __PSTR2CONbits_t PSTR2CONbits;
2876 #define _STR2A 0x01
2877 #define _STR2B 0x02
2878 #define _STR2C 0x04
2879 #define _STR2D 0x08
2880 #define _STR2SYNC 0x10
2882 //==============================================================================
2885 //==============================================================================
2886 // CCPTMRS Bits
2888 extern __at(0x029E) __sfr CCPTMRS;
2890 typedef union
2892 struct
2894 unsigned C1TSEL0 : 1;
2895 unsigned C1TSEL1 : 1;
2896 unsigned C2TSEL0 : 1;
2897 unsigned C2TSEL1 : 1;
2898 unsigned C3TSEL0 : 1;
2899 unsigned C3TSEL1 : 1;
2900 unsigned C4TSEL0 : 1;
2901 unsigned C4TSEL1 : 1;
2904 struct
2906 unsigned C1TSEL : 2;
2907 unsigned : 6;
2910 struct
2912 unsigned : 2;
2913 unsigned C2TSEL : 2;
2914 unsigned : 4;
2917 struct
2919 unsigned : 4;
2920 unsigned C3TSEL : 2;
2921 unsigned : 2;
2924 struct
2926 unsigned : 6;
2927 unsigned C4TSEL : 2;
2929 } __CCPTMRSbits_t;
2931 extern __at(0x029E) volatile __CCPTMRSbits_t CCPTMRSbits;
2933 #define _C1TSEL0 0x01
2934 #define _C1TSEL1 0x02
2935 #define _C2TSEL0 0x04
2936 #define _C2TSEL1 0x08
2937 #define _C3TSEL0 0x10
2938 #define _C3TSEL1 0x20
2939 #define _C4TSEL0 0x40
2940 #define _C4TSEL1 0x80
2942 //==============================================================================
2945 //==============================================================================
2946 // CCPTMRS0 Bits
2948 extern __at(0x029E) __sfr CCPTMRS0;
2950 typedef union
2952 struct
2954 unsigned C1TSEL0 : 1;
2955 unsigned C1TSEL1 : 1;
2956 unsigned C2TSEL0 : 1;
2957 unsigned C2TSEL1 : 1;
2958 unsigned C3TSEL0 : 1;
2959 unsigned C3TSEL1 : 1;
2960 unsigned C4TSEL0 : 1;
2961 unsigned C4TSEL1 : 1;
2964 struct
2966 unsigned C1TSEL : 2;
2967 unsigned : 6;
2970 struct
2972 unsigned : 2;
2973 unsigned C2TSEL : 2;
2974 unsigned : 4;
2977 struct
2979 unsigned : 4;
2980 unsigned C3TSEL : 2;
2981 unsigned : 2;
2984 struct
2986 unsigned : 6;
2987 unsigned C4TSEL : 2;
2989 } __CCPTMRS0bits_t;
2991 extern __at(0x029E) volatile __CCPTMRS0bits_t CCPTMRS0bits;
2993 #define _CCPTMRS0_C1TSEL0 0x01
2994 #define _CCPTMRS0_C1TSEL1 0x02
2995 #define _CCPTMRS0_C2TSEL0 0x04
2996 #define _CCPTMRS0_C2TSEL1 0x08
2997 #define _CCPTMRS0_C3TSEL0 0x10
2998 #define _CCPTMRS0_C3TSEL1 0x20
2999 #define _CCPTMRS0_C4TSEL0 0x40
3000 #define _CCPTMRS0_C4TSEL1 0x80
3002 //==============================================================================
3004 extern __at(0x0311) __sfr CCPR3;
3005 extern __at(0x0311) __sfr CCPR3L;
3006 extern __at(0x0312) __sfr CCPR3H;
3008 //==============================================================================
3009 // CCP3CON Bits
3011 extern __at(0x0313) __sfr CCP3CON;
3013 typedef union
3015 struct
3017 unsigned CCP3M0 : 1;
3018 unsigned CCP3M1 : 1;
3019 unsigned CCP3M2 : 1;
3020 unsigned CCP3M3 : 1;
3021 unsigned DC3B0 : 1;
3022 unsigned DC3B1 : 1;
3023 unsigned : 1;
3024 unsigned : 1;
3027 struct
3029 unsigned CCP3M : 4;
3030 unsigned : 4;
3033 struct
3035 unsigned : 4;
3036 unsigned DC3B : 2;
3037 unsigned : 2;
3039 } __CCP3CONbits_t;
3041 extern __at(0x0313) volatile __CCP3CONbits_t CCP3CONbits;
3043 #define _CCP3M0 0x01
3044 #define _CCP3M1 0x02
3045 #define _CCP3M2 0x04
3046 #define _CCP3M3 0x08
3047 #define _DC3B0 0x10
3048 #define _DC3B1 0x20
3050 //==============================================================================
3052 extern __at(0x0318) __sfr CCPR4;
3053 extern __at(0x0318) __sfr CCPR4L;
3054 extern __at(0x0319) __sfr CCPR4H;
3056 //==============================================================================
3057 // CCP4CON Bits
3059 extern __at(0x031A) __sfr CCP4CON;
3061 typedef union
3063 struct
3065 unsigned CCP4M0 : 1;
3066 unsigned CCP4M1 : 1;
3067 unsigned CCP4M2 : 1;
3068 unsigned CCP4M3 : 1;
3069 unsigned DC4B0 : 1;
3070 unsigned DC4B1 : 1;
3071 unsigned : 1;
3072 unsigned : 1;
3075 struct
3077 unsigned CCP4M : 4;
3078 unsigned : 4;
3081 struct
3083 unsigned : 4;
3084 unsigned DC4B : 2;
3085 unsigned : 2;
3087 } __CCP4CONbits_t;
3089 extern __at(0x031A) volatile __CCP4CONbits_t CCP4CONbits;
3091 #define _CCP4M0 0x01
3092 #define _CCP4M1 0x02
3093 #define _CCP4M2 0x04
3094 #define _CCP4M3 0x08
3095 #define _DC4B0 0x10
3096 #define _DC4B1 0x20
3098 //==============================================================================
3101 //==============================================================================
3102 // INLVLA Bits
3104 extern __at(0x038C) __sfr INLVLA;
3106 typedef union
3108 struct
3110 unsigned INLVLA0 : 1;
3111 unsigned INLVLA1 : 1;
3112 unsigned INLVLA2 : 1;
3113 unsigned INLVLA3 : 1;
3114 unsigned INLVLA4 : 1;
3115 unsigned INLVLA5 : 1;
3116 unsigned : 1;
3117 unsigned : 1;
3120 struct
3122 unsigned INLVLA : 6;
3123 unsigned : 2;
3125 } __INLVLAbits_t;
3127 extern __at(0x038C) volatile __INLVLAbits_t INLVLAbits;
3129 #define _INLVLA0 0x01
3130 #define _INLVLA1 0x02
3131 #define _INLVLA2 0x04
3132 #define _INLVLA3 0x08
3133 #define _INLVLA4 0x10
3134 #define _INLVLA5 0x20
3136 //==============================================================================
3139 //==============================================================================
3140 // INLVLB Bits
3142 extern __at(0x038D) __sfr INLVLB;
3144 typedef struct
3146 unsigned : 1;
3147 unsigned : 1;
3148 unsigned : 1;
3149 unsigned : 1;
3150 unsigned INLVLB4 : 1;
3151 unsigned INLVLB5 : 1;
3152 unsigned INLVLB6 : 1;
3153 unsigned INLVLB7 : 1;
3154 } __INLVLBbits_t;
3156 extern __at(0x038D) volatile __INLVLBbits_t INLVLBbits;
3158 #define _INLVLB4 0x10
3159 #define _INLVLB5 0x20
3160 #define _INLVLB6 0x40
3161 #define _INLVLB7 0x80
3163 //==============================================================================
3166 //==============================================================================
3167 // INLVLC Bits
3169 extern __at(0x038E) __sfr INLVLC;
3171 typedef struct
3173 unsigned INLVLC0 : 1;
3174 unsigned INLVLC1 : 1;
3175 unsigned INLVLC2 : 1;
3176 unsigned INLVLC3 : 1;
3177 unsigned INLVLC4 : 1;
3178 unsigned INLVLC5 : 1;
3179 unsigned INLVLC6 : 1;
3180 unsigned INLVLC7 : 1;
3181 } __INLVLCbits_t;
3183 extern __at(0x038E) volatile __INLVLCbits_t INLVLCbits;
3185 #define _INLVLC0 0x01
3186 #define _INLVLC1 0x02
3187 #define _INLVLC2 0x04
3188 #define _INLVLC3 0x08
3189 #define _INLVLC4 0x10
3190 #define _INLVLC5 0x20
3191 #define _INLVLC6 0x40
3192 #define _INLVLC7 0x80
3194 //==============================================================================
3197 //==============================================================================
3198 // IOCAP Bits
3200 extern __at(0x0391) __sfr IOCAP;
3202 typedef union
3204 struct
3206 unsigned IOCAP0 : 1;
3207 unsigned IOCAP1 : 1;
3208 unsigned IOCAP2 : 1;
3209 unsigned IOCAP3 : 1;
3210 unsigned IOCAP4 : 1;
3211 unsigned IOCAP5 : 1;
3212 unsigned : 1;
3213 unsigned : 1;
3216 struct
3218 unsigned IOCAP : 6;
3219 unsigned : 2;
3221 } __IOCAPbits_t;
3223 extern __at(0x0391) volatile __IOCAPbits_t IOCAPbits;
3225 #define _IOCAP0 0x01
3226 #define _IOCAP1 0x02
3227 #define _IOCAP2 0x04
3228 #define _IOCAP3 0x08
3229 #define _IOCAP4 0x10
3230 #define _IOCAP5 0x20
3232 //==============================================================================
3235 //==============================================================================
3236 // IOCAN Bits
3238 extern __at(0x0392) __sfr IOCAN;
3240 typedef union
3242 struct
3244 unsigned IOCAN0 : 1;
3245 unsigned IOCAN1 : 1;
3246 unsigned IOCAN2 : 1;
3247 unsigned IOCAN3 : 1;
3248 unsigned IOCAN4 : 1;
3249 unsigned IOCAN5 : 1;
3250 unsigned : 1;
3251 unsigned : 1;
3254 struct
3256 unsigned IOCAN : 6;
3257 unsigned : 2;
3259 } __IOCANbits_t;
3261 extern __at(0x0392) volatile __IOCANbits_t IOCANbits;
3263 #define _IOCAN0 0x01
3264 #define _IOCAN1 0x02
3265 #define _IOCAN2 0x04
3266 #define _IOCAN3 0x08
3267 #define _IOCAN4 0x10
3268 #define _IOCAN5 0x20
3270 //==============================================================================
3273 //==============================================================================
3274 // IOCAF Bits
3276 extern __at(0x0393) __sfr IOCAF;
3278 typedef union
3280 struct
3282 unsigned IOCAF0 : 1;
3283 unsigned IOCAF1 : 1;
3284 unsigned IOCAF2 : 1;
3285 unsigned IOCAF3 : 1;
3286 unsigned IOCAF4 : 1;
3287 unsigned IOCAF5 : 1;
3288 unsigned : 1;
3289 unsigned : 1;
3292 struct
3294 unsigned IOCAF : 6;
3295 unsigned : 2;
3297 } __IOCAFbits_t;
3299 extern __at(0x0393) volatile __IOCAFbits_t IOCAFbits;
3301 #define _IOCAF0 0x01
3302 #define _IOCAF1 0x02
3303 #define _IOCAF2 0x04
3304 #define _IOCAF3 0x08
3305 #define _IOCAF4 0x10
3306 #define _IOCAF5 0x20
3308 //==============================================================================
3311 //==============================================================================
3312 // IOCBP Bits
3314 extern __at(0x0394) __sfr IOCBP;
3316 typedef struct
3318 unsigned : 1;
3319 unsigned : 1;
3320 unsigned : 1;
3321 unsigned : 1;
3322 unsigned IOCBP4 : 1;
3323 unsigned IOCBP5 : 1;
3324 unsigned IOCBP6 : 1;
3325 unsigned IOCBP7 : 1;
3326 } __IOCBPbits_t;
3328 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
3330 #define _IOCBP4 0x10
3331 #define _IOCBP5 0x20
3332 #define _IOCBP6 0x40
3333 #define _IOCBP7 0x80
3335 //==============================================================================
3338 //==============================================================================
3339 // IOCBN Bits
3341 extern __at(0x0395) __sfr IOCBN;
3343 typedef struct
3345 unsigned : 1;
3346 unsigned : 1;
3347 unsigned : 1;
3348 unsigned : 1;
3349 unsigned IOCBN4 : 1;
3350 unsigned IOCBN5 : 1;
3351 unsigned IOCBN6 : 1;
3352 unsigned IOCBN7 : 1;
3353 } __IOCBNbits_t;
3355 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
3357 #define _IOCBN4 0x10
3358 #define _IOCBN5 0x20
3359 #define _IOCBN6 0x40
3360 #define _IOCBN7 0x80
3362 //==============================================================================
3365 //==============================================================================
3366 // IOCBF Bits
3368 extern __at(0x0396) __sfr IOCBF;
3370 typedef struct
3372 unsigned : 1;
3373 unsigned : 1;
3374 unsigned : 1;
3375 unsigned : 1;
3376 unsigned IOCBF4 : 1;
3377 unsigned IOCBF5 : 1;
3378 unsigned IOCBF6 : 1;
3379 unsigned IOCBF7 : 1;
3380 } __IOCBFbits_t;
3382 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
3384 #define _IOCBF4 0x10
3385 #define _IOCBF5 0x20
3386 #define _IOCBF6 0x40
3387 #define _IOCBF7 0x80
3389 //==============================================================================
3392 //==============================================================================
3393 // CLKRCON Bits
3395 extern __at(0x039A) __sfr CLKRCON;
3397 typedef union
3399 struct
3401 unsigned CLKRDIV0 : 1;
3402 unsigned CLKRDIV1 : 1;
3403 unsigned CLKRDIV2 : 1;
3404 unsigned CLKRDC0 : 1;
3405 unsigned CLKRDC1 : 1;
3406 unsigned CLKRSLR : 1;
3407 unsigned CLKROE : 1;
3408 unsigned CLKREN : 1;
3411 struct
3413 unsigned CLKRDIV : 3;
3414 unsigned : 5;
3417 struct
3419 unsigned : 3;
3420 unsigned CLKRDC : 2;
3421 unsigned : 3;
3423 } __CLKRCONbits_t;
3425 extern __at(0x039A) volatile __CLKRCONbits_t CLKRCONbits;
3427 #define _CLKRDIV0 0x01
3428 #define _CLKRDIV1 0x02
3429 #define _CLKRDIV2 0x04
3430 #define _CLKRDC0 0x08
3431 #define _CLKRDC1 0x10
3432 #define _CLKRSLR 0x20
3433 #define _CLKROE 0x40
3434 #define _CLKREN 0x80
3436 //==============================================================================
3439 //==============================================================================
3440 // MDCON Bits
3442 extern __at(0x039C) __sfr MDCON;
3444 typedef struct
3446 unsigned MDBIT : 1;
3447 unsigned : 1;
3448 unsigned : 1;
3449 unsigned MDOUT : 1;
3450 unsigned MDOPOL : 1;
3451 unsigned MDSLR : 1;
3452 unsigned MDOE : 1;
3453 unsigned MDEN : 1;
3454 } __MDCONbits_t;
3456 extern __at(0x039C) volatile __MDCONbits_t MDCONbits;
3458 #define _MDBIT 0x01
3459 #define _MDOUT 0x08
3460 #define _MDOPOL 0x10
3461 #define _MDSLR 0x20
3462 #define _MDOE 0x40
3463 #define _MDEN 0x80
3465 //==============================================================================
3468 //==============================================================================
3469 // MDSRC Bits
3471 extern __at(0x039D) __sfr MDSRC;
3473 typedef union
3475 struct
3477 unsigned MDMS0 : 1;
3478 unsigned MDMS1 : 1;
3479 unsigned MDMS2 : 1;
3480 unsigned MDMS3 : 1;
3481 unsigned : 1;
3482 unsigned : 1;
3483 unsigned : 1;
3484 unsigned MDMSODIS : 1;
3487 struct
3489 unsigned MDMS : 4;
3490 unsigned : 4;
3492 } __MDSRCbits_t;
3494 extern __at(0x039D) volatile __MDSRCbits_t MDSRCbits;
3496 #define _MDMS0 0x01
3497 #define _MDMS1 0x02
3498 #define _MDMS2 0x04
3499 #define _MDMS3 0x08
3500 #define _MDMSODIS 0x80
3502 //==============================================================================
3505 //==============================================================================
3506 // MDCARL Bits
3508 extern __at(0x039E) __sfr MDCARL;
3510 typedef union
3512 struct
3514 unsigned MDCL0 : 1;
3515 unsigned MDCL1 : 1;
3516 unsigned MDCL2 : 1;
3517 unsigned MDCL3 : 1;
3518 unsigned : 1;
3519 unsigned MDCLSYNC : 1;
3520 unsigned MDCLPOL : 1;
3521 unsigned MDCLODIS : 1;
3524 struct
3526 unsigned MDCL : 4;
3527 unsigned : 4;
3529 } __MDCARLbits_t;
3531 extern __at(0x039E) volatile __MDCARLbits_t MDCARLbits;
3533 #define _MDCL0 0x01
3534 #define _MDCL1 0x02
3535 #define _MDCL2 0x04
3536 #define _MDCL3 0x08
3537 #define _MDCLSYNC 0x20
3538 #define _MDCLPOL 0x40
3539 #define _MDCLODIS 0x80
3541 //==============================================================================
3544 //==============================================================================
3545 // MDCARH Bits
3547 extern __at(0x039F) __sfr MDCARH;
3549 typedef union
3551 struct
3553 unsigned MDCH0 : 1;
3554 unsigned MDCH1 : 1;
3555 unsigned MDCH2 : 1;
3556 unsigned MDCH3 : 1;
3557 unsigned : 1;
3558 unsigned MDCHSYNC : 1;
3559 unsigned MDCHPOL : 1;
3560 unsigned MDCHODIS : 1;
3563 struct
3565 unsigned MDCH : 4;
3566 unsigned : 4;
3568 } __MDCARHbits_t;
3570 extern __at(0x039F) volatile __MDCARHbits_t MDCARHbits;
3572 #define _MDCH0 0x01
3573 #define _MDCH1 0x02
3574 #define _MDCH2 0x04
3575 #define _MDCH3 0x08
3576 #define _MDCHSYNC 0x20
3577 #define _MDCHPOL 0x40
3578 #define _MDCHODIS 0x80
3580 //==============================================================================
3582 extern __at(0x0415) __sfr TMR4;
3583 extern __at(0x0416) __sfr PR4;
3585 //==============================================================================
3586 // T4CON Bits
3588 extern __at(0x0417) __sfr T4CON;
3590 typedef union
3592 struct
3594 unsigned T4CKPS0 : 1;
3595 unsigned T4CKPS1 : 1;
3596 unsigned TMR4ON : 1;
3597 unsigned T4OUTPS0 : 1;
3598 unsigned T4OUTPS1 : 1;
3599 unsigned T4OUTPS2 : 1;
3600 unsigned T4OUTPS3 : 1;
3601 unsigned : 1;
3604 struct
3606 unsigned T4CKPS : 2;
3607 unsigned : 6;
3610 struct
3612 unsigned : 3;
3613 unsigned T4OUTPS : 4;
3614 unsigned : 1;
3616 } __T4CONbits_t;
3618 extern __at(0x0417) volatile __T4CONbits_t T4CONbits;
3620 #define _T4CKPS0 0x01
3621 #define _T4CKPS1 0x02
3622 #define _TMR4ON 0x04
3623 #define _T4OUTPS0 0x08
3624 #define _T4OUTPS1 0x10
3625 #define _T4OUTPS2 0x20
3626 #define _T4OUTPS3 0x40
3628 //==============================================================================
3630 extern __at(0x041C) __sfr TMR6;
3631 extern __at(0x041D) __sfr PR6;
3633 //==============================================================================
3634 // T6CON Bits
3636 extern __at(0x041E) __sfr T6CON;
3638 typedef union
3640 struct
3642 unsigned T6CKPS0 : 1;
3643 unsigned T6CKPS1 : 1;
3644 unsigned TMR6ON : 1;
3645 unsigned T6OUTPS0 : 1;
3646 unsigned T6OUTPS1 : 1;
3647 unsigned T6OUTPS2 : 1;
3648 unsigned T6OUTPS3 : 1;
3649 unsigned : 1;
3652 struct
3654 unsigned T6CKPS : 2;
3655 unsigned : 6;
3658 struct
3660 unsigned : 3;
3661 unsigned T6OUTPS : 4;
3662 unsigned : 1;
3664 } __T6CONbits_t;
3666 extern __at(0x041E) volatile __T6CONbits_t T6CONbits;
3668 #define _T6CKPS0 0x01
3669 #define _T6CKPS1 0x02
3670 #define _TMR6ON 0x04
3671 #define _T6OUTPS0 0x08
3672 #define _T6OUTPS1 0x10
3673 #define _T6OUTPS2 0x20
3674 #define _T6OUTPS3 0x40
3676 //==============================================================================
3679 //==============================================================================
3680 // STATUS_SHAD Bits
3682 extern __at(0x0FE4) __sfr STATUS_SHAD;
3684 typedef struct
3686 unsigned C_SHAD : 1;
3687 unsigned DC_SHAD : 1;
3688 unsigned Z_SHAD : 1;
3689 unsigned : 1;
3690 unsigned : 1;
3691 unsigned : 1;
3692 unsigned : 1;
3693 unsigned : 1;
3694 } __STATUS_SHADbits_t;
3696 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
3698 #define _C_SHAD 0x01
3699 #define _DC_SHAD 0x02
3700 #define _Z_SHAD 0x04
3702 //==============================================================================
3704 extern __at(0x0FE5) __sfr WREG_SHAD;
3705 extern __at(0x0FE6) __sfr BSR_SHAD;
3706 extern __at(0x0FE7) __sfr PCLATH_SHAD;
3707 extern __at(0x0FE8) __sfr FSR0L_SHAD;
3708 extern __at(0x0FE9) __sfr FSR0H_SHAD;
3709 extern __at(0x0FEA) __sfr FSR1L_SHAD;
3710 extern __at(0x0FEB) __sfr FSR1H_SHAD;
3711 extern __at(0x0FED) __sfr STKPTR;
3712 extern __at(0x0FEE) __sfr TOSL;
3713 extern __at(0x0FEF) __sfr TOSH;
3715 //==============================================================================
3717 // Configuration Bits
3719 //==============================================================================
3721 #define _CONFIG1 0x8007
3722 #define _CONFIG2 0x8008
3724 //----------------------------- CONFIG1 Options -------------------------------
3726 #define _FOSC_LP 0x3FF8 // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins.
3727 #define _FOSC_XT 0x3FF9 // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins.
3728 #define _FOSC_HS 0x3FFA // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins.
3729 #define _FOSC_EXTRC 0x3FFB // EXTRC oscillator: External RC circuit connected to CLKIN pin.
3730 #define _FOSC_INTOSC 0x3FFC // INTOSC oscillator: I/O function on CLKIN pin.
3731 #define _FOSC_ECL 0x3FFD // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin.
3732 #define _FOSC_ECM 0x3FFE // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin.
3733 #define _FOSC_ECH 0x3FFF // ECH, External Clock, High Power Mode (4-32 MHz): device clock supplied to CLKIN pin.
3734 #define _WDTE_OFF 0x3FE7 // WDT disabled.
3735 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
3736 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep.
3737 #define _WDTE_ON 0x3FFF // WDT enabled.
3738 #define _PWRTE_ON 0x3FDF // PWRT enabled.
3739 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
3740 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
3741 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
3742 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
3743 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
3744 #define _CPD_ON 0x3EFF // Data memory code protection is enabled.
3745 #define _CPD_OFF 0x3FFF // Data memory code protection is disabled.
3746 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled.
3747 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
3748 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep.
3749 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
3750 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
3751 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
3752 #define _IESO_OFF 0x2FFF // Internal/External Switchover mode is disabled.
3753 #define _IESO_ON 0x3FFF // Internal/External Switchover mode is enabled.
3754 #define _FCMEN_OFF 0x1FFF // Fail-Safe Clock Monitor is disabled.
3755 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor is enabled.
3757 //----------------------------- CONFIG2 Options -------------------------------
3759 #define _WRT_ALL 0x3FFC // 000h to FFFh write protected, no addresses may be modified by EECON control.
3760 #define _WRT_HALF 0x3FFD // 000h to 7FFh write protected, 800h to FFFh may be modified by EECON control.
3761 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to FFFh may be modified by EECON control.
3762 #define _WRT_OFF 0x3FFF // Write protection off.
3763 #define _PLLEN_OFF 0x3EFF // 4x PLL disabled.
3764 #define _PLLEN_ON 0x3FFF // 4x PLL enabled.
3765 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
3766 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
3767 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
3768 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
3769 #define _BORV_19 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
3770 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
3771 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
3772 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
3773 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
3775 //==============================================================================
3777 #define _DEVID1 0x8006
3779 #define _IDLOC0 0x8000
3780 #define _IDLOC1 0x8001
3781 #define _IDLOC2 0x8002
3782 #define _IDLOC3 0x8003
3784 //==============================================================================
3786 #ifndef NO_BIT_DEFINES
3788 #define ADON ADCON0bits.ADON // bit 0
3789 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
3790 #define ADGO ADCON0bits.ADGO // bit 1, shadows bit in ADCON0bits
3791 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
3792 #define CHS0 ADCON0bits.CHS0 // bit 2
3793 #define CHS1 ADCON0bits.CHS1 // bit 3
3794 #define CHS2 ADCON0bits.CHS2 // bit 4
3795 #define CHS3 ADCON0bits.CHS3 // bit 5
3796 #define CHS4 ADCON0bits.CHS4 // bit 6
3798 #define ADPREF0 ADCON1bits.ADPREF0 // bit 0
3799 #define ADPREF1 ADCON1bits.ADPREF1 // bit 1
3800 #define ADNREF ADCON1bits.ADNREF // bit 2
3801 #define ADCS0 ADCON1bits.ADCS0 // bit 4
3802 #define ADCS1 ADCON1bits.ADCS1 // bit 5
3803 #define ADCS2 ADCON1bits.ADCS2 // bit 6
3804 #define ADFM ADCON1bits.ADFM // bit 7
3806 #define ANSA0 ANSELAbits.ANSA0 // bit 0
3807 #define ANSA1 ANSELAbits.ANSA1 // bit 1
3808 #define ANSA2 ANSELAbits.ANSA2 // bit 2
3809 #define ANSA4 ANSELAbits.ANSA4 // bit 4
3811 #define ANSB4 ANSELBbits.ANSB4 // bit 4
3812 #define ANSB5 ANSELBbits.ANSB5 // bit 5
3814 #define ANSC0 ANSELCbits.ANSC0 // bit 0
3815 #define ANSC1 ANSELCbits.ANSC1 // bit 1
3816 #define ANSC2 ANSELCbits.ANSC2 // bit 2
3817 #define ANSC3 ANSELCbits.ANSC3 // bit 3
3818 #define ANSC6 ANSELCbits.ANSC6 // bit 6
3819 #define ANSC7 ANSELCbits.ANSC7 // bit 7
3821 #define TXCKSEL APFCON0bits.TXCKSEL // bit 2
3822 #define T1GSEL APFCON0bits.T1GSEL // bit 3
3823 #define RXDTSEL APFCON0bits.RXDTSEL // bit 7
3825 #define CCP2SEL APFCON1bits.CCP2SEL // bit 0
3826 #define P2BSEL APFCON1bits.P2BSEL // bit 1
3827 #define P1CSEL APFCON1bits.P1CSEL // bit 2
3828 #define P1DSEL APFCON1bits.P1DSEL // bit 3
3830 #define ABDEN BAUDCONbits.ABDEN // bit 0
3831 #define WUE BAUDCONbits.WUE // bit 1
3832 #define BRG16 BAUDCONbits.BRG16 // bit 3
3833 #define SCKP BAUDCONbits.SCKP // bit 4
3834 #define RCIDL BAUDCONbits.RCIDL // bit 6
3835 #define ABDOVF BAUDCONbits.ABDOVF // bit 7
3837 #define BORRDY BORCONbits.BORRDY // bit 0
3838 #define SBOREN BORCONbits.SBOREN // bit 7
3840 #define BSR0 BSRbits.BSR0 // bit 0
3841 #define BSR1 BSRbits.BSR1 // bit 1
3842 #define BSR2 BSRbits.BSR2 // bit 2
3843 #define BSR3 BSRbits.BSR3 // bit 3
3844 #define BSR4 BSRbits.BSR4 // bit 4
3846 #define PSS1BD0 CCP1ASbits.PSS1BD0 // bit 0
3847 #define PSS1BD1 CCP1ASbits.PSS1BD1 // bit 1
3848 #define PSS1AC0 CCP1ASbits.PSS1AC0 // bit 2
3849 #define PSS1AC1 CCP1ASbits.PSS1AC1 // bit 3
3850 #define CCP1AS0 CCP1ASbits.CCP1AS0 // bit 4
3851 #define CCP1AS1 CCP1ASbits.CCP1AS1 // bit 5
3852 #define CCP1AS2 CCP1ASbits.CCP1AS2 // bit 6
3853 #define CCP1ASE CCP1ASbits.CCP1ASE // bit 7
3855 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
3856 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
3857 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
3858 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
3859 #define DC1B0 CCP1CONbits.DC1B0 // bit 4
3860 #define DC1B1 CCP1CONbits.DC1B1 // bit 5
3861 #define P1M0 CCP1CONbits.P1M0 // bit 6
3862 #define P1M1 CCP1CONbits.P1M1 // bit 7
3864 #define PSS2BD0 CCP2ASbits.PSS2BD0 // bit 0
3865 #define PSS2BD1 CCP2ASbits.PSS2BD1 // bit 1
3866 #define PSS2AC0 CCP2ASbits.PSS2AC0 // bit 2
3867 #define PSS2AC1 CCP2ASbits.PSS2AC1 // bit 3
3868 #define CCP2AS0 CCP2ASbits.CCP2AS0 // bit 4
3869 #define CCP2AS1 CCP2ASbits.CCP2AS1 // bit 5
3870 #define CCP2AS2 CCP2ASbits.CCP2AS2 // bit 6
3871 #define CCP2ASE CCP2ASbits.CCP2ASE // bit 7
3873 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
3874 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
3875 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
3876 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
3877 #define DC2B0 CCP2CONbits.DC2B0 // bit 4
3878 #define DC2B1 CCP2CONbits.DC2B1 // bit 5
3879 #define P2M0 CCP2CONbits.P2M0 // bit 6
3880 #define P2M1 CCP2CONbits.P2M1 // bit 7
3882 #define CCP3M0 CCP3CONbits.CCP3M0 // bit 0
3883 #define CCP3M1 CCP3CONbits.CCP3M1 // bit 1
3884 #define CCP3M2 CCP3CONbits.CCP3M2 // bit 2
3885 #define CCP3M3 CCP3CONbits.CCP3M3 // bit 3
3886 #define DC3B0 CCP3CONbits.DC3B0 // bit 4
3887 #define DC3B1 CCP3CONbits.DC3B1 // bit 5
3889 #define CCP4M0 CCP4CONbits.CCP4M0 // bit 0
3890 #define CCP4M1 CCP4CONbits.CCP4M1 // bit 1
3891 #define CCP4M2 CCP4CONbits.CCP4M2 // bit 2
3892 #define CCP4M3 CCP4CONbits.CCP4M3 // bit 3
3893 #define DC4B0 CCP4CONbits.DC4B0 // bit 4
3894 #define DC4B1 CCP4CONbits.DC4B1 // bit 5
3896 #define C1TSEL0 CCPTMRSbits.C1TSEL0 // bit 0
3897 #define C1TSEL1 CCPTMRSbits.C1TSEL1 // bit 1
3898 #define C2TSEL0 CCPTMRSbits.C2TSEL0 // bit 2
3899 #define C2TSEL1 CCPTMRSbits.C2TSEL1 // bit 3
3900 #define C3TSEL0 CCPTMRSbits.C3TSEL0 // bit 4
3901 #define C3TSEL1 CCPTMRSbits.C3TSEL1 // bit 5
3902 #define C4TSEL0 CCPTMRSbits.C4TSEL0 // bit 6
3903 #define C4TSEL1 CCPTMRSbits.C4TSEL1 // bit 7
3905 #define CLKRDIV0 CLKRCONbits.CLKRDIV0 // bit 0
3906 #define CLKRDIV1 CLKRCONbits.CLKRDIV1 // bit 1
3907 #define CLKRDIV2 CLKRCONbits.CLKRDIV2 // bit 2
3908 #define CLKRDC0 CLKRCONbits.CLKRDC0 // bit 3
3909 #define CLKRDC1 CLKRCONbits.CLKRDC1 // bit 4
3910 #define CLKRSLR CLKRCONbits.CLKRSLR // bit 5
3911 #define CLKROE CLKRCONbits.CLKROE // bit 6
3912 #define CLKREN CLKRCONbits.CLKREN // bit 7
3914 #define C1SYNC CM1CON0bits.C1SYNC // bit 0
3915 #define C1HYS CM1CON0bits.C1HYS // bit 1
3916 #define C1SP CM1CON0bits.C1SP // bit 2
3917 #define C1POL CM1CON0bits.C1POL // bit 4
3918 #define C1OE CM1CON0bits.C1OE // bit 5
3919 #define C1OUT CM1CON0bits.C1OUT // bit 6
3920 #define C1ON CM1CON0bits.C1ON // bit 7
3922 #define C1NCH0 CM1CON1bits.C1NCH0 // bit 0
3923 #define C1NCH1 CM1CON1bits.C1NCH1 // bit 1
3924 #define C1PCH0 CM1CON1bits.C1PCH0 // bit 4
3925 #define C1PCH1 CM1CON1bits.C1PCH1 // bit 5
3926 #define C1INTN CM1CON1bits.C1INTN // bit 6
3927 #define C1INTP CM1CON1bits.C1INTP // bit 7
3929 #define C2SYNC CM2CON0bits.C2SYNC // bit 0
3930 #define C2HYS CM2CON0bits.C2HYS // bit 1
3931 #define C2SP CM2CON0bits.C2SP // bit 2
3932 #define C2POL CM2CON0bits.C2POL // bit 4
3933 #define C2OE CM2CON0bits.C2OE // bit 5
3934 #define C2OUT CM2CON0bits.C2OUT // bit 6
3935 #define C2ON CM2CON0bits.C2ON // bit 7
3937 #define C2NCH0 CM2CON1bits.C2NCH0 // bit 0
3938 #define C2NCH1 CM2CON1bits.C2NCH1 // bit 1
3939 #define C2PCH0 CM2CON1bits.C2PCH0 // bit 4
3940 #define C2PCH1 CM2CON1bits.C2PCH1 // bit 5
3941 #define C2INTN CM2CON1bits.C2INTN // bit 6
3942 #define C2INTP CM2CON1bits.C2INTP // bit 7
3944 #define MC1OUT CMOUTbits.MC1OUT // bit 0
3945 #define MC2OUT CMOUTbits.MC2OUT // bit 1
3947 #define T0XCS CPSCON0bits.T0XCS // bit 0
3948 #define CPSOUT CPSCON0bits.CPSOUT // bit 1
3949 #define CPSRNG0 CPSCON0bits.CPSRNG0 // bit 2
3950 #define CPSRNG1 CPSCON0bits.CPSRNG1 // bit 3
3951 #define CPSRM CPSCON0bits.CPSRM // bit 6
3952 #define CPSON CPSCON0bits.CPSON // bit 7
3954 #define CPSCH0 CPSCON1bits.CPSCH0 // bit 0
3955 #define CPSCH1 CPSCON1bits.CPSCH1 // bit 1
3956 #define CPSCH2 CPSCON1bits.CPSCH2 // bit 2
3957 #define CPSCH3 CPSCON1bits.CPSCH3 // bit 3
3959 #define DACNSS DACCON0bits.DACNSS // bit 0
3960 #define DACPSS0 DACCON0bits.DACPSS0 // bit 2
3961 #define DACPSS1 DACCON0bits.DACPSS1 // bit 3
3962 #define DACOE DACCON0bits.DACOE // bit 5
3963 #define DACLPS DACCON0bits.DACLPS // bit 6
3964 #define DACEN DACCON0bits.DACEN // bit 7
3966 #define DACR0 DACCON1bits.DACR0 // bit 0
3967 #define DACR1 DACCON1bits.DACR1 // bit 1
3968 #define DACR2 DACCON1bits.DACR2 // bit 2
3969 #define DACR3 DACCON1bits.DACR3 // bit 3
3970 #define DACR4 DACCON1bits.DACR4 // bit 4
3972 #define RD EECON1bits.RD // bit 0
3973 #define WR EECON1bits.WR // bit 1
3974 #define WREN EECON1bits.WREN // bit 2
3975 #define WRERR EECON1bits.WRERR // bit 3
3976 #define FREE EECON1bits.FREE // bit 4
3977 #define LWLO EECON1bits.LWLO // bit 5
3978 #define CFGS EECON1bits.CFGS // bit 6
3979 #define EEPGD EECON1bits.EEPGD // bit 7
3981 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
3982 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
3983 #define CDAFVR0 FVRCONbits.CDAFVR0 // bit 2
3984 #define CDAFVR1 FVRCONbits.CDAFVR1 // bit 3
3985 #define TSRNG FVRCONbits.TSRNG // bit 4
3986 #define TSEN FVRCONbits.TSEN // bit 5
3987 #define FVRRDY FVRCONbits.FVRRDY // bit 6
3988 #define FVREN FVRCONbits.FVREN // bit 7
3990 #define INLVLA0 INLVLAbits.INLVLA0 // bit 0
3991 #define INLVLA1 INLVLAbits.INLVLA1 // bit 1
3992 #define INLVLA2 INLVLAbits.INLVLA2 // bit 2
3993 #define INLVLA3 INLVLAbits.INLVLA3 // bit 3
3994 #define INLVLA4 INLVLAbits.INLVLA4 // bit 4
3995 #define INLVLA5 INLVLAbits.INLVLA5 // bit 5
3997 #define INLVLB4 INLVLBbits.INLVLB4 // bit 4
3998 #define INLVLB5 INLVLBbits.INLVLB5 // bit 5
3999 #define INLVLB6 INLVLBbits.INLVLB6 // bit 6
4000 #define INLVLB7 INLVLBbits.INLVLB7 // bit 7
4002 #define INLVLC0 INLVLCbits.INLVLC0 // bit 0
4003 #define INLVLC1 INLVLCbits.INLVLC1 // bit 1
4004 #define INLVLC2 INLVLCbits.INLVLC2 // bit 2
4005 #define INLVLC3 INLVLCbits.INLVLC3 // bit 3
4006 #define INLVLC4 INLVLCbits.INLVLC4 // bit 4
4007 #define INLVLC5 INLVLCbits.INLVLC5 // bit 5
4008 #define INLVLC6 INLVLCbits.INLVLC6 // bit 6
4009 #define INLVLC7 INLVLCbits.INLVLC7 // bit 7
4011 #define IOCIF INTCONbits.IOCIF // bit 0
4012 #define INTF INTCONbits.INTF // bit 1
4013 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
4014 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
4015 #define IOCIE INTCONbits.IOCIE // bit 3
4016 #define INTE INTCONbits.INTE // bit 4
4017 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
4018 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
4019 #define PEIE INTCONbits.PEIE // bit 6
4020 #define GIE INTCONbits.GIE // bit 7
4022 #define IOCAF0 IOCAFbits.IOCAF0 // bit 0
4023 #define IOCAF1 IOCAFbits.IOCAF1 // bit 1
4024 #define IOCAF2 IOCAFbits.IOCAF2 // bit 2
4025 #define IOCAF3 IOCAFbits.IOCAF3 // bit 3
4026 #define IOCAF4 IOCAFbits.IOCAF4 // bit 4
4027 #define IOCAF5 IOCAFbits.IOCAF5 // bit 5
4029 #define IOCAN0 IOCANbits.IOCAN0 // bit 0
4030 #define IOCAN1 IOCANbits.IOCAN1 // bit 1
4031 #define IOCAN2 IOCANbits.IOCAN2 // bit 2
4032 #define IOCAN3 IOCANbits.IOCAN3 // bit 3
4033 #define IOCAN4 IOCANbits.IOCAN4 // bit 4
4034 #define IOCAN5 IOCANbits.IOCAN5 // bit 5
4036 #define IOCAP0 IOCAPbits.IOCAP0 // bit 0
4037 #define IOCAP1 IOCAPbits.IOCAP1 // bit 1
4038 #define IOCAP2 IOCAPbits.IOCAP2 // bit 2
4039 #define IOCAP3 IOCAPbits.IOCAP3 // bit 3
4040 #define IOCAP4 IOCAPbits.IOCAP4 // bit 4
4041 #define IOCAP5 IOCAPbits.IOCAP5 // bit 5
4043 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
4044 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
4045 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
4046 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
4048 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
4049 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
4050 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
4051 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
4053 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
4054 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
4055 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
4056 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
4058 #define LATA0 LATAbits.LATA0 // bit 0
4059 #define LATA1 LATAbits.LATA1 // bit 1
4060 #define LATA2 LATAbits.LATA2 // bit 2
4061 #define LATA4 LATAbits.LATA4 // bit 4
4062 #define LATA5 LATAbits.LATA5 // bit 5
4064 #define LATB4 LATBbits.LATB4 // bit 4
4065 #define LATB5 LATBbits.LATB5 // bit 5
4066 #define LATB6 LATBbits.LATB6 // bit 6
4067 #define LATB7 LATBbits.LATB7 // bit 7
4069 #define LATC0 LATCbits.LATC0 // bit 0
4070 #define LATC1 LATCbits.LATC1 // bit 1
4071 #define LATC2 LATCbits.LATC2 // bit 2
4072 #define LATC3 LATCbits.LATC3 // bit 3
4073 #define LATC4 LATCbits.LATC4 // bit 4
4074 #define LATC5 LATCbits.LATC5 // bit 5
4075 #define LATC6 LATCbits.LATC6 // bit 6
4076 #define LATC7 LATCbits.LATC7 // bit 7
4078 #define MDCH0 MDCARHbits.MDCH0 // bit 0
4079 #define MDCH1 MDCARHbits.MDCH1 // bit 1
4080 #define MDCH2 MDCARHbits.MDCH2 // bit 2
4081 #define MDCH3 MDCARHbits.MDCH3 // bit 3
4082 #define MDCHSYNC MDCARHbits.MDCHSYNC // bit 5
4083 #define MDCHPOL MDCARHbits.MDCHPOL // bit 6
4084 #define MDCHODIS MDCARHbits.MDCHODIS // bit 7
4086 #define MDCL0 MDCARLbits.MDCL0 // bit 0
4087 #define MDCL1 MDCARLbits.MDCL1 // bit 1
4088 #define MDCL2 MDCARLbits.MDCL2 // bit 2
4089 #define MDCL3 MDCARLbits.MDCL3 // bit 3
4090 #define MDCLSYNC MDCARLbits.MDCLSYNC // bit 5
4091 #define MDCLPOL MDCARLbits.MDCLPOL // bit 6
4092 #define MDCLODIS MDCARLbits.MDCLODIS // bit 7
4094 #define MDBIT MDCONbits.MDBIT // bit 0
4095 #define MDOUT MDCONbits.MDOUT // bit 3
4096 #define MDOPOL MDCONbits.MDOPOL // bit 4
4097 #define MDSLR MDCONbits.MDSLR // bit 5
4098 #define MDOE MDCONbits.MDOE // bit 6
4099 #define MDEN MDCONbits.MDEN // bit 7
4101 #define MDMS0 MDSRCbits.MDMS0 // bit 0
4102 #define MDMS1 MDSRCbits.MDMS1 // bit 1
4103 #define MDMS2 MDSRCbits.MDMS2 // bit 2
4104 #define MDMS3 MDSRCbits.MDMS3 // bit 3
4105 #define MDMSODIS MDSRCbits.MDMSODIS // bit 7
4107 #define PS0 OPTION_REGbits.PS0 // bit 0
4108 #define PS1 OPTION_REGbits.PS1 // bit 1
4109 #define PS2 OPTION_REGbits.PS2 // bit 2
4110 #define PSA OPTION_REGbits.PSA // bit 3
4111 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
4112 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
4113 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
4114 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
4115 #define INTEDG OPTION_REGbits.INTEDG // bit 6
4116 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
4118 #define SCS0 OSCCONbits.SCS0 // bit 0
4119 #define SCS1 OSCCONbits.SCS1 // bit 1
4120 #define IRCF0 OSCCONbits.IRCF0 // bit 3
4121 #define IRCF1 OSCCONbits.IRCF1 // bit 4
4122 #define IRCF2 OSCCONbits.IRCF2 // bit 5
4123 #define IRCF3 OSCCONbits.IRCF3 // bit 6
4124 #define SPLLEN OSCCONbits.SPLLEN // bit 7
4126 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
4127 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
4128 #define MFIOFR OSCSTATbits.MFIOFR // bit 2
4129 #define HFIOFL OSCSTATbits.HFIOFL // bit 3
4130 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
4131 #define OSTS OSCSTATbits.OSTS // bit 5
4132 #define PLLR OSCSTATbits.PLLR // bit 6
4133 #define T1OSCR OSCSTATbits.T1OSCR // bit 7
4135 #define TUN0 OSCTUNEbits.TUN0 // bit 0
4136 #define TUN1 OSCTUNEbits.TUN1 // bit 1
4137 #define TUN2 OSCTUNEbits.TUN2 // bit 2
4138 #define TUN3 OSCTUNEbits.TUN3 // bit 3
4139 #define TUN4 OSCTUNEbits.TUN4 // bit 4
4140 #define TUN5 OSCTUNEbits.TUN5 // bit 5
4142 #define NOT_BOR PCONbits.NOT_BOR // bit 0
4143 #define NOT_POR PCONbits.NOT_POR // bit 1
4144 #define NOT_RI PCONbits.NOT_RI // bit 2
4145 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
4146 #define STKUNF PCONbits.STKUNF // bit 6
4147 #define STKOVF PCONbits.STKOVF // bit 7
4149 #define TMR1IE PIE1bits.TMR1IE // bit 0
4150 #define TMR2IE PIE1bits.TMR2IE // bit 1
4151 #define CCP1IE PIE1bits.CCP1IE // bit 2
4152 #define SSP1IE PIE1bits.SSP1IE // bit 3
4153 #define TXIE PIE1bits.TXIE // bit 4
4154 #define RCIE PIE1bits.RCIE // bit 5
4155 #define ADIE PIE1bits.ADIE // bit 6
4156 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
4158 #define CCP2IE PIE2bits.CCP2IE // bit 0
4159 #define BCL1IE PIE2bits.BCL1IE // bit 3
4160 #define EEIE PIE2bits.EEIE // bit 4
4161 #define C1IE PIE2bits.C1IE // bit 5
4162 #define C2IE PIE2bits.C2IE // bit 6
4163 #define OSFIE PIE2bits.OSFIE // bit 7
4165 #define TMR4IE PIE3bits.TMR4IE // bit 1
4166 #define TMR6IE PIE3bits.TMR6IE // bit 3
4167 #define CCP3IE PIE3bits.CCP3IE // bit 4
4168 #define CCP4IE PIE3bits.CCP4IE // bit 5
4170 #define TMR1IF PIR1bits.TMR1IF // bit 0
4171 #define TMR2IF PIR1bits.TMR2IF // bit 1
4172 #define CCP1IF PIR1bits.CCP1IF // bit 2
4173 #define SSP1IF PIR1bits.SSP1IF // bit 3
4174 #define TXIF PIR1bits.TXIF // bit 4
4175 #define RCIF PIR1bits.RCIF // bit 5
4176 #define ADIF PIR1bits.ADIF // bit 6
4177 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
4179 #define CCP2IF PIR2bits.CCP2IF // bit 0
4180 #define BCL1IF PIR2bits.BCL1IF // bit 3
4181 #define EEIF PIR2bits.EEIF // bit 4
4182 #define C1IF PIR2bits.C1IF // bit 5
4183 #define C2IF PIR2bits.C2IF // bit 6
4184 #define OSFIF PIR2bits.OSFIF // bit 7
4186 #define TMR4IF PIR3bits.TMR4IF // bit 1
4187 #define TMR6IF PIR3bits.TMR6IF // bit 3
4188 #define CCP3IF PIR3bits.CCP3IF // bit 4
4189 #define CCP4IF PIR3bits.CCP4IF // bit 5
4191 #define RA0 PORTAbits.RA0 // bit 0
4192 #define RA1 PORTAbits.RA1 // bit 1
4193 #define RA2 PORTAbits.RA2 // bit 2
4194 #define RA3 PORTAbits.RA3 // bit 3
4195 #define RA4 PORTAbits.RA4 // bit 4
4196 #define RA5 PORTAbits.RA5 // bit 5
4198 #define RB4 PORTBbits.RB4 // bit 4
4199 #define RB5 PORTBbits.RB5 // bit 5
4200 #define RB6 PORTBbits.RB6 // bit 6
4201 #define RB7 PORTBbits.RB7 // bit 7
4203 #define RC0 PORTCbits.RC0 // bit 0
4204 #define RC1 PORTCbits.RC1 // bit 1
4205 #define RC2 PORTCbits.RC2 // bit 2
4206 #define RC3 PORTCbits.RC3 // bit 3
4207 #define RC4 PORTCbits.RC4 // bit 4
4208 #define RC5 PORTCbits.RC5 // bit 5
4209 #define RC6 PORTCbits.RC6 // bit 6
4210 #define RC7 PORTCbits.RC7 // bit 7
4212 #define STR1A PSTR1CONbits.STR1A // bit 0
4213 #define STR1B PSTR1CONbits.STR1B // bit 1
4214 #define STR1C PSTR1CONbits.STR1C // bit 2
4215 #define STR1D PSTR1CONbits.STR1D // bit 3
4216 #define STR1SYNC PSTR1CONbits.STR1SYNC // bit 4
4218 #define STR2A PSTR2CONbits.STR2A // bit 0
4219 #define STR2B PSTR2CONbits.STR2B // bit 1
4220 #define STR2C PSTR2CONbits.STR2C // bit 2
4221 #define STR2D PSTR2CONbits.STR2D // bit 3
4222 #define STR2SYNC PSTR2CONbits.STR2SYNC // bit 4
4224 #define P1DC0 PWM1CONbits.P1DC0 // bit 0
4225 #define P1DC1 PWM1CONbits.P1DC1 // bit 1
4226 #define P1DC2 PWM1CONbits.P1DC2 // bit 2
4227 #define P1DC3 PWM1CONbits.P1DC3 // bit 3
4228 #define P1DC4 PWM1CONbits.P1DC4 // bit 4
4229 #define P1DC5 PWM1CONbits.P1DC5 // bit 5
4230 #define P1DC6 PWM1CONbits.P1DC6 // bit 6
4231 #define P1RSEN PWM1CONbits.P1RSEN // bit 7
4233 #define P2DC0 PWM2CONbits.P2DC0 // bit 0
4234 #define P2DC1 PWM2CONbits.P2DC1 // bit 1
4235 #define P2DC2 PWM2CONbits.P2DC2 // bit 2
4236 #define P2DC3 PWM2CONbits.P2DC3 // bit 3
4237 #define P2DC4 PWM2CONbits.P2DC4 // bit 4
4238 #define P2DC5 PWM2CONbits.P2DC5 // bit 5
4239 #define P2DC6 PWM2CONbits.P2DC6 // bit 6
4240 #define P2RSEN PWM2CONbits.P2RSEN // bit 7
4242 #define RX9D RCSTAbits.RX9D // bit 0
4243 #define OERR RCSTAbits.OERR // bit 1
4244 #define FERR RCSTAbits.FERR // bit 2
4245 #define ADDEN RCSTAbits.ADDEN // bit 3
4246 #define CREN RCSTAbits.CREN // bit 4
4247 #define SREN RCSTAbits.SREN // bit 5
4248 #define RX9 RCSTAbits.RX9 // bit 6
4249 #define SPEN RCSTAbits.SPEN // bit 7
4251 #define SRPR SRCON0bits.SRPR // bit 0
4252 #define SRPS SRCON0bits.SRPS // bit 1
4253 #define SRNQEN SRCON0bits.SRNQEN // bit 2
4254 #define SRQEN SRCON0bits.SRQEN // bit 3
4255 #define SRCLK0 SRCON0bits.SRCLK0 // bit 4
4256 #define SRCLK1 SRCON0bits.SRCLK1 // bit 5
4257 #define SRCLK2 SRCON0bits.SRCLK2 // bit 6
4258 #define SRLEN SRCON0bits.SRLEN // bit 7
4260 #define SRRC1E SRCON1bits.SRRC1E // bit 0
4261 #define SRRC2E SRCON1bits.SRRC2E // bit 1
4262 #define SRRCKE SRCON1bits.SRRCKE // bit 2
4263 #define SRRPE SRCON1bits.SRRPE // bit 3
4264 #define SRSC1E SRCON1bits.SRSC1E // bit 4
4265 #define SRSC2E SRCON1bits.SRSC2E // bit 5
4266 #define SRSCKE SRCON1bits.SRSCKE // bit 6
4267 #define SRSPE SRCON1bits.SRSPE // bit 7
4269 #define SSPM0 SSP1CONbits.SSPM0 // bit 0
4270 #define SSPM1 SSP1CONbits.SSPM1 // bit 1
4271 #define SSPM2 SSP1CONbits.SSPM2 // bit 2
4272 #define SSPM3 SSP1CONbits.SSPM3 // bit 3
4273 #define CKP SSP1CONbits.CKP // bit 4
4274 #define SSPEN SSP1CONbits.SSPEN // bit 5
4275 #define SSPOV SSP1CONbits.SSPOV // bit 6
4276 #define WCOL SSP1CONbits.WCOL // bit 7
4278 #define SEN SSP1CON2bits.SEN // bit 0
4279 #define RSEN SSP1CON2bits.RSEN // bit 1
4280 #define PEN SSP1CON2bits.PEN // bit 2
4281 #define RCEN SSP1CON2bits.RCEN // bit 3
4282 #define ACKEN SSP1CON2bits.ACKEN // bit 4
4283 #define ACKDT SSP1CON2bits.ACKDT // bit 5
4284 #define ACKSTAT SSP1CON2bits.ACKSTAT // bit 6
4285 #define GCEN SSP1CON2bits.GCEN // bit 7
4287 #define DHEN SSP1CON3bits.DHEN // bit 0
4288 #define AHEN SSP1CON3bits.AHEN // bit 1
4289 #define SBCDE SSP1CON3bits.SBCDE // bit 2
4290 #define SDAHT SSP1CON3bits.SDAHT // bit 3
4291 #define BOEN SSP1CON3bits.BOEN // bit 4
4292 #define SCIE SSP1CON3bits.SCIE // bit 5
4293 #define PCIE SSP1CON3bits.PCIE // bit 6
4294 #define ACKTIM SSP1CON3bits.ACKTIM // bit 7
4296 #define BF SSP1STATbits.BF // bit 0
4297 #define UA SSP1STATbits.UA // bit 1
4298 #define R_NOT_W SSP1STATbits.R_NOT_W // bit 2
4299 #define S SSP1STATbits.S // bit 3
4300 #define P SSP1STATbits.P // bit 4
4301 #define D_NOT_A SSP1STATbits.D_NOT_A // bit 5
4302 #define CKE SSP1STATbits.CKE // bit 6
4303 #define SMP SSP1STATbits.SMP // bit 7
4305 #define C STATUSbits.C // bit 0
4306 #define DC STATUSbits.DC // bit 1
4307 #define Z STATUSbits.Z // bit 2
4308 #define NOT_PD STATUSbits.NOT_PD // bit 3
4309 #define NOT_TO STATUSbits.NOT_TO // bit 4
4311 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
4312 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
4313 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
4315 #define TMR1ON T1CONbits.TMR1ON // bit 0
4316 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
4317 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
4318 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
4319 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
4320 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
4321 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
4323 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
4324 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
4325 #define T1GVAL T1GCONbits.T1GVAL // bit 2
4326 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3, shadows bit in T1GCONbits
4327 #define T1GGO T1GCONbits.T1GGO // bit 3, shadows bit in T1GCONbits
4328 #define T1GSPM T1GCONbits.T1GSPM // bit 4
4329 #define T1GTM T1GCONbits.T1GTM // bit 5
4330 #define T1GPOL T1GCONbits.T1GPOL // bit 6
4331 #define TMR1GE T1GCONbits.TMR1GE // bit 7
4333 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
4334 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
4335 #define TMR2ON T2CONbits.TMR2ON // bit 2
4336 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
4337 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
4338 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
4339 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
4341 #define T4CKPS0 T4CONbits.T4CKPS0 // bit 0
4342 #define T4CKPS1 T4CONbits.T4CKPS1 // bit 1
4343 #define TMR4ON T4CONbits.TMR4ON // bit 2
4344 #define T4OUTPS0 T4CONbits.T4OUTPS0 // bit 3
4345 #define T4OUTPS1 T4CONbits.T4OUTPS1 // bit 4
4346 #define T4OUTPS2 T4CONbits.T4OUTPS2 // bit 5
4347 #define T4OUTPS3 T4CONbits.T4OUTPS3 // bit 6
4349 #define T6CKPS0 T6CONbits.T6CKPS0 // bit 0
4350 #define T6CKPS1 T6CONbits.T6CKPS1 // bit 1
4351 #define TMR6ON T6CONbits.TMR6ON // bit 2
4352 #define T6OUTPS0 T6CONbits.T6OUTPS0 // bit 3
4353 #define T6OUTPS1 T6CONbits.T6OUTPS1 // bit 4
4354 #define T6OUTPS2 T6CONbits.T6OUTPS2 // bit 5
4355 #define T6OUTPS3 T6CONbits.T6OUTPS3 // bit 6
4357 #define TRISA0 TRISAbits.TRISA0 // bit 0
4358 #define TRISA1 TRISAbits.TRISA1 // bit 1
4359 #define TRISA2 TRISAbits.TRISA2 // bit 2
4360 #define TRISA3 TRISAbits.TRISA3 // bit 3
4361 #define TRISA4 TRISAbits.TRISA4 // bit 4
4362 #define TRISA5 TRISAbits.TRISA5 // bit 5
4364 #define TRISB4 TRISBbits.TRISB4 // bit 4
4365 #define TRISB5 TRISBbits.TRISB5 // bit 5
4366 #define TRISB6 TRISBbits.TRISB6 // bit 6
4367 #define TRISB7 TRISBbits.TRISB7 // bit 7
4369 #define TRISC0 TRISCbits.TRISC0 // bit 0
4370 #define TRISC1 TRISCbits.TRISC1 // bit 1
4371 #define TRISC2 TRISCbits.TRISC2 // bit 2
4372 #define TRISC3 TRISCbits.TRISC3 // bit 3
4373 #define TRISC4 TRISCbits.TRISC4 // bit 4
4374 #define TRISC5 TRISCbits.TRISC5 // bit 5
4375 #define TRISC6 TRISCbits.TRISC6 // bit 6
4376 #define TRISC7 TRISCbits.TRISC7 // bit 7
4378 #define TX9D TXSTAbits.TX9D // bit 0
4379 #define TRMT TXSTAbits.TRMT // bit 1
4380 #define BRGH TXSTAbits.BRGH // bit 2
4381 #define SENDB TXSTAbits.SENDB // bit 3
4382 #define SYNC TXSTAbits.SYNC // bit 4
4383 #define TXEN TXSTAbits.TXEN // bit 5
4384 #define TX9 TXSTAbits.TX9 // bit 6
4385 #define CSRC TXSTAbits.CSRC // bit 7
4387 #define SWDTEN WDTCONbits.SWDTEN // bit 0
4388 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
4389 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
4390 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
4391 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
4392 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
4394 #define WPUA0 WPUAbits.WPUA0 // bit 0
4395 #define WPUA1 WPUAbits.WPUA1 // bit 1
4396 #define WPUA2 WPUAbits.WPUA2 // bit 2
4397 #define WPUA3 WPUAbits.WPUA3 // bit 3
4398 #define WPUA4 WPUAbits.WPUA4 // bit 4
4399 #define WPUA5 WPUAbits.WPUA5 // bit 5
4401 #define WPUB4 WPUBbits.WPUB4 // bit 4
4402 #define WPUB5 WPUBbits.WPUB5 // bit 5
4403 #define WPUB6 WPUBbits.WPUB6 // bit 6
4404 #define WPUB7 WPUBbits.WPUB7 // bit 7
4406 #define WPUC0 WPUCbits.WPUC0 // bit 0
4407 #define WPUC1 WPUCbits.WPUC1 // bit 1
4408 #define WPUC2 WPUCbits.WPUC2 // bit 2
4409 #define WPUC3 WPUCbits.WPUC3 // bit 3
4410 #define WPUC4 WPUCbits.WPUC4 // bit 4
4411 #define WPUC5 WPUCbits.WPUC5 // bit 5
4412 #define WPUC6 WPUCbits.WPUC6 // bit 6
4413 #define WPUC7 WPUCbits.WPUC7 // bit 7
4415 #endif // #ifndef NO_BIT_DEFINES
4417 #endif // #ifndef __PIC16F1828_H__