Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16f1829lin.h
blob8a4226f6322e3515a552692c1a88bbecb06667b7
1 /*
2 * This declarations of the PIC16F1829LIN 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 __PIC16F1829LIN_H__
26 #define __PIC16F1829LIN_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 PIR4_ADDR 0x0014
57 #define TMR0_ADDR 0x0015
58 #define TMR1_ADDR 0x0016
59 #define TMR1L_ADDR 0x0016
60 #define TMR1H_ADDR 0x0017
61 #define T1CON_ADDR 0x0018
62 #define T1GCON_ADDR 0x0019
63 #define TMR2_ADDR 0x001A
64 #define PR2_ADDR 0x001B
65 #define T2CON_ADDR 0x001C
66 #define CPSCON0_ADDR 0x001E
67 #define CPSCON1_ADDR 0x001F
68 #define TRISA_ADDR 0x008C
69 #define TRISB_ADDR 0x008D
70 #define TRISC_ADDR 0x008E
71 #define PIE1_ADDR 0x0091
72 #define PIE2_ADDR 0x0092
73 #define PIE3_ADDR 0x0093
74 #define PIE4_ADDR 0x0094
75 #define OPTION_REG_ADDR 0x0095
76 #define PCON_ADDR 0x0096
77 #define WDTCON_ADDR 0x0097
78 #define OSCTUNE_ADDR 0x0098
79 #define OSCCON_ADDR 0x0099
80 #define OSCSTAT_ADDR 0x009A
81 #define ADRES_ADDR 0x009B
82 #define ADRESL_ADDR 0x009B
83 #define ADRESH_ADDR 0x009C
84 #define ADCON0_ADDR 0x009D
85 #define ADCON1_ADDR 0x009E
86 #define LATA_ADDR 0x010C
87 #define LATB_ADDR 0x010D
88 #define LATC_ADDR 0x010E
89 #define CM1CON0_ADDR 0x0111
90 #define CM1CON1_ADDR 0x0112
91 #define CM2CON0_ADDR 0x0113
92 #define CM2CON1_ADDR 0x0114
93 #define CMOUT_ADDR 0x0115
94 #define BORCON_ADDR 0x0116
95 #define FVRCON_ADDR 0x0117
96 #define DACCON0_ADDR 0x0118
97 #define DACCON1_ADDR 0x0119
98 #define SRCON0_ADDR 0x011A
99 #define SRCON1_ADDR 0x011B
100 #define APFCON0_ADDR 0x011D
101 #define APFCON1_ADDR 0x011E
102 #define ANSELA_ADDR 0x018C
103 #define ANSELB_ADDR 0x018D
104 #define ANSELC_ADDR 0x018E
105 #define EEADR_ADDR 0x0191
106 #define EEADRL_ADDR 0x0191
107 #define EEADRH_ADDR 0x0192
108 #define EEDAT_ADDR 0x0193
109 #define EEDATL_ADDR 0x0193
110 #define EEDATH_ADDR 0x0194
111 #define EECON1_ADDR 0x0195
112 #define EECON2_ADDR 0x0196
113 #define RCREG_ADDR 0x0199
114 #define TXREG_ADDR 0x019A
115 #define SPBRG_ADDR 0x019B
116 #define SPBRGL_ADDR 0x019B
117 #define SPBRGH_ADDR 0x019C
118 #define RCSTA_ADDR 0x019D
119 #define TXSTA_ADDR 0x019E
120 #define BAUDCON_ADDR 0x019F
121 #define WPUA_ADDR 0x020C
122 #define WPUB_ADDR 0x020D
123 #define WPUC_ADDR 0x020E
124 #define SSP1BUF_ADDR 0x0211
125 #define SSPBUF_ADDR 0x0211
126 #define SSP1ADD_ADDR 0x0212
127 #define SSPADD_ADDR 0x0212
128 #define SSP1MSK_ADDR 0x0213
129 #define SSPMSK_ADDR 0x0213
130 #define SSP1STAT_ADDR 0x0214
131 #define SSPSTAT_ADDR 0x0214
132 #define SSP1CON1_ADDR 0x0215
133 #define SSPCON_ADDR 0x0215
134 #define SSPCON1_ADDR 0x0215
135 #define SSP1CON2_ADDR 0x0216
136 #define SSPCON2_ADDR 0x0216
137 #define SSP1CON3_ADDR 0x0217
138 #define SSPCON3_ADDR 0x0217
139 #define SSP2BUF_ADDR 0x0219
140 #define SSP2ADD_ADDR 0x021A
141 #define SSP2MSK_ADDR 0x021B
142 #define SSP2STAT_ADDR 0x021C
143 #define SSP2CON1_ADDR 0x021D
144 #define SSP2CON2_ADDR 0x021E
145 #define SSP2CON3_ADDR 0x021F
146 #define CCPR1_ADDR 0x0291
147 #define CCPR1L_ADDR 0x0291
148 #define CCPR1H_ADDR 0x0292
149 #define CCP1CON_ADDR 0x0293
150 #define PWM1CON_ADDR 0x0294
151 #define CCP1AS_ADDR 0x0295
152 #define ECCP1AS_ADDR 0x0295
153 #define PSTR1CON_ADDR 0x0296
154 #define CCPR2_ADDR 0x0298
155 #define CCPR2L_ADDR 0x0298
156 #define CCPR2H_ADDR 0x0299
157 #define CCP2CON_ADDR 0x029A
158 #define PWM2CON_ADDR 0x029B
159 #define CCP2AS_ADDR 0x029C
160 #define PSTR2CON_ADDR 0x029D
161 #define CCPTMRS_ADDR 0x029E
162 #define CCPR3_ADDR 0x0311
163 #define CCPR3L_ADDR 0x0311
164 #define CCPR3H_ADDR 0x0312
165 #define CCP3CON_ADDR 0x0313
166 #define CCPR4_ADDR 0x0318
167 #define CCPR4L_ADDR 0x0318
168 #define CCPR4H_ADDR 0x0319
169 #define CCP4CON_ADDR 0x031A
170 #define INLVLA_ADDR 0x038C
171 #define INLVLB_ADDR 0x038D
172 #define INLVLC_ADDR 0x038E
173 #define IOCAP_ADDR 0x0391
174 #define IOCAN_ADDR 0x0392
175 #define IOCAF_ADDR 0x0393
176 #define IOCBP_ADDR 0x0394
177 #define IOCBN_ADDR 0x0395
178 #define IOCBF_ADDR 0x0396
179 #define CLKRCON_ADDR 0x039A
180 #define MDCON_ADDR 0x039C
181 #define MDSRC_ADDR 0x039D
182 #define MDCARL_ADDR 0x039E
183 #define MDCARH_ADDR 0x039F
184 #define TMR4_ADDR 0x0415
185 #define PR4_ADDR 0x0416
186 #define T4CON_ADDR 0x0417
187 #define TMR6_ADDR 0x041C
188 #define PR6_ADDR 0x041D
189 #define T6CON_ADDR 0x041E
190 #define STATUS_SHAD_ADDR 0x0FE4
191 #define WREG_SHAD_ADDR 0x0FE5
192 #define BSR_SHAD_ADDR 0x0FE6
193 #define PCLATH_SHAD_ADDR 0x0FE7
194 #define FSR0L_SHAD_ADDR 0x0FE8
195 #define FSR0H_SHAD_ADDR 0x0FE9
196 #define FSR1L_SHAD_ADDR 0x0FEA
197 #define FSR1H_SHAD_ADDR 0x0FEB
198 #define STKPTR_ADDR 0x0FED
199 #define TOSL_ADDR 0x0FEE
200 #define TOSH_ADDR 0x0FEF
202 #endif // #ifndef NO_ADDR_DEFINES
204 //==============================================================================
206 // Register Definitions
208 //==============================================================================
210 extern __at(0x0000) __sfr INDF0;
211 extern __at(0x0001) __sfr INDF1;
212 extern __at(0x0002) __sfr PCL;
214 //==============================================================================
215 // STATUS Bits
217 extern __at(0x0003) __sfr STATUS;
219 typedef struct
221 unsigned C : 1;
222 unsigned DC : 1;
223 unsigned Z : 1;
224 unsigned NOT_PD : 1;
225 unsigned NOT_TO : 1;
226 unsigned : 1;
227 unsigned : 1;
228 unsigned : 1;
229 } __STATUSbits_t;
231 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
233 #define _C 0x01
234 #define _DC 0x02
235 #define _Z 0x04
236 #define _NOT_PD 0x08
237 #define _NOT_TO 0x10
239 //==============================================================================
241 extern __at(0x0004) __sfr FSR0;
242 extern __at(0x0004) __sfr FSR0L;
243 extern __at(0x0005) __sfr FSR0H;
244 extern __at(0x0006) __sfr FSR1;
245 extern __at(0x0006) __sfr FSR1L;
246 extern __at(0x0007) __sfr FSR1H;
248 //==============================================================================
249 // BSR Bits
251 extern __at(0x0008) __sfr BSR;
253 typedef union
255 struct
257 unsigned BSR0 : 1;
258 unsigned BSR1 : 1;
259 unsigned BSR2 : 1;
260 unsigned BSR3 : 1;
261 unsigned BSR4 : 1;
262 unsigned : 1;
263 unsigned : 1;
264 unsigned : 1;
267 struct
269 unsigned BSR : 5;
270 unsigned : 3;
272 } __BSRbits_t;
274 extern __at(0x0008) volatile __BSRbits_t BSRbits;
276 #define _BSR0 0x01
277 #define _BSR1 0x02
278 #define _BSR2 0x04
279 #define _BSR3 0x08
280 #define _BSR4 0x10
282 //==============================================================================
284 extern __at(0x0009) __sfr WREG;
285 extern __at(0x000A) __sfr PCLATH;
287 //==============================================================================
288 // INTCON Bits
290 extern __at(0x000B) __sfr INTCON;
292 typedef union
294 struct
296 unsigned IOCIF : 1;
297 unsigned INTF : 1;
298 unsigned TMR0IF : 1;
299 unsigned IOCIE : 1;
300 unsigned INTE : 1;
301 unsigned TMR0IE : 1;
302 unsigned PEIE : 1;
303 unsigned GIE : 1;
306 struct
308 unsigned : 1;
309 unsigned : 1;
310 unsigned T0IF : 1;
311 unsigned : 1;
312 unsigned : 1;
313 unsigned T0IE : 1;
314 unsigned : 1;
315 unsigned : 1;
317 } __INTCONbits_t;
319 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
321 #define _IOCIF 0x01
322 #define _INTF 0x02
323 #define _TMR0IF 0x04
324 #define _T0IF 0x04
325 #define _IOCIE 0x08
326 #define _INTE 0x10
327 #define _TMR0IE 0x20
328 #define _T0IE 0x20
329 #define _PEIE 0x40
330 #define _GIE 0x80
332 //==============================================================================
335 //==============================================================================
336 // PORTA Bits
338 extern __at(0x000C) __sfr PORTA;
340 typedef union
342 struct
344 unsigned RA0 : 1;
345 unsigned RA1 : 1;
346 unsigned RA2 : 1;
347 unsigned RA3 : 1;
348 unsigned RA4 : 1;
349 unsigned RA5 : 1;
350 unsigned : 1;
351 unsigned : 1;
354 struct
356 unsigned RA : 6;
357 unsigned : 2;
359 } __PORTAbits_t;
361 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
363 #define _RA0 0x01
364 #define _RA1 0x02
365 #define _RA2 0x04
366 #define _RA3 0x08
367 #define _RA4 0x10
368 #define _RA5 0x20
370 //==============================================================================
373 //==============================================================================
374 // PORTB Bits
376 extern __at(0x000D) __sfr PORTB;
378 typedef union
380 struct
382 unsigned : 1;
383 unsigned : 1;
384 unsigned : 1;
385 unsigned : 1;
386 unsigned RB4 : 1;
387 unsigned RB5 : 1;
388 unsigned RB6 : 1;
389 unsigned RB7 : 1;
392 struct
394 unsigned : 1;
395 unsigned : 1;
396 unsigned : 1;
397 unsigned : 1;
398 unsigned : 1;
399 unsigned LINRX : 1;
400 unsigned LINCS : 1;
401 unsigned LINTX : 1;
403 } __PORTBbits_t;
405 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
407 #define _RB4 0x10
408 #define _RB5 0x20
409 #define _LINRX 0x20
410 #define _RB6 0x40
411 #define _LINCS 0x40
412 #define _RB7 0x80
413 #define _LINTX 0x80
415 //==============================================================================
418 //==============================================================================
419 // PORTC Bits
421 extern __at(0x000E) __sfr PORTC;
423 typedef union
425 struct
427 unsigned RC0 : 1;
428 unsigned RC1 : 1;
429 unsigned RC2 : 1;
430 unsigned RC3 : 1;
431 unsigned RC4 : 1;
432 unsigned RC5 : 1;
433 unsigned RC6 : 1;
434 unsigned RC7 : 1;
437 struct
439 unsigned : 1;
440 unsigned : 1;
441 unsigned : 1;
442 unsigned : 1;
443 unsigned : 1;
444 unsigned : 1;
445 unsigned : 1;
446 unsigned PWRGD : 1;
448 } __PORTCbits_t;
450 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
452 #define _PORTC_RC0 0x01
453 #define _PORTC_RC1 0x02
454 #define _PORTC_RC2 0x04
455 #define _PORTC_RC3 0x08
456 #define _PORTC_RC4 0x10
457 #define _PORTC_RC5 0x20
458 #define _PORTC_RC6 0x40
459 #define _PORTC_RC7 0x80
460 #define _PORTC_PWRGD 0x80
462 //==============================================================================
465 //==============================================================================
466 // PIR1 Bits
468 extern __at(0x0011) __sfr PIR1;
470 typedef struct
472 unsigned TMR1IF : 1;
473 unsigned TMR2IF : 1;
474 unsigned CCP1IF : 1;
475 unsigned SSP1IF : 1;
476 unsigned TXIF : 1;
477 unsigned RCIF : 1;
478 unsigned ADIF : 1;
479 unsigned TMR1GIF : 1;
480 } __PIR1bits_t;
482 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
484 #define _TMR1IF 0x01
485 #define _TMR2IF 0x02
486 #define _CCP1IF 0x04
487 #define _SSP1IF 0x08
488 #define _TXIF 0x10
489 #define _RCIF 0x20
490 #define _ADIF 0x40
491 #define _TMR1GIF 0x80
493 //==============================================================================
496 //==============================================================================
497 // PIR2 Bits
499 extern __at(0x0012) __sfr PIR2;
501 typedef struct
503 unsigned CCP2IF : 1;
504 unsigned : 1;
505 unsigned : 1;
506 unsigned BCL1IF : 1;
507 unsigned EEIF : 1;
508 unsigned C1IF : 1;
509 unsigned C2IF : 1;
510 unsigned OSFIF : 1;
511 } __PIR2bits_t;
513 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
515 #define _CCP2IF 0x01
516 #define _BCL1IF 0x08
517 #define _EEIF 0x10
518 #define _C1IF 0x20
519 #define _C2IF 0x40
520 #define _OSFIF 0x80
522 //==============================================================================
525 //==============================================================================
526 // PIR3 Bits
528 extern __at(0x0013) __sfr PIR3;
530 typedef struct
532 unsigned : 1;
533 unsigned TMR4IF : 1;
534 unsigned : 1;
535 unsigned TMR6IF : 1;
536 unsigned CCP3IF : 1;
537 unsigned CCP4IF : 1;
538 unsigned : 1;
539 unsigned : 1;
540 } __PIR3bits_t;
542 extern __at(0x0013) volatile __PIR3bits_t PIR3bits;
544 #define _TMR4IF 0x02
545 #define _TMR6IF 0x08
546 #define _CCP3IF 0x10
547 #define _CCP4IF 0x20
549 //==============================================================================
552 //==============================================================================
553 // PIR4 Bits
555 extern __at(0x0014) __sfr PIR4;
557 typedef struct
559 unsigned SSP2IF : 1;
560 unsigned BCL2IF : 1;
561 unsigned : 1;
562 unsigned : 1;
563 unsigned : 1;
564 unsigned : 1;
565 unsigned : 1;
566 unsigned : 1;
567 } __PIR4bits_t;
569 extern __at(0x0014) volatile __PIR4bits_t PIR4bits;
571 #define _SSP2IF 0x01
572 #define _BCL2IF 0x02
574 //==============================================================================
576 extern __at(0x0015) __sfr TMR0;
577 extern __at(0x0016) __sfr TMR1;
578 extern __at(0x0016) __sfr TMR1L;
579 extern __at(0x0017) __sfr TMR1H;
581 //==============================================================================
582 // T1CON Bits
584 extern __at(0x0018) __sfr T1CON;
586 typedef union
588 struct
590 unsigned TMR1ON : 1;
591 unsigned : 1;
592 unsigned NOT_T1SYNC : 1;
593 unsigned T1OSCEN : 1;
594 unsigned T1CKPS0 : 1;
595 unsigned T1CKPS1 : 1;
596 unsigned TMR1CS0 : 1;
597 unsigned TMR1CS1 : 1;
600 struct
602 unsigned : 4;
603 unsigned T1CKPS : 2;
604 unsigned : 2;
607 struct
609 unsigned : 6;
610 unsigned TMR1CS : 2;
612 } __T1CONbits_t;
614 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
616 #define _TMR1ON 0x01
617 #define _NOT_T1SYNC 0x04
618 #define _T1OSCEN 0x08
619 #define _T1CKPS0 0x10
620 #define _T1CKPS1 0x20
621 #define _TMR1CS0 0x40
622 #define _TMR1CS1 0x80
624 //==============================================================================
627 //==============================================================================
628 // T1GCON Bits
630 extern __at(0x0019) __sfr T1GCON;
632 typedef union
634 struct
636 unsigned T1GSS0 : 1;
637 unsigned T1GSS1 : 1;
638 unsigned T1GVAL : 1;
639 unsigned T1GGO : 1;
640 unsigned T1GSPM : 1;
641 unsigned T1GTM : 1;
642 unsigned T1GPOL : 1;
643 unsigned TMR1GE : 1;
646 struct
648 unsigned T1GSS : 2;
649 unsigned : 6;
651 } __T1GCONbits_t;
653 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
655 #define _T1GSS0 0x01
656 #define _T1GSS1 0x02
657 #define _T1GVAL 0x04
658 #define _T1GGO 0x08
659 #define _T1GSPM 0x10
660 #define _T1GTM 0x20
661 #define _T1GPOL 0x40
662 #define _TMR1GE 0x80
664 //==============================================================================
666 extern __at(0x001A) __sfr TMR2;
667 extern __at(0x001B) __sfr PR2;
669 //==============================================================================
670 // T2CON Bits
672 extern __at(0x001C) __sfr T2CON;
674 typedef union
676 struct
678 unsigned T2CKPS0 : 1;
679 unsigned T2CKPS1 : 1;
680 unsigned TMR2ON : 1;
681 unsigned T2OUTPS0 : 1;
682 unsigned T2OUTPS1 : 1;
683 unsigned T2OUTPS2 : 1;
684 unsigned T2OUTPS3 : 1;
685 unsigned : 1;
688 struct
690 unsigned T2CKPS : 2;
691 unsigned : 6;
694 struct
696 unsigned : 3;
697 unsigned T2OUTPS : 4;
698 unsigned : 1;
700 } __T2CONbits_t;
702 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
704 #define _T2CKPS0 0x01
705 #define _T2CKPS1 0x02
706 #define _TMR2ON 0x04
707 #define _T2OUTPS0 0x08
708 #define _T2OUTPS1 0x10
709 #define _T2OUTPS2 0x20
710 #define _T2OUTPS3 0x40
712 //==============================================================================
715 //==============================================================================
716 // CPSCON0 Bits
718 extern __at(0x001E) __sfr CPSCON0;
720 typedef union
722 struct
724 unsigned T0XCS : 1;
725 unsigned CPSOUT : 1;
726 unsigned CPSRNG0 : 1;
727 unsigned CPSRNG1 : 1;
728 unsigned : 1;
729 unsigned : 1;
730 unsigned CPSRM : 1;
731 unsigned CPSON : 1;
734 struct
736 unsigned : 2;
737 unsigned CPSRNG : 2;
738 unsigned : 4;
740 } __CPSCON0bits_t;
742 extern __at(0x001E) volatile __CPSCON0bits_t CPSCON0bits;
744 #define _T0XCS 0x01
745 #define _CPSOUT 0x02
746 #define _CPSRNG0 0x04
747 #define _CPSRNG1 0x08
748 #define _CPSRM 0x40
749 #define _CPSON 0x80
751 //==============================================================================
754 //==============================================================================
755 // CPSCON1 Bits
757 extern __at(0x001F) __sfr CPSCON1;
759 typedef union
761 struct
763 unsigned CPSCH0 : 1;
764 unsigned CPSCH1 : 1;
765 unsigned CPSCH2 : 1;
766 unsigned CPSCH3 : 1;
767 unsigned : 1;
768 unsigned : 1;
769 unsigned : 1;
770 unsigned : 1;
773 struct
775 unsigned CPSCH : 4;
776 unsigned : 4;
778 } __CPSCON1bits_t;
780 extern __at(0x001F) volatile __CPSCON1bits_t CPSCON1bits;
782 #define _CPSCH0 0x01
783 #define _CPSCH1 0x02
784 #define _CPSCH2 0x04
785 #define _CPSCH3 0x08
787 //==============================================================================
790 //==============================================================================
791 // TRISA Bits
793 extern __at(0x008C) __sfr TRISA;
795 typedef union
797 struct
799 unsigned TRISA0 : 1;
800 unsigned TRISA1 : 1;
801 unsigned TRISA2 : 1;
802 unsigned TRISA3 : 1;
803 unsigned TRISA4 : 1;
804 unsigned TRISA5 : 1;
805 unsigned : 1;
806 unsigned : 1;
809 struct
811 unsigned TRISA : 6;
812 unsigned : 2;
814 } __TRISAbits_t;
816 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
818 #define _TRISA0 0x01
819 #define _TRISA1 0x02
820 #define _TRISA2 0x04
821 #define _TRISA3 0x08
822 #define _TRISA4 0x10
823 #define _TRISA5 0x20
825 //==============================================================================
828 //==============================================================================
829 // TRISB Bits
831 extern __at(0x008D) __sfr TRISB;
833 typedef struct
835 unsigned : 1;
836 unsigned : 1;
837 unsigned : 1;
838 unsigned : 1;
839 unsigned TRISB4 : 1;
840 unsigned TRISB5 : 1;
841 unsigned TRISB6 : 1;
842 unsigned TRISB7 : 1;
843 } __TRISBbits_t;
845 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
847 #define _TRISB4 0x10
848 #define _TRISB5 0x20
849 #define _TRISB6 0x40
850 #define _TRISB7 0x80
852 //==============================================================================
855 //==============================================================================
856 // TRISC Bits
858 extern __at(0x008E) __sfr TRISC;
860 typedef struct
862 unsigned TRISC0 : 1;
863 unsigned TRISC1 : 1;
864 unsigned TRISC2 : 1;
865 unsigned TRISC3 : 1;
866 unsigned TRISC4 : 1;
867 unsigned TRISC5 : 1;
868 unsigned TRISC6 : 1;
869 unsigned TRISC7 : 1;
870 } __TRISCbits_t;
872 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
874 #define _TRISC0 0x01
875 #define _TRISC1 0x02
876 #define _TRISC2 0x04
877 #define _TRISC3 0x08
878 #define _TRISC4 0x10
879 #define _TRISC5 0x20
880 #define _TRISC6 0x40
881 #define _TRISC7 0x80
883 //==============================================================================
886 //==============================================================================
887 // PIE1 Bits
889 extern __at(0x0091) __sfr PIE1;
891 typedef struct
893 unsigned TMR1IE : 1;
894 unsigned TMR2IE : 1;
895 unsigned CCP1IE : 1;
896 unsigned SSP1IE : 1;
897 unsigned TXIE : 1;
898 unsigned RCIE : 1;
899 unsigned ADIE : 1;
900 unsigned TMR1GIE : 1;
901 } __PIE1bits_t;
903 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
905 #define _TMR1IE 0x01
906 #define _TMR2IE 0x02
907 #define _CCP1IE 0x04
908 #define _SSP1IE 0x08
909 #define _TXIE 0x10
910 #define _RCIE 0x20
911 #define _ADIE 0x40
912 #define _TMR1GIE 0x80
914 //==============================================================================
917 //==============================================================================
918 // PIE2 Bits
920 extern __at(0x0092) __sfr PIE2;
922 typedef struct
924 unsigned CCP2IE : 1;
925 unsigned : 1;
926 unsigned : 1;
927 unsigned BCL1IE : 1;
928 unsigned EEIE : 1;
929 unsigned C1IE : 1;
930 unsigned C2IE : 1;
931 unsigned OSFIE : 1;
932 } __PIE2bits_t;
934 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
936 #define _CCP2IE 0x01
937 #define _BCL1IE 0x08
938 #define _EEIE 0x10
939 #define _C1IE 0x20
940 #define _C2IE 0x40
941 #define _OSFIE 0x80
943 //==============================================================================
946 //==============================================================================
947 // PIE3 Bits
949 extern __at(0x0093) __sfr PIE3;
951 typedef struct
953 unsigned : 1;
954 unsigned TMR4IE : 1;
955 unsigned : 1;
956 unsigned TMR6IE : 1;
957 unsigned CCP3IE : 1;
958 unsigned CCP4IE : 1;
959 unsigned : 1;
960 unsigned : 1;
961 } __PIE3bits_t;
963 extern __at(0x0093) volatile __PIE3bits_t PIE3bits;
965 #define _TMR4IE 0x02
966 #define _TMR6IE 0x08
967 #define _CCP3IE 0x10
968 #define _CCP4IE 0x20
970 //==============================================================================
973 //==============================================================================
974 // PIE4 Bits
976 extern __at(0x0094) __sfr PIE4;
978 typedef struct
980 unsigned SSP2IE : 1;
981 unsigned BCL2IE : 1;
982 unsigned : 1;
983 unsigned : 1;
984 unsigned : 1;
985 unsigned : 1;
986 unsigned : 1;
987 unsigned : 1;
988 } __PIE4bits_t;
990 extern __at(0x0094) volatile __PIE4bits_t PIE4bits;
992 #define _SSP2IE 0x01
993 #define _BCL2IE 0x02
995 //==============================================================================
998 //==============================================================================
999 // OPTION_REG Bits
1001 extern __at(0x0095) __sfr OPTION_REG;
1003 typedef union
1005 struct
1007 unsigned PS0 : 1;
1008 unsigned PS1 : 1;
1009 unsigned PS2 : 1;
1010 unsigned PSA : 1;
1011 unsigned TMR0SE : 1;
1012 unsigned TMR0CS : 1;
1013 unsigned INTEDG : 1;
1014 unsigned NOT_WPUEN : 1;
1017 struct
1019 unsigned : 1;
1020 unsigned : 1;
1021 unsigned : 1;
1022 unsigned : 1;
1023 unsigned T0SE : 1;
1024 unsigned T0CS : 1;
1025 unsigned : 1;
1026 unsigned : 1;
1029 struct
1031 unsigned PS : 3;
1032 unsigned : 5;
1034 } __OPTION_REGbits_t;
1036 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
1038 #define _PS0 0x01
1039 #define _PS1 0x02
1040 #define _PS2 0x04
1041 #define _PSA 0x08
1042 #define _TMR0SE 0x10
1043 #define _T0SE 0x10
1044 #define _TMR0CS 0x20
1045 #define _T0CS 0x20
1046 #define _INTEDG 0x40
1047 #define _NOT_WPUEN 0x80
1049 //==============================================================================
1052 //==============================================================================
1053 // PCON Bits
1055 extern __at(0x0096) __sfr PCON;
1057 typedef struct
1059 unsigned NOT_BOR : 1;
1060 unsigned NOT_POR : 1;
1061 unsigned NOT_RI : 1;
1062 unsigned NOT_RMCLR : 1;
1063 unsigned : 1;
1064 unsigned : 1;
1065 unsigned STKUNF : 1;
1066 unsigned STKOVF : 1;
1067 } __PCONbits_t;
1069 extern __at(0x0096) volatile __PCONbits_t PCONbits;
1071 #define _NOT_BOR 0x01
1072 #define _NOT_POR 0x02
1073 #define _NOT_RI 0x04
1074 #define _NOT_RMCLR 0x08
1075 #define _STKUNF 0x40
1076 #define _STKOVF 0x80
1078 //==============================================================================
1081 //==============================================================================
1082 // WDTCON Bits
1084 extern __at(0x0097) __sfr WDTCON;
1086 typedef union
1088 struct
1090 unsigned SWDTEN : 1;
1091 unsigned WDTPS0 : 1;
1092 unsigned WDTPS1 : 1;
1093 unsigned WDTPS2 : 1;
1094 unsigned WDTPS3 : 1;
1095 unsigned WDTPS4 : 1;
1096 unsigned : 1;
1097 unsigned : 1;
1100 struct
1102 unsigned : 1;
1103 unsigned WDTPS : 5;
1104 unsigned : 2;
1106 } __WDTCONbits_t;
1108 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
1110 #define _SWDTEN 0x01
1111 #define _WDTPS0 0x02
1112 #define _WDTPS1 0x04
1113 #define _WDTPS2 0x08
1114 #define _WDTPS3 0x10
1115 #define _WDTPS4 0x20
1117 //==============================================================================
1120 //==============================================================================
1121 // OSCTUNE Bits
1123 extern __at(0x0098) __sfr OSCTUNE;
1125 typedef union
1127 struct
1129 unsigned TUN0 : 1;
1130 unsigned TUN1 : 1;
1131 unsigned TUN2 : 1;
1132 unsigned TUN3 : 1;
1133 unsigned TUN4 : 1;
1134 unsigned TUN5 : 1;
1135 unsigned : 1;
1136 unsigned : 1;
1139 struct
1141 unsigned TUN : 6;
1142 unsigned : 2;
1144 } __OSCTUNEbits_t;
1146 extern __at(0x0098) volatile __OSCTUNEbits_t OSCTUNEbits;
1148 #define _TUN0 0x01
1149 #define _TUN1 0x02
1150 #define _TUN2 0x04
1151 #define _TUN3 0x08
1152 #define _TUN4 0x10
1153 #define _TUN5 0x20
1155 //==============================================================================
1158 //==============================================================================
1159 // OSCCON Bits
1161 extern __at(0x0099) __sfr OSCCON;
1163 typedef union
1165 struct
1167 unsigned SCS0 : 1;
1168 unsigned SCS1 : 1;
1169 unsigned : 1;
1170 unsigned IRCF0 : 1;
1171 unsigned IRCF1 : 1;
1172 unsigned IRCF2 : 1;
1173 unsigned IRCF3 : 1;
1174 unsigned SPLLEN : 1;
1177 struct
1179 unsigned SCS : 2;
1180 unsigned : 6;
1183 struct
1185 unsigned : 3;
1186 unsigned IRCF : 4;
1187 unsigned : 1;
1189 } __OSCCONbits_t;
1191 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1193 #define _SCS0 0x01
1194 #define _SCS1 0x02
1195 #define _IRCF0 0x08
1196 #define _IRCF1 0x10
1197 #define _IRCF2 0x20
1198 #define _IRCF3 0x40
1199 #define _SPLLEN 0x80
1201 //==============================================================================
1204 //==============================================================================
1205 // OSCSTAT Bits
1207 extern __at(0x009A) __sfr OSCSTAT;
1209 typedef struct
1211 unsigned HFIOFS : 1;
1212 unsigned LFIOFR : 1;
1213 unsigned MFIOFR : 1;
1214 unsigned HFIOFL : 1;
1215 unsigned HFIOFR : 1;
1216 unsigned OSTS : 1;
1217 unsigned PLLR : 1;
1218 unsigned T1OSCR : 1;
1219 } __OSCSTATbits_t;
1221 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1223 #define _HFIOFS 0x01
1224 #define _LFIOFR 0x02
1225 #define _MFIOFR 0x04
1226 #define _HFIOFL 0x08
1227 #define _HFIOFR 0x10
1228 #define _OSTS 0x20
1229 #define _PLLR 0x40
1230 #define _T1OSCR 0x80
1232 //==============================================================================
1234 extern __at(0x009B) __sfr ADRES;
1235 extern __at(0x009B) __sfr ADRESL;
1236 extern __at(0x009C) __sfr ADRESH;
1238 //==============================================================================
1239 // ADCON0 Bits
1241 extern __at(0x009D) __sfr ADCON0;
1243 typedef union
1245 struct
1247 unsigned ADON : 1;
1248 unsigned GO_NOT_DONE : 1;
1249 unsigned CHS0 : 1;
1250 unsigned CHS1 : 1;
1251 unsigned CHS2 : 1;
1252 unsigned CHS3 : 1;
1253 unsigned CHS4 : 1;
1254 unsigned : 1;
1257 struct
1259 unsigned : 1;
1260 unsigned ADGO : 1;
1261 unsigned : 1;
1262 unsigned : 1;
1263 unsigned : 1;
1264 unsigned : 1;
1265 unsigned : 1;
1266 unsigned : 1;
1269 struct
1271 unsigned : 1;
1272 unsigned GO : 1;
1273 unsigned : 1;
1274 unsigned : 1;
1275 unsigned : 1;
1276 unsigned : 1;
1277 unsigned : 1;
1278 unsigned : 1;
1281 struct
1283 unsigned : 2;
1284 unsigned CHS : 5;
1285 unsigned : 1;
1287 } __ADCON0bits_t;
1289 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1291 #define _ADON 0x01
1292 #define _GO_NOT_DONE 0x02
1293 #define _ADGO 0x02
1294 #define _GO 0x02
1295 #define _CHS0 0x04
1296 #define _CHS1 0x08
1297 #define _CHS2 0x10
1298 #define _CHS3 0x20
1299 #define _CHS4 0x40
1301 //==============================================================================
1304 //==============================================================================
1305 // ADCON1 Bits
1307 extern __at(0x009E) __sfr ADCON1;
1309 typedef union
1311 struct
1313 unsigned ADPREF0 : 1;
1314 unsigned ADPREF1 : 1;
1315 unsigned ADNREF : 1;
1316 unsigned : 1;
1317 unsigned ADCS0 : 1;
1318 unsigned ADCS1 : 1;
1319 unsigned ADCS2 : 1;
1320 unsigned ADFM : 1;
1323 struct
1325 unsigned ADPREF : 2;
1326 unsigned : 6;
1329 struct
1331 unsigned : 4;
1332 unsigned ADCS : 3;
1333 unsigned : 1;
1335 } __ADCON1bits_t;
1337 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1339 #define _ADPREF0 0x01
1340 #define _ADPREF1 0x02
1341 #define _ADNREF 0x04
1342 #define _ADCS0 0x10
1343 #define _ADCS1 0x20
1344 #define _ADCS2 0x40
1345 #define _ADFM 0x80
1347 //==============================================================================
1350 //==============================================================================
1351 // LATA Bits
1353 extern __at(0x010C) __sfr LATA;
1355 typedef struct
1357 unsigned LATA0 : 1;
1358 unsigned LATA1 : 1;
1359 unsigned LATA2 : 1;
1360 unsigned : 1;
1361 unsigned LATA4 : 1;
1362 unsigned LATA5 : 1;
1363 unsigned : 1;
1364 unsigned : 1;
1365 } __LATAbits_t;
1367 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1369 #define _LATA0 0x01
1370 #define _LATA1 0x02
1371 #define _LATA2 0x04
1372 #define _LATA4 0x10
1373 #define _LATA5 0x20
1375 //==============================================================================
1378 //==============================================================================
1379 // LATB Bits
1381 extern __at(0x010D) __sfr LATB;
1383 typedef struct
1385 unsigned : 1;
1386 unsigned : 1;
1387 unsigned : 1;
1388 unsigned : 1;
1389 unsigned LATB4 : 1;
1390 unsigned LATB5 : 1;
1391 unsigned LATB6 : 1;
1392 unsigned LATB7 : 1;
1393 } __LATBbits_t;
1395 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1397 #define _LATB4 0x10
1398 #define _LATB5 0x20
1399 #define _LATB6 0x40
1400 #define _LATB7 0x80
1402 //==============================================================================
1405 //==============================================================================
1406 // LATC Bits
1408 extern __at(0x010E) __sfr LATC;
1410 typedef union
1412 struct
1414 unsigned LATC0 : 1;
1415 unsigned LATC1 : 1;
1416 unsigned LATC2 : 1;
1417 unsigned LATC3 : 1;
1418 unsigned LATC4 : 1;
1419 unsigned LATC5 : 1;
1420 unsigned LATC6 : 1;
1421 unsigned LATC7 : 1;
1424 struct
1426 unsigned : 1;
1427 unsigned : 1;
1428 unsigned : 1;
1429 unsigned : 1;
1430 unsigned : 1;
1431 unsigned : 1;
1432 unsigned : 1;
1433 unsigned PWRGD : 1;
1435 } __LATCbits_t;
1437 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1439 #define _LATC0 0x01
1440 #define _LATC1 0x02
1441 #define _LATC2 0x04
1442 #define _LATC3 0x08
1443 #define _LATC4 0x10
1444 #define _LATC5 0x20
1445 #define _LATC6 0x40
1446 #define _LATC7 0x80
1447 #define _PWRGD 0x80
1449 //==============================================================================
1452 //==============================================================================
1453 // CM1CON0 Bits
1455 extern __at(0x0111) __sfr CM1CON0;
1457 typedef struct
1459 unsigned C1SYNC : 1;
1460 unsigned C1HYS : 1;
1461 unsigned C1SP : 1;
1462 unsigned : 1;
1463 unsigned C1POL : 1;
1464 unsigned C1OE : 1;
1465 unsigned C1OUT : 1;
1466 unsigned C1ON : 1;
1467 } __CM1CON0bits_t;
1469 extern __at(0x0111) volatile __CM1CON0bits_t CM1CON0bits;
1471 #define _C1SYNC 0x01
1472 #define _C1HYS 0x02
1473 #define _C1SP 0x04
1474 #define _C1POL 0x10
1475 #define _C1OE 0x20
1476 #define _C1OUT 0x40
1477 #define _C1ON 0x80
1479 //==============================================================================
1482 //==============================================================================
1483 // CM1CON1 Bits
1485 extern __at(0x0112) __sfr CM1CON1;
1487 typedef union
1489 struct
1491 unsigned C1NCH0 : 1;
1492 unsigned C1NCH1 : 1;
1493 unsigned : 1;
1494 unsigned : 1;
1495 unsigned C1PCH0 : 1;
1496 unsigned C1PCH1 : 1;
1497 unsigned C1INTN : 1;
1498 unsigned C1INTP : 1;
1501 struct
1503 unsigned C1NCH : 2;
1504 unsigned : 6;
1507 struct
1509 unsigned : 4;
1510 unsigned C1PCH : 2;
1511 unsigned : 2;
1513 } __CM1CON1bits_t;
1515 extern __at(0x0112) volatile __CM1CON1bits_t CM1CON1bits;
1517 #define _C1NCH0 0x01
1518 #define _C1NCH1 0x02
1519 #define _C1PCH0 0x10
1520 #define _C1PCH1 0x20
1521 #define _C1INTN 0x40
1522 #define _C1INTP 0x80
1524 //==============================================================================
1527 //==============================================================================
1528 // CM2CON0 Bits
1530 extern __at(0x0113) __sfr CM2CON0;
1532 typedef struct
1534 unsigned C2SYNC : 1;
1535 unsigned C2HYS : 1;
1536 unsigned C2SP : 1;
1537 unsigned : 1;
1538 unsigned C2POL : 1;
1539 unsigned C2OE : 1;
1540 unsigned C2OUT : 1;
1541 unsigned C2ON : 1;
1542 } __CM2CON0bits_t;
1544 extern __at(0x0113) volatile __CM2CON0bits_t CM2CON0bits;
1546 #define _C2SYNC 0x01
1547 #define _C2HYS 0x02
1548 #define _C2SP 0x04
1549 #define _C2POL 0x10
1550 #define _C2OE 0x20
1551 #define _C2OUT 0x40
1552 #define _C2ON 0x80
1554 //==============================================================================
1557 //==============================================================================
1558 // CM2CON1 Bits
1560 extern __at(0x0114) __sfr CM2CON1;
1562 typedef union
1564 struct
1566 unsigned C2NCH0 : 1;
1567 unsigned C2NCH1 : 1;
1568 unsigned : 1;
1569 unsigned : 1;
1570 unsigned C2PCH0 : 1;
1571 unsigned C2PCH1 : 1;
1572 unsigned C2INTN : 1;
1573 unsigned C2INTP : 1;
1576 struct
1578 unsigned C2NCH : 2;
1579 unsigned : 6;
1582 struct
1584 unsigned : 4;
1585 unsigned C2PCH : 2;
1586 unsigned : 2;
1588 } __CM2CON1bits_t;
1590 extern __at(0x0114) volatile __CM2CON1bits_t CM2CON1bits;
1592 #define _C2NCH0 0x01
1593 #define _C2NCH1 0x02
1594 #define _C2PCH0 0x10
1595 #define _C2PCH1 0x20
1596 #define _C2INTN 0x40
1597 #define _C2INTP 0x80
1599 //==============================================================================
1602 //==============================================================================
1603 // CMOUT Bits
1605 extern __at(0x0115) __sfr CMOUT;
1607 typedef struct
1609 unsigned MC1OUT : 1;
1610 unsigned MC2OUT : 1;
1611 unsigned : 1;
1612 unsigned : 1;
1613 unsigned : 1;
1614 unsigned : 1;
1615 unsigned : 1;
1616 unsigned : 1;
1617 } __CMOUTbits_t;
1619 extern __at(0x0115) volatile __CMOUTbits_t CMOUTbits;
1621 #define _MC1OUT 0x01
1622 #define _MC2OUT 0x02
1624 //==============================================================================
1627 //==============================================================================
1628 // BORCON Bits
1630 extern __at(0x0116) __sfr BORCON;
1632 typedef struct
1634 unsigned BORRDY : 1;
1635 unsigned : 1;
1636 unsigned : 1;
1637 unsigned : 1;
1638 unsigned : 1;
1639 unsigned : 1;
1640 unsigned : 1;
1641 unsigned SBOREN : 1;
1642 } __BORCONbits_t;
1644 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1646 #define _BORRDY 0x01
1647 #define _SBOREN 0x80
1649 //==============================================================================
1652 //==============================================================================
1653 // FVRCON Bits
1655 extern __at(0x0117) __sfr FVRCON;
1657 typedef union
1659 struct
1661 unsigned ADFVR0 : 1;
1662 unsigned ADFVR1 : 1;
1663 unsigned CDAFVR0 : 1;
1664 unsigned CDAFVR1 : 1;
1665 unsigned TSRNG : 1;
1666 unsigned TSEN : 1;
1667 unsigned FVRRDY : 1;
1668 unsigned FVREN : 1;
1671 struct
1673 unsigned ADFVR : 2;
1674 unsigned : 6;
1677 struct
1679 unsigned : 2;
1680 unsigned CDAFVR : 2;
1681 unsigned : 4;
1683 } __FVRCONbits_t;
1685 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1687 #define _ADFVR0 0x01
1688 #define _ADFVR1 0x02
1689 #define _CDAFVR0 0x04
1690 #define _CDAFVR1 0x08
1691 #define _TSRNG 0x10
1692 #define _TSEN 0x20
1693 #define _FVRRDY 0x40
1694 #define _FVREN 0x80
1696 //==============================================================================
1699 //==============================================================================
1700 // DACCON0 Bits
1702 extern __at(0x0118) __sfr DACCON0;
1704 typedef union
1706 struct
1708 unsigned DACNSS : 1;
1709 unsigned : 1;
1710 unsigned DACPSS0 : 1;
1711 unsigned DACPSS1 : 1;
1712 unsigned : 1;
1713 unsigned DACOE : 1;
1714 unsigned DACLPS : 1;
1715 unsigned DACEN : 1;
1718 struct
1720 unsigned : 2;
1721 unsigned DACPSS : 2;
1722 unsigned : 4;
1724 } __DACCON0bits_t;
1726 extern __at(0x0118) volatile __DACCON0bits_t DACCON0bits;
1728 #define _DACNSS 0x01
1729 #define _DACPSS0 0x04
1730 #define _DACPSS1 0x08
1731 #define _DACOE 0x20
1732 #define _DACLPS 0x40
1733 #define _DACEN 0x80
1735 //==============================================================================
1738 //==============================================================================
1739 // DACCON1 Bits
1741 extern __at(0x0119) __sfr DACCON1;
1743 typedef union
1745 struct
1747 unsigned DACR0 : 1;
1748 unsigned DACR1 : 1;
1749 unsigned DACR2 : 1;
1750 unsigned DACR3 : 1;
1751 unsigned DACR4 : 1;
1752 unsigned : 1;
1753 unsigned : 1;
1754 unsigned : 1;
1757 struct
1759 unsigned DACR : 5;
1760 unsigned : 3;
1762 } __DACCON1bits_t;
1764 extern __at(0x0119) volatile __DACCON1bits_t DACCON1bits;
1766 #define _DACR0 0x01
1767 #define _DACR1 0x02
1768 #define _DACR2 0x04
1769 #define _DACR3 0x08
1770 #define _DACR4 0x10
1772 //==============================================================================
1775 //==============================================================================
1776 // SRCON0 Bits
1778 extern __at(0x011A) __sfr SRCON0;
1780 typedef union
1782 struct
1784 unsigned SRPR : 1;
1785 unsigned SRPS : 1;
1786 unsigned SRNQEN : 1;
1787 unsigned SRQEN : 1;
1788 unsigned SRCLK0 : 1;
1789 unsigned SRCLK1 : 1;
1790 unsigned SRCLK2 : 1;
1791 unsigned SRLEN : 1;
1794 struct
1796 unsigned : 4;
1797 unsigned SRCLK : 3;
1798 unsigned : 1;
1800 } __SRCON0bits_t;
1802 extern __at(0x011A) volatile __SRCON0bits_t SRCON0bits;
1804 #define _SRPR 0x01
1805 #define _SRPS 0x02
1806 #define _SRNQEN 0x04
1807 #define _SRQEN 0x08
1808 #define _SRCLK0 0x10
1809 #define _SRCLK1 0x20
1810 #define _SRCLK2 0x40
1811 #define _SRLEN 0x80
1813 //==============================================================================
1816 //==============================================================================
1817 // SRCON1 Bits
1819 extern __at(0x011B) __sfr SRCON1;
1821 typedef struct
1823 unsigned SRRC1E : 1;
1824 unsigned SRRC2E : 1;
1825 unsigned SRRCKE : 1;
1826 unsigned SRRPE : 1;
1827 unsigned SRSC1E : 1;
1828 unsigned SRSC2E : 1;
1829 unsigned SRSCKE : 1;
1830 unsigned SRSPE : 1;
1831 } __SRCON1bits_t;
1833 extern __at(0x011B) volatile __SRCON1bits_t SRCON1bits;
1835 #define _SRRC1E 0x01
1836 #define _SRRC2E 0x02
1837 #define _SRRCKE 0x04
1838 #define _SRRPE 0x08
1839 #define _SRSC1E 0x10
1840 #define _SRSC2E 0x20
1841 #define _SRSCKE 0x40
1842 #define _SRSPE 0x80
1844 //==============================================================================
1847 //==============================================================================
1848 // APFCON0 Bits
1850 extern __at(0x011D) __sfr APFCON0;
1852 typedef struct
1854 unsigned : 1;
1855 unsigned : 1;
1856 unsigned TXCKSEL : 1;
1857 unsigned T1GSEL : 1;
1858 unsigned : 1;
1859 unsigned : 1;
1860 unsigned : 1;
1861 unsigned RXDTSEL : 1;
1862 } __APFCON0bits_t;
1864 extern __at(0x011D) volatile __APFCON0bits_t APFCON0bits;
1866 #define _TXCKSEL 0x04
1867 #define _T1GSEL 0x08
1868 #define _RXDTSEL 0x80
1870 //==============================================================================
1873 //==============================================================================
1874 // APFCON1 Bits
1876 extern __at(0x011E) __sfr APFCON1;
1878 typedef struct
1880 unsigned CCP2SEL : 1;
1881 unsigned P2BSEL : 1;
1882 unsigned P1CSEL : 1;
1883 unsigned P1DSEL : 1;
1884 unsigned SS2SEL : 1;
1885 unsigned SDO2SEL : 1;
1886 unsigned : 1;
1887 unsigned : 1;
1888 } __APFCON1bits_t;
1890 extern __at(0x011E) volatile __APFCON1bits_t APFCON1bits;
1892 #define _CCP2SEL 0x01
1893 #define _P2BSEL 0x02
1894 #define _P1CSEL 0x04
1895 #define _P1DSEL 0x08
1896 #define _SS2SEL 0x10
1897 #define _SDO2SEL 0x20
1899 //==============================================================================
1902 //==============================================================================
1903 // ANSELA Bits
1905 extern __at(0x018C) __sfr ANSELA;
1907 typedef struct
1909 unsigned ANSA0 : 1;
1910 unsigned ANSA1 : 1;
1911 unsigned ANSA2 : 1;
1912 unsigned : 1;
1913 unsigned ANSA4 : 1;
1914 unsigned : 1;
1915 unsigned : 1;
1916 unsigned : 1;
1917 } __ANSELAbits_t;
1919 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1921 #define _ANSA0 0x01
1922 #define _ANSA1 0x02
1923 #define _ANSA2 0x04
1924 #define _ANSA4 0x10
1926 //==============================================================================
1929 //==============================================================================
1930 // ANSELB Bits
1932 extern __at(0x018D) __sfr ANSELB;
1934 typedef struct
1936 unsigned : 1;
1937 unsigned : 1;
1938 unsigned : 1;
1939 unsigned : 1;
1940 unsigned ANSB4 : 1;
1941 unsigned ANSB5 : 1;
1942 unsigned ANSB6 : 1;
1943 unsigned ANSB7 : 1;
1944 } __ANSELBbits_t;
1946 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1948 #define _ANSB4 0x10
1949 #define _ANSB5 0x20
1950 #define _ANSB6 0x40
1951 #define _ANSB7 0x80
1953 //==============================================================================
1956 //==============================================================================
1957 // ANSELC Bits
1959 extern __at(0x018E) __sfr ANSELC;
1961 typedef struct
1963 unsigned ANSC0 : 1;
1964 unsigned ANSC1 : 1;
1965 unsigned ANSC2 : 1;
1966 unsigned ANSC3 : 1;
1967 unsigned : 1;
1968 unsigned : 1;
1969 unsigned ANSC6 : 1;
1970 unsigned ANSC7 : 1;
1971 } __ANSELCbits_t;
1973 extern __at(0x018E) volatile __ANSELCbits_t ANSELCbits;
1975 #define _ANSC0 0x01
1976 #define _ANSC1 0x02
1977 #define _ANSC2 0x04
1978 #define _ANSC3 0x08
1979 #define _ANSC6 0x40
1980 #define _ANSC7 0x80
1982 //==============================================================================
1984 extern __at(0x0191) __sfr EEADR;
1985 extern __at(0x0191) __sfr EEADRL;
1986 extern __at(0x0192) __sfr EEADRH;
1987 extern __at(0x0193) __sfr EEDAT;
1988 extern __at(0x0193) __sfr EEDATL;
1989 extern __at(0x0194) __sfr EEDATH;
1991 //==============================================================================
1992 // EECON1 Bits
1994 extern __at(0x0195) __sfr EECON1;
1996 typedef struct
1998 unsigned RD : 1;
1999 unsigned WR : 1;
2000 unsigned WREN : 1;
2001 unsigned WRERR : 1;
2002 unsigned FREE : 1;
2003 unsigned LWLO : 1;
2004 unsigned CFGS : 1;
2005 unsigned EEPGD : 1;
2006 } __EECON1bits_t;
2008 extern __at(0x0195) volatile __EECON1bits_t EECON1bits;
2010 #define _RD 0x01
2011 #define _WR 0x02
2012 #define _WREN 0x04
2013 #define _WRERR 0x08
2014 #define _FREE 0x10
2015 #define _LWLO 0x20
2016 #define _CFGS 0x40
2017 #define _EEPGD 0x80
2019 //==============================================================================
2021 extern __at(0x0196) __sfr EECON2;
2022 extern __at(0x0199) __sfr RCREG;
2023 extern __at(0x019A) __sfr TXREG;
2024 extern __at(0x019B) __sfr SPBRG;
2025 extern __at(0x019B) __sfr SPBRGL;
2026 extern __at(0x019C) __sfr SPBRGH;
2028 //==============================================================================
2029 // RCSTA Bits
2031 extern __at(0x019D) __sfr RCSTA;
2033 typedef struct
2035 unsigned RX9D : 1;
2036 unsigned OERR : 1;
2037 unsigned FERR : 1;
2038 unsigned ADDEN : 1;
2039 unsigned CREN : 1;
2040 unsigned SREN : 1;
2041 unsigned RX9 : 1;
2042 unsigned SPEN : 1;
2043 } __RCSTAbits_t;
2045 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
2047 #define _RX9D 0x01
2048 #define _OERR 0x02
2049 #define _FERR 0x04
2050 #define _ADDEN 0x08
2051 #define _CREN 0x10
2052 #define _SREN 0x20
2053 #define _RX9 0x40
2054 #define _SPEN 0x80
2056 //==============================================================================
2059 //==============================================================================
2060 // TXSTA Bits
2062 extern __at(0x019E) __sfr TXSTA;
2064 typedef struct
2066 unsigned TX9D : 1;
2067 unsigned TRMT : 1;
2068 unsigned BRGH : 1;
2069 unsigned SENDB : 1;
2070 unsigned SYNC : 1;
2071 unsigned TXEN : 1;
2072 unsigned TX9 : 1;
2073 unsigned CSRC : 1;
2074 } __TXSTAbits_t;
2076 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
2078 #define _TX9D 0x01
2079 #define _TRMT 0x02
2080 #define _BRGH 0x04
2081 #define _SENDB 0x08
2082 #define _SYNC 0x10
2083 #define _TXEN 0x20
2084 #define _TX9 0x40
2085 #define _CSRC 0x80
2087 //==============================================================================
2090 //==============================================================================
2091 // BAUDCON Bits
2093 extern __at(0x019F) __sfr BAUDCON;
2095 typedef struct
2097 unsigned ABDEN : 1;
2098 unsigned WUE : 1;
2099 unsigned : 1;
2100 unsigned BRG16 : 1;
2101 unsigned SCKP : 1;
2102 unsigned : 1;
2103 unsigned RCIDL : 1;
2104 unsigned ABDOVF : 1;
2105 } __BAUDCONbits_t;
2107 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
2109 #define _ABDEN 0x01
2110 #define _WUE 0x02
2111 #define _BRG16 0x08
2112 #define _SCKP 0x10
2113 #define _RCIDL 0x40
2114 #define _ABDOVF 0x80
2116 //==============================================================================
2119 //==============================================================================
2120 // WPUA Bits
2122 extern __at(0x020C) __sfr WPUA;
2124 typedef union
2126 struct
2128 unsigned WPUA0 : 1;
2129 unsigned WPUA1 : 1;
2130 unsigned WPUA2 : 1;
2131 unsigned WPUA3 : 1;
2132 unsigned WPUA4 : 1;
2133 unsigned WPUA5 : 1;
2134 unsigned : 1;
2135 unsigned : 1;
2138 struct
2140 unsigned WPUA : 6;
2141 unsigned : 2;
2143 } __WPUAbits_t;
2145 extern __at(0x020C) volatile __WPUAbits_t WPUAbits;
2147 #define _WPUA0 0x01
2148 #define _WPUA1 0x02
2149 #define _WPUA2 0x04
2150 #define _WPUA3 0x08
2151 #define _WPUA4 0x10
2152 #define _WPUA5 0x20
2154 //==============================================================================
2157 //==============================================================================
2158 // WPUB Bits
2160 extern __at(0x020D) __sfr WPUB;
2162 typedef struct
2164 unsigned : 1;
2165 unsigned : 1;
2166 unsigned : 1;
2167 unsigned : 1;
2168 unsigned WPUB4 : 1;
2169 unsigned WPUB5 : 1;
2170 unsigned WPUB6 : 1;
2171 unsigned WPUB7 : 1;
2172 } __WPUBbits_t;
2174 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
2176 #define _WPUB4 0x10
2177 #define _WPUB5 0x20
2178 #define _WPUB6 0x40
2179 #define _WPUB7 0x80
2181 //==============================================================================
2184 //==============================================================================
2185 // WPUC Bits
2187 extern __at(0x020E) __sfr WPUC;
2189 typedef struct
2191 unsigned WPUC0 : 1;
2192 unsigned WPUC1 : 1;
2193 unsigned WPUC2 : 1;
2194 unsigned WPUC3 : 1;
2195 unsigned WPUC4 : 1;
2196 unsigned WPUC5 : 1;
2197 unsigned WPUC6 : 1;
2198 unsigned WPUC7 : 1;
2199 } __WPUCbits_t;
2201 extern __at(0x020E) volatile __WPUCbits_t WPUCbits;
2203 #define _WPUC0 0x01
2204 #define _WPUC1 0x02
2205 #define _WPUC2 0x04
2206 #define _WPUC3 0x08
2207 #define _WPUC4 0x10
2208 #define _WPUC5 0x20
2209 #define _WPUC6 0x40
2210 #define _WPUC7 0x80
2212 //==============================================================================
2214 extern __at(0x0211) __sfr SSP1BUF;
2215 extern __at(0x0211) __sfr SSPBUF;
2216 extern __at(0x0212) __sfr SSP1ADD;
2217 extern __at(0x0212) __sfr SSPADD;
2218 extern __at(0x0213) __sfr SSP1MSK;
2219 extern __at(0x0213) __sfr SSPMSK;
2221 //==============================================================================
2222 // SSP1STAT Bits
2224 extern __at(0x0214) __sfr SSP1STAT;
2226 typedef struct
2228 unsigned BF : 1;
2229 unsigned UA : 1;
2230 unsigned R_NOT_W : 1;
2231 unsigned S : 1;
2232 unsigned P : 1;
2233 unsigned D_NOT_A : 1;
2234 unsigned CKE : 1;
2235 unsigned SMP : 1;
2236 } __SSP1STATbits_t;
2238 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
2240 #define _BF 0x01
2241 #define _UA 0x02
2242 #define _R_NOT_W 0x04
2243 #define _S 0x08
2244 #define _P 0x10
2245 #define _D_NOT_A 0x20
2246 #define _CKE 0x40
2247 #define _SMP 0x80
2249 //==============================================================================
2252 //==============================================================================
2253 // SSPSTAT Bits
2255 extern __at(0x0214) __sfr SSPSTAT;
2257 typedef struct
2259 unsigned BF : 1;
2260 unsigned UA : 1;
2261 unsigned R_NOT_W : 1;
2262 unsigned S : 1;
2263 unsigned P : 1;
2264 unsigned D_NOT_A : 1;
2265 unsigned CKE : 1;
2266 unsigned SMP : 1;
2267 } __SSPSTATbits_t;
2269 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
2271 #define _SSPSTAT_BF 0x01
2272 #define _SSPSTAT_UA 0x02
2273 #define _SSPSTAT_R_NOT_W 0x04
2274 #define _SSPSTAT_S 0x08
2275 #define _SSPSTAT_P 0x10
2276 #define _SSPSTAT_D_NOT_A 0x20
2277 #define _SSPSTAT_CKE 0x40
2278 #define _SSPSTAT_SMP 0x80
2280 //==============================================================================
2283 //==============================================================================
2284 // SSP1CON1 Bits
2286 extern __at(0x0215) __sfr SSP1CON1;
2288 typedef union
2290 struct
2292 unsigned SSPM0 : 1;
2293 unsigned SSPM1 : 1;
2294 unsigned SSPM2 : 1;
2295 unsigned SSPM3 : 1;
2296 unsigned CKP : 1;
2297 unsigned SSPEN : 1;
2298 unsigned SSPOV : 1;
2299 unsigned WCOL : 1;
2302 struct
2304 unsigned SSPM : 4;
2305 unsigned : 4;
2307 } __SSP1CON1bits_t;
2309 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
2311 #define _SSPM0 0x01
2312 #define _SSPM1 0x02
2313 #define _SSPM2 0x04
2314 #define _SSPM3 0x08
2315 #define _CKP 0x10
2316 #define _SSPEN 0x20
2317 #define _SSPOV 0x40
2318 #define _WCOL 0x80
2320 //==============================================================================
2323 //==============================================================================
2324 // SSPCON Bits
2326 extern __at(0x0215) __sfr SSPCON;
2328 typedef union
2330 struct
2332 unsigned SSPM0 : 1;
2333 unsigned SSPM1 : 1;
2334 unsigned SSPM2 : 1;
2335 unsigned SSPM3 : 1;
2336 unsigned CKP : 1;
2337 unsigned SSPEN : 1;
2338 unsigned SSPOV : 1;
2339 unsigned WCOL : 1;
2342 struct
2344 unsigned SSPM : 4;
2345 unsigned : 4;
2347 } __SSPCONbits_t;
2349 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
2351 #define _SSPCON_SSPM0 0x01
2352 #define _SSPCON_SSPM1 0x02
2353 #define _SSPCON_SSPM2 0x04
2354 #define _SSPCON_SSPM3 0x08
2355 #define _SSPCON_CKP 0x10
2356 #define _SSPCON_SSPEN 0x20
2357 #define _SSPCON_SSPOV 0x40
2358 #define _SSPCON_WCOL 0x80
2360 //==============================================================================
2363 //==============================================================================
2364 // SSPCON1 Bits
2366 extern __at(0x0215) __sfr SSPCON1;
2368 typedef union
2370 struct
2372 unsigned SSPM0 : 1;
2373 unsigned SSPM1 : 1;
2374 unsigned SSPM2 : 1;
2375 unsigned SSPM3 : 1;
2376 unsigned CKP : 1;
2377 unsigned SSPEN : 1;
2378 unsigned SSPOV : 1;
2379 unsigned WCOL : 1;
2382 struct
2384 unsigned SSPM : 4;
2385 unsigned : 4;
2387 } __SSPCON1bits_t;
2389 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
2391 #define _SSPCON1_SSPM0 0x01
2392 #define _SSPCON1_SSPM1 0x02
2393 #define _SSPCON1_SSPM2 0x04
2394 #define _SSPCON1_SSPM3 0x08
2395 #define _SSPCON1_CKP 0x10
2396 #define _SSPCON1_SSPEN 0x20
2397 #define _SSPCON1_SSPOV 0x40
2398 #define _SSPCON1_WCOL 0x80
2400 //==============================================================================
2403 //==============================================================================
2404 // SSP1CON2 Bits
2406 extern __at(0x0216) __sfr SSP1CON2;
2408 typedef struct
2410 unsigned SEN : 1;
2411 unsigned RSEN : 1;
2412 unsigned PEN : 1;
2413 unsigned RCEN : 1;
2414 unsigned ACKEN : 1;
2415 unsigned ACKDT : 1;
2416 unsigned ACKSTAT : 1;
2417 unsigned GCEN : 1;
2418 } __SSP1CON2bits_t;
2420 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
2422 #define _SEN 0x01
2423 #define _RSEN 0x02
2424 #define _PEN 0x04
2425 #define _RCEN 0x08
2426 #define _ACKEN 0x10
2427 #define _ACKDT 0x20
2428 #define _ACKSTAT 0x40
2429 #define _GCEN 0x80
2431 //==============================================================================
2434 //==============================================================================
2435 // SSPCON2 Bits
2437 extern __at(0x0216) __sfr SSPCON2;
2439 typedef struct
2441 unsigned SEN : 1;
2442 unsigned RSEN : 1;
2443 unsigned PEN : 1;
2444 unsigned RCEN : 1;
2445 unsigned ACKEN : 1;
2446 unsigned ACKDT : 1;
2447 unsigned ACKSTAT : 1;
2448 unsigned GCEN : 1;
2449 } __SSPCON2bits_t;
2451 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
2453 #define _SSPCON2_SEN 0x01
2454 #define _SSPCON2_RSEN 0x02
2455 #define _SSPCON2_PEN 0x04
2456 #define _SSPCON2_RCEN 0x08
2457 #define _SSPCON2_ACKEN 0x10
2458 #define _SSPCON2_ACKDT 0x20
2459 #define _SSPCON2_ACKSTAT 0x40
2460 #define _SSPCON2_GCEN 0x80
2462 //==============================================================================
2465 //==============================================================================
2466 // SSP1CON3 Bits
2468 extern __at(0x0217) __sfr SSP1CON3;
2470 typedef struct
2472 unsigned DHEN : 1;
2473 unsigned AHEN : 1;
2474 unsigned SBCDE : 1;
2475 unsigned SDAHT : 1;
2476 unsigned BOEN : 1;
2477 unsigned SCIE : 1;
2478 unsigned PCIE : 1;
2479 unsigned ACKTIM : 1;
2480 } __SSP1CON3bits_t;
2482 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
2484 #define _DHEN 0x01
2485 #define _AHEN 0x02
2486 #define _SBCDE 0x04
2487 #define _SDAHT 0x08
2488 #define _BOEN 0x10
2489 #define _SCIE 0x20
2490 #define _PCIE 0x40
2491 #define _ACKTIM 0x80
2493 //==============================================================================
2496 //==============================================================================
2497 // SSPCON3 Bits
2499 extern __at(0x0217) __sfr SSPCON3;
2501 typedef struct
2503 unsigned DHEN : 1;
2504 unsigned AHEN : 1;
2505 unsigned SBCDE : 1;
2506 unsigned SDAHT : 1;
2507 unsigned BOEN : 1;
2508 unsigned SCIE : 1;
2509 unsigned PCIE : 1;
2510 unsigned ACKTIM : 1;
2511 } __SSPCON3bits_t;
2513 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
2515 #define _SSPCON3_DHEN 0x01
2516 #define _SSPCON3_AHEN 0x02
2517 #define _SSPCON3_SBCDE 0x04
2518 #define _SSPCON3_SDAHT 0x08
2519 #define _SSPCON3_BOEN 0x10
2520 #define _SSPCON3_SCIE 0x20
2521 #define _SSPCON3_PCIE 0x40
2522 #define _SSPCON3_ACKTIM 0x80
2524 //==============================================================================
2526 extern __at(0x0219) __sfr SSP2BUF;
2527 extern __at(0x021A) __sfr SSP2ADD;
2528 extern __at(0x021B) __sfr SSP2MSK;
2530 //==============================================================================
2531 // SSP2STAT Bits
2533 extern __at(0x021C) __sfr SSP2STAT;
2535 typedef struct
2537 unsigned BF : 1;
2538 unsigned UA : 1;
2539 unsigned R_NOT_W : 1;
2540 unsigned S : 1;
2541 unsigned P : 1;
2542 unsigned D_NOT_A : 1;
2543 unsigned CKE : 1;
2544 unsigned SMP : 1;
2545 } __SSP2STATbits_t;
2547 extern __at(0x021C) volatile __SSP2STATbits_t SSP2STATbits;
2549 #define _SSP2STAT_BF 0x01
2550 #define _SSP2STAT_UA 0x02
2551 #define _SSP2STAT_R_NOT_W 0x04
2552 #define _SSP2STAT_S 0x08
2553 #define _SSP2STAT_P 0x10
2554 #define _SSP2STAT_D_NOT_A 0x20
2555 #define _SSP2STAT_CKE 0x40
2556 #define _SSP2STAT_SMP 0x80
2558 //==============================================================================
2561 //==============================================================================
2562 // SSP2CON1 Bits
2564 extern __at(0x021D) __sfr SSP2CON1;
2566 typedef union
2568 struct
2570 unsigned SSPM0 : 1;
2571 unsigned SSPM1 : 1;
2572 unsigned SSPM2 : 1;
2573 unsigned SSPM3 : 1;
2574 unsigned CKP : 1;
2575 unsigned SSPEN : 1;
2576 unsigned SSPOV : 1;
2577 unsigned WCOL : 1;
2580 struct
2582 unsigned SSPM : 4;
2583 unsigned : 4;
2585 } __SSP2CON1bits_t;
2587 extern __at(0x021D) volatile __SSP2CON1bits_t SSP2CON1bits;
2589 #define _SSP2CON1_SSPM0 0x01
2590 #define _SSP2CON1_SSPM1 0x02
2591 #define _SSP2CON1_SSPM2 0x04
2592 #define _SSP2CON1_SSPM3 0x08
2593 #define _SSP2CON1_CKP 0x10
2594 #define _SSP2CON1_SSPEN 0x20
2595 #define _SSP2CON1_SSPOV 0x40
2596 #define _SSP2CON1_WCOL 0x80
2598 //==============================================================================
2601 //==============================================================================
2602 // SSP2CON2 Bits
2604 extern __at(0x021E) __sfr SSP2CON2;
2606 typedef struct
2608 unsigned SEN : 1;
2609 unsigned RSEN : 1;
2610 unsigned PEN : 1;
2611 unsigned RCEN : 1;
2612 unsigned ACKEN : 1;
2613 unsigned ACKDT : 1;
2614 unsigned ACKSTAT : 1;
2615 unsigned GCEN : 1;
2616 } __SSP2CON2bits_t;
2618 extern __at(0x021E) volatile __SSP2CON2bits_t SSP2CON2bits;
2620 #define _SSP2CON2_SEN 0x01
2621 #define _SSP2CON2_RSEN 0x02
2622 #define _SSP2CON2_PEN 0x04
2623 #define _SSP2CON2_RCEN 0x08
2624 #define _SSP2CON2_ACKEN 0x10
2625 #define _SSP2CON2_ACKDT 0x20
2626 #define _SSP2CON2_ACKSTAT 0x40
2627 #define _SSP2CON2_GCEN 0x80
2629 //==============================================================================
2632 //==============================================================================
2633 // SSP2CON3 Bits
2635 extern __at(0x021F) __sfr SSP2CON3;
2637 typedef struct
2639 unsigned DHEN : 1;
2640 unsigned AHEN : 1;
2641 unsigned SBCDE : 1;
2642 unsigned SDAHT : 1;
2643 unsigned BOEN : 1;
2644 unsigned SCIE : 1;
2645 unsigned PCIE : 1;
2646 unsigned ACKTIM : 1;
2647 } __SSP2CON3bits_t;
2649 extern __at(0x021F) volatile __SSP2CON3bits_t SSP2CON3bits;
2651 #define _SSP2CON3_DHEN 0x01
2652 #define _SSP2CON3_AHEN 0x02
2653 #define _SSP2CON3_SBCDE 0x04
2654 #define _SSP2CON3_SDAHT 0x08
2655 #define _SSP2CON3_BOEN 0x10
2656 #define _SSP2CON3_SCIE 0x20
2657 #define _SSP2CON3_PCIE 0x40
2658 #define _SSP2CON3_ACKTIM 0x80
2660 //==============================================================================
2662 extern __at(0x0291) __sfr CCPR1;
2663 extern __at(0x0291) __sfr CCPR1L;
2664 extern __at(0x0292) __sfr CCPR1H;
2666 //==============================================================================
2667 // CCP1CON Bits
2669 extern __at(0x0293) __sfr CCP1CON;
2671 typedef union
2673 struct
2675 unsigned CCP1M0 : 1;
2676 unsigned CCP1M1 : 1;
2677 unsigned CCP1M2 : 1;
2678 unsigned CCP1M3 : 1;
2679 unsigned DC1B0 : 1;
2680 unsigned DC1B1 : 1;
2681 unsigned P1M0 : 1;
2682 unsigned P1M1 : 1;
2685 struct
2687 unsigned CCP1M : 4;
2688 unsigned : 4;
2691 struct
2693 unsigned : 4;
2694 unsigned DC1B : 2;
2695 unsigned : 2;
2698 struct
2700 unsigned : 6;
2701 unsigned P1M : 2;
2703 } __CCP1CONbits_t;
2705 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
2707 #define _CCP1M0 0x01
2708 #define _CCP1M1 0x02
2709 #define _CCP1M2 0x04
2710 #define _CCP1M3 0x08
2711 #define _DC1B0 0x10
2712 #define _DC1B1 0x20
2713 #define _P1M0 0x40
2714 #define _P1M1 0x80
2716 //==============================================================================
2719 //==============================================================================
2720 // PWM1CON Bits
2722 extern __at(0x0294) __sfr PWM1CON;
2724 typedef union
2726 struct
2728 unsigned P1DC0 : 1;
2729 unsigned P1DC1 : 1;
2730 unsigned P1DC2 : 1;
2731 unsigned P1DC3 : 1;
2732 unsigned P1DC4 : 1;
2733 unsigned P1DC5 : 1;
2734 unsigned P1DC6 : 1;
2735 unsigned P1RSEN : 1;
2738 struct
2740 unsigned P1DC : 7;
2741 unsigned : 1;
2743 } __PWM1CONbits_t;
2745 extern __at(0x0294) volatile __PWM1CONbits_t PWM1CONbits;
2747 #define _P1DC0 0x01
2748 #define _P1DC1 0x02
2749 #define _P1DC2 0x04
2750 #define _P1DC3 0x08
2751 #define _P1DC4 0x10
2752 #define _P1DC5 0x20
2753 #define _P1DC6 0x40
2754 #define _P1RSEN 0x80
2756 //==============================================================================
2759 //==============================================================================
2760 // CCP1AS Bits
2762 extern __at(0x0295) __sfr CCP1AS;
2764 typedef union
2766 struct
2768 unsigned PSS1BD0 : 1;
2769 unsigned PSS1BD1 : 1;
2770 unsigned PSS1AC0 : 1;
2771 unsigned PSS1AC1 : 1;
2772 unsigned CCP1AS0 : 1;
2773 unsigned CCP1AS1 : 1;
2774 unsigned CCP1AS2 : 1;
2775 unsigned CCP1ASE : 1;
2778 struct
2780 unsigned PSS1BD : 2;
2781 unsigned : 6;
2784 struct
2786 unsigned : 2;
2787 unsigned PSS1AC : 2;
2788 unsigned : 4;
2791 struct
2793 unsigned : 4;
2794 unsigned CCP1AS : 3;
2795 unsigned : 1;
2797 } __CCP1ASbits_t;
2799 extern __at(0x0295) volatile __CCP1ASbits_t CCP1ASbits;
2801 #define _PSS1BD0 0x01
2802 #define _PSS1BD1 0x02
2803 #define _PSS1AC0 0x04
2804 #define _PSS1AC1 0x08
2805 #define _CCP1AS0 0x10
2806 #define _CCP1AS1 0x20
2807 #define _CCP1AS2 0x40
2808 #define _CCP1ASE 0x80
2810 //==============================================================================
2813 //==============================================================================
2814 // ECCP1AS Bits
2816 extern __at(0x0295) __sfr ECCP1AS;
2818 typedef union
2820 struct
2822 unsigned PSS1BD0 : 1;
2823 unsigned PSS1BD1 : 1;
2824 unsigned PSS1AC0 : 1;
2825 unsigned PSS1AC1 : 1;
2826 unsigned CCP1AS0 : 1;
2827 unsigned CCP1AS1 : 1;
2828 unsigned CCP1AS2 : 1;
2829 unsigned CCP1ASE : 1;
2832 struct
2834 unsigned PSS1BD : 2;
2835 unsigned : 6;
2838 struct
2840 unsigned : 2;
2841 unsigned PSS1AC : 2;
2842 unsigned : 4;
2845 struct
2847 unsigned : 4;
2848 unsigned CCP1AS : 3;
2849 unsigned : 1;
2851 } __ECCP1ASbits_t;
2853 extern __at(0x0295) volatile __ECCP1ASbits_t ECCP1ASbits;
2855 #define _ECCP1AS_PSS1BD0 0x01
2856 #define _ECCP1AS_PSS1BD1 0x02
2857 #define _ECCP1AS_PSS1AC0 0x04
2858 #define _ECCP1AS_PSS1AC1 0x08
2859 #define _ECCP1AS_CCP1AS0 0x10
2860 #define _ECCP1AS_CCP1AS1 0x20
2861 #define _ECCP1AS_CCP1AS2 0x40
2862 #define _ECCP1AS_CCP1ASE 0x80
2864 //==============================================================================
2867 //==============================================================================
2868 // PSTR1CON Bits
2870 extern __at(0x0296) __sfr PSTR1CON;
2872 typedef struct
2874 unsigned STR1A : 1;
2875 unsigned STR1B : 1;
2876 unsigned STR1C : 1;
2877 unsigned STR1D : 1;
2878 unsigned STR1SYNC : 1;
2879 unsigned : 1;
2880 unsigned : 1;
2881 unsigned : 1;
2882 } __PSTR1CONbits_t;
2884 extern __at(0x0296) volatile __PSTR1CONbits_t PSTR1CONbits;
2886 #define _STR1A 0x01
2887 #define _STR1B 0x02
2888 #define _STR1C 0x04
2889 #define _STR1D 0x08
2890 #define _STR1SYNC 0x10
2892 //==============================================================================
2894 extern __at(0x0298) __sfr CCPR2;
2895 extern __at(0x0298) __sfr CCPR2L;
2896 extern __at(0x0299) __sfr CCPR2H;
2898 //==============================================================================
2899 // CCP2CON Bits
2901 extern __at(0x029A) __sfr CCP2CON;
2903 typedef union
2905 struct
2907 unsigned CCP2M0 : 1;
2908 unsigned CCP2M1 : 1;
2909 unsigned CCP2M2 : 1;
2910 unsigned CCP2M3 : 1;
2911 unsigned DC2B0 : 1;
2912 unsigned DC2B1 : 1;
2913 unsigned P2M0 : 1;
2914 unsigned P2M1 : 1;
2917 struct
2919 unsigned CCP2M : 4;
2920 unsigned : 4;
2923 struct
2925 unsigned : 4;
2926 unsigned DC2B : 2;
2927 unsigned : 2;
2930 struct
2932 unsigned : 6;
2933 unsigned P2M : 2;
2935 } __CCP2CONbits_t;
2937 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
2939 #define _CCP2M0 0x01
2940 #define _CCP2M1 0x02
2941 #define _CCP2M2 0x04
2942 #define _CCP2M3 0x08
2943 #define _DC2B0 0x10
2944 #define _DC2B1 0x20
2945 #define _P2M0 0x40
2946 #define _P2M1 0x80
2948 //==============================================================================
2951 //==============================================================================
2952 // PWM2CON Bits
2954 extern __at(0x029B) __sfr PWM2CON;
2956 typedef union
2958 struct
2960 unsigned P2DC0 : 1;
2961 unsigned P2DC1 : 1;
2962 unsigned P2DC2 : 1;
2963 unsigned P2DC3 : 1;
2964 unsigned P2DC4 : 1;
2965 unsigned P2DC5 : 1;
2966 unsigned P2DC6 : 1;
2967 unsigned P2RSEN : 1;
2970 struct
2972 unsigned P2DC : 7;
2973 unsigned : 1;
2975 } __PWM2CONbits_t;
2977 extern __at(0x029B) volatile __PWM2CONbits_t PWM2CONbits;
2979 #define _P2DC0 0x01
2980 #define _P2DC1 0x02
2981 #define _P2DC2 0x04
2982 #define _P2DC3 0x08
2983 #define _P2DC4 0x10
2984 #define _P2DC5 0x20
2985 #define _P2DC6 0x40
2986 #define _P2RSEN 0x80
2988 //==============================================================================
2991 //==============================================================================
2992 // CCP2AS Bits
2994 extern __at(0x029C) __sfr CCP2AS;
2996 typedef union
2998 struct
3000 unsigned PSS2BD0 : 1;
3001 unsigned PSS2BD1 : 1;
3002 unsigned PSS2AC0 : 1;
3003 unsigned PSS2AC1 : 1;
3004 unsigned CCP2AS0 : 1;
3005 unsigned CCP2AS1 : 1;
3006 unsigned CCP2AS2 : 1;
3007 unsigned CCP2ASE : 1;
3010 struct
3012 unsigned PSS2BD : 2;
3013 unsigned : 6;
3016 struct
3018 unsigned : 2;
3019 unsigned PSS2AC : 2;
3020 unsigned : 4;
3023 struct
3025 unsigned : 4;
3026 unsigned CCP2AS : 3;
3027 unsigned : 1;
3029 } __CCP2ASbits_t;
3031 extern __at(0x029C) volatile __CCP2ASbits_t CCP2ASbits;
3033 #define _PSS2BD0 0x01
3034 #define _PSS2BD1 0x02
3035 #define _PSS2AC0 0x04
3036 #define _PSS2AC1 0x08
3037 #define _CCP2AS0 0x10
3038 #define _CCP2AS1 0x20
3039 #define _CCP2AS2 0x40
3040 #define _CCP2ASE 0x80
3042 //==============================================================================
3045 //==============================================================================
3046 // PSTR2CON Bits
3048 extern __at(0x029D) __sfr PSTR2CON;
3050 typedef struct
3052 unsigned STR2A : 1;
3053 unsigned STR2B : 1;
3054 unsigned STR2C : 1;
3055 unsigned STR2D : 1;
3056 unsigned STR2SYNC : 1;
3057 unsigned : 1;
3058 unsigned : 1;
3059 unsigned : 1;
3060 } __PSTR2CONbits_t;
3062 extern __at(0x029D) volatile __PSTR2CONbits_t PSTR2CONbits;
3064 #define _STR2A 0x01
3065 #define _STR2B 0x02
3066 #define _STR2C 0x04
3067 #define _STR2D 0x08
3068 #define _STR2SYNC 0x10
3070 //==============================================================================
3073 //==============================================================================
3074 // CCPTMRS Bits
3076 extern __at(0x029E) __sfr CCPTMRS;
3078 typedef union
3080 struct
3082 unsigned C1TSEL0 : 1;
3083 unsigned C1TSEL1 : 1;
3084 unsigned C2TSEL0 : 1;
3085 unsigned C2TSEL1 : 1;
3086 unsigned C3TSEL0 : 1;
3087 unsigned C3TSEL1 : 1;
3088 unsigned C4TSEL0 : 1;
3089 unsigned C4TSEL1 : 1;
3092 struct
3094 unsigned C1TSEL : 2;
3095 unsigned : 6;
3098 struct
3100 unsigned : 2;
3101 unsigned C2TSEL : 2;
3102 unsigned : 4;
3105 struct
3107 unsigned : 4;
3108 unsigned C3TSEL : 2;
3109 unsigned : 2;
3112 struct
3114 unsigned : 6;
3115 unsigned C4TSEL : 2;
3117 } __CCPTMRSbits_t;
3119 extern __at(0x029E) volatile __CCPTMRSbits_t CCPTMRSbits;
3121 #define _C1TSEL0 0x01
3122 #define _C1TSEL1 0x02
3123 #define _C2TSEL0 0x04
3124 #define _C2TSEL1 0x08
3125 #define _C3TSEL0 0x10
3126 #define _C3TSEL1 0x20
3127 #define _C4TSEL0 0x40
3128 #define _C4TSEL1 0x80
3130 //==============================================================================
3132 extern __at(0x0311) __sfr CCPR3;
3133 extern __at(0x0311) __sfr CCPR3L;
3134 extern __at(0x0312) __sfr CCPR3H;
3136 //==============================================================================
3137 // CCP3CON Bits
3139 extern __at(0x0313) __sfr CCP3CON;
3141 typedef union
3143 struct
3145 unsigned CCP3M0 : 1;
3146 unsigned CCP3M1 : 1;
3147 unsigned CCP3M2 : 1;
3148 unsigned CCP3M3 : 1;
3149 unsigned DC3B0 : 1;
3150 unsigned DC3B1 : 1;
3151 unsigned : 1;
3152 unsigned : 1;
3155 struct
3157 unsigned CCP3M : 4;
3158 unsigned : 4;
3161 struct
3163 unsigned : 4;
3164 unsigned DC3B : 2;
3165 unsigned : 2;
3167 } __CCP3CONbits_t;
3169 extern __at(0x0313) volatile __CCP3CONbits_t CCP3CONbits;
3171 #define _CCP3M0 0x01
3172 #define _CCP3M1 0x02
3173 #define _CCP3M2 0x04
3174 #define _CCP3M3 0x08
3175 #define _DC3B0 0x10
3176 #define _DC3B1 0x20
3178 //==============================================================================
3180 extern __at(0x0318) __sfr CCPR4;
3181 extern __at(0x0318) __sfr CCPR4L;
3182 extern __at(0x0319) __sfr CCPR4H;
3184 //==============================================================================
3185 // CCP4CON Bits
3187 extern __at(0x031A) __sfr CCP4CON;
3189 typedef union
3191 struct
3193 unsigned CCP4M0 : 1;
3194 unsigned CCP4M1 : 1;
3195 unsigned CCP4M2 : 1;
3196 unsigned CCP4M3 : 1;
3197 unsigned DC4B0 : 1;
3198 unsigned DC4B1 : 1;
3199 unsigned : 1;
3200 unsigned : 1;
3203 struct
3205 unsigned CCP4M : 4;
3206 unsigned : 4;
3209 struct
3211 unsigned : 4;
3212 unsigned DC4B : 2;
3213 unsigned : 2;
3215 } __CCP4CONbits_t;
3217 extern __at(0x031A) volatile __CCP4CONbits_t CCP4CONbits;
3219 #define _CCP4M0 0x01
3220 #define _CCP4M1 0x02
3221 #define _CCP4M2 0x04
3222 #define _CCP4M3 0x08
3223 #define _DC4B0 0x10
3224 #define _DC4B1 0x20
3226 //==============================================================================
3229 //==============================================================================
3230 // INLVLA Bits
3232 extern __at(0x038C) __sfr INLVLA;
3234 typedef union
3236 struct
3238 unsigned INLVLA0 : 1;
3239 unsigned INLVLA1 : 1;
3240 unsigned INLVLA2 : 1;
3241 unsigned INLVLA3 : 1;
3242 unsigned INLVLA4 : 1;
3243 unsigned INLVLA5 : 1;
3244 unsigned : 1;
3245 unsigned : 1;
3248 struct
3250 unsigned INLVLA : 6;
3251 unsigned : 2;
3253 } __INLVLAbits_t;
3255 extern __at(0x038C) volatile __INLVLAbits_t INLVLAbits;
3257 #define _INLVLA0 0x01
3258 #define _INLVLA1 0x02
3259 #define _INLVLA2 0x04
3260 #define _INLVLA3 0x08
3261 #define _INLVLA4 0x10
3262 #define _INLVLA5 0x20
3264 //==============================================================================
3267 //==============================================================================
3268 // INLVLB Bits
3270 extern __at(0x038D) __sfr INLVLB;
3272 typedef struct
3274 unsigned : 1;
3275 unsigned : 1;
3276 unsigned : 1;
3277 unsigned : 1;
3278 unsigned INLVLB4 : 1;
3279 unsigned INLVLB5 : 1;
3280 unsigned INLVLB6 : 1;
3281 unsigned INLVLB7 : 1;
3282 } __INLVLBbits_t;
3284 extern __at(0x038D) volatile __INLVLBbits_t INLVLBbits;
3286 #define _INLVLB4 0x10
3287 #define _INLVLB5 0x20
3288 #define _INLVLB6 0x40
3289 #define _INLVLB7 0x80
3291 //==============================================================================
3294 //==============================================================================
3295 // INLVLC Bits
3297 extern __at(0x038E) __sfr INLVLC;
3299 typedef struct
3301 unsigned INLVLC0 : 1;
3302 unsigned INLVLC1 : 1;
3303 unsigned INLVLC2 : 1;
3304 unsigned INLVLC3 : 1;
3305 unsigned INLVLC4 : 1;
3306 unsigned INLVLC5 : 1;
3307 unsigned INLVLC6 : 1;
3308 unsigned INLVLC7 : 1;
3309 } __INLVLCbits_t;
3311 extern __at(0x038E) volatile __INLVLCbits_t INLVLCbits;
3313 #define _INLVLC0 0x01
3314 #define _INLVLC1 0x02
3315 #define _INLVLC2 0x04
3316 #define _INLVLC3 0x08
3317 #define _INLVLC4 0x10
3318 #define _INLVLC5 0x20
3319 #define _INLVLC6 0x40
3320 #define _INLVLC7 0x80
3322 //==============================================================================
3325 //==============================================================================
3326 // IOCAP Bits
3328 extern __at(0x0391) __sfr IOCAP;
3330 typedef union
3332 struct
3334 unsigned IOCAP0 : 1;
3335 unsigned IOCAP1 : 1;
3336 unsigned IOCAP2 : 1;
3337 unsigned IOCAP3 : 1;
3338 unsigned IOCAP4 : 1;
3339 unsigned IOCAP5 : 1;
3340 unsigned : 1;
3341 unsigned : 1;
3344 struct
3346 unsigned IOCAP : 6;
3347 unsigned : 2;
3349 } __IOCAPbits_t;
3351 extern __at(0x0391) volatile __IOCAPbits_t IOCAPbits;
3353 #define _IOCAP0 0x01
3354 #define _IOCAP1 0x02
3355 #define _IOCAP2 0x04
3356 #define _IOCAP3 0x08
3357 #define _IOCAP4 0x10
3358 #define _IOCAP5 0x20
3360 //==============================================================================
3363 //==============================================================================
3364 // IOCAN Bits
3366 extern __at(0x0392) __sfr IOCAN;
3368 typedef union
3370 struct
3372 unsigned IOCAN0 : 1;
3373 unsigned IOCAN1 : 1;
3374 unsigned IOCAN2 : 1;
3375 unsigned IOCAN3 : 1;
3376 unsigned IOCAN4 : 1;
3377 unsigned IOCAN5 : 1;
3378 unsigned : 1;
3379 unsigned : 1;
3382 struct
3384 unsigned IOCAN : 6;
3385 unsigned : 2;
3387 } __IOCANbits_t;
3389 extern __at(0x0392) volatile __IOCANbits_t IOCANbits;
3391 #define _IOCAN0 0x01
3392 #define _IOCAN1 0x02
3393 #define _IOCAN2 0x04
3394 #define _IOCAN3 0x08
3395 #define _IOCAN4 0x10
3396 #define _IOCAN5 0x20
3398 //==============================================================================
3401 //==============================================================================
3402 // IOCAF Bits
3404 extern __at(0x0393) __sfr IOCAF;
3406 typedef union
3408 struct
3410 unsigned IOCAF0 : 1;
3411 unsigned IOCAF1 : 1;
3412 unsigned IOCAF2 : 1;
3413 unsigned IOCAF3 : 1;
3414 unsigned IOCAF4 : 1;
3415 unsigned IOCAF5 : 1;
3416 unsigned : 1;
3417 unsigned : 1;
3420 struct
3422 unsigned IOCAF : 6;
3423 unsigned : 2;
3425 } __IOCAFbits_t;
3427 extern __at(0x0393) volatile __IOCAFbits_t IOCAFbits;
3429 #define _IOCAF0 0x01
3430 #define _IOCAF1 0x02
3431 #define _IOCAF2 0x04
3432 #define _IOCAF3 0x08
3433 #define _IOCAF4 0x10
3434 #define _IOCAF5 0x20
3436 //==============================================================================
3439 //==============================================================================
3440 // IOCBP Bits
3442 extern __at(0x0394) __sfr IOCBP;
3444 typedef struct
3446 unsigned : 1;
3447 unsigned : 1;
3448 unsigned : 1;
3449 unsigned : 1;
3450 unsigned IOCBP4 : 1;
3451 unsigned IOCBP5 : 1;
3452 unsigned IOCBP6 : 1;
3453 unsigned IOCBP7 : 1;
3454 } __IOCBPbits_t;
3456 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
3458 #define _IOCBP4 0x10
3459 #define _IOCBP5 0x20
3460 #define _IOCBP6 0x40
3461 #define _IOCBP7 0x80
3463 //==============================================================================
3466 //==============================================================================
3467 // IOCBN Bits
3469 extern __at(0x0395) __sfr IOCBN;
3471 typedef struct
3473 unsigned : 1;
3474 unsigned : 1;
3475 unsigned : 1;
3476 unsigned : 1;
3477 unsigned IOCBN4 : 1;
3478 unsigned IOCBN5 : 1;
3479 unsigned IOCBN6 : 1;
3480 unsigned IOCBN7 : 1;
3481 } __IOCBNbits_t;
3483 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
3485 #define _IOCBN4 0x10
3486 #define _IOCBN5 0x20
3487 #define _IOCBN6 0x40
3488 #define _IOCBN7 0x80
3490 //==============================================================================
3493 //==============================================================================
3494 // IOCBF Bits
3496 extern __at(0x0396) __sfr IOCBF;
3498 typedef struct
3500 unsigned : 1;
3501 unsigned : 1;
3502 unsigned : 1;
3503 unsigned : 1;
3504 unsigned IOCBF4 : 1;
3505 unsigned IOCBF5 : 1;
3506 unsigned IOCBF6 : 1;
3507 unsigned IOCBF7 : 1;
3508 } __IOCBFbits_t;
3510 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
3512 #define _IOCBF4 0x10
3513 #define _IOCBF5 0x20
3514 #define _IOCBF6 0x40
3515 #define _IOCBF7 0x80
3517 //==============================================================================
3520 //==============================================================================
3521 // CLKRCON Bits
3523 extern __at(0x039A) __sfr CLKRCON;
3525 typedef union
3527 struct
3529 unsigned CLKRDIV0 : 1;
3530 unsigned CLKRDIV1 : 1;
3531 unsigned CLKRDIV2 : 1;
3532 unsigned CLKRDC0 : 1;
3533 unsigned CLKRDC1 : 1;
3534 unsigned CLKRSLR : 1;
3535 unsigned CLKROE : 1;
3536 unsigned CLKREN : 1;
3539 struct
3541 unsigned CLKRDIV : 3;
3542 unsigned : 5;
3545 struct
3547 unsigned : 3;
3548 unsigned CLKRDC : 2;
3549 unsigned : 3;
3551 } __CLKRCONbits_t;
3553 extern __at(0x039A) volatile __CLKRCONbits_t CLKRCONbits;
3555 #define _CLKRDIV0 0x01
3556 #define _CLKRDIV1 0x02
3557 #define _CLKRDIV2 0x04
3558 #define _CLKRDC0 0x08
3559 #define _CLKRDC1 0x10
3560 #define _CLKRSLR 0x20
3561 #define _CLKROE 0x40
3562 #define _CLKREN 0x80
3564 //==============================================================================
3567 //==============================================================================
3568 // MDCON Bits
3570 extern __at(0x039C) __sfr MDCON;
3572 typedef struct
3574 unsigned MDBIT : 1;
3575 unsigned : 1;
3576 unsigned : 1;
3577 unsigned MDOUT : 1;
3578 unsigned MDOPOL : 1;
3579 unsigned MDSLR : 1;
3580 unsigned MDOE : 1;
3581 unsigned MDEN : 1;
3582 } __MDCONbits_t;
3584 extern __at(0x039C) volatile __MDCONbits_t MDCONbits;
3586 #define _MDBIT 0x01
3587 #define _MDOUT 0x08
3588 #define _MDOPOL 0x10
3589 #define _MDSLR 0x20
3590 #define _MDOE 0x40
3591 #define _MDEN 0x80
3593 //==============================================================================
3596 //==============================================================================
3597 // MDSRC Bits
3599 extern __at(0x039D) __sfr MDSRC;
3601 typedef union
3603 struct
3605 unsigned MDMS0 : 1;
3606 unsigned MDMS1 : 1;
3607 unsigned MDMS2 : 1;
3608 unsigned MDMS3 : 1;
3609 unsigned : 1;
3610 unsigned : 1;
3611 unsigned : 1;
3612 unsigned MDMSODIS : 1;
3615 struct
3617 unsigned MDMS : 4;
3618 unsigned : 4;
3620 } __MDSRCbits_t;
3622 extern __at(0x039D) volatile __MDSRCbits_t MDSRCbits;
3624 #define _MDMS0 0x01
3625 #define _MDMS1 0x02
3626 #define _MDMS2 0x04
3627 #define _MDMS3 0x08
3628 #define _MDMSODIS 0x80
3630 //==============================================================================
3633 //==============================================================================
3634 // MDCARL Bits
3636 extern __at(0x039E) __sfr MDCARL;
3638 typedef union
3640 struct
3642 unsigned MDCL0 : 1;
3643 unsigned MDCL1 : 1;
3644 unsigned MDCL2 : 1;
3645 unsigned MDCL3 : 1;
3646 unsigned : 1;
3647 unsigned MDCLSYNC : 1;
3648 unsigned MDCLPOL : 1;
3649 unsigned MDCLODIS : 1;
3652 struct
3654 unsigned MDCL : 4;
3655 unsigned : 4;
3657 } __MDCARLbits_t;
3659 extern __at(0x039E) volatile __MDCARLbits_t MDCARLbits;
3661 #define _MDCL0 0x01
3662 #define _MDCL1 0x02
3663 #define _MDCL2 0x04
3664 #define _MDCL3 0x08
3665 #define _MDCLSYNC 0x20
3666 #define _MDCLPOL 0x40
3667 #define _MDCLODIS 0x80
3669 //==============================================================================
3672 //==============================================================================
3673 // MDCARH Bits
3675 extern __at(0x039F) __sfr MDCARH;
3677 typedef union
3679 struct
3681 unsigned MDCH0 : 1;
3682 unsigned MDCH1 : 1;
3683 unsigned MDCH2 : 1;
3684 unsigned MDCH3 : 1;
3685 unsigned : 1;
3686 unsigned MDCHSYNC : 1;
3687 unsigned MDCHPOL : 1;
3688 unsigned MDCHODIS : 1;
3691 struct
3693 unsigned MDCH : 4;
3694 unsigned : 4;
3696 } __MDCARHbits_t;
3698 extern __at(0x039F) volatile __MDCARHbits_t MDCARHbits;
3700 #define _MDCH0 0x01
3701 #define _MDCH1 0x02
3702 #define _MDCH2 0x04
3703 #define _MDCH3 0x08
3704 #define _MDCHSYNC 0x20
3705 #define _MDCHPOL 0x40
3706 #define _MDCHODIS 0x80
3708 //==============================================================================
3710 extern __at(0x0415) __sfr TMR4;
3711 extern __at(0x0416) __sfr PR4;
3713 //==============================================================================
3714 // T4CON Bits
3716 extern __at(0x0417) __sfr T4CON;
3718 typedef union
3720 struct
3722 unsigned T4CKPS0 : 1;
3723 unsigned T4CKPS1 : 1;
3724 unsigned TMR4ON : 1;
3725 unsigned T4OUTPS0 : 1;
3726 unsigned T4OUTPS1 : 1;
3727 unsigned T4OUTPS2 : 1;
3728 unsigned T4OUTPS3 : 1;
3729 unsigned : 1;
3732 struct
3734 unsigned T4CKPS : 2;
3735 unsigned : 6;
3738 struct
3740 unsigned : 3;
3741 unsigned T4OUTPS : 4;
3742 unsigned : 1;
3744 } __T4CONbits_t;
3746 extern __at(0x0417) volatile __T4CONbits_t T4CONbits;
3748 #define _T4CKPS0 0x01
3749 #define _T4CKPS1 0x02
3750 #define _TMR4ON 0x04
3751 #define _T4OUTPS0 0x08
3752 #define _T4OUTPS1 0x10
3753 #define _T4OUTPS2 0x20
3754 #define _T4OUTPS3 0x40
3756 //==============================================================================
3758 extern __at(0x041C) __sfr TMR6;
3759 extern __at(0x041D) __sfr PR6;
3761 //==============================================================================
3762 // T6CON Bits
3764 extern __at(0x041E) __sfr T6CON;
3766 typedef union
3768 struct
3770 unsigned T6CKPS0 : 1;
3771 unsigned T6CKPS1 : 1;
3772 unsigned TMR6ON : 1;
3773 unsigned T6OUTPS0 : 1;
3774 unsigned T6OUTPS1 : 1;
3775 unsigned T6OUTPS2 : 1;
3776 unsigned T6OUTPS3 : 1;
3777 unsigned : 1;
3780 struct
3782 unsigned T6CKPS : 2;
3783 unsigned : 6;
3786 struct
3788 unsigned : 3;
3789 unsigned T6OUTPS : 4;
3790 unsigned : 1;
3792 } __T6CONbits_t;
3794 extern __at(0x041E) volatile __T6CONbits_t T6CONbits;
3796 #define _T6CKPS0 0x01
3797 #define _T6CKPS1 0x02
3798 #define _TMR6ON 0x04
3799 #define _T6OUTPS0 0x08
3800 #define _T6OUTPS1 0x10
3801 #define _T6OUTPS2 0x20
3802 #define _T6OUTPS3 0x40
3804 //==============================================================================
3807 //==============================================================================
3808 // STATUS_SHAD Bits
3810 extern __at(0x0FE4) __sfr STATUS_SHAD;
3812 typedef struct
3814 unsigned C_SHAD : 1;
3815 unsigned DC_SHAD : 1;
3816 unsigned Z_SHAD : 1;
3817 unsigned : 1;
3818 unsigned : 1;
3819 unsigned : 1;
3820 unsigned : 1;
3821 unsigned : 1;
3822 } __STATUS_SHADbits_t;
3824 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
3826 #define _C_SHAD 0x01
3827 #define _DC_SHAD 0x02
3828 #define _Z_SHAD 0x04
3830 //==============================================================================
3832 extern __at(0x0FE5) __sfr WREG_SHAD;
3833 extern __at(0x0FE6) __sfr BSR_SHAD;
3834 extern __at(0x0FE7) __sfr PCLATH_SHAD;
3835 extern __at(0x0FE8) __sfr FSR0L_SHAD;
3836 extern __at(0x0FE9) __sfr FSR0H_SHAD;
3837 extern __at(0x0FEA) __sfr FSR1L_SHAD;
3838 extern __at(0x0FEB) __sfr FSR1H_SHAD;
3839 extern __at(0x0FED) __sfr STKPTR;
3840 extern __at(0x0FEE) __sfr TOSL;
3841 extern __at(0x0FEF) __sfr TOSH;
3843 //==============================================================================
3845 // Configuration Bits
3847 //==============================================================================
3849 #define _CONFIG1 0x8007
3850 #define _CONFIG2 0x8008
3852 //----------------------------- CONFIG1 Options -------------------------------
3854 #define _FOSC_LP 0x3FF8 // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins.
3855 #define _FOSC_XT 0x3FF9 // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins.
3856 #define _FOSC_HS 0x3FFA // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins.
3857 #define _FOSC_EXTRC 0x3FFB // EXTRC oscillator: External RC circuit connected to CLKIN pin.
3858 #define _FOSC_INTOSC 0x3FFC // INTOSC oscillator: I/O function on CLKIN pin.
3859 #define _FOSC_ECL 0x3FFD // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin.
3860 #define _FOSC_ECM 0x3FFE // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin.
3861 #define _FOSC_ECH 0x3FFF // ECH, External Clock, High Power Mode (4-32 MHz): device clock supplied to CLKIN pin.
3862 #define _WDTE_OFF 0x3FE7 // WDT disabled.
3863 #define _WDTE_SWDTEN 0x3FEF // WDT controlled by the SWDTEN bit in the WDTCON register.
3864 #define _WDTE_NSLEEP 0x3FF7 // WDT enabled while running and disabled in Sleep.
3865 #define _WDTE_ON 0x3FFF // WDT enabled.
3866 #define _PWRTE_ON 0x3FDF // PWRT enabled.
3867 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
3868 #define _MCLRE_OFF 0x3FBF // MCLR/VPP pin function is digital input.
3869 #define _MCLRE_ON 0x3FFF // MCLR/VPP pin function is MCLR.
3870 #define _CP_ON 0x3F7F // Program memory code protection is enabled.
3871 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
3872 #define _CPD_ON 0x3EFF // Data memory code protection is enabled.
3873 #define _CPD_OFF 0x3FFF // Data memory code protection is disabled.
3874 #define _BOREN_OFF 0x39FF // Brown-out Reset disabled.
3875 #define _BOREN_SBODEN 0x3BFF // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
3876 #define _BOREN_NSLEEP 0x3DFF // Brown-out Reset enabled while running and disabled in Sleep.
3877 #define _BOREN_ON 0x3FFF // Brown-out Reset enabled.
3878 #define _CLKOUTEN_ON 0x37FF // CLKOUT function is enabled on the CLKOUT pin.
3879 #define _CLKOUTEN_OFF 0x3FFF // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
3880 #define _IESO_OFF 0x2FFF // Internal/External Switchover mode is disabled.
3881 #define _IESO_ON 0x3FFF // Internal/External Switchover mode is enabled.
3882 #define _FCMEN_OFF 0x1FFF // Fail-Safe Clock Monitor is disabled.
3883 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor is enabled.
3885 //----------------------------- CONFIG2 Options -------------------------------
3887 #define _WRT_ALL 0x3FFC // 000h to 1FFFh write protected, no addresses may be modified by EECON control.
3888 #define _WRT_HALF 0x3FFD // 000h to FFFh write protected, 1000h to 1FFFh may be modified by EECON control.
3889 #define _WRT_BOOT 0x3FFE // 000h to 1FFh write protected, 200h to 1FFFh may be modified by EECON control.
3890 #define _WRT_OFF 0x3FFF // Write protection off.
3891 #define _PLLEN_OFF 0x3EFF // 4x PLL disabled.
3892 #define _PLLEN_ON 0x3FFF // 4x PLL enabled.
3893 #define _STVREN_OFF 0x3DFF // Stack Overflow or Underflow will not cause a Reset.
3894 #define _STVREN_ON 0x3FFF // Stack Overflow or Underflow will cause a Reset.
3895 #define _BORV_HI 0x3BFF // Brown-out Reset Voltage (Vbor), high trip point selected.
3896 #define _BORV_LO 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
3897 #define _BORV_19 0x3FFF // Brown-out Reset Voltage (Vbor), low trip point selected.
3898 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
3899 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
3900 #define _LVP_OFF 0x1FFF // High-voltage on MCLR/VPP must be used for programming.
3901 #define _LVP_ON 0x3FFF // Low-voltage programming enabled.
3903 //==============================================================================
3905 #define _DEVID1 0x8006
3907 #define _IDLOC0 0x8000
3908 #define _IDLOC1 0x8001
3909 #define _IDLOC2 0x8002
3910 #define _IDLOC3 0x8003
3912 //==============================================================================
3914 #ifndef NO_BIT_DEFINES
3916 #define ADON ADCON0bits.ADON // bit 0
3917 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
3918 #define ADGO ADCON0bits.ADGO // bit 1, shadows bit in ADCON0bits
3919 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
3920 #define CHS0 ADCON0bits.CHS0 // bit 2
3921 #define CHS1 ADCON0bits.CHS1 // bit 3
3922 #define CHS2 ADCON0bits.CHS2 // bit 4
3923 #define CHS3 ADCON0bits.CHS3 // bit 5
3924 #define CHS4 ADCON0bits.CHS4 // bit 6
3926 #define ADPREF0 ADCON1bits.ADPREF0 // bit 0
3927 #define ADPREF1 ADCON1bits.ADPREF1 // bit 1
3928 #define ADNREF ADCON1bits.ADNREF // bit 2
3929 #define ADCS0 ADCON1bits.ADCS0 // bit 4
3930 #define ADCS1 ADCON1bits.ADCS1 // bit 5
3931 #define ADCS2 ADCON1bits.ADCS2 // bit 6
3932 #define ADFM ADCON1bits.ADFM // bit 7
3934 #define ANSA0 ANSELAbits.ANSA0 // bit 0
3935 #define ANSA1 ANSELAbits.ANSA1 // bit 1
3936 #define ANSA2 ANSELAbits.ANSA2 // bit 2
3937 #define ANSA4 ANSELAbits.ANSA4 // bit 4
3939 #define ANSB4 ANSELBbits.ANSB4 // bit 4
3940 #define ANSB5 ANSELBbits.ANSB5 // bit 5
3941 #define ANSB6 ANSELBbits.ANSB6 // bit 6
3942 #define ANSB7 ANSELBbits.ANSB7 // bit 7
3944 #define ANSC0 ANSELCbits.ANSC0 // bit 0
3945 #define ANSC1 ANSELCbits.ANSC1 // bit 1
3946 #define ANSC2 ANSELCbits.ANSC2 // bit 2
3947 #define ANSC3 ANSELCbits.ANSC3 // bit 3
3948 #define ANSC6 ANSELCbits.ANSC6 // bit 6
3949 #define ANSC7 ANSELCbits.ANSC7 // bit 7
3951 #define TXCKSEL APFCON0bits.TXCKSEL // bit 2
3952 #define T1GSEL APFCON0bits.T1GSEL // bit 3
3953 #define RXDTSEL APFCON0bits.RXDTSEL // bit 7
3955 #define CCP2SEL APFCON1bits.CCP2SEL // bit 0
3956 #define P2BSEL APFCON1bits.P2BSEL // bit 1
3957 #define P1CSEL APFCON1bits.P1CSEL // bit 2
3958 #define P1DSEL APFCON1bits.P1DSEL // bit 3
3959 #define SS2SEL APFCON1bits.SS2SEL // bit 4
3960 #define SDO2SEL APFCON1bits.SDO2SEL // bit 5
3962 #define ABDEN BAUDCONbits.ABDEN // bit 0
3963 #define WUE BAUDCONbits.WUE // bit 1
3964 #define BRG16 BAUDCONbits.BRG16 // bit 3
3965 #define SCKP BAUDCONbits.SCKP // bit 4
3966 #define RCIDL BAUDCONbits.RCIDL // bit 6
3967 #define ABDOVF BAUDCONbits.ABDOVF // bit 7
3969 #define BORRDY BORCONbits.BORRDY // bit 0
3970 #define SBOREN BORCONbits.SBOREN // bit 7
3972 #define BSR0 BSRbits.BSR0 // bit 0
3973 #define BSR1 BSRbits.BSR1 // bit 1
3974 #define BSR2 BSRbits.BSR2 // bit 2
3975 #define BSR3 BSRbits.BSR3 // bit 3
3976 #define BSR4 BSRbits.BSR4 // bit 4
3978 #define PSS1BD0 CCP1ASbits.PSS1BD0 // bit 0
3979 #define PSS1BD1 CCP1ASbits.PSS1BD1 // bit 1
3980 #define PSS1AC0 CCP1ASbits.PSS1AC0 // bit 2
3981 #define PSS1AC1 CCP1ASbits.PSS1AC1 // bit 3
3982 #define CCP1AS0 CCP1ASbits.CCP1AS0 // bit 4
3983 #define CCP1AS1 CCP1ASbits.CCP1AS1 // bit 5
3984 #define CCP1AS2 CCP1ASbits.CCP1AS2 // bit 6
3985 #define CCP1ASE CCP1ASbits.CCP1ASE // bit 7
3987 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
3988 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
3989 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
3990 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
3991 #define DC1B0 CCP1CONbits.DC1B0 // bit 4
3992 #define DC1B1 CCP1CONbits.DC1B1 // bit 5
3993 #define P1M0 CCP1CONbits.P1M0 // bit 6
3994 #define P1M1 CCP1CONbits.P1M1 // bit 7
3996 #define PSS2BD0 CCP2ASbits.PSS2BD0 // bit 0
3997 #define PSS2BD1 CCP2ASbits.PSS2BD1 // bit 1
3998 #define PSS2AC0 CCP2ASbits.PSS2AC0 // bit 2
3999 #define PSS2AC1 CCP2ASbits.PSS2AC1 // bit 3
4000 #define CCP2AS0 CCP2ASbits.CCP2AS0 // bit 4
4001 #define CCP2AS1 CCP2ASbits.CCP2AS1 // bit 5
4002 #define CCP2AS2 CCP2ASbits.CCP2AS2 // bit 6
4003 #define CCP2ASE CCP2ASbits.CCP2ASE // bit 7
4005 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
4006 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
4007 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
4008 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
4009 #define DC2B0 CCP2CONbits.DC2B0 // bit 4
4010 #define DC2B1 CCP2CONbits.DC2B1 // bit 5
4011 #define P2M0 CCP2CONbits.P2M0 // bit 6
4012 #define P2M1 CCP2CONbits.P2M1 // bit 7
4014 #define CCP3M0 CCP3CONbits.CCP3M0 // bit 0
4015 #define CCP3M1 CCP3CONbits.CCP3M1 // bit 1
4016 #define CCP3M2 CCP3CONbits.CCP3M2 // bit 2
4017 #define CCP3M3 CCP3CONbits.CCP3M3 // bit 3
4018 #define DC3B0 CCP3CONbits.DC3B0 // bit 4
4019 #define DC3B1 CCP3CONbits.DC3B1 // bit 5
4021 #define CCP4M0 CCP4CONbits.CCP4M0 // bit 0
4022 #define CCP4M1 CCP4CONbits.CCP4M1 // bit 1
4023 #define CCP4M2 CCP4CONbits.CCP4M2 // bit 2
4024 #define CCP4M3 CCP4CONbits.CCP4M3 // bit 3
4025 #define DC4B0 CCP4CONbits.DC4B0 // bit 4
4026 #define DC4B1 CCP4CONbits.DC4B1 // bit 5
4028 #define C1TSEL0 CCPTMRSbits.C1TSEL0 // bit 0
4029 #define C1TSEL1 CCPTMRSbits.C1TSEL1 // bit 1
4030 #define C2TSEL0 CCPTMRSbits.C2TSEL0 // bit 2
4031 #define C2TSEL1 CCPTMRSbits.C2TSEL1 // bit 3
4032 #define C3TSEL0 CCPTMRSbits.C3TSEL0 // bit 4
4033 #define C3TSEL1 CCPTMRSbits.C3TSEL1 // bit 5
4034 #define C4TSEL0 CCPTMRSbits.C4TSEL0 // bit 6
4035 #define C4TSEL1 CCPTMRSbits.C4TSEL1 // bit 7
4037 #define CLKRDIV0 CLKRCONbits.CLKRDIV0 // bit 0
4038 #define CLKRDIV1 CLKRCONbits.CLKRDIV1 // bit 1
4039 #define CLKRDIV2 CLKRCONbits.CLKRDIV2 // bit 2
4040 #define CLKRDC0 CLKRCONbits.CLKRDC0 // bit 3
4041 #define CLKRDC1 CLKRCONbits.CLKRDC1 // bit 4
4042 #define CLKRSLR CLKRCONbits.CLKRSLR // bit 5
4043 #define CLKROE CLKRCONbits.CLKROE // bit 6
4044 #define CLKREN CLKRCONbits.CLKREN // bit 7
4046 #define C1SYNC CM1CON0bits.C1SYNC // bit 0
4047 #define C1HYS CM1CON0bits.C1HYS // bit 1
4048 #define C1SP CM1CON0bits.C1SP // bit 2
4049 #define C1POL CM1CON0bits.C1POL // bit 4
4050 #define C1OE CM1CON0bits.C1OE // bit 5
4051 #define C1OUT CM1CON0bits.C1OUT // bit 6
4052 #define C1ON CM1CON0bits.C1ON // bit 7
4054 #define C1NCH0 CM1CON1bits.C1NCH0 // bit 0
4055 #define C1NCH1 CM1CON1bits.C1NCH1 // bit 1
4056 #define C1PCH0 CM1CON1bits.C1PCH0 // bit 4
4057 #define C1PCH1 CM1CON1bits.C1PCH1 // bit 5
4058 #define C1INTN CM1CON1bits.C1INTN // bit 6
4059 #define C1INTP CM1CON1bits.C1INTP // bit 7
4061 #define C2SYNC CM2CON0bits.C2SYNC // bit 0
4062 #define C2HYS CM2CON0bits.C2HYS // bit 1
4063 #define C2SP CM2CON0bits.C2SP // bit 2
4064 #define C2POL CM2CON0bits.C2POL // bit 4
4065 #define C2OE CM2CON0bits.C2OE // bit 5
4066 #define C2OUT CM2CON0bits.C2OUT // bit 6
4067 #define C2ON CM2CON0bits.C2ON // bit 7
4069 #define C2NCH0 CM2CON1bits.C2NCH0 // bit 0
4070 #define C2NCH1 CM2CON1bits.C2NCH1 // bit 1
4071 #define C2PCH0 CM2CON1bits.C2PCH0 // bit 4
4072 #define C2PCH1 CM2CON1bits.C2PCH1 // bit 5
4073 #define C2INTN CM2CON1bits.C2INTN // bit 6
4074 #define C2INTP CM2CON1bits.C2INTP // bit 7
4076 #define MC1OUT CMOUTbits.MC1OUT // bit 0
4077 #define MC2OUT CMOUTbits.MC2OUT // bit 1
4079 #define T0XCS CPSCON0bits.T0XCS // bit 0
4080 #define CPSOUT CPSCON0bits.CPSOUT // bit 1
4081 #define CPSRNG0 CPSCON0bits.CPSRNG0 // bit 2
4082 #define CPSRNG1 CPSCON0bits.CPSRNG1 // bit 3
4083 #define CPSRM CPSCON0bits.CPSRM // bit 6
4084 #define CPSON CPSCON0bits.CPSON // bit 7
4086 #define CPSCH0 CPSCON1bits.CPSCH0 // bit 0
4087 #define CPSCH1 CPSCON1bits.CPSCH1 // bit 1
4088 #define CPSCH2 CPSCON1bits.CPSCH2 // bit 2
4089 #define CPSCH3 CPSCON1bits.CPSCH3 // bit 3
4091 #define DACNSS DACCON0bits.DACNSS // bit 0
4092 #define DACPSS0 DACCON0bits.DACPSS0 // bit 2
4093 #define DACPSS1 DACCON0bits.DACPSS1 // bit 3
4094 #define DACOE DACCON0bits.DACOE // bit 5
4095 #define DACLPS DACCON0bits.DACLPS // bit 6
4096 #define DACEN DACCON0bits.DACEN // bit 7
4098 #define DACR0 DACCON1bits.DACR0 // bit 0
4099 #define DACR1 DACCON1bits.DACR1 // bit 1
4100 #define DACR2 DACCON1bits.DACR2 // bit 2
4101 #define DACR3 DACCON1bits.DACR3 // bit 3
4102 #define DACR4 DACCON1bits.DACR4 // bit 4
4104 #define RD EECON1bits.RD // bit 0
4105 #define WR EECON1bits.WR // bit 1
4106 #define WREN EECON1bits.WREN // bit 2
4107 #define WRERR EECON1bits.WRERR // bit 3
4108 #define FREE EECON1bits.FREE // bit 4
4109 #define LWLO EECON1bits.LWLO // bit 5
4110 #define CFGS EECON1bits.CFGS // bit 6
4111 #define EEPGD EECON1bits.EEPGD // bit 7
4113 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
4114 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
4115 #define CDAFVR0 FVRCONbits.CDAFVR0 // bit 2
4116 #define CDAFVR1 FVRCONbits.CDAFVR1 // bit 3
4117 #define TSRNG FVRCONbits.TSRNG // bit 4
4118 #define TSEN FVRCONbits.TSEN // bit 5
4119 #define FVRRDY FVRCONbits.FVRRDY // bit 6
4120 #define FVREN FVRCONbits.FVREN // bit 7
4122 #define INLVLA0 INLVLAbits.INLVLA0 // bit 0
4123 #define INLVLA1 INLVLAbits.INLVLA1 // bit 1
4124 #define INLVLA2 INLVLAbits.INLVLA2 // bit 2
4125 #define INLVLA3 INLVLAbits.INLVLA3 // bit 3
4126 #define INLVLA4 INLVLAbits.INLVLA4 // bit 4
4127 #define INLVLA5 INLVLAbits.INLVLA5 // bit 5
4129 #define INLVLB4 INLVLBbits.INLVLB4 // bit 4
4130 #define INLVLB5 INLVLBbits.INLVLB5 // bit 5
4131 #define INLVLB6 INLVLBbits.INLVLB6 // bit 6
4132 #define INLVLB7 INLVLBbits.INLVLB7 // bit 7
4134 #define INLVLC0 INLVLCbits.INLVLC0 // bit 0
4135 #define INLVLC1 INLVLCbits.INLVLC1 // bit 1
4136 #define INLVLC2 INLVLCbits.INLVLC2 // bit 2
4137 #define INLVLC3 INLVLCbits.INLVLC3 // bit 3
4138 #define INLVLC4 INLVLCbits.INLVLC4 // bit 4
4139 #define INLVLC5 INLVLCbits.INLVLC5 // bit 5
4140 #define INLVLC6 INLVLCbits.INLVLC6 // bit 6
4141 #define INLVLC7 INLVLCbits.INLVLC7 // bit 7
4143 #define IOCIF INTCONbits.IOCIF // bit 0
4144 #define INTF INTCONbits.INTF // bit 1
4145 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
4146 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
4147 #define IOCIE INTCONbits.IOCIE // bit 3
4148 #define INTE INTCONbits.INTE // bit 4
4149 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
4150 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
4151 #define PEIE INTCONbits.PEIE // bit 6
4152 #define GIE INTCONbits.GIE // bit 7
4154 #define IOCAF0 IOCAFbits.IOCAF0 // bit 0
4155 #define IOCAF1 IOCAFbits.IOCAF1 // bit 1
4156 #define IOCAF2 IOCAFbits.IOCAF2 // bit 2
4157 #define IOCAF3 IOCAFbits.IOCAF3 // bit 3
4158 #define IOCAF4 IOCAFbits.IOCAF4 // bit 4
4159 #define IOCAF5 IOCAFbits.IOCAF5 // bit 5
4161 #define IOCAN0 IOCANbits.IOCAN0 // bit 0
4162 #define IOCAN1 IOCANbits.IOCAN1 // bit 1
4163 #define IOCAN2 IOCANbits.IOCAN2 // bit 2
4164 #define IOCAN3 IOCANbits.IOCAN3 // bit 3
4165 #define IOCAN4 IOCANbits.IOCAN4 // bit 4
4166 #define IOCAN5 IOCANbits.IOCAN5 // bit 5
4168 #define IOCAP0 IOCAPbits.IOCAP0 // bit 0
4169 #define IOCAP1 IOCAPbits.IOCAP1 // bit 1
4170 #define IOCAP2 IOCAPbits.IOCAP2 // bit 2
4171 #define IOCAP3 IOCAPbits.IOCAP3 // bit 3
4172 #define IOCAP4 IOCAPbits.IOCAP4 // bit 4
4173 #define IOCAP5 IOCAPbits.IOCAP5 // bit 5
4175 #define IOCBF4 IOCBFbits.IOCBF4 // bit 4
4176 #define IOCBF5 IOCBFbits.IOCBF5 // bit 5
4177 #define IOCBF6 IOCBFbits.IOCBF6 // bit 6
4178 #define IOCBF7 IOCBFbits.IOCBF7 // bit 7
4180 #define IOCBN4 IOCBNbits.IOCBN4 // bit 4
4181 #define IOCBN5 IOCBNbits.IOCBN5 // bit 5
4182 #define IOCBN6 IOCBNbits.IOCBN6 // bit 6
4183 #define IOCBN7 IOCBNbits.IOCBN7 // bit 7
4185 #define IOCBP4 IOCBPbits.IOCBP4 // bit 4
4186 #define IOCBP5 IOCBPbits.IOCBP5 // bit 5
4187 #define IOCBP6 IOCBPbits.IOCBP6 // bit 6
4188 #define IOCBP7 IOCBPbits.IOCBP7 // bit 7
4190 #define LATA0 LATAbits.LATA0 // bit 0
4191 #define LATA1 LATAbits.LATA1 // bit 1
4192 #define LATA2 LATAbits.LATA2 // bit 2
4193 #define LATA4 LATAbits.LATA4 // bit 4
4194 #define LATA5 LATAbits.LATA5 // bit 5
4196 #define LATB4 LATBbits.LATB4 // bit 4
4197 #define LATB5 LATBbits.LATB5 // bit 5
4198 #define LATB6 LATBbits.LATB6 // bit 6
4199 #define LATB7 LATBbits.LATB7 // bit 7
4201 #define LATC0 LATCbits.LATC0 // bit 0
4202 #define LATC1 LATCbits.LATC1 // bit 1
4203 #define LATC2 LATCbits.LATC2 // bit 2
4204 #define LATC3 LATCbits.LATC3 // bit 3
4205 #define LATC4 LATCbits.LATC4 // bit 4
4206 #define LATC5 LATCbits.LATC5 // bit 5
4207 #define LATC6 LATCbits.LATC6 // bit 6
4208 #define LATC7 LATCbits.LATC7 // bit 7, shadows bit in LATCbits
4209 #define PWRGD LATCbits.PWRGD // bit 7, shadows bit in LATCbits
4211 #define MDCH0 MDCARHbits.MDCH0 // bit 0
4212 #define MDCH1 MDCARHbits.MDCH1 // bit 1
4213 #define MDCH2 MDCARHbits.MDCH2 // bit 2
4214 #define MDCH3 MDCARHbits.MDCH3 // bit 3
4215 #define MDCHSYNC MDCARHbits.MDCHSYNC // bit 5
4216 #define MDCHPOL MDCARHbits.MDCHPOL // bit 6
4217 #define MDCHODIS MDCARHbits.MDCHODIS // bit 7
4219 #define MDCL0 MDCARLbits.MDCL0 // bit 0
4220 #define MDCL1 MDCARLbits.MDCL1 // bit 1
4221 #define MDCL2 MDCARLbits.MDCL2 // bit 2
4222 #define MDCL3 MDCARLbits.MDCL3 // bit 3
4223 #define MDCLSYNC MDCARLbits.MDCLSYNC // bit 5
4224 #define MDCLPOL MDCARLbits.MDCLPOL // bit 6
4225 #define MDCLODIS MDCARLbits.MDCLODIS // bit 7
4227 #define MDBIT MDCONbits.MDBIT // bit 0
4228 #define MDOUT MDCONbits.MDOUT // bit 3
4229 #define MDOPOL MDCONbits.MDOPOL // bit 4
4230 #define MDSLR MDCONbits.MDSLR // bit 5
4231 #define MDOE MDCONbits.MDOE // bit 6
4232 #define MDEN MDCONbits.MDEN // bit 7
4234 #define MDMS0 MDSRCbits.MDMS0 // bit 0
4235 #define MDMS1 MDSRCbits.MDMS1 // bit 1
4236 #define MDMS2 MDSRCbits.MDMS2 // bit 2
4237 #define MDMS3 MDSRCbits.MDMS3 // bit 3
4238 #define MDMSODIS MDSRCbits.MDMSODIS // bit 7
4240 #define PS0 OPTION_REGbits.PS0 // bit 0
4241 #define PS1 OPTION_REGbits.PS1 // bit 1
4242 #define PS2 OPTION_REGbits.PS2 // bit 2
4243 #define PSA OPTION_REGbits.PSA // bit 3
4244 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
4245 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
4246 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
4247 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
4248 #define INTEDG OPTION_REGbits.INTEDG // bit 6
4249 #define NOT_WPUEN OPTION_REGbits.NOT_WPUEN // bit 7
4251 #define SCS0 OSCCONbits.SCS0 // bit 0
4252 #define SCS1 OSCCONbits.SCS1 // bit 1
4253 #define IRCF0 OSCCONbits.IRCF0 // bit 3
4254 #define IRCF1 OSCCONbits.IRCF1 // bit 4
4255 #define IRCF2 OSCCONbits.IRCF2 // bit 5
4256 #define IRCF3 OSCCONbits.IRCF3 // bit 6
4257 #define SPLLEN OSCCONbits.SPLLEN // bit 7
4259 #define HFIOFS OSCSTATbits.HFIOFS // bit 0
4260 #define LFIOFR OSCSTATbits.LFIOFR // bit 1
4261 #define MFIOFR OSCSTATbits.MFIOFR // bit 2
4262 #define HFIOFL OSCSTATbits.HFIOFL // bit 3
4263 #define HFIOFR OSCSTATbits.HFIOFR // bit 4
4264 #define OSTS OSCSTATbits.OSTS // bit 5
4265 #define PLLR OSCSTATbits.PLLR // bit 6
4266 #define T1OSCR OSCSTATbits.T1OSCR // bit 7
4268 #define TUN0 OSCTUNEbits.TUN0 // bit 0
4269 #define TUN1 OSCTUNEbits.TUN1 // bit 1
4270 #define TUN2 OSCTUNEbits.TUN2 // bit 2
4271 #define TUN3 OSCTUNEbits.TUN3 // bit 3
4272 #define TUN4 OSCTUNEbits.TUN4 // bit 4
4273 #define TUN5 OSCTUNEbits.TUN5 // bit 5
4275 #define NOT_BOR PCONbits.NOT_BOR // bit 0
4276 #define NOT_POR PCONbits.NOT_POR // bit 1
4277 #define NOT_RI PCONbits.NOT_RI // bit 2
4278 #define NOT_RMCLR PCONbits.NOT_RMCLR // bit 3
4279 #define STKUNF PCONbits.STKUNF // bit 6
4280 #define STKOVF PCONbits.STKOVF // bit 7
4282 #define TMR1IE PIE1bits.TMR1IE // bit 0
4283 #define TMR2IE PIE1bits.TMR2IE // bit 1
4284 #define CCP1IE PIE1bits.CCP1IE // bit 2
4285 #define SSP1IE PIE1bits.SSP1IE // bit 3
4286 #define TXIE PIE1bits.TXIE // bit 4
4287 #define RCIE PIE1bits.RCIE // bit 5
4288 #define ADIE PIE1bits.ADIE // bit 6
4289 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
4291 #define CCP2IE PIE2bits.CCP2IE // bit 0
4292 #define BCL1IE PIE2bits.BCL1IE // bit 3
4293 #define EEIE PIE2bits.EEIE // bit 4
4294 #define C1IE PIE2bits.C1IE // bit 5
4295 #define C2IE PIE2bits.C2IE // bit 6
4296 #define OSFIE PIE2bits.OSFIE // bit 7
4298 #define TMR4IE PIE3bits.TMR4IE // bit 1
4299 #define TMR6IE PIE3bits.TMR6IE // bit 3
4300 #define CCP3IE PIE3bits.CCP3IE // bit 4
4301 #define CCP4IE PIE3bits.CCP4IE // bit 5
4303 #define SSP2IE PIE4bits.SSP2IE // bit 0
4304 #define BCL2IE PIE4bits.BCL2IE // bit 1
4306 #define TMR1IF PIR1bits.TMR1IF // bit 0
4307 #define TMR2IF PIR1bits.TMR2IF // bit 1
4308 #define CCP1IF PIR1bits.CCP1IF // bit 2
4309 #define SSP1IF PIR1bits.SSP1IF // bit 3
4310 #define TXIF PIR1bits.TXIF // bit 4
4311 #define RCIF PIR1bits.RCIF // bit 5
4312 #define ADIF PIR1bits.ADIF // bit 6
4313 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
4315 #define CCP2IF PIR2bits.CCP2IF // bit 0
4316 #define BCL1IF PIR2bits.BCL1IF // bit 3
4317 #define EEIF PIR2bits.EEIF // bit 4
4318 #define C1IF PIR2bits.C1IF // bit 5
4319 #define C2IF PIR2bits.C2IF // bit 6
4320 #define OSFIF PIR2bits.OSFIF // bit 7
4322 #define TMR4IF PIR3bits.TMR4IF // bit 1
4323 #define TMR6IF PIR3bits.TMR6IF // bit 3
4324 #define CCP3IF PIR3bits.CCP3IF // bit 4
4325 #define CCP4IF PIR3bits.CCP4IF // bit 5
4327 #define SSP2IF PIR4bits.SSP2IF // bit 0
4328 #define BCL2IF PIR4bits.BCL2IF // bit 1
4330 #define RA0 PORTAbits.RA0 // bit 0
4331 #define RA1 PORTAbits.RA1 // bit 1
4332 #define RA2 PORTAbits.RA2 // bit 2
4333 #define RA3 PORTAbits.RA3 // bit 3
4334 #define RA4 PORTAbits.RA4 // bit 4
4335 #define RA5 PORTAbits.RA5 // bit 5
4337 #define RB4 PORTBbits.RB4 // bit 4
4338 #define RB5 PORTBbits.RB5 // bit 5, shadows bit in PORTBbits
4339 #define LINRX PORTBbits.LINRX // bit 5, shadows bit in PORTBbits
4340 #define RB6 PORTBbits.RB6 // bit 6, shadows bit in PORTBbits
4341 #define LINCS PORTBbits.LINCS // bit 6, shadows bit in PORTBbits
4342 #define RB7 PORTBbits.RB7 // bit 7, shadows bit in PORTBbits
4343 #define LINTX PORTBbits.LINTX // bit 7, shadows bit in PORTBbits
4345 #define STR1A PSTR1CONbits.STR1A // bit 0
4346 #define STR1B PSTR1CONbits.STR1B // bit 1
4347 #define STR1C PSTR1CONbits.STR1C // bit 2
4348 #define STR1D PSTR1CONbits.STR1D // bit 3
4349 #define STR1SYNC PSTR1CONbits.STR1SYNC // bit 4
4351 #define STR2A PSTR2CONbits.STR2A // bit 0
4352 #define STR2B PSTR2CONbits.STR2B // bit 1
4353 #define STR2C PSTR2CONbits.STR2C // bit 2
4354 #define STR2D PSTR2CONbits.STR2D // bit 3
4355 #define STR2SYNC PSTR2CONbits.STR2SYNC // bit 4
4357 #define P1DC0 PWM1CONbits.P1DC0 // bit 0
4358 #define P1DC1 PWM1CONbits.P1DC1 // bit 1
4359 #define P1DC2 PWM1CONbits.P1DC2 // bit 2
4360 #define P1DC3 PWM1CONbits.P1DC3 // bit 3
4361 #define P1DC4 PWM1CONbits.P1DC4 // bit 4
4362 #define P1DC5 PWM1CONbits.P1DC5 // bit 5
4363 #define P1DC6 PWM1CONbits.P1DC6 // bit 6
4364 #define P1RSEN PWM1CONbits.P1RSEN // bit 7
4366 #define P2DC0 PWM2CONbits.P2DC0 // bit 0
4367 #define P2DC1 PWM2CONbits.P2DC1 // bit 1
4368 #define P2DC2 PWM2CONbits.P2DC2 // bit 2
4369 #define P2DC3 PWM2CONbits.P2DC3 // bit 3
4370 #define P2DC4 PWM2CONbits.P2DC4 // bit 4
4371 #define P2DC5 PWM2CONbits.P2DC5 // bit 5
4372 #define P2DC6 PWM2CONbits.P2DC6 // bit 6
4373 #define P2RSEN PWM2CONbits.P2RSEN // bit 7
4375 #define RX9D RCSTAbits.RX9D // bit 0
4376 #define OERR RCSTAbits.OERR // bit 1
4377 #define FERR RCSTAbits.FERR // bit 2
4378 #define ADDEN RCSTAbits.ADDEN // bit 3
4379 #define CREN RCSTAbits.CREN // bit 4
4380 #define SREN RCSTAbits.SREN // bit 5
4381 #define RX9 RCSTAbits.RX9 // bit 6
4382 #define SPEN RCSTAbits.SPEN // bit 7
4384 #define SRPR SRCON0bits.SRPR // bit 0
4385 #define SRPS SRCON0bits.SRPS // bit 1
4386 #define SRNQEN SRCON0bits.SRNQEN // bit 2
4387 #define SRQEN SRCON0bits.SRQEN // bit 3
4388 #define SRCLK0 SRCON0bits.SRCLK0 // bit 4
4389 #define SRCLK1 SRCON0bits.SRCLK1 // bit 5
4390 #define SRCLK2 SRCON0bits.SRCLK2 // bit 6
4391 #define SRLEN SRCON0bits.SRLEN // bit 7
4393 #define SRRC1E SRCON1bits.SRRC1E // bit 0
4394 #define SRRC2E SRCON1bits.SRRC2E // bit 1
4395 #define SRRCKE SRCON1bits.SRRCKE // bit 2
4396 #define SRRPE SRCON1bits.SRRPE // bit 3
4397 #define SRSC1E SRCON1bits.SRSC1E // bit 4
4398 #define SRSC2E SRCON1bits.SRSC2E // bit 5
4399 #define SRSCKE SRCON1bits.SRSCKE // bit 6
4400 #define SRSPE SRCON1bits.SRSPE // bit 7
4402 #define SSPM0 SSP1CON1bits.SSPM0 // bit 0
4403 #define SSPM1 SSP1CON1bits.SSPM1 // bit 1
4404 #define SSPM2 SSP1CON1bits.SSPM2 // bit 2
4405 #define SSPM3 SSP1CON1bits.SSPM3 // bit 3
4406 #define CKP SSP1CON1bits.CKP // bit 4
4407 #define SSPEN SSP1CON1bits.SSPEN // bit 5
4408 #define SSPOV SSP1CON1bits.SSPOV // bit 6
4409 #define WCOL SSP1CON1bits.WCOL // bit 7
4411 #define SEN SSP1CON2bits.SEN // bit 0
4412 #define RSEN SSP1CON2bits.RSEN // bit 1
4413 #define PEN SSP1CON2bits.PEN // bit 2
4414 #define RCEN SSP1CON2bits.RCEN // bit 3
4415 #define ACKEN SSP1CON2bits.ACKEN // bit 4
4416 #define ACKDT SSP1CON2bits.ACKDT // bit 5
4417 #define ACKSTAT SSP1CON2bits.ACKSTAT // bit 6
4418 #define GCEN SSP1CON2bits.GCEN // bit 7
4420 #define DHEN SSP1CON3bits.DHEN // bit 0
4421 #define AHEN SSP1CON3bits.AHEN // bit 1
4422 #define SBCDE SSP1CON3bits.SBCDE // bit 2
4423 #define SDAHT SSP1CON3bits.SDAHT // bit 3
4424 #define BOEN SSP1CON3bits.BOEN // bit 4
4425 #define SCIE SSP1CON3bits.SCIE // bit 5
4426 #define PCIE SSP1CON3bits.PCIE // bit 6
4427 #define ACKTIM SSP1CON3bits.ACKTIM // bit 7
4429 #define BF SSP1STATbits.BF // bit 0
4430 #define UA SSP1STATbits.UA // bit 1
4431 #define R_NOT_W SSP1STATbits.R_NOT_W // bit 2
4432 #define S SSP1STATbits.S // bit 3
4433 #define P SSP1STATbits.P // bit 4
4434 #define D_NOT_A SSP1STATbits.D_NOT_A // bit 5
4435 #define CKE SSP1STATbits.CKE // bit 6
4436 #define SMP SSP1STATbits.SMP // bit 7
4438 #define C STATUSbits.C // bit 0
4439 #define DC STATUSbits.DC // bit 1
4440 #define Z STATUSbits.Z // bit 2
4441 #define NOT_PD STATUSbits.NOT_PD // bit 3
4442 #define NOT_TO STATUSbits.NOT_TO // bit 4
4444 #define C_SHAD STATUS_SHADbits.C_SHAD // bit 0
4445 #define DC_SHAD STATUS_SHADbits.DC_SHAD // bit 1
4446 #define Z_SHAD STATUS_SHADbits.Z_SHAD // bit 2
4448 #define TMR1ON T1CONbits.TMR1ON // bit 0
4449 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
4450 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
4451 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
4452 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
4453 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
4454 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
4456 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
4457 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
4458 #define T1GVAL T1GCONbits.T1GVAL // bit 2
4459 #define T1GGO T1GCONbits.T1GGO // bit 3
4460 #define T1GSPM T1GCONbits.T1GSPM // bit 4
4461 #define T1GTM T1GCONbits.T1GTM // bit 5
4462 #define T1GPOL T1GCONbits.T1GPOL // bit 6
4463 #define TMR1GE T1GCONbits.TMR1GE // bit 7
4465 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
4466 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
4467 #define TMR2ON T2CONbits.TMR2ON // bit 2
4468 #define T2OUTPS0 T2CONbits.T2OUTPS0 // bit 3
4469 #define T2OUTPS1 T2CONbits.T2OUTPS1 // bit 4
4470 #define T2OUTPS2 T2CONbits.T2OUTPS2 // bit 5
4471 #define T2OUTPS3 T2CONbits.T2OUTPS3 // bit 6
4473 #define T4CKPS0 T4CONbits.T4CKPS0 // bit 0
4474 #define T4CKPS1 T4CONbits.T4CKPS1 // bit 1
4475 #define TMR4ON T4CONbits.TMR4ON // bit 2
4476 #define T4OUTPS0 T4CONbits.T4OUTPS0 // bit 3
4477 #define T4OUTPS1 T4CONbits.T4OUTPS1 // bit 4
4478 #define T4OUTPS2 T4CONbits.T4OUTPS2 // bit 5
4479 #define T4OUTPS3 T4CONbits.T4OUTPS3 // bit 6
4481 #define T6CKPS0 T6CONbits.T6CKPS0 // bit 0
4482 #define T6CKPS1 T6CONbits.T6CKPS1 // bit 1
4483 #define TMR6ON T6CONbits.TMR6ON // bit 2
4484 #define T6OUTPS0 T6CONbits.T6OUTPS0 // bit 3
4485 #define T6OUTPS1 T6CONbits.T6OUTPS1 // bit 4
4486 #define T6OUTPS2 T6CONbits.T6OUTPS2 // bit 5
4487 #define T6OUTPS3 T6CONbits.T6OUTPS3 // bit 6
4489 #define TRISA0 TRISAbits.TRISA0 // bit 0
4490 #define TRISA1 TRISAbits.TRISA1 // bit 1
4491 #define TRISA2 TRISAbits.TRISA2 // bit 2
4492 #define TRISA3 TRISAbits.TRISA3 // bit 3
4493 #define TRISA4 TRISAbits.TRISA4 // bit 4
4494 #define TRISA5 TRISAbits.TRISA5 // bit 5
4496 #define TRISB4 TRISBbits.TRISB4 // bit 4
4497 #define TRISB5 TRISBbits.TRISB5 // bit 5
4498 #define TRISB6 TRISBbits.TRISB6 // bit 6
4499 #define TRISB7 TRISBbits.TRISB7 // bit 7
4501 #define TRISC0 TRISCbits.TRISC0 // bit 0
4502 #define TRISC1 TRISCbits.TRISC1 // bit 1
4503 #define TRISC2 TRISCbits.TRISC2 // bit 2
4504 #define TRISC3 TRISCbits.TRISC3 // bit 3
4505 #define TRISC4 TRISCbits.TRISC4 // bit 4
4506 #define TRISC5 TRISCbits.TRISC5 // bit 5
4507 #define TRISC6 TRISCbits.TRISC6 // bit 6
4508 #define TRISC7 TRISCbits.TRISC7 // bit 7
4510 #define TX9D TXSTAbits.TX9D // bit 0
4511 #define TRMT TXSTAbits.TRMT // bit 1
4512 #define BRGH TXSTAbits.BRGH // bit 2
4513 #define SENDB TXSTAbits.SENDB // bit 3
4514 #define SYNC TXSTAbits.SYNC // bit 4
4515 #define TXEN TXSTAbits.TXEN // bit 5
4516 #define TX9 TXSTAbits.TX9 // bit 6
4517 #define CSRC TXSTAbits.CSRC // bit 7
4519 #define SWDTEN WDTCONbits.SWDTEN // bit 0
4520 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
4521 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
4522 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
4523 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
4524 #define WDTPS4 WDTCONbits.WDTPS4 // bit 5
4526 #define WPUA0 WPUAbits.WPUA0 // bit 0
4527 #define WPUA1 WPUAbits.WPUA1 // bit 1
4528 #define WPUA2 WPUAbits.WPUA2 // bit 2
4529 #define WPUA3 WPUAbits.WPUA3 // bit 3
4530 #define WPUA4 WPUAbits.WPUA4 // bit 4
4531 #define WPUA5 WPUAbits.WPUA5 // bit 5
4533 #define WPUB4 WPUBbits.WPUB4 // bit 4
4534 #define WPUB5 WPUBbits.WPUB5 // bit 5
4535 #define WPUB6 WPUBbits.WPUB6 // bit 6
4536 #define WPUB7 WPUBbits.WPUB7 // bit 7
4538 #define WPUC0 WPUCbits.WPUC0 // bit 0
4539 #define WPUC1 WPUCbits.WPUC1 // bit 1
4540 #define WPUC2 WPUCbits.WPUC2 // bit 2
4541 #define WPUC3 WPUCbits.WPUC3 // bit 3
4542 #define WPUC4 WPUCbits.WPUC4 // bit 4
4543 #define WPUC5 WPUCbits.WPUC5 // bit 5
4544 #define WPUC6 WPUCbits.WPUC6 // bit 6
4545 #define WPUC7 WPUCbits.WPUC7 // bit 7
4547 #endif // #ifndef NO_BIT_DEFINES
4549 #endif // #ifndef __PIC16F1829LIN_H__