1 /*
2  * This declarations of the PIC16F1704 MCU.
3  *
4  * This file is part of the GNU PIC library for SDCC, originally
5  * created by Molnar Karoly <molnarkaroly@users.sf.net> 2016.
6  *
7  * This file is generated automatically by the cinc2h.pl, 2016-04-13 17:23:11 UTC.
8  *
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.
12  *
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.
21  *
22  * See http://sdcc.sourceforge.net/ for the latest information on sdcc.
23  */
24 
25 #ifndef __PIC16F1704_H__
26 #define __PIC16F1704_H__
27 
28 //==============================================================================
29 //
30 //	Register Addresses
31 //
32 //==============================================================================
33 
34 #ifndef NO_ADDR_DEFINES
35 
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 PORTC_ADDR              0x000E
52 #define PIR1_ADDR               0x0011
53 #define PIR2_ADDR               0x0012
54 #define PIR3_ADDR               0x0013
55 #define TMR0_ADDR               0x0015
56 #define TMR1_ADDR               0x0016
57 #define TMR1L_ADDR              0x0016
58 #define TMR1H_ADDR              0x0017
59 #define T1CON_ADDR              0x0018
60 #define T1GCON_ADDR             0x0019
61 #define TMR2_ADDR               0x001A
62 #define PR2_ADDR                0x001B
63 #define T2CON_ADDR              0x001C
64 #define TRISA_ADDR              0x008C
65 #define TRISC_ADDR              0x008E
66 #define PIE1_ADDR               0x0091
67 #define PIE2_ADDR               0x0092
68 #define PIE3_ADDR               0x0093
69 #define OPTION_REG_ADDR         0x0095
70 #define PCON_ADDR               0x0096
71 #define WDTCON_ADDR             0x0097
72 #define OSCTUNE_ADDR            0x0098
73 #define OSCCON_ADDR             0x0099
74 #define OSCSTAT_ADDR            0x009A
75 #define ADRES_ADDR              0x009B
76 #define ADRESL_ADDR             0x009B
77 #define ADRESH_ADDR             0x009C
78 #define ADCON0_ADDR             0x009D
79 #define ADCON1_ADDR             0x009E
80 #define ADCON2_ADDR             0x009F
81 #define LATA_ADDR               0x010C
82 #define LATC_ADDR               0x010E
83 #define CM1CON0_ADDR            0x0111
84 #define CM1CON1_ADDR            0x0112
85 #define CM2CON0_ADDR            0x0113
86 #define CM2CON1_ADDR            0x0114
87 #define CMOUT_ADDR              0x0115
88 #define BORCON_ADDR             0x0116
89 #define FVRCON_ADDR             0x0117
90 #define DAC1CON0_ADDR           0x0118
91 #define DAC1CON1_ADDR           0x0119
92 #define ZCD1CON_ADDR            0x011C
93 #define ANSELA_ADDR             0x018C
94 #define ANSELC_ADDR             0x018E
95 #define PMADR_ADDR              0x0191
96 #define PMADRL_ADDR             0x0191
97 #define PMADRH_ADDR             0x0192
98 #define PMDAT_ADDR              0x0193
99 #define PMDATL_ADDR             0x0193
100 #define PMDATH_ADDR             0x0194
101 #define PMCON1_ADDR             0x0195
102 #define PMCON2_ADDR             0x0196
103 #define VREGCON_ADDR            0x0197
104 #define RC1REG_ADDR             0x0199
105 #define RCREG_ADDR              0x0199
106 #define RCREG1_ADDR             0x0199
107 #define TX1REG_ADDR             0x019A
108 #define TXREG_ADDR              0x019A
109 #define TXREG1_ADDR             0x019A
110 #define SP1BRG_ADDR             0x019B
111 #define SP1BRGL_ADDR            0x019B
112 #define SPBRG_ADDR              0x019B
113 #define SPBRG1_ADDR             0x019B
114 #define SPBRGL_ADDR             0x019B
115 #define SP1BRGH_ADDR            0x019C
116 #define SPBRGH_ADDR             0x019C
117 #define SPBRGH1_ADDR            0x019C
118 #define RC1STA_ADDR             0x019D
119 #define RCSTA_ADDR              0x019D
120 #define RCSTA1_ADDR             0x019D
121 #define TX1STA_ADDR             0x019E
122 #define TXSTA_ADDR              0x019E
123 #define TXSTA1_ADDR             0x019E
124 #define BAUD1CON_ADDR           0x019F
125 #define BAUDCON_ADDR            0x019F
126 #define BAUDCON1_ADDR           0x019F
127 #define BAUDCTL_ADDR            0x019F
128 #define BAUDCTL1_ADDR           0x019F
129 #define WPUA_ADDR               0x020C
130 #define WPUC_ADDR               0x020E
131 #define SSP1BUF_ADDR            0x0211
132 #define SSPBUF_ADDR             0x0211
133 #define SSP1ADD_ADDR            0x0212
134 #define SSPADD_ADDR             0x0212
135 #define SSP1MSK_ADDR            0x0213
136 #define SSPMSK_ADDR             0x0213
137 #define SSP1STAT_ADDR           0x0214
138 #define SSPSTAT_ADDR            0x0214
139 #define SSP1CON_ADDR            0x0215
140 #define SSP1CON1_ADDR           0x0215
141 #define SSPCON_ADDR             0x0215
142 #define SSPCON1_ADDR            0x0215
143 #define SSP1CON2_ADDR           0x0216
144 #define SSPCON2_ADDR            0x0216
145 #define SSP1CON3_ADDR           0x0217
146 #define SSPCON3_ADDR            0x0217
147 #define ODCONA_ADDR             0x028C
148 #define ODCONC_ADDR             0x028E
149 #define CCPR1_ADDR              0x0291
150 #define CCPR1L_ADDR             0x0291
151 #define CCPR1H_ADDR             0x0292
152 #define CCP1CON_ADDR            0x0293
153 #define ECCP1CON_ADDR           0x0293
154 #define CCPR2_ADDR              0x0298
155 #define CCPR2L_ADDR             0x0298
156 #define CCPR2H_ADDR             0x0299
157 #define CCP2CON_ADDR            0x029A
158 #define ECCP2CON_ADDR           0x029A
159 #define CCPTMRS_ADDR            0x029E
160 #define SLRCONA_ADDR            0x030C
161 #define SLRCONC_ADDR            0x030E
162 #define INLVLA_ADDR             0x038C
163 #define INLVLC_ADDR             0x038E
164 #define IOCAP_ADDR              0x0391
165 #define IOCAN_ADDR              0x0392
166 #define IOCAF_ADDR              0x0393
167 #define IOCCP_ADDR              0x0397
168 #define IOCCN_ADDR              0x0398
169 #define IOCCF_ADDR              0x0399
170 #define TMR4_ADDR               0x0415
171 #define PR4_ADDR                0x0416
172 #define T4CON_ADDR              0x0417
173 #define TMR6_ADDR               0x041C
174 #define PR6_ADDR                0x041D
175 #define T6CON_ADDR              0x041E
176 #define OPA1CON_ADDR            0x0511
177 #define OPA2CON_ADDR            0x0515
178 #define PWM3DCL_ADDR            0x0617
179 #define PWM3DCH_ADDR            0x0618
180 #define PWM3CON_ADDR            0x0619
181 #define PWM3CON0_ADDR           0x0619
182 #define PWM4DCL_ADDR            0x061A
183 #define PWM4DCH_ADDR            0x061B
184 #define PWM4CON_ADDR            0x061C
185 #define PWM4CON0_ADDR           0x061C
186 #define COG1PHR_ADDR            0x0691
187 #define COG1PHF_ADDR            0x0692
188 #define COG1BLKR_ADDR           0x0693
189 #define COG1BLKF_ADDR           0x0694
190 #define COG1DBR_ADDR            0x0695
191 #define COG1DBF_ADDR            0x0696
192 #define COG1CON0_ADDR           0x0697
193 #define COG1CON1_ADDR           0x0698
194 #define COG1RIS_ADDR            0x0699
195 #define COG1RSIM_ADDR           0x069A
196 #define COG1FIS_ADDR            0x069B
197 #define COG1FSIM_ADDR           0x069C
198 #define COG1ASD0_ADDR           0x069D
199 #define COG1ASD1_ADDR           0x069E
200 #define COG1STR_ADDR            0x069F
201 #define PPSLOCK_ADDR            0x0E0F
202 #define INTPPS_ADDR             0x0E10
203 #define T0CKIPPS_ADDR           0x0E11
204 #define T1CKIPPS_ADDR           0x0E12
205 #define T1GPPS_ADDR             0x0E13
206 #define CCP1PPS_ADDR            0x0E14
207 #define CCP2PPS_ADDR            0x0E15
208 #define COGINPPS_ADDR           0x0E17
209 #define SSPCLKPPS_ADDR          0x0E20
210 #define SSPDATPPS_ADDR          0x0E21
211 #define SSPSSPPS_ADDR           0x0E22
212 #define RXPPS_ADDR              0x0E24
213 #define CKPPS_ADDR              0x0E25
214 #define CLCIN0PPS_ADDR          0x0E28
215 #define CLCIN1PPS_ADDR          0x0E29
216 #define CLCIN2PPS_ADDR          0x0E2A
217 #define CLCIN3PPS_ADDR          0x0E2B
218 #define RA0PPS_ADDR             0x0E90
219 #define RA1PPS_ADDR             0x0E91
220 #define RA2PPS_ADDR             0x0E92
221 #define RA4PPS_ADDR             0x0E94
222 #define RA5PPS_ADDR             0x0E95
223 #define RC0PPS_ADDR             0x0EA0
224 #define RC1PPS_ADDR             0x0EA1
225 #define RC2PPS_ADDR             0x0EA2
226 #define RC3PPS_ADDR             0x0EA3
227 #define RC4PPS_ADDR             0x0EA4
228 #define RC5PPS_ADDR             0x0EA5
229 #define CLCDATA_ADDR            0x0F0F
230 #define CLC1CON_ADDR            0x0F10
231 #define CLC1POL_ADDR            0x0F11
232 #define CLC1SEL0_ADDR           0x0F12
233 #define CLC1SEL1_ADDR           0x0F13
234 #define CLC1SEL2_ADDR           0x0F14
235 #define CLC1SEL3_ADDR           0x0F15
236 #define CLC1GLS0_ADDR           0x0F16
237 #define CLC1GLS1_ADDR           0x0F17
238 #define CLC1GLS2_ADDR           0x0F18
239 #define CLC1GLS3_ADDR           0x0F19
240 #define CLC2CON_ADDR            0x0F1A
241 #define CLC2POL_ADDR            0x0F1B
242 #define CLC2SEL0_ADDR           0x0F1C
243 #define CLC2SEL1_ADDR           0x0F1D
244 #define CLC2SEL2_ADDR           0x0F1E
245 #define CLC2SEL3_ADDR           0x0F1F
246 #define CLC2GLS0_ADDR           0x0F20
247 #define CLC2GLS1_ADDR           0x0F21
248 #define CLC2GLS2_ADDR           0x0F22
249 #define CLC2GLS3_ADDR           0x0F23
250 #define CLC3CON_ADDR            0x0F24
251 #define CLC3POL_ADDR            0x0F25
252 #define CLC3SEL0_ADDR           0x0F26
253 #define CLC3SEL1_ADDR           0x0F27
254 #define CLC3SEL2_ADDR           0x0F28
255 #define CLC3SEL3_ADDR           0x0F29
256 #define CLC3GLS0_ADDR           0x0F2A
257 #define CLC3GLS1_ADDR           0x0F2B
258 #define CLC3GLS2_ADDR           0x0F2C
259 #define CLC3GLS3_ADDR           0x0F2D
260 #define STATUS_SHAD_ADDR        0x0FE4
261 #define WREG_SHAD_ADDR          0x0FE5
262 #define BSR_SHAD_ADDR           0x0FE6
263 #define PCLATH_SHAD_ADDR        0x0FE7
264 #define FSR0L_SHAD_ADDR         0x0FE8
265 #define FSR0H_SHAD_ADDR         0x0FE9
266 #define FSR1L_SHAD_ADDR         0x0FEA
267 #define FSR1H_SHAD_ADDR         0x0FEB
268 #define STKPTR_ADDR             0x0FED
269 #define TOSL_ADDR               0x0FEE
270 #define TOSH_ADDR               0x0FEF
271 
272 #endif // #ifndef NO_ADDR_DEFINES
273 
274 //==============================================================================
275 //
276 //	Register Definitions
277 //
278 //==============================================================================
279 
280 extern __at(0x0000) __sfr INDF0;
281 extern __at(0x0001) __sfr INDF1;
282 extern __at(0x0002) __sfr PCL;
283 
284 //==============================================================================
285 //        STATUS Bits
286 
287 extern __at(0x0003) __sfr STATUS;
288 
289 typedef struct
290   {
291   unsigned C                    : 1;
292   unsigned DC                   : 1;
293   unsigned Z                    : 1;
294   unsigned NOT_PD               : 1;
295   unsigned NOT_TO               : 1;
296   unsigned                      : 1;
297   unsigned                      : 1;
298   unsigned                      : 1;
299   } __STATUSbits_t;
300 
301 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
302 
303 #define _C                      0x01
304 #define _DC                     0x02
305 #define _Z                      0x04
306 #define _NOT_PD                 0x08
307 #define _NOT_TO                 0x10
308 
309 //==============================================================================
310 
311 extern __at(0x0004) __sfr FSR0;
312 extern __at(0x0004) __sfr FSR0L;
313 extern __at(0x0005) __sfr FSR0H;
314 extern __at(0x0006) __sfr FSR1;
315 extern __at(0x0006) __sfr FSR1L;
316 extern __at(0x0007) __sfr FSR1H;
317 
318 //==============================================================================
319 //        BSR Bits
320 
321 extern __at(0x0008) __sfr BSR;
322 
323 typedef union
324   {
325   struct
326     {
327     unsigned BSR0               : 1;
328     unsigned BSR1               : 1;
329     unsigned BSR2               : 1;
330     unsigned BSR3               : 1;
331     unsigned BSR4               : 1;
332     unsigned                    : 1;
333     unsigned                    : 1;
334     unsigned                    : 1;
335     };
336 
337   struct
338     {
339     unsigned BSR                : 5;
340     unsigned                    : 3;
341     };
342   } __BSRbits_t;
343 
344 extern __at(0x0008) volatile __BSRbits_t BSRbits;
345 
346 #define _BSR0                   0x01
347 #define _BSR1                   0x02
348 #define _BSR2                   0x04
349 #define _BSR3                   0x08
350 #define _BSR4                   0x10
351 
352 //==============================================================================
353 
354 extern __at(0x0009) __sfr WREG;
355 extern __at(0x000A) __sfr PCLATH;
356 
357 //==============================================================================
358 //        INTCON Bits
359 
360 extern __at(0x000B) __sfr INTCON;
361 
362 typedef union
363   {
364   struct
365     {
366     unsigned IOCIF              : 1;
367     unsigned INTF               : 1;
368     unsigned TMR0IF             : 1;
369     unsigned IOCIE              : 1;
370     unsigned INTE               : 1;
371     unsigned TMR0IE             : 1;
372     unsigned PEIE               : 1;
373     unsigned GIE                : 1;
374     };
375 
376   struct
377     {
378     unsigned                    : 1;
379     unsigned                    : 1;
380     unsigned T0IF               : 1;
381     unsigned                    : 1;
382     unsigned                    : 1;
383     unsigned T0IE               : 1;
384     unsigned                    : 1;
385     unsigned                    : 1;
386     };
387   } __INTCONbits_t;
388 
389 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
390 
391 #define _IOCIF                  0x01
392 #define _INTF                   0x02
393 #define _TMR0IF                 0x04
394 #define _T0IF                   0x04
395 #define _IOCIE                  0x08
396 #define _INTE                   0x10
397 #define _TMR0IE                 0x20
398 #define _T0IE                   0x20
399 #define _PEIE                   0x40
400 #define _GIE                    0x80
401 
402 //==============================================================================
403 
404 
405 //==============================================================================
406 //        PORTA Bits
407 
408 extern __at(0x000C) __sfr PORTA;
409 
410 typedef union
411   {
412   struct
413     {
414     unsigned RA0                : 1;
415     unsigned RA1                : 1;
416     unsigned RA2                : 1;
417     unsigned RA3                : 1;
418     unsigned RA4                : 1;
419     unsigned RA5                : 1;
420     unsigned                    : 1;
421     unsigned                    : 1;
422     };
423 
424   struct
425     {
426     unsigned RA                 : 6;
427     unsigned                    : 2;
428     };
429   } __PORTAbits_t;
430 
431 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
432 
433 #define _RA0                    0x01
434 #define _RA1                    0x02
435 #define _RA2                    0x04
436 #define _RA3                    0x08
437 #define _RA4                    0x10
438 #define _RA5                    0x20
439 
440 //==============================================================================
441 
442 
443 //==============================================================================
444 //        PORTC Bits
445 
446 extern __at(0x000E) __sfr PORTC;
447 
448 typedef union
449   {
450   struct
451     {
452     unsigned RC0                : 1;
453     unsigned RC1                : 1;
454     unsigned RC2                : 1;
455     unsigned RC3                : 1;
456     unsigned RC4                : 1;
457     unsigned RC5                : 1;
458     unsigned                    : 1;
459     unsigned                    : 1;
460     };
461 
462   struct
463     {
464     unsigned RC                 : 6;
465     unsigned                    : 2;
466     };
467   } __PORTCbits_t;
468 
469 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
470 
471 #define _RC0                    0x01
472 #define _RC1                    0x02
473 #define _RC2                    0x04
474 #define _RC3                    0x08
475 #define _RC4                    0x10
476 #define _RC5                    0x20
477 
478 //==============================================================================
479 
480 
481 //==============================================================================
482 //        PIR1 Bits
483 
484 extern __at(0x0011) __sfr PIR1;
485 
486 typedef union
487   {
488   struct
489     {
490     unsigned TMR1IF             : 1;
491     unsigned TMR2IF             : 1;
492     unsigned CCP1IF             : 1;
493     unsigned SSP1IF             : 1;
494     unsigned TXIF               : 1;
495     unsigned RCIF               : 1;
496     unsigned ADIF               : 1;
497     unsigned TMR1GIF            : 1;
498     };
499 
500   struct
501     {
502     unsigned                    : 1;
503     unsigned                    : 1;
504     unsigned CCPIF              : 1;
505     unsigned                    : 1;
506     unsigned                    : 1;
507     unsigned                    : 1;
508     unsigned                    : 1;
509     unsigned                    : 1;
510     };
511   } __PIR1bits_t;
512 
513 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
514 
515 #define _TMR1IF                 0x01
516 #define _TMR2IF                 0x02
517 #define _CCP1IF                 0x04
518 #define _CCPIF                  0x04
519 #define _SSP1IF                 0x08
520 #define _TXIF                   0x10
521 #define _RCIF                   0x20
522 #define _ADIF                   0x40
523 #define _TMR1GIF                0x80
524 
525 //==============================================================================
526 
527 
528 //==============================================================================
529 //        PIR2 Bits
530 
531 extern __at(0x0012) __sfr PIR2;
532 
533 typedef struct
534   {
535   unsigned CCP2IF               : 1;
536   unsigned TMR4IF               : 1;
537   unsigned TMR6IF               : 1;
538   unsigned BCL1IF               : 1;
539   unsigned                      : 1;
540   unsigned C1IF                 : 1;
541   unsigned C2IF                 : 1;
542   unsigned OSFIF                : 1;
543   } __PIR2bits_t;
544 
545 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
546 
547 #define _CCP2IF                 0x01
548 #define _TMR4IF                 0x02
549 #define _TMR6IF                 0x04
550 #define _BCL1IF                 0x08
551 #define _C1IF                   0x20
552 #define _C2IF                   0x40
553 #define _OSFIF                  0x80
554 
555 //==============================================================================
556 
557 
558 //==============================================================================
559 //        PIR3 Bits
560 
561 extern __at(0x0013) __sfr PIR3;
562 
563 typedef struct
564   {
565   unsigned CLC1IF               : 1;
566   unsigned CLC2IF               : 1;
567   unsigned CLC3IF               : 1;
568   unsigned                      : 1;
569   unsigned ZCDIF                : 1;
570   unsigned COGIF                : 1;
571   unsigned                      : 1;
572   unsigned                      : 1;
573   } __PIR3bits_t;
574 
575 extern __at(0x0013) volatile __PIR3bits_t PIR3bits;
576 
577 #define _CLC1IF                 0x01
578 #define _CLC2IF                 0x02
579 #define _CLC3IF                 0x04
580 #define _ZCDIF                  0x10
581 #define _COGIF                  0x20
582 
583 //==============================================================================
584 
585 extern __at(0x0015) __sfr TMR0;
586 extern __at(0x0016) __sfr TMR1;
587 extern __at(0x0016) __sfr TMR1L;
588 extern __at(0x0017) __sfr TMR1H;
589 
590 //==============================================================================
591 //        T1CON Bits
592 
593 extern __at(0x0018) __sfr T1CON;
594 
595 typedef union
596   {
597   struct
598     {
599     unsigned TMR1ON             : 1;
600     unsigned                    : 1;
601     unsigned NOT_T1SYNC         : 1;
602     unsigned T1OSCEN            : 1;
603     unsigned T1CKPS0            : 1;
604     unsigned T1CKPS1            : 1;
605     unsigned TMR1CS0            : 1;
606     unsigned TMR1CS1            : 1;
607     };
608 
609   struct
610     {
611     unsigned                    : 4;
612     unsigned T1CKPS             : 2;
613     unsigned                    : 2;
614     };
615 
616   struct
617     {
618     unsigned                    : 6;
619     unsigned TMR1CS             : 2;
620     };
621   } __T1CONbits_t;
622 
623 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
624 
625 #define _TMR1ON                 0x01
626 #define _NOT_T1SYNC             0x04
627 #define _T1OSCEN                0x08
628 #define _T1CKPS0                0x10
629 #define _T1CKPS1                0x20
630 #define _TMR1CS0                0x40
631 #define _TMR1CS1                0x80
632 
633 //==============================================================================
634 
635 
636 //==============================================================================
637 //        T1GCON Bits
638 
639 extern __at(0x0019) __sfr T1GCON;
640 
641 typedef union
642   {
643   struct
644     {
645     unsigned T1GSS0             : 1;
646     unsigned T1GSS1             : 1;
647     unsigned T1GVAL             : 1;
648     unsigned T1GGO_NOT_DONE     : 1;
649     unsigned T1GSPM             : 1;
650     unsigned T1GTM              : 1;
651     unsigned T1GPOL             : 1;
652     unsigned TMR1GE             : 1;
653     };
654 
655   struct
656     {
657     unsigned T1GSS              : 2;
658     unsigned                    : 6;
659     };
660   } __T1GCONbits_t;
661 
662 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
663 
664 #define _T1GSS0                 0x01
665 #define _T1GSS1                 0x02
666 #define _T1GVAL                 0x04
667 #define _T1GGO_NOT_DONE         0x08
668 #define _T1GSPM                 0x10
669 #define _T1GTM                  0x20
670 #define _T1GPOL                 0x40
671 #define _TMR1GE                 0x80
672 
673 //==============================================================================
674 
675 extern __at(0x001A) __sfr TMR2;
676 extern __at(0x001B) __sfr PR2;
677 
678 //==============================================================================
679 //        T2CON Bits
680 
681 extern __at(0x001C) __sfr T2CON;
682 
683 typedef union
684   {
685   struct
686     {
687     unsigned T2CKPS0            : 1;
688     unsigned T2CKPS1            : 1;
689     unsigned TMR2ON             : 1;
690     unsigned T2OUTPS0           : 1;
691     unsigned T2OUTPS1           : 1;
692     unsigned T2OUTPS2           : 1;
693     unsigned T2OUTPS3           : 1;
694     unsigned                    : 1;
695     };
696 
697   struct
698     {
699     unsigned T2CKPS             : 2;
700     unsigned                    : 6;
701     };
702 
703   struct
704     {
705     unsigned                    : 3;
706     unsigned T2OUTPS            : 4;
707     unsigned                    : 1;
708     };
709   } __T2CONbits_t;
710 
711 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
712 
713 #define _T2CKPS0                0x01
714 #define _T2CKPS1                0x02
715 #define _TMR2ON                 0x04
716 #define _T2OUTPS0               0x08
717 #define _T2OUTPS1               0x10
718 #define _T2OUTPS2               0x20
719 #define _T2OUTPS3               0x40
720 
721 //==============================================================================
722 
723 
724 //==============================================================================
725 //        TRISA Bits
726 
727 extern __at(0x008C) __sfr TRISA;
728 
729 typedef struct
730   {
731   unsigned TRISA0               : 1;
732   unsigned TRISA1               : 1;
733   unsigned TRISA2               : 1;
734   unsigned                      : 1;
735   unsigned TRISA4               : 1;
736   unsigned TRISA5               : 1;
737   unsigned                      : 1;
738   unsigned                      : 1;
739   } __TRISAbits_t;
740 
741 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
742 
743 #define _TRISA0                 0x01
744 #define _TRISA1                 0x02
745 #define _TRISA2                 0x04
746 #define _TRISA4                 0x10
747 #define _TRISA5                 0x20
748 
749 //==============================================================================
750 
751 
752 //==============================================================================
753 //        TRISC Bits
754 
755 extern __at(0x008E) __sfr TRISC;
756 
757 typedef union
758   {
759   struct
760     {
761     unsigned TRISC0             : 1;
762     unsigned TRISC1             : 1;
763     unsigned TRISC2             : 1;
764     unsigned TRISC3             : 1;
765     unsigned TRISC4             : 1;
766     unsigned TRISC5             : 1;
767     unsigned                    : 1;
768     unsigned                    : 1;
769     };
770 
771   struct
772     {
773     unsigned TRISC              : 6;
774     unsigned                    : 2;
775     };
776   } __TRISCbits_t;
777 
778 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
779 
780 #define _TRISC0                 0x01
781 #define _TRISC1                 0x02
782 #define _TRISC2                 0x04
783 #define _TRISC3                 0x08
784 #define _TRISC4                 0x10
785 #define _TRISC5                 0x20
786 
787 //==============================================================================
788 
789 
790 //==============================================================================
791 //        PIE1 Bits
792 
793 extern __at(0x0091) __sfr PIE1;
794 
795 typedef union
796   {
797   struct
798     {
799     unsigned TMR1IE             : 1;
800     unsigned TMR2IE             : 1;
801     unsigned CCP1IE             : 1;
802     unsigned SSP1IE             : 1;
803     unsigned TXIE               : 1;
804     unsigned RCIE               : 1;
805     unsigned ADIE               : 1;
806     unsigned TMR1GIE            : 1;
807     };
808 
809   struct
810     {
811     unsigned                    : 1;
812     unsigned                    : 1;
813     unsigned CCPIE              : 1;
814     unsigned                    : 1;
815     unsigned                    : 1;
816     unsigned                    : 1;
817     unsigned                    : 1;
818     unsigned                    : 1;
819     };
820   } __PIE1bits_t;
821 
822 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
823 
824 #define _TMR1IE                 0x01
825 #define _TMR2IE                 0x02
826 #define _CCP1IE                 0x04
827 #define _CCPIE                  0x04
828 #define _SSP1IE                 0x08
829 #define _TXIE                   0x10
830 #define _RCIE                   0x20
831 #define _ADIE                   0x40
832 #define _TMR1GIE                0x80
833 
834 //==============================================================================
835 
836 
837 //==============================================================================
838 //        PIE2 Bits
839 
840 extern __at(0x0092) __sfr PIE2;
841 
842 typedef struct
843   {
844   unsigned CCP2IE               : 1;
845   unsigned TMR4IE               : 1;
846   unsigned TMR6IE               : 1;
847   unsigned BCL1IE               : 1;
848   unsigned                      : 1;
849   unsigned C1IE                 : 1;
850   unsigned C2IE                 : 1;
851   unsigned OSFIE                : 1;
852   } __PIE2bits_t;
853 
854 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
855 
856 #define _CCP2IE                 0x01
857 #define _TMR4IE                 0x02
858 #define _TMR6IE                 0x04
859 #define _BCL1IE                 0x08
860 #define _C1IE                   0x20
861 #define _C2IE                   0x40
862 #define _OSFIE                  0x80
863 
864 //==============================================================================
865 
866 
867 //==============================================================================
868 //        PIE3 Bits
869 
870 extern __at(0x0093) __sfr PIE3;
871 
872 typedef struct
873   {
874   unsigned CLC1IE               : 1;
875   unsigned CLC2IE               : 1;
876   unsigned CLC3IE               : 1;
877   unsigned                      : 1;
878   unsigned ZCDIE                : 1;
879   unsigned COGIE                : 1;
880   unsigned                      : 1;
881   unsigned                      : 1;
882   } __PIE3bits_t;
883 
884 extern __at(0x0093) volatile __PIE3bits_t PIE3bits;
885 
886 #define _CLC1IE                 0x01
887 #define _CLC2IE                 0x02
888 #define _CLC3IE                 0x04
889 #define _ZCDIE                  0x10
890 #define _COGIE                  0x20
891 
892 //==============================================================================
893 
894 
895 //==============================================================================
896 //        OPTION_REG Bits
897 
898 extern __at(0x0095) __sfr OPTION_REG;
899 
900 typedef union
901   {
902   struct
903     {
904     unsigned PS0                : 1;
905     unsigned PS1                : 1;
906     unsigned PS2                : 1;
907     unsigned PSA                : 1;
908     unsigned TMR0SE             : 1;
909     unsigned TMR0CS             : 1;
910     unsigned INTEDG             : 1;
911     unsigned NOT_WPUEN          : 1;
912     };
913 
914   struct
915     {
916     unsigned                    : 1;
917     unsigned                    : 1;
918     unsigned                    : 1;
919     unsigned                    : 1;
920     unsigned T0SE               : 1;
921     unsigned T0CS               : 1;
922     unsigned                    : 1;
923     unsigned                    : 1;
924     };
925 
926   struct
927     {
928     unsigned PS                 : 3;
929     unsigned                    : 5;
930     };
931   } __OPTION_REGbits_t;
932 
933 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
934 
935 #define _PS0                    0x01
936 #define _PS1                    0x02
937 #define _PS2                    0x04
938 #define _PSA                    0x08
939 #define _TMR0SE                 0x10
940 #define _T0SE                   0x10
941 #define _TMR0CS                 0x20
942 #define _T0CS                   0x20
943 #define _INTEDG                 0x40
944 #define _NOT_WPUEN              0x80
945 
946 //==============================================================================
947 
948 
949 //==============================================================================
950 //        PCON Bits
951 
952 extern __at(0x0096) __sfr PCON;
953 
954 typedef struct
955   {
956   unsigned NOT_BOR              : 1;
957   unsigned NOT_POR              : 1;
958   unsigned NOT_RI               : 1;
959   unsigned NOT_RMCLR            : 1;
960   unsigned NOT_RWDT             : 1;
961   unsigned                      : 1;
962   unsigned STKUNF               : 1;
963   unsigned STKOVF               : 1;
964   } __PCONbits_t;
965 
966 extern __at(0x0096) volatile __PCONbits_t PCONbits;
967 
968 #define _NOT_BOR                0x01
969 #define _NOT_POR                0x02
970 #define _NOT_RI                 0x04
971 #define _NOT_RMCLR              0x08
972 #define _NOT_RWDT               0x10
973 #define _STKUNF                 0x40
974 #define _STKOVF                 0x80
975 
976 //==============================================================================
977 
978 
979 //==============================================================================
980 //        WDTCON Bits
981 
982 extern __at(0x0097) __sfr WDTCON;
983 
984 typedef union
985   {
986   struct
987     {
988     unsigned SWDTEN             : 1;
989     unsigned WDTPS0             : 1;
990     unsigned WDTPS1             : 1;
991     unsigned WDTPS2             : 1;
992     unsigned WDTPS3             : 1;
993     unsigned WDTPS4             : 1;
994     unsigned                    : 1;
995     unsigned                    : 1;
996     };
997 
998   struct
999     {
1000     unsigned                    : 1;
1001     unsigned WDTPS              : 5;
1002     unsigned                    : 2;
1003     };
1004   } __WDTCONbits_t;
1005 
1006 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
1007 
1008 #define _SWDTEN                 0x01
1009 #define _WDTPS0                 0x02
1010 #define _WDTPS1                 0x04
1011 #define _WDTPS2                 0x08
1012 #define _WDTPS3                 0x10
1013 #define _WDTPS4                 0x20
1014 
1015 //==============================================================================
1016 
1017 
1018 //==============================================================================
1019 //        OSCTUNE Bits
1020 
1021 extern __at(0x0098) __sfr OSCTUNE;
1022 
1023 typedef union
1024   {
1025   struct
1026     {
1027     unsigned TUN0               : 1;
1028     unsigned TUN1               : 1;
1029     unsigned TUN2               : 1;
1030     unsigned TUN3               : 1;
1031     unsigned TUN4               : 1;
1032     unsigned TUN5               : 1;
1033     unsigned                    : 1;
1034     unsigned                    : 1;
1035     };
1036 
1037   struct
1038     {
1039     unsigned TUN                : 6;
1040     unsigned                    : 2;
1041     };
1042   } __OSCTUNEbits_t;
1043 
1044 extern __at(0x0098) volatile __OSCTUNEbits_t OSCTUNEbits;
1045 
1046 #define _TUN0                   0x01
1047 #define _TUN1                   0x02
1048 #define _TUN2                   0x04
1049 #define _TUN3                   0x08
1050 #define _TUN4                   0x10
1051 #define _TUN5                   0x20
1052 
1053 //==============================================================================
1054 
1055 
1056 //==============================================================================
1057 //        OSCCON Bits
1058 
1059 extern __at(0x0099) __sfr OSCCON;
1060 
1061 typedef union
1062   {
1063   struct
1064     {
1065     unsigned SCS0               : 1;
1066     unsigned SCS1               : 1;
1067     unsigned                    : 1;
1068     unsigned IRCF0              : 1;
1069     unsigned IRCF1              : 1;
1070     unsigned IRCF2              : 1;
1071     unsigned IRCF3              : 1;
1072     unsigned SPLLEN             : 1;
1073     };
1074 
1075   struct
1076     {
1077     unsigned SCS                : 2;
1078     unsigned                    : 6;
1079     };
1080 
1081   struct
1082     {
1083     unsigned                    : 3;
1084     unsigned IRCF               : 4;
1085     unsigned                    : 1;
1086     };
1087   } __OSCCONbits_t;
1088 
1089 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1090 
1091 #define _SCS0                   0x01
1092 #define _SCS1                   0x02
1093 #define _IRCF0                  0x08
1094 #define _IRCF1                  0x10
1095 #define _IRCF2                  0x20
1096 #define _IRCF3                  0x40
1097 #define _SPLLEN                 0x80
1098 
1099 //==============================================================================
1100 
1101 
1102 //==============================================================================
1103 //        OSCSTAT Bits
1104 
1105 extern __at(0x009A) __sfr OSCSTAT;
1106 
1107 typedef struct
1108   {
1109   unsigned HFIOFS               : 1;
1110   unsigned LFIOFR               : 1;
1111   unsigned MFIOFR               : 1;
1112   unsigned HFIOFL               : 1;
1113   unsigned HFIOFR               : 1;
1114   unsigned OSTS                 : 1;
1115   unsigned PLLR                 : 1;
1116   unsigned SOSCR                : 1;
1117   } __OSCSTATbits_t;
1118 
1119 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1120 
1121 #define _HFIOFS                 0x01
1122 #define _LFIOFR                 0x02
1123 #define _MFIOFR                 0x04
1124 #define _HFIOFL                 0x08
1125 #define _HFIOFR                 0x10
1126 #define _OSTS                   0x20
1127 #define _PLLR                   0x40
1128 #define _SOSCR                  0x80
1129 
1130 //==============================================================================
1131 
1132 extern __at(0x009B) __sfr ADRES;
1133 extern __at(0x009B) __sfr ADRESL;
1134 extern __at(0x009C) __sfr ADRESH;
1135 
1136 //==============================================================================
1137 //        ADCON0 Bits
1138 
1139 extern __at(0x009D) __sfr ADCON0;
1140 
1141 typedef union
1142   {
1143   struct
1144     {
1145     unsigned ADON               : 1;
1146     unsigned GO_NOT_DONE        : 1;
1147     unsigned CHS0               : 1;
1148     unsigned CHS1               : 1;
1149     unsigned CHS2               : 1;
1150     unsigned CHS3               : 1;
1151     unsigned CHS4               : 1;
1152     unsigned                    : 1;
1153     };
1154 
1155   struct
1156     {
1157     unsigned                    : 1;
1158     unsigned ADGO               : 1;
1159     unsigned                    : 1;
1160     unsigned                    : 1;
1161     unsigned                    : 1;
1162     unsigned                    : 1;
1163     unsigned                    : 1;
1164     unsigned                    : 1;
1165     };
1166 
1167   struct
1168     {
1169     unsigned                    : 1;
1170     unsigned GO                 : 1;
1171     unsigned                    : 1;
1172     unsigned                    : 1;
1173     unsigned                    : 1;
1174     unsigned                    : 1;
1175     unsigned                    : 1;
1176     unsigned                    : 1;
1177     };
1178 
1179   struct
1180     {
1181     unsigned                    : 2;
1182     unsigned CHS                : 5;
1183     unsigned                    : 1;
1184     };
1185   } __ADCON0bits_t;
1186 
1187 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1188 
1189 #define _ADON                   0x01
1190 #define _GO_NOT_DONE            0x02
1191 #define _ADGO                   0x02
1192 #define _GO                     0x02
1193 #define _CHS0                   0x04
1194 #define _CHS1                   0x08
1195 #define _CHS2                   0x10
1196 #define _CHS3                   0x20
1197 #define _CHS4                   0x40
1198 
1199 //==============================================================================
1200 
1201 
1202 //==============================================================================
1203 //        ADCON1 Bits
1204 
1205 extern __at(0x009E) __sfr ADCON1;
1206 
1207 typedef union
1208   {
1209   struct
1210     {
1211     unsigned ADPREF0            : 1;
1212     unsigned ADPREF1            : 1;
1213     unsigned ADNREF             : 1;
1214     unsigned                    : 1;
1215     unsigned ADCS0              : 1;
1216     unsigned ADCS1              : 1;
1217     unsigned ADCS2              : 1;
1218     unsigned ADFM               : 1;
1219     };
1220 
1221   struct
1222     {
1223     unsigned ADPREF             : 2;
1224     unsigned                    : 6;
1225     };
1226 
1227   struct
1228     {
1229     unsigned                    : 4;
1230     unsigned ADCS               : 3;
1231     unsigned                    : 1;
1232     };
1233   } __ADCON1bits_t;
1234 
1235 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1236 
1237 #define _ADPREF0                0x01
1238 #define _ADPREF1                0x02
1239 #define _ADNREF                 0x04
1240 #define _ADCS0                  0x10
1241 #define _ADCS1                  0x20
1242 #define _ADCS2                  0x40
1243 #define _ADFM                   0x80
1244 
1245 //==============================================================================
1246 
1247 
1248 //==============================================================================
1249 //        ADCON2 Bits
1250 
1251 extern __at(0x009F) __sfr ADCON2;
1252 
1253 typedef union
1254   {
1255   struct
1256     {
1257     unsigned                    : 1;
1258     unsigned                    : 1;
1259     unsigned                    : 1;
1260     unsigned                    : 1;
1261     unsigned TRIGSEL0           : 1;
1262     unsigned TRIGSEL1           : 1;
1263     unsigned TRIGSEL2           : 1;
1264     unsigned TRIGSEL3           : 1;
1265     };
1266 
1267   struct
1268     {
1269     unsigned                    : 4;
1270     unsigned TRIGSEL            : 4;
1271     };
1272   } __ADCON2bits_t;
1273 
1274 extern __at(0x009F) volatile __ADCON2bits_t ADCON2bits;
1275 
1276 #define _TRIGSEL0               0x10
1277 #define _TRIGSEL1               0x20
1278 #define _TRIGSEL2               0x40
1279 #define _TRIGSEL3               0x80
1280 
1281 //==============================================================================
1282 
1283 
1284 //==============================================================================
1285 //        LATA Bits
1286 
1287 extern __at(0x010C) __sfr LATA;
1288 
1289 typedef struct
1290   {
1291   unsigned LATA0                : 1;
1292   unsigned LATA1                : 1;
1293   unsigned LATA2                : 1;
1294   unsigned                      : 1;
1295   unsigned LATA4                : 1;
1296   unsigned LATA5                : 1;
1297   unsigned                      : 1;
1298   unsigned                      : 1;
1299   } __LATAbits_t;
1300 
1301 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1302 
1303 #define _LATA0                  0x01
1304 #define _LATA1                  0x02
1305 #define _LATA2                  0x04
1306 #define _LATA4                  0x10
1307 #define _LATA5                  0x20
1308 
1309 //==============================================================================
1310 
1311 
1312 //==============================================================================
1313 //        LATC Bits
1314 
1315 extern __at(0x010E) __sfr LATC;
1316 
1317 typedef union
1318   {
1319   struct
1320     {
1321     unsigned LATC0              : 1;
1322     unsigned LATC1              : 1;
1323     unsigned LATC2              : 1;
1324     unsigned LATC3              : 1;
1325     unsigned LATC4              : 1;
1326     unsigned LATC5              : 1;
1327     unsigned                    : 1;
1328     unsigned                    : 1;
1329     };
1330 
1331   struct
1332     {
1333     unsigned LATC               : 6;
1334     unsigned                    : 2;
1335     };
1336   } __LATCbits_t;
1337 
1338 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1339 
1340 #define _LATC0                  0x01
1341 #define _LATC1                  0x02
1342 #define _LATC2                  0x04
1343 #define _LATC3                  0x08
1344 #define _LATC4                  0x10
1345 #define _LATC5                  0x20
1346 
1347 //==============================================================================
1348 
1349 
1350 //==============================================================================
1351 //        CM1CON0 Bits
1352 
1353 extern __at(0x0111) __sfr CM1CON0;
1354 
1355 typedef struct
1356   {
1357   unsigned C1SYNC               : 1;
1358   unsigned C1HYS                : 1;
1359   unsigned C1SP                 : 1;
1360   unsigned C1ZLF                : 1;
1361   unsigned C1POL                : 1;
1362   unsigned                      : 1;
1363   unsigned C1OUT                : 1;
1364   unsigned C1ON                 : 1;
1365   } __CM1CON0bits_t;
1366 
1367 extern __at(0x0111) volatile __CM1CON0bits_t CM1CON0bits;
1368 
1369 #define _C1SYNC                 0x01
1370 #define _C1HYS                  0x02
1371 #define _C1SP                   0x04
1372 #define _C1ZLF                  0x08
1373 #define _C1POL                  0x10
1374 #define _C1OUT                  0x40
1375 #define _C1ON                   0x80
1376 
1377 //==============================================================================
1378 
1379 
1380 //==============================================================================
1381 //        CM1CON1 Bits
1382 
1383 extern __at(0x0112) __sfr CM1CON1;
1384 
1385 typedef union
1386   {
1387   struct
1388     {
1389     unsigned C1NCH0             : 1;
1390     unsigned C1NCH1             : 1;
1391     unsigned C1NCH2             : 1;
1392     unsigned C1PCH0             : 1;
1393     unsigned C1PCH1             : 1;
1394     unsigned C1PCH2             : 1;
1395     unsigned C1INTN             : 1;
1396     unsigned C1INTP             : 1;
1397     };
1398 
1399   struct
1400     {
1401     unsigned C1NCH              : 3;
1402     unsigned                    : 5;
1403     };
1404 
1405   struct
1406     {
1407     unsigned                    : 3;
1408     unsigned C1PCH              : 3;
1409     unsigned                    : 2;
1410     };
1411   } __CM1CON1bits_t;
1412 
1413 extern __at(0x0112) volatile __CM1CON1bits_t CM1CON1bits;
1414 
1415 #define _C1NCH0                 0x01
1416 #define _C1NCH1                 0x02
1417 #define _C1NCH2                 0x04
1418 #define _C1PCH0                 0x08
1419 #define _C1PCH1                 0x10
1420 #define _C1PCH2                 0x20
1421 #define _C1INTN                 0x40
1422 #define _C1INTP                 0x80
1423 
1424 //==============================================================================
1425 
1426 
1427 //==============================================================================
1428 //        CM2CON0 Bits
1429 
1430 extern __at(0x0113) __sfr CM2CON0;
1431 
1432 typedef struct
1433   {
1434   unsigned C2SYNC               : 1;
1435   unsigned C2HYS                : 1;
1436   unsigned C2SP                 : 1;
1437   unsigned C2ZLF                : 1;
1438   unsigned C2POL                : 1;
1439   unsigned                      : 1;
1440   unsigned C2OUT                : 1;
1441   unsigned C2ON                 : 1;
1442   } __CM2CON0bits_t;
1443 
1444 extern __at(0x0113) volatile __CM2CON0bits_t CM2CON0bits;
1445 
1446 #define _C2SYNC                 0x01
1447 #define _C2HYS                  0x02
1448 #define _C2SP                   0x04
1449 #define _C2ZLF                  0x08
1450 #define _C2POL                  0x10
1451 #define _C2OUT                  0x40
1452 #define _C2ON                   0x80
1453 
1454 //==============================================================================
1455 
1456 
1457 //==============================================================================
1458 //        CM2CON1 Bits
1459 
1460 extern __at(0x0114) __sfr CM2CON1;
1461 
1462 typedef union
1463   {
1464   struct
1465     {
1466     unsigned C2NCH0             : 1;
1467     unsigned C2NCH1             : 1;
1468     unsigned C2NCH2             : 1;
1469     unsigned C2PCH0             : 1;
1470     unsigned C2PCH1             : 1;
1471     unsigned C2PCH2             : 1;
1472     unsigned C2INTN             : 1;
1473     unsigned C2INTP             : 1;
1474     };
1475 
1476   struct
1477     {
1478     unsigned C2NCH              : 3;
1479     unsigned                    : 5;
1480     };
1481 
1482   struct
1483     {
1484     unsigned                    : 3;
1485     unsigned C2PCH              : 3;
1486     unsigned                    : 2;
1487     };
1488   } __CM2CON1bits_t;
1489 
1490 extern __at(0x0114) volatile __CM2CON1bits_t CM2CON1bits;
1491 
1492 #define _C2NCH0                 0x01
1493 #define _C2NCH1                 0x02
1494 #define _C2NCH2                 0x04
1495 #define _C2PCH0                 0x08
1496 #define _C2PCH1                 0x10
1497 #define _C2PCH2                 0x20
1498 #define _C2INTN                 0x40
1499 #define _C2INTP                 0x80
1500 
1501 //==============================================================================
1502 
1503 
1504 //==============================================================================
1505 //        CMOUT Bits
1506 
1507 extern __at(0x0115) __sfr CMOUT;
1508 
1509 typedef struct
1510   {
1511   unsigned MC1OUT               : 1;
1512   unsigned MC2OUT               : 1;
1513   unsigned                      : 1;
1514   unsigned                      : 1;
1515   unsigned                      : 1;
1516   unsigned                      : 1;
1517   unsigned                      : 1;
1518   unsigned                      : 1;
1519   } __CMOUTbits_t;
1520 
1521 extern __at(0x0115) volatile __CMOUTbits_t CMOUTbits;
1522 
1523 #define _MC1OUT                 0x01
1524 #define _MC2OUT                 0x02
1525 
1526 //==============================================================================
1527 
1528 
1529 //==============================================================================
1530 //        BORCON Bits
1531 
1532 extern __at(0x0116) __sfr BORCON;
1533 
1534 typedef struct
1535   {
1536   unsigned BORRDY               : 1;
1537   unsigned                      : 1;
1538   unsigned                      : 1;
1539   unsigned                      : 1;
1540   unsigned                      : 1;
1541   unsigned                      : 1;
1542   unsigned BORFS                : 1;
1543   unsigned SBOREN               : 1;
1544   } __BORCONbits_t;
1545 
1546 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1547 
1548 #define _BORRDY                 0x01
1549 #define _BORFS                  0x40
1550 #define _SBOREN                 0x80
1551 
1552 //==============================================================================
1553 
1554 
1555 //==============================================================================
1556 //        FVRCON Bits
1557 
1558 extern __at(0x0117) __sfr FVRCON;
1559 
1560 typedef union
1561   {
1562   struct
1563     {
1564     unsigned ADFVR0             : 1;
1565     unsigned ADFVR1             : 1;
1566     unsigned CDAFVR0            : 1;
1567     unsigned CDAFVR1            : 1;
1568     unsigned TSRNG              : 1;
1569     unsigned TSEN               : 1;
1570     unsigned FVRRDY             : 1;
1571     unsigned FVREN              : 1;
1572     };
1573 
1574   struct
1575     {
1576     unsigned ADFVR              : 2;
1577     unsigned                    : 6;
1578     };
1579 
1580   struct
1581     {
1582     unsigned                    : 2;
1583     unsigned CDAFVR             : 2;
1584     unsigned                    : 4;
1585     };
1586   } __FVRCONbits_t;
1587 
1588 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1589 
1590 #define _ADFVR0                 0x01
1591 #define _ADFVR1                 0x02
1592 #define _CDAFVR0                0x04
1593 #define _CDAFVR1                0x08
1594 #define _TSRNG                  0x10
1595 #define _TSEN                   0x20
1596 #define _FVRRDY                 0x40
1597 #define _FVREN                  0x80
1598 
1599 //==============================================================================
1600 
1601 
1602 //==============================================================================
1603 //        DAC1CON0 Bits
1604 
1605 extern __at(0x0118) __sfr DAC1CON0;
1606 
1607 typedef union
1608   {
1609   struct
1610     {
1611     unsigned DAC1NSS            : 1;
1612     unsigned                    : 1;
1613     unsigned DAC1PSS0           : 1;
1614     unsigned DAC1PSS1           : 1;
1615     unsigned DAC1OE2            : 1;
1616     unsigned DAC1OE1            : 1;
1617     unsigned                    : 1;
1618     unsigned DAC1EN             : 1;
1619     };
1620 
1621   struct
1622     {
1623     unsigned DACNSS             : 1;
1624     unsigned                    : 1;
1625     unsigned DACPSS0            : 1;
1626     unsigned DACPSS1            : 1;
1627     unsigned DACOE0             : 1;
1628     unsigned DACOE1             : 1;
1629     unsigned                    : 1;
1630     unsigned DACEN              : 1;
1631     };
1632 
1633   struct
1634     {
1635     unsigned                    : 2;
1636     unsigned DACPSS             : 2;
1637     unsigned                    : 4;
1638     };
1639 
1640   struct
1641     {
1642     unsigned                    : 2;
1643     unsigned DAC1PSS            : 2;
1644     unsigned                    : 4;
1645     };
1646 
1647   struct
1648     {
1649     unsigned                    : 4;
1650     unsigned DACOE              : 2;
1651     unsigned                    : 2;
1652     };
1653   } __DAC1CON0bits_t;
1654 
1655 extern __at(0x0118) volatile __DAC1CON0bits_t DAC1CON0bits;
1656 
1657 #define _DAC1NSS                0x01
1658 #define _DACNSS                 0x01
1659 #define _DAC1PSS0               0x04
1660 #define _DACPSS0                0x04
1661 #define _DAC1PSS1               0x08
1662 #define _DACPSS1                0x08
1663 #define _DAC1OE2                0x10
1664 #define _DACOE0                 0x10
1665 #define _DAC1OE1                0x20
1666 #define _DACOE1                 0x20
1667 #define _DAC1EN                 0x80
1668 #define _DACEN                  0x80
1669 
1670 //==============================================================================
1671 
1672 
1673 //==============================================================================
1674 //        DAC1CON1 Bits
1675 
1676 extern __at(0x0119) __sfr DAC1CON1;
1677 
1678 typedef union
1679   {
1680   struct
1681     {
1682     unsigned DAC1R0             : 1;
1683     unsigned DAC1R1             : 1;
1684     unsigned DAC1R2             : 1;
1685     unsigned DAC1R3             : 1;
1686     unsigned DAC1R4             : 1;
1687     unsigned DAC1R5             : 1;
1688     unsigned DAC1R6             : 1;
1689     unsigned DAC1R7             : 1;
1690     };
1691 
1692   struct
1693     {
1694     unsigned DACR0              : 1;
1695     unsigned DACR1              : 1;
1696     unsigned DACR2              : 1;
1697     unsigned DACR3              : 1;
1698     unsigned DACR4              : 1;
1699     unsigned DACR5              : 1;
1700     unsigned DACR6              : 1;
1701     unsigned DACR7              : 1;
1702     };
1703   } __DAC1CON1bits_t;
1704 
1705 extern __at(0x0119) volatile __DAC1CON1bits_t DAC1CON1bits;
1706 
1707 #define _DAC1R0                 0x01
1708 #define _DACR0                  0x01
1709 #define _DAC1R1                 0x02
1710 #define _DACR1                  0x02
1711 #define _DAC1R2                 0x04
1712 #define _DACR2                  0x04
1713 #define _DAC1R3                 0x08
1714 #define _DACR3                  0x08
1715 #define _DAC1R4                 0x10
1716 #define _DACR4                  0x10
1717 #define _DAC1R5                 0x20
1718 #define _DACR5                  0x20
1719 #define _DAC1R6                 0x40
1720 #define _DACR6                  0x40
1721 #define _DAC1R7                 0x80
1722 #define _DACR7                  0x80
1723 
1724 //==============================================================================
1725 
1726 
1727 //==============================================================================
1728 //        ZCD1CON Bits
1729 
1730 extern __at(0x011C) __sfr ZCD1CON;
1731 
1732 typedef struct
1733   {
1734   unsigned ZCD1INTN             : 1;
1735   unsigned ZCD1INTP             : 1;
1736   unsigned                      : 1;
1737   unsigned                      : 1;
1738   unsigned ZCD1POL              : 1;
1739   unsigned ZCD1OUT              : 1;
1740   unsigned                      : 1;
1741   unsigned ZCD1EN               : 1;
1742   } __ZCD1CONbits_t;
1743 
1744 extern __at(0x011C) volatile __ZCD1CONbits_t ZCD1CONbits;
1745 
1746 #define _ZCD1INTN               0x01
1747 #define _ZCD1INTP               0x02
1748 #define _ZCD1POL                0x10
1749 #define _ZCD1OUT                0x20
1750 #define _ZCD1EN                 0x80
1751 
1752 //==============================================================================
1753 
1754 
1755 //==============================================================================
1756 //        ANSELA Bits
1757 
1758 extern __at(0x018C) __sfr ANSELA;
1759 
1760 typedef struct
1761   {
1762   unsigned ANSA0                : 1;
1763   unsigned ANSA1                : 1;
1764   unsigned ANSA2                : 1;
1765   unsigned                      : 1;
1766   unsigned ANSA4                : 1;
1767   unsigned ANS5                 : 1;
1768   unsigned                      : 1;
1769   unsigned                      : 1;
1770   } __ANSELAbits_t;
1771 
1772 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1773 
1774 #define _ANSA0                  0x01
1775 #define _ANSA1                  0x02
1776 #define _ANSA2                  0x04
1777 #define _ANSA4                  0x10
1778 #define _ANS5                   0x20
1779 
1780 //==============================================================================
1781 
1782 
1783 //==============================================================================
1784 //        ANSELC Bits
1785 
1786 extern __at(0x018E) __sfr ANSELC;
1787 
1788 typedef union
1789   {
1790   struct
1791     {
1792     unsigned ANSC0              : 1;
1793     unsigned ANSC1              : 1;
1794     unsigned ANSC2              : 1;
1795     unsigned ANSC3              : 1;
1796     unsigned ANSC4              : 1;
1797     unsigned ANSC5              : 1;
1798     unsigned                    : 1;
1799     unsigned                    : 1;
1800     };
1801 
1802   struct
1803     {
1804     unsigned ANSC               : 6;
1805     unsigned                    : 2;
1806     };
1807   } __ANSELCbits_t;
1808 
1809 extern __at(0x018E) volatile __ANSELCbits_t ANSELCbits;
1810 
1811 #define _ANSC0                  0x01
1812 #define _ANSC1                  0x02
1813 #define _ANSC2                  0x04
1814 #define _ANSC3                  0x08
1815 #define _ANSC4                  0x10
1816 #define _ANSC5                  0x20
1817 
1818 //==============================================================================
1819 
1820 extern __at(0x0191) __sfr PMADR;
1821 extern __at(0x0191) __sfr PMADRL;
1822 extern __at(0x0192) __sfr PMADRH;
1823 extern __at(0x0193) __sfr PMDAT;
1824 extern __at(0x0193) __sfr PMDATL;
1825 extern __at(0x0194) __sfr PMDATH;
1826 
1827 //==============================================================================
1828 //        PMCON1 Bits
1829 
1830 extern __at(0x0195) __sfr PMCON1;
1831 
1832 typedef struct
1833   {
1834   unsigned RD                   : 1;
1835   unsigned WR                   : 1;
1836   unsigned WREN                 : 1;
1837   unsigned WRERR                : 1;
1838   unsigned FREE                 : 1;
1839   unsigned LWLO                 : 1;
1840   unsigned CFGS                 : 1;
1841   unsigned                      : 1;
1842   } __PMCON1bits_t;
1843 
1844 extern __at(0x0195) volatile __PMCON1bits_t PMCON1bits;
1845 
1846 #define _RD                     0x01
1847 #define _WR                     0x02
1848 #define _WREN                   0x04
1849 #define _WRERR                  0x08
1850 #define _FREE                   0x10
1851 #define _LWLO                   0x20
1852 #define _CFGS                   0x40
1853 
1854 //==============================================================================
1855 
1856 extern __at(0x0196) __sfr PMCON2;
1857 
1858 //==============================================================================
1859 //        VREGCON Bits
1860 
1861 extern __at(0x0197) __sfr VREGCON;
1862 
1863 typedef struct
1864   {
1865   unsigned Reserved             : 1;
1866   unsigned VREGPM               : 1;
1867   unsigned                      : 1;
1868   unsigned                      : 1;
1869   unsigned                      : 1;
1870   unsigned                      : 1;
1871   unsigned                      : 1;
1872   unsigned                      : 1;
1873   } __VREGCONbits_t;
1874 
1875 extern __at(0x0197) volatile __VREGCONbits_t VREGCONbits;
1876 
1877 #define _Reserved               0x01
1878 #define _VREGPM                 0x02
1879 
1880 //==============================================================================
1881 
1882 extern __at(0x0199) __sfr RC1REG;
1883 extern __at(0x0199) __sfr RCREG;
1884 extern __at(0x0199) __sfr RCREG1;
1885 extern __at(0x019A) __sfr TX1REG;
1886 extern __at(0x019A) __sfr TXREG;
1887 extern __at(0x019A) __sfr TXREG1;
1888 extern __at(0x019B) __sfr SP1BRG;
1889 extern __at(0x019B) __sfr SP1BRGL;
1890 extern __at(0x019B) __sfr SPBRG;
1891 extern __at(0x019B) __sfr SPBRG1;
1892 extern __at(0x019B) __sfr SPBRGL;
1893 extern __at(0x019C) __sfr SP1BRGH;
1894 extern __at(0x019C) __sfr SPBRGH;
1895 extern __at(0x019C) __sfr SPBRGH1;
1896 
1897 //==============================================================================
1898 //        RC1STA Bits
1899 
1900 extern __at(0x019D) __sfr RC1STA;
1901 
1902 typedef struct
1903   {
1904   unsigned RX9D                 : 1;
1905   unsigned OERR                 : 1;
1906   unsigned FERR                 : 1;
1907   unsigned ADDEN                : 1;
1908   unsigned CREN                 : 1;
1909   unsigned SREN                 : 1;
1910   unsigned RX9                  : 1;
1911   unsigned SPEN                 : 1;
1912   } __RC1STAbits_t;
1913 
1914 extern __at(0x019D) volatile __RC1STAbits_t RC1STAbits;
1915 
1916 #define _RX9D                   0x01
1917 #define _OERR                   0x02
1918 #define _FERR                   0x04
1919 #define _ADDEN                  0x08
1920 #define _CREN                   0x10
1921 #define _SREN                   0x20
1922 #define _RX9                    0x40
1923 #define _SPEN                   0x80
1924 
1925 //==============================================================================
1926 
1927 
1928 //==============================================================================
1929 //        RCSTA Bits
1930 
1931 extern __at(0x019D) __sfr RCSTA;
1932 
1933 typedef struct
1934   {
1935   unsigned RX9D                 : 1;
1936   unsigned OERR                 : 1;
1937   unsigned FERR                 : 1;
1938   unsigned ADDEN                : 1;
1939   unsigned CREN                 : 1;
1940   unsigned SREN                 : 1;
1941   unsigned RX9                  : 1;
1942   unsigned SPEN                 : 1;
1943   } __RCSTAbits_t;
1944 
1945 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
1946 
1947 #define _RCSTA_RX9D             0x01
1948 #define _RCSTA_OERR             0x02
1949 #define _RCSTA_FERR             0x04
1950 #define _RCSTA_ADDEN            0x08
1951 #define _RCSTA_CREN             0x10
1952 #define _RCSTA_SREN             0x20
1953 #define _RCSTA_RX9              0x40
1954 #define _RCSTA_SPEN             0x80
1955 
1956 //==============================================================================
1957 
1958 
1959 //==============================================================================
1960 //        RCSTA1 Bits
1961 
1962 extern __at(0x019D) __sfr RCSTA1;
1963 
1964 typedef struct
1965   {
1966   unsigned RX9D                 : 1;
1967   unsigned OERR                 : 1;
1968   unsigned FERR                 : 1;
1969   unsigned ADDEN                : 1;
1970   unsigned CREN                 : 1;
1971   unsigned SREN                 : 1;
1972   unsigned RX9                  : 1;
1973   unsigned SPEN                 : 1;
1974   } __RCSTA1bits_t;
1975 
1976 extern __at(0x019D) volatile __RCSTA1bits_t RCSTA1bits;
1977 
1978 #define _RCSTA1_RX9D            0x01
1979 #define _RCSTA1_OERR            0x02
1980 #define _RCSTA1_FERR            0x04
1981 #define _RCSTA1_ADDEN           0x08
1982 #define _RCSTA1_CREN            0x10
1983 #define _RCSTA1_SREN            0x20
1984 #define _RCSTA1_RX9             0x40
1985 #define _RCSTA1_SPEN            0x80
1986 
1987 //==============================================================================
1988 
1989 
1990 //==============================================================================
1991 //        TX1STA Bits
1992 
1993 extern __at(0x019E) __sfr TX1STA;
1994 
1995 typedef struct
1996   {
1997   unsigned TX9D                 : 1;
1998   unsigned TRMT                 : 1;
1999   unsigned BRGH                 : 1;
2000   unsigned SENDB                : 1;
2001   unsigned SYNC                 : 1;
2002   unsigned TXEN                 : 1;
2003   unsigned TX9                  : 1;
2004   unsigned CSRC                 : 1;
2005   } __TX1STAbits_t;
2006 
2007 extern __at(0x019E) volatile __TX1STAbits_t TX1STAbits;
2008 
2009 #define _TX9D                   0x01
2010 #define _TRMT                   0x02
2011 #define _BRGH                   0x04
2012 #define _SENDB                  0x08
2013 #define _SYNC                   0x10
2014 #define _TXEN                   0x20
2015 #define _TX9                    0x40
2016 #define _CSRC                   0x80
2017 
2018 //==============================================================================
2019 
2020 
2021 //==============================================================================
2022 //        TXSTA Bits
2023 
2024 extern __at(0x019E) __sfr TXSTA;
2025 
2026 typedef struct
2027   {
2028   unsigned TX9D                 : 1;
2029   unsigned TRMT                 : 1;
2030   unsigned BRGH                 : 1;
2031   unsigned SENDB                : 1;
2032   unsigned SYNC                 : 1;
2033   unsigned TXEN                 : 1;
2034   unsigned TX9                  : 1;
2035   unsigned CSRC                 : 1;
2036   } __TXSTAbits_t;
2037 
2038 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
2039 
2040 #define _TXSTA_TX9D             0x01
2041 #define _TXSTA_TRMT             0x02
2042 #define _TXSTA_BRGH             0x04
2043 #define _TXSTA_SENDB            0x08
2044 #define _TXSTA_SYNC             0x10
2045 #define _TXSTA_TXEN             0x20
2046 #define _TXSTA_TX9              0x40
2047 #define _TXSTA_CSRC             0x80
2048 
2049 //==============================================================================
2050 
2051 
2052 //==============================================================================
2053 //        TXSTA1 Bits
2054 
2055 extern __at(0x019E) __sfr TXSTA1;
2056 
2057 typedef struct
2058   {
2059   unsigned TX9D                 : 1;
2060   unsigned TRMT                 : 1;
2061   unsigned BRGH                 : 1;
2062   unsigned SENDB                : 1;
2063   unsigned SYNC                 : 1;
2064   unsigned TXEN                 : 1;
2065   unsigned TX9                  : 1;
2066   unsigned CSRC                 : 1;
2067   } __TXSTA1bits_t;
2068 
2069 extern __at(0x019E) volatile __TXSTA1bits_t TXSTA1bits;
2070 
2071 #define _TXSTA1_TX9D            0x01
2072 #define _TXSTA1_TRMT            0x02
2073 #define _TXSTA1_BRGH            0x04
2074 #define _TXSTA1_SENDB           0x08
2075 #define _TXSTA1_SYNC            0x10
2076 #define _TXSTA1_TXEN            0x20
2077 #define _TXSTA1_TX9             0x40
2078 #define _TXSTA1_CSRC            0x80
2079 
2080 //==============================================================================
2081 
2082 
2083 //==============================================================================
2084 //        BAUD1CON Bits
2085 
2086 extern __at(0x019F) __sfr BAUD1CON;
2087 
2088 typedef struct
2089   {
2090   unsigned ABDEN                : 1;
2091   unsigned WUE                  : 1;
2092   unsigned                      : 1;
2093   unsigned BRG16                : 1;
2094   unsigned SCKP                 : 1;
2095   unsigned                      : 1;
2096   unsigned RCIDL                : 1;
2097   unsigned ABDOVF               : 1;
2098   } __BAUD1CONbits_t;
2099 
2100 extern __at(0x019F) volatile __BAUD1CONbits_t BAUD1CONbits;
2101 
2102 #define _ABDEN                  0x01
2103 #define _WUE                    0x02
2104 #define _BRG16                  0x08
2105 #define _SCKP                   0x10
2106 #define _RCIDL                  0x40
2107 #define _ABDOVF                 0x80
2108 
2109 //==============================================================================
2110 
2111 
2112 //==============================================================================
2113 //        BAUDCON Bits
2114 
2115 extern __at(0x019F) __sfr BAUDCON;
2116 
2117 typedef struct
2118   {
2119   unsigned ABDEN                : 1;
2120   unsigned WUE                  : 1;
2121   unsigned                      : 1;
2122   unsigned BRG16                : 1;
2123   unsigned SCKP                 : 1;
2124   unsigned                      : 1;
2125   unsigned RCIDL                : 1;
2126   unsigned ABDOVF               : 1;
2127   } __BAUDCONbits_t;
2128 
2129 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
2130 
2131 #define _BAUDCON_ABDEN          0x01
2132 #define _BAUDCON_WUE            0x02
2133 #define _BAUDCON_BRG16          0x08
2134 #define _BAUDCON_SCKP           0x10
2135 #define _BAUDCON_RCIDL          0x40
2136 #define _BAUDCON_ABDOVF         0x80
2137 
2138 //==============================================================================
2139 
2140 
2141 //==============================================================================
2142 //        BAUDCON1 Bits
2143 
2144 extern __at(0x019F) __sfr BAUDCON1;
2145 
2146 typedef struct
2147   {
2148   unsigned ABDEN                : 1;
2149   unsigned WUE                  : 1;
2150   unsigned                      : 1;
2151   unsigned BRG16                : 1;
2152   unsigned SCKP                 : 1;
2153   unsigned                      : 1;
2154   unsigned RCIDL                : 1;
2155   unsigned ABDOVF               : 1;
2156   } __BAUDCON1bits_t;
2157 
2158 extern __at(0x019F) volatile __BAUDCON1bits_t BAUDCON1bits;
2159 
2160 #define _BAUDCON1_ABDEN         0x01
2161 #define _BAUDCON1_WUE           0x02
2162 #define _BAUDCON1_BRG16         0x08
2163 #define _BAUDCON1_SCKP          0x10
2164 #define _BAUDCON1_RCIDL         0x40
2165 #define _BAUDCON1_ABDOVF        0x80
2166 
2167 //==============================================================================
2168 
2169 
2170 //==============================================================================
2171 //        BAUDCTL Bits
2172 
2173 extern __at(0x019F) __sfr BAUDCTL;
2174 
2175 typedef struct
2176   {
2177   unsigned ABDEN                : 1;
2178   unsigned WUE                  : 1;
2179   unsigned                      : 1;
2180   unsigned BRG16                : 1;
2181   unsigned SCKP                 : 1;
2182   unsigned                      : 1;
2183   unsigned RCIDL                : 1;
2184   unsigned ABDOVF               : 1;
2185   } __BAUDCTLbits_t;
2186 
2187 extern __at(0x019F) volatile __BAUDCTLbits_t BAUDCTLbits;
2188 
2189 #define _BAUDCTL_ABDEN          0x01
2190 #define _BAUDCTL_WUE            0x02
2191 #define _BAUDCTL_BRG16          0x08
2192 #define _BAUDCTL_SCKP           0x10
2193 #define _BAUDCTL_RCIDL          0x40
2194 #define _BAUDCTL_ABDOVF         0x80
2195 
2196 //==============================================================================
2197 
2198 
2199 //==============================================================================
2200 //        BAUDCTL1 Bits
2201 
2202 extern __at(0x019F) __sfr BAUDCTL1;
2203 
2204 typedef struct
2205   {
2206   unsigned ABDEN                : 1;
2207   unsigned WUE                  : 1;
2208   unsigned                      : 1;
2209   unsigned BRG16                : 1;
2210   unsigned SCKP                 : 1;
2211   unsigned                      : 1;
2212   unsigned RCIDL                : 1;
2213   unsigned ABDOVF               : 1;
2214   } __BAUDCTL1bits_t;
2215 
2216 extern __at(0x019F) volatile __BAUDCTL1bits_t BAUDCTL1bits;
2217 
2218 #define _BAUDCTL1_ABDEN         0x01
2219 #define _BAUDCTL1_WUE           0x02
2220 #define _BAUDCTL1_BRG16         0x08
2221 #define _BAUDCTL1_SCKP          0x10
2222 #define _BAUDCTL1_RCIDL         0x40
2223 #define _BAUDCTL1_ABDOVF        0x80
2224 
2225 //==============================================================================
2226 
2227 
2228 //==============================================================================
2229 //        WPUA Bits
2230 
2231 extern __at(0x020C) __sfr WPUA;
2232 
2233 typedef union
2234   {
2235   struct
2236     {
2237     unsigned WPUA0              : 1;
2238     unsigned WPUA1              : 1;
2239     unsigned WPUA2              : 1;
2240     unsigned WPUA3              : 1;
2241     unsigned WPUA4              : 1;
2242     unsigned WPUA5              : 1;
2243     unsigned                    : 1;
2244     unsigned                    : 1;
2245     };
2246 
2247   struct
2248     {
2249     unsigned WPUA               : 6;
2250     unsigned                    : 2;
2251     };
2252   } __WPUAbits_t;
2253 
2254 extern __at(0x020C) volatile __WPUAbits_t WPUAbits;
2255 
2256 #define _WPUA0                  0x01
2257 #define _WPUA1                  0x02
2258 #define _WPUA2                  0x04
2259 #define _WPUA3                  0x08
2260 #define _WPUA4                  0x10
2261 #define _WPUA5                  0x20
2262 
2263 //==============================================================================
2264 
2265 
2266 //==============================================================================
2267 //        WPUC Bits
2268 
2269 extern __at(0x020E) __sfr WPUC;
2270 
2271 typedef union
2272   {
2273   struct
2274     {
2275     unsigned WPUC0              : 1;
2276     unsigned WPUC1              : 1;
2277     unsigned WPUC2              : 1;
2278     unsigned WPUC3              : 1;
2279     unsigned WPUC4              : 1;
2280     unsigned WPUC5              : 1;
2281     unsigned                    : 1;
2282     unsigned                    : 1;
2283     };
2284 
2285   struct
2286     {
2287     unsigned WPUC               : 6;
2288     unsigned                    : 2;
2289     };
2290   } __WPUCbits_t;
2291 
2292 extern __at(0x020E) volatile __WPUCbits_t WPUCbits;
2293 
2294 #define _WPUC0                  0x01
2295 #define _WPUC1                  0x02
2296 #define _WPUC2                  0x04
2297 #define _WPUC3                  0x08
2298 #define _WPUC4                  0x10
2299 #define _WPUC5                  0x20
2300 
2301 //==============================================================================
2302 
2303 
2304 //==============================================================================
2305 //        SSP1BUF Bits
2306 
2307 extern __at(0x0211) __sfr SSP1BUF;
2308 
2309 typedef union
2310   {
2311   struct
2312     {
2313     unsigned SSP1BUF0           : 1;
2314     unsigned SSP1BUF1           : 1;
2315     unsigned SSP1BUF2           : 1;
2316     unsigned SSP1BUF3           : 1;
2317     unsigned SSP1BUF4           : 1;
2318     unsigned SSP1BUF5           : 1;
2319     unsigned SSP1BUF6           : 1;
2320     unsigned SSP1BUF7           : 1;
2321     };
2322 
2323   struct
2324     {
2325     unsigned BUF0               : 1;
2326     unsigned BUF1               : 1;
2327     unsigned BUF2               : 1;
2328     unsigned BUF3               : 1;
2329     unsigned BUF4               : 1;
2330     unsigned BUF5               : 1;
2331     unsigned BUF6               : 1;
2332     unsigned BUF7               : 1;
2333     };
2334   } __SSP1BUFbits_t;
2335 
2336 extern __at(0x0211) volatile __SSP1BUFbits_t SSP1BUFbits;
2337 
2338 #define _SSP1BUF0               0x01
2339 #define _BUF0                   0x01
2340 #define _SSP1BUF1               0x02
2341 #define _BUF1                   0x02
2342 #define _SSP1BUF2               0x04
2343 #define _BUF2                   0x04
2344 #define _SSP1BUF3               0x08
2345 #define _BUF3                   0x08
2346 #define _SSP1BUF4               0x10
2347 #define _BUF4                   0x10
2348 #define _SSP1BUF5               0x20
2349 #define _BUF5                   0x20
2350 #define _SSP1BUF6               0x40
2351 #define _BUF6                   0x40
2352 #define _SSP1BUF7               0x80
2353 #define _BUF7                   0x80
2354 
2355 //==============================================================================
2356 
2357 
2358 //==============================================================================
2359 //        SSPBUF Bits
2360 
2361 extern __at(0x0211) __sfr SSPBUF;
2362 
2363 typedef union
2364   {
2365   struct
2366     {
2367     unsigned SSP1BUF0           : 1;
2368     unsigned SSP1BUF1           : 1;
2369     unsigned SSP1BUF2           : 1;
2370     unsigned SSP1BUF3           : 1;
2371     unsigned SSP1BUF4           : 1;
2372     unsigned SSP1BUF5           : 1;
2373     unsigned SSP1BUF6           : 1;
2374     unsigned SSP1BUF7           : 1;
2375     };
2376 
2377   struct
2378     {
2379     unsigned BUF0               : 1;
2380     unsigned BUF1               : 1;
2381     unsigned BUF2               : 1;
2382     unsigned BUF3               : 1;
2383     unsigned BUF4               : 1;
2384     unsigned BUF5               : 1;
2385     unsigned BUF6               : 1;
2386     unsigned BUF7               : 1;
2387     };
2388   } __SSPBUFbits_t;
2389 
2390 extern __at(0x0211) volatile __SSPBUFbits_t SSPBUFbits;
2391 
2392 #define _SSPBUF_SSP1BUF0        0x01
2393 #define _SSPBUF_BUF0            0x01
2394 #define _SSPBUF_SSP1BUF1        0x02
2395 #define _SSPBUF_BUF1            0x02
2396 #define _SSPBUF_SSP1BUF2        0x04
2397 #define _SSPBUF_BUF2            0x04
2398 #define _SSPBUF_SSP1BUF3        0x08
2399 #define _SSPBUF_BUF3            0x08
2400 #define _SSPBUF_SSP1BUF4        0x10
2401 #define _SSPBUF_BUF4            0x10
2402 #define _SSPBUF_SSP1BUF5        0x20
2403 #define _SSPBUF_BUF5            0x20
2404 #define _SSPBUF_SSP1BUF6        0x40
2405 #define _SSPBUF_BUF6            0x40
2406 #define _SSPBUF_SSP1BUF7        0x80
2407 #define _SSPBUF_BUF7            0x80
2408 
2409 //==============================================================================
2410 
2411 
2412 //==============================================================================
2413 //        SSP1ADD Bits
2414 
2415 extern __at(0x0212) __sfr SSP1ADD;
2416 
2417 typedef union
2418   {
2419   struct
2420     {
2421     unsigned SSP1ADD0           : 1;
2422     unsigned SSP1ADD1           : 1;
2423     unsigned SSP1ADD2           : 1;
2424     unsigned SSP1ADD3           : 1;
2425     unsigned SSP1ADD4           : 1;
2426     unsigned SSP1ADD5           : 1;
2427     unsigned SSP1ADD6           : 1;
2428     unsigned SSP1ADD7           : 1;
2429     };
2430 
2431   struct
2432     {
2433     unsigned ADD0               : 1;
2434     unsigned ADD1               : 1;
2435     unsigned ADD2               : 1;
2436     unsigned ADD3               : 1;
2437     unsigned ADD4               : 1;
2438     unsigned ADD5               : 1;
2439     unsigned ADD6               : 1;
2440     unsigned ADD7               : 1;
2441     };
2442   } __SSP1ADDbits_t;
2443 
2444 extern __at(0x0212) volatile __SSP1ADDbits_t SSP1ADDbits;
2445 
2446 #define _SSP1ADD0               0x01
2447 #define _ADD0                   0x01
2448 #define _SSP1ADD1               0x02
2449 #define _ADD1                   0x02
2450 #define _SSP1ADD2               0x04
2451 #define _ADD2                   0x04
2452 #define _SSP1ADD3               0x08
2453 #define _ADD3                   0x08
2454 #define _SSP1ADD4               0x10
2455 #define _ADD4                   0x10
2456 #define _SSP1ADD5               0x20
2457 #define _ADD5                   0x20
2458 #define _SSP1ADD6               0x40
2459 #define _ADD6                   0x40
2460 #define _SSP1ADD7               0x80
2461 #define _ADD7                   0x80
2462 
2463 //==============================================================================
2464 
2465 
2466 //==============================================================================
2467 //        SSPADD Bits
2468 
2469 extern __at(0x0212) __sfr SSPADD;
2470 
2471 typedef union
2472   {
2473   struct
2474     {
2475     unsigned SSP1ADD0           : 1;
2476     unsigned SSP1ADD1           : 1;
2477     unsigned SSP1ADD2           : 1;
2478     unsigned SSP1ADD3           : 1;
2479     unsigned SSP1ADD4           : 1;
2480     unsigned SSP1ADD5           : 1;
2481     unsigned SSP1ADD6           : 1;
2482     unsigned SSP1ADD7           : 1;
2483     };
2484 
2485   struct
2486     {
2487     unsigned ADD0               : 1;
2488     unsigned ADD1               : 1;
2489     unsigned ADD2               : 1;
2490     unsigned ADD3               : 1;
2491     unsigned ADD4               : 1;
2492     unsigned ADD5               : 1;
2493     unsigned ADD6               : 1;
2494     unsigned ADD7               : 1;
2495     };
2496   } __SSPADDbits_t;
2497 
2498 extern __at(0x0212) volatile __SSPADDbits_t SSPADDbits;
2499 
2500 #define _SSPADD_SSP1ADD0        0x01
2501 #define _SSPADD_ADD0            0x01
2502 #define _SSPADD_SSP1ADD1        0x02
2503 #define _SSPADD_ADD1            0x02
2504 #define _SSPADD_SSP1ADD2        0x04
2505 #define _SSPADD_ADD2            0x04
2506 #define _SSPADD_SSP1ADD3        0x08
2507 #define _SSPADD_ADD3            0x08
2508 #define _SSPADD_SSP1ADD4        0x10
2509 #define _SSPADD_ADD4            0x10
2510 #define _SSPADD_SSP1ADD5        0x20
2511 #define _SSPADD_ADD5            0x20
2512 #define _SSPADD_SSP1ADD6        0x40
2513 #define _SSPADD_ADD6            0x40
2514 #define _SSPADD_SSP1ADD7        0x80
2515 #define _SSPADD_ADD7            0x80
2516 
2517 //==============================================================================
2518 
2519 
2520 //==============================================================================
2521 //        SSP1MSK Bits
2522 
2523 extern __at(0x0213) __sfr SSP1MSK;
2524 
2525 typedef union
2526   {
2527   struct
2528     {
2529     unsigned SSP1MSK0           : 1;
2530     unsigned SSP1MSK1           : 1;
2531     unsigned SSP1MSK2           : 1;
2532     unsigned SSP1MSK3           : 1;
2533     unsigned SSP1MSK4           : 1;
2534     unsigned SSP1MSK5           : 1;
2535     unsigned SSP1MSK6           : 1;
2536     unsigned SSP1MSK7           : 1;
2537     };
2538 
2539   struct
2540     {
2541     unsigned MSK0               : 1;
2542     unsigned MSK1               : 1;
2543     unsigned MSK2               : 1;
2544     unsigned MSK3               : 1;
2545     unsigned MSK4               : 1;
2546     unsigned MSK5               : 1;
2547     unsigned MSK6               : 1;
2548     unsigned MSK7               : 1;
2549     };
2550   } __SSP1MSKbits_t;
2551 
2552 extern __at(0x0213) volatile __SSP1MSKbits_t SSP1MSKbits;
2553 
2554 #define _SSP1MSK0               0x01
2555 #define _MSK0                   0x01
2556 #define _SSP1MSK1               0x02
2557 #define _MSK1                   0x02
2558 #define _SSP1MSK2               0x04
2559 #define _MSK2                   0x04
2560 #define _SSP1MSK3               0x08
2561 #define _MSK3                   0x08
2562 #define _SSP1MSK4               0x10
2563 #define _MSK4                   0x10
2564 #define _SSP1MSK5               0x20
2565 #define _MSK5                   0x20
2566 #define _SSP1MSK6               0x40
2567 #define _MSK6                   0x40
2568 #define _SSP1MSK7               0x80
2569 #define _MSK7                   0x80
2570 
2571 //==============================================================================
2572 
2573 
2574 //==============================================================================
2575 //        SSPMSK Bits
2576 
2577 extern __at(0x0213) __sfr SSPMSK;
2578 
2579 typedef union
2580   {
2581   struct
2582     {
2583     unsigned SSP1MSK0           : 1;
2584     unsigned SSP1MSK1           : 1;
2585     unsigned SSP1MSK2           : 1;
2586     unsigned SSP1MSK3           : 1;
2587     unsigned SSP1MSK4           : 1;
2588     unsigned SSP1MSK5           : 1;
2589     unsigned SSP1MSK6           : 1;
2590     unsigned SSP1MSK7           : 1;
2591     };
2592 
2593   struct
2594     {
2595     unsigned MSK0               : 1;
2596     unsigned MSK1               : 1;
2597     unsigned MSK2               : 1;
2598     unsigned MSK3               : 1;
2599     unsigned MSK4               : 1;
2600     unsigned MSK5               : 1;
2601     unsigned MSK6               : 1;
2602     unsigned MSK7               : 1;
2603     };
2604   } __SSPMSKbits_t;
2605 
2606 extern __at(0x0213) volatile __SSPMSKbits_t SSPMSKbits;
2607 
2608 #define _SSPMSK_SSP1MSK0        0x01
2609 #define _SSPMSK_MSK0            0x01
2610 #define _SSPMSK_SSP1MSK1        0x02
2611 #define _SSPMSK_MSK1            0x02
2612 #define _SSPMSK_SSP1MSK2        0x04
2613 #define _SSPMSK_MSK2            0x04
2614 #define _SSPMSK_SSP1MSK3        0x08
2615 #define _SSPMSK_MSK3            0x08
2616 #define _SSPMSK_SSP1MSK4        0x10
2617 #define _SSPMSK_MSK4            0x10
2618 #define _SSPMSK_SSP1MSK5        0x20
2619 #define _SSPMSK_MSK5            0x20
2620 #define _SSPMSK_SSP1MSK6        0x40
2621 #define _SSPMSK_MSK6            0x40
2622 #define _SSPMSK_SSP1MSK7        0x80
2623 #define _SSPMSK_MSK7            0x80
2624 
2625 //==============================================================================
2626 
2627 
2628 //==============================================================================
2629 //        SSP1STAT Bits
2630 
2631 extern __at(0x0214) __sfr SSP1STAT;
2632 
2633 typedef struct
2634   {
2635   unsigned BF                   : 1;
2636   unsigned UA                   : 1;
2637   unsigned R_NOT_W              : 1;
2638   unsigned S                    : 1;
2639   unsigned P                    : 1;
2640   unsigned D_NOT_A              : 1;
2641   unsigned CKE                  : 1;
2642   unsigned SMP                  : 1;
2643   } __SSP1STATbits_t;
2644 
2645 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
2646 
2647 #define _BF                     0x01
2648 #define _UA                     0x02
2649 #define _R_NOT_W                0x04
2650 #define _S                      0x08
2651 #define _P                      0x10
2652 #define _D_NOT_A                0x20
2653 #define _CKE                    0x40
2654 #define _SMP                    0x80
2655 
2656 //==============================================================================
2657 
2658 
2659 //==============================================================================
2660 //        SSPSTAT Bits
2661 
2662 extern __at(0x0214) __sfr SSPSTAT;
2663 
2664 typedef struct
2665   {
2666   unsigned BF                   : 1;
2667   unsigned UA                   : 1;
2668   unsigned R_NOT_W              : 1;
2669   unsigned S                    : 1;
2670   unsigned P                    : 1;
2671   unsigned D_NOT_A              : 1;
2672   unsigned CKE                  : 1;
2673   unsigned SMP                  : 1;
2674   } __SSPSTATbits_t;
2675 
2676 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
2677 
2678 #define _SSPSTAT_BF             0x01
2679 #define _SSPSTAT_UA             0x02
2680 #define _SSPSTAT_R_NOT_W        0x04
2681 #define _SSPSTAT_S              0x08
2682 #define _SSPSTAT_P              0x10
2683 #define _SSPSTAT_D_NOT_A        0x20
2684 #define _SSPSTAT_CKE            0x40
2685 #define _SSPSTAT_SMP            0x80
2686 
2687 //==============================================================================
2688 
2689 
2690 //==============================================================================
2691 //        SSP1CON Bits
2692 
2693 extern __at(0x0215) __sfr SSP1CON;
2694 
2695 typedef union
2696   {
2697   struct
2698     {
2699     unsigned SSPM0              : 1;
2700     unsigned SSPM1              : 1;
2701     unsigned SSPM2              : 1;
2702     unsigned SSPM3              : 1;
2703     unsigned CKP                : 1;
2704     unsigned SSPEN              : 1;
2705     unsigned SSPOV              : 1;
2706     unsigned WCOL               : 1;
2707     };
2708 
2709   struct
2710     {
2711     unsigned SSPM               : 4;
2712     unsigned                    : 4;
2713     };
2714   } __SSP1CONbits_t;
2715 
2716 extern __at(0x0215) volatile __SSP1CONbits_t SSP1CONbits;
2717 
2718 #define _SSPM0                  0x01
2719 #define _SSPM1                  0x02
2720 #define _SSPM2                  0x04
2721 #define _SSPM3                  0x08
2722 #define _CKP                    0x10
2723 #define _SSPEN                  0x20
2724 #define _SSPOV                  0x40
2725 #define _WCOL                   0x80
2726 
2727 //==============================================================================
2728 
2729 
2730 //==============================================================================
2731 //        SSP1CON1 Bits
2732 
2733 extern __at(0x0215) __sfr SSP1CON1;
2734 
2735 typedef union
2736   {
2737   struct
2738     {
2739     unsigned SSPM0              : 1;
2740     unsigned SSPM1              : 1;
2741     unsigned SSPM2              : 1;
2742     unsigned SSPM3              : 1;
2743     unsigned CKP                : 1;
2744     unsigned SSPEN              : 1;
2745     unsigned SSPOV              : 1;
2746     unsigned WCOL               : 1;
2747     };
2748 
2749   struct
2750     {
2751     unsigned SSPM               : 4;
2752     unsigned                    : 4;
2753     };
2754   } __SSP1CON1bits_t;
2755 
2756 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
2757 
2758 #define _SSP1CON1_SSPM0         0x01
2759 #define _SSP1CON1_SSPM1         0x02
2760 #define _SSP1CON1_SSPM2         0x04
2761 #define _SSP1CON1_SSPM3         0x08
2762 #define _SSP1CON1_CKP           0x10
2763 #define _SSP1CON1_SSPEN         0x20
2764 #define _SSP1CON1_SSPOV         0x40
2765 #define _SSP1CON1_WCOL          0x80
2766 
2767 //==============================================================================
2768 
2769 
2770 //==============================================================================
2771 //        SSPCON Bits
2772 
2773 extern __at(0x0215) __sfr SSPCON;
2774 
2775 typedef union
2776   {
2777   struct
2778     {
2779     unsigned SSPM0              : 1;
2780     unsigned SSPM1              : 1;
2781     unsigned SSPM2              : 1;
2782     unsigned SSPM3              : 1;
2783     unsigned CKP                : 1;
2784     unsigned SSPEN              : 1;
2785     unsigned SSPOV              : 1;
2786     unsigned WCOL               : 1;
2787     };
2788 
2789   struct
2790     {
2791     unsigned SSPM               : 4;
2792     unsigned                    : 4;
2793     };
2794   } __SSPCONbits_t;
2795 
2796 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
2797 
2798 #define _SSPCON_SSPM0           0x01
2799 #define _SSPCON_SSPM1           0x02
2800 #define _SSPCON_SSPM2           0x04
2801 #define _SSPCON_SSPM3           0x08
2802 #define _SSPCON_CKP             0x10
2803 #define _SSPCON_SSPEN           0x20
2804 #define _SSPCON_SSPOV           0x40
2805 #define _SSPCON_WCOL            0x80
2806 
2807 //==============================================================================
2808 
2809 
2810 //==============================================================================
2811 //        SSPCON1 Bits
2812 
2813 extern __at(0x0215) __sfr SSPCON1;
2814 
2815 typedef union
2816   {
2817   struct
2818     {
2819     unsigned SSPM0              : 1;
2820     unsigned SSPM1              : 1;
2821     unsigned SSPM2              : 1;
2822     unsigned SSPM3              : 1;
2823     unsigned CKP                : 1;
2824     unsigned SSPEN              : 1;
2825     unsigned SSPOV              : 1;
2826     unsigned WCOL               : 1;
2827     };
2828 
2829   struct
2830     {
2831     unsigned SSPM               : 4;
2832     unsigned                    : 4;
2833     };
2834   } __SSPCON1bits_t;
2835 
2836 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
2837 
2838 #define _SSPCON1_SSPM0          0x01
2839 #define _SSPCON1_SSPM1          0x02
2840 #define _SSPCON1_SSPM2          0x04
2841 #define _SSPCON1_SSPM3          0x08
2842 #define _SSPCON1_CKP            0x10
2843 #define _SSPCON1_SSPEN          0x20
2844 #define _SSPCON1_SSPOV          0x40
2845 #define _SSPCON1_WCOL           0x80
2846 
2847 //==============================================================================
2848 
2849 
2850 //==============================================================================
2851 //        SSP1CON2 Bits
2852 
2853 extern __at(0x0216) __sfr SSP1CON2;
2854 
2855 typedef struct
2856   {
2857   unsigned SEN                  : 1;
2858   unsigned RSEN                 : 1;
2859   unsigned PEN                  : 1;
2860   unsigned RCEN                 : 1;
2861   unsigned ACKEN                : 1;
2862   unsigned ACKDT                : 1;
2863   unsigned ACKSTAT              : 1;
2864   unsigned GCEN                 : 1;
2865   } __SSP1CON2bits_t;
2866 
2867 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
2868 
2869 #define _SEN                    0x01
2870 #define _RSEN                   0x02
2871 #define _PEN                    0x04
2872 #define _RCEN                   0x08
2873 #define _ACKEN                  0x10
2874 #define _ACKDT                  0x20
2875 #define _ACKSTAT                0x40
2876 #define _GCEN                   0x80
2877 
2878 //==============================================================================
2879 
2880 
2881 //==============================================================================
2882 //        SSPCON2 Bits
2883 
2884 extern __at(0x0216) __sfr SSPCON2;
2885 
2886 typedef struct
2887   {
2888   unsigned SEN                  : 1;
2889   unsigned RSEN                 : 1;
2890   unsigned PEN                  : 1;
2891   unsigned RCEN                 : 1;
2892   unsigned ACKEN                : 1;
2893   unsigned ACKDT                : 1;
2894   unsigned ACKSTAT              : 1;
2895   unsigned GCEN                 : 1;
2896   } __SSPCON2bits_t;
2897 
2898 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
2899 
2900 #define _SSPCON2_SEN            0x01
2901 #define _SSPCON2_RSEN           0x02
2902 #define _SSPCON2_PEN            0x04
2903 #define _SSPCON2_RCEN           0x08
2904 #define _SSPCON2_ACKEN          0x10
2905 #define _SSPCON2_ACKDT          0x20
2906 #define _SSPCON2_ACKSTAT        0x40
2907 #define _SSPCON2_GCEN           0x80
2908 
2909 //==============================================================================
2910 
2911 
2912 //==============================================================================
2913 //        SSP1CON3 Bits
2914 
2915 extern __at(0x0217) __sfr SSP1CON3;
2916 
2917 typedef struct
2918   {
2919   unsigned DHEN                 : 1;
2920   unsigned AHEN                 : 1;
2921   unsigned SBCDE                : 1;
2922   unsigned SDAHT                : 1;
2923   unsigned BOEN                 : 1;
2924   unsigned SCIE                 : 1;
2925   unsigned PCIE                 : 1;
2926   unsigned ACKTIM               : 1;
2927   } __SSP1CON3bits_t;
2928 
2929 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
2930 
2931 #define _DHEN                   0x01
2932 #define _AHEN                   0x02
2933 #define _SBCDE                  0x04
2934 #define _SDAHT                  0x08
2935 #define _BOEN                   0x10
2936 #define _SCIE                   0x20
2937 #define _PCIE                   0x40
2938 #define _ACKTIM                 0x80
2939 
2940 //==============================================================================
2941 
2942 
2943 //==============================================================================
2944 //        SSPCON3 Bits
2945 
2946 extern __at(0x0217) __sfr SSPCON3;
2947 
2948 typedef struct
2949   {
2950   unsigned DHEN                 : 1;
2951   unsigned AHEN                 : 1;
2952   unsigned SBCDE                : 1;
2953   unsigned SDAHT                : 1;
2954   unsigned BOEN                 : 1;
2955   unsigned SCIE                 : 1;
2956   unsigned PCIE                 : 1;
2957   unsigned ACKTIM               : 1;
2958   } __SSPCON3bits_t;
2959 
2960 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
2961 
2962 #define _SSPCON3_DHEN           0x01
2963 #define _SSPCON3_AHEN           0x02
2964 #define _SSPCON3_SBCDE          0x04
2965 #define _SSPCON3_SDAHT          0x08
2966 #define _SSPCON3_BOEN           0x10
2967 #define _SSPCON3_SCIE           0x20
2968 #define _SSPCON3_PCIE           0x40
2969 #define _SSPCON3_ACKTIM         0x80
2970 
2971 //==============================================================================
2972 
2973 
2974 //==============================================================================
2975 //        ODCONA Bits
2976 
2977 extern __at(0x028C) __sfr ODCONA;
2978 
2979 typedef struct
2980   {
2981   unsigned ODA0                 : 1;
2982   unsigned ODA1                 : 1;
2983   unsigned ODA2                 : 1;
2984   unsigned                      : 1;
2985   unsigned ODA4                 : 1;
2986   unsigned ODA5                 : 1;
2987   unsigned                      : 1;
2988   unsigned                      : 1;
2989   } __ODCONAbits_t;
2990 
2991 extern __at(0x028C) volatile __ODCONAbits_t ODCONAbits;
2992 
2993 #define _ODA0                   0x01
2994 #define _ODA1                   0x02
2995 #define _ODA2                   0x04
2996 #define _ODA4                   0x10
2997 #define _ODA5                   0x20
2998 
2999 //==============================================================================
3000 
3001 
3002 //==============================================================================
3003 //        ODCONC Bits
3004 
3005 extern __at(0x028E) __sfr ODCONC;
3006 
3007 typedef union
3008   {
3009   struct
3010     {
3011     unsigned ODC0               : 1;
3012     unsigned ODC1               : 1;
3013     unsigned ODC2               : 1;
3014     unsigned ODC3               : 1;
3015     unsigned ODC4               : 1;
3016     unsigned ODC5               : 1;
3017     unsigned                    : 1;
3018     unsigned                    : 1;
3019     };
3020 
3021   struct
3022     {
3023     unsigned ODC                : 6;
3024     unsigned                    : 2;
3025     };
3026   } __ODCONCbits_t;
3027 
3028 extern __at(0x028E) volatile __ODCONCbits_t ODCONCbits;
3029 
3030 #define _ODC0                   0x01
3031 #define _ODC1                   0x02
3032 #define _ODC2                   0x04
3033 #define _ODC3                   0x08
3034 #define _ODC4                   0x10
3035 #define _ODC5                   0x20
3036 
3037 //==============================================================================
3038 
3039 extern __at(0x0291) __sfr CCPR1;
3040 extern __at(0x0291) __sfr CCPR1L;
3041 extern __at(0x0292) __sfr CCPR1H;
3042 
3043 //==============================================================================
3044 //        CCP1CON Bits
3045 
3046 extern __at(0x0293) __sfr CCP1CON;
3047 
3048 typedef union
3049   {
3050   struct
3051     {
3052     unsigned CCP1M0             : 1;
3053     unsigned CCP1M1             : 1;
3054     unsigned CCP1M2             : 1;
3055     unsigned CCP1M3             : 1;
3056     unsigned DC1B0              : 1;
3057     unsigned DC1B1              : 1;
3058     unsigned                    : 1;
3059     unsigned                    : 1;
3060     };
3061 
3062   struct
3063     {
3064     unsigned                    : 1;
3065     unsigned                    : 1;
3066     unsigned                    : 1;
3067     unsigned                    : 1;
3068     unsigned CCP1Y              : 1;
3069     unsigned CCP1X              : 1;
3070     unsigned                    : 1;
3071     unsigned                    : 1;
3072     };
3073 
3074   struct
3075     {
3076     unsigned CCP1M              : 4;
3077     unsigned                    : 4;
3078     };
3079 
3080   struct
3081     {
3082     unsigned                    : 4;
3083     unsigned DC1B               : 2;
3084     unsigned                    : 2;
3085     };
3086   } __CCP1CONbits_t;
3087 
3088 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
3089 
3090 #define _CCP1M0                 0x01
3091 #define _CCP1M1                 0x02
3092 #define _CCP1M2                 0x04
3093 #define _CCP1M3                 0x08
3094 #define _DC1B0                  0x10
3095 #define _CCP1Y                  0x10
3096 #define _DC1B1                  0x20
3097 #define _CCP1X                  0x20
3098 
3099 //==============================================================================
3100 
3101 
3102 //==============================================================================
3103 //        ECCP1CON Bits
3104 
3105 extern __at(0x0293) __sfr ECCP1CON;
3106 
3107 typedef union
3108   {
3109   struct
3110     {
3111     unsigned CCP1M0             : 1;
3112     unsigned CCP1M1             : 1;
3113     unsigned CCP1M2             : 1;
3114     unsigned CCP1M3             : 1;
3115     unsigned DC1B0              : 1;
3116     unsigned DC1B1              : 1;
3117     unsigned                    : 1;
3118     unsigned                    : 1;
3119     };
3120 
3121   struct
3122     {
3123     unsigned                    : 1;
3124     unsigned                    : 1;
3125     unsigned                    : 1;
3126     unsigned                    : 1;
3127     unsigned CCP1Y              : 1;
3128     unsigned CCP1X              : 1;
3129     unsigned                    : 1;
3130     unsigned                    : 1;
3131     };
3132 
3133   struct
3134     {
3135     unsigned CCP1M              : 4;
3136     unsigned                    : 4;
3137     };
3138 
3139   struct
3140     {
3141     unsigned                    : 4;
3142     unsigned DC1B               : 2;
3143     unsigned                    : 2;
3144     };
3145   } __ECCP1CONbits_t;
3146 
3147 extern __at(0x0293) volatile __ECCP1CONbits_t ECCP1CONbits;
3148 
3149 #define _ECCP1CON_CCP1M0        0x01
3150 #define _ECCP1CON_CCP1M1        0x02
3151 #define _ECCP1CON_CCP1M2        0x04
3152 #define _ECCP1CON_CCP1M3        0x08
3153 #define _ECCP1CON_DC1B0         0x10
3154 #define _ECCP1CON_CCP1Y         0x10
3155 #define _ECCP1CON_DC1B1         0x20
3156 #define _ECCP1CON_CCP1X         0x20
3157 
3158 //==============================================================================
3159 
3160 extern __at(0x0298) __sfr CCPR2;
3161 extern __at(0x0298) __sfr CCPR2L;
3162 extern __at(0x0299) __sfr CCPR2H;
3163 
3164 //==============================================================================
3165 //        CCP2CON Bits
3166 
3167 extern __at(0x029A) __sfr CCP2CON;
3168 
3169 typedef union
3170   {
3171   struct
3172     {
3173     unsigned CCP2M0             : 1;
3174     unsigned CCP2M1             : 1;
3175     unsigned CCP2M2             : 1;
3176     unsigned CCP2M3             : 1;
3177     unsigned DC2B0              : 1;
3178     unsigned DC2B1              : 1;
3179     unsigned                    : 1;
3180     unsigned                    : 1;
3181     };
3182 
3183   struct
3184     {
3185     unsigned                    : 1;
3186     unsigned                    : 1;
3187     unsigned                    : 1;
3188     unsigned                    : 1;
3189     unsigned CCP2Y              : 1;
3190     unsigned CCP2X              : 1;
3191     unsigned                    : 1;
3192     unsigned                    : 1;
3193     };
3194 
3195   struct
3196     {
3197     unsigned CCP2M              : 4;
3198     unsigned                    : 4;
3199     };
3200 
3201   struct
3202     {
3203     unsigned                    : 4;
3204     unsigned DC2B               : 2;
3205     unsigned                    : 2;
3206     };
3207   } __CCP2CONbits_t;
3208 
3209 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
3210 
3211 #define _CCP2M0                 0x01
3212 #define _CCP2M1                 0x02
3213 #define _CCP2M2                 0x04
3214 #define _CCP2M3                 0x08
3215 #define _DC2B0                  0x10
3216 #define _CCP2Y                  0x10
3217 #define _DC2B1                  0x20
3218 #define _CCP2X                  0x20
3219 
3220 //==============================================================================
3221 
3222 
3223 //==============================================================================
3224 //        ECCP2CON Bits
3225 
3226 extern __at(0x029A) __sfr ECCP2CON;
3227 
3228 typedef union
3229   {
3230   struct
3231     {
3232     unsigned CCP2M0             : 1;
3233     unsigned CCP2M1             : 1;
3234     unsigned CCP2M2             : 1;
3235     unsigned CCP2M3             : 1;
3236     unsigned DC2B0              : 1;
3237     unsigned DC2B1              : 1;
3238     unsigned                    : 1;
3239     unsigned                    : 1;
3240     };
3241 
3242   struct
3243     {
3244     unsigned                    : 1;
3245     unsigned                    : 1;
3246     unsigned                    : 1;
3247     unsigned                    : 1;
3248     unsigned CCP2Y              : 1;
3249     unsigned CCP2X              : 1;
3250     unsigned                    : 1;
3251     unsigned                    : 1;
3252     };
3253 
3254   struct
3255     {
3256     unsigned CCP2M              : 4;
3257     unsigned                    : 4;
3258     };
3259 
3260   struct
3261     {
3262     unsigned                    : 4;
3263     unsigned DC2B               : 2;
3264     unsigned                    : 2;
3265     };
3266   } __ECCP2CONbits_t;
3267 
3268 extern __at(0x029A) volatile __ECCP2CONbits_t ECCP2CONbits;
3269 
3270 #define _ECCP2CON_CCP2M0        0x01
3271 #define _ECCP2CON_CCP2M1        0x02
3272 #define _ECCP2CON_CCP2M2        0x04
3273 #define _ECCP2CON_CCP2M3        0x08
3274 #define _ECCP2CON_DC2B0         0x10
3275 #define _ECCP2CON_CCP2Y         0x10
3276 #define _ECCP2CON_DC2B1         0x20
3277 #define _ECCP2CON_CCP2X         0x20
3278 
3279 //==============================================================================
3280 
3281 
3282 //==============================================================================
3283 //        CCPTMRS Bits
3284 
3285 extern __at(0x029E) __sfr CCPTMRS;
3286 
3287 typedef union
3288   {
3289   struct
3290     {
3291     unsigned C1TSEL0            : 1;
3292     unsigned C1TSEL1            : 1;
3293     unsigned C2TSEL0            : 1;
3294     unsigned C2TSEL1            : 1;
3295     unsigned P3TSEL0            : 1;
3296     unsigned P3TSEL1            : 1;
3297     unsigned P4TSEL0            : 1;
3298     unsigned P4TSEL1            : 1;
3299     };
3300 
3301   struct
3302     {
3303     unsigned C1TSEL             : 2;
3304     unsigned                    : 6;
3305     };
3306 
3307   struct
3308     {
3309     unsigned                    : 2;
3310     unsigned C2TSEL             : 2;
3311     unsigned                    : 4;
3312     };
3313 
3314   struct
3315     {
3316     unsigned                    : 4;
3317     unsigned P3TSEL             : 2;
3318     unsigned                    : 2;
3319     };
3320 
3321   struct
3322     {
3323     unsigned                    : 6;
3324     unsigned P4TSEL             : 2;
3325     };
3326   } __CCPTMRSbits_t;
3327 
3328 extern __at(0x029E) volatile __CCPTMRSbits_t CCPTMRSbits;
3329 
3330 #define _C1TSEL0                0x01
3331 #define _C1TSEL1                0x02
3332 #define _C2TSEL0                0x04
3333 #define _C2TSEL1                0x08
3334 #define _P3TSEL0                0x10
3335 #define _P3TSEL1                0x20
3336 #define _P4TSEL0                0x40
3337 #define _P4TSEL1                0x80
3338 
3339 //==============================================================================
3340 
3341 
3342 //==============================================================================
3343 //        SLRCONA Bits
3344 
3345 extern __at(0x030C) __sfr SLRCONA;
3346 
3347 typedef struct
3348   {
3349   unsigned SLRA0                : 1;
3350   unsigned SLRA1                : 1;
3351   unsigned SLRA2                : 1;
3352   unsigned                      : 1;
3353   unsigned SLRA4                : 1;
3354   unsigned SLRA5                : 1;
3355   unsigned                      : 1;
3356   unsigned                      : 1;
3357   } __SLRCONAbits_t;
3358 
3359 extern __at(0x030C) volatile __SLRCONAbits_t SLRCONAbits;
3360 
3361 #define _SLRA0                  0x01
3362 #define _SLRA1                  0x02
3363 #define _SLRA2                  0x04
3364 #define _SLRA4                  0x10
3365 #define _SLRA5                  0x20
3366 
3367 //==============================================================================
3368 
3369 
3370 //==============================================================================
3371 //        SLRCONC Bits
3372 
3373 extern __at(0x030E) __sfr SLRCONC;
3374 
3375 typedef union
3376   {
3377   struct
3378     {
3379     unsigned SLRC0              : 1;
3380     unsigned SLRC1              : 1;
3381     unsigned SLRC2              : 1;
3382     unsigned SLRC3              : 1;
3383     unsigned SLRC4              : 1;
3384     unsigned SLRC5              : 1;
3385     unsigned                    : 1;
3386     unsigned                    : 1;
3387     };
3388 
3389   struct
3390     {
3391     unsigned SLRC               : 6;
3392     unsigned                    : 2;
3393     };
3394   } __SLRCONCbits_t;
3395 
3396 extern __at(0x030E) volatile __SLRCONCbits_t SLRCONCbits;
3397 
3398 #define _SLRC0                  0x01
3399 #define _SLRC1                  0x02
3400 #define _SLRC2                  0x04
3401 #define _SLRC3                  0x08
3402 #define _SLRC4                  0x10
3403 #define _SLRC5                  0x20
3404 
3405 //==============================================================================
3406 
3407 
3408 //==============================================================================
3409 //        INLVLA Bits
3410 
3411 extern __at(0x038C) __sfr INLVLA;
3412 
3413 typedef union
3414   {
3415   struct
3416     {
3417     unsigned INLVLA0            : 1;
3418     unsigned INLVLA1            : 1;
3419     unsigned INLVLA2            : 1;
3420     unsigned INLVLA3            : 1;
3421     unsigned INLVLA4            : 1;
3422     unsigned INLVLA5            : 1;
3423     unsigned                    : 1;
3424     unsigned                    : 1;
3425     };
3426 
3427   struct
3428     {
3429     unsigned INLVLA             : 6;
3430     unsigned                    : 2;
3431     };
3432   } __INLVLAbits_t;
3433 
3434 extern __at(0x038C) volatile __INLVLAbits_t INLVLAbits;
3435 
3436 #define _INLVLA0                0x01
3437 #define _INLVLA1                0x02
3438 #define _INLVLA2                0x04
3439 #define _INLVLA3                0x08
3440 #define _INLVLA4                0x10
3441 #define _INLVLA5                0x20
3442 
3443 //==============================================================================
3444 
3445 
3446 //==============================================================================
3447 //        INLVLC Bits
3448 
3449 extern __at(0x038E) __sfr INLVLC;
3450 
3451 typedef union
3452   {
3453   struct
3454     {
3455     unsigned INLVLC0            : 1;
3456     unsigned INLVLC1            : 1;
3457     unsigned INLVLC2            : 1;
3458     unsigned INLVLC3            : 1;
3459     unsigned INLVLC4            : 1;
3460     unsigned INLVLC5            : 1;
3461     unsigned                    : 1;
3462     unsigned                    : 1;
3463     };
3464 
3465   struct
3466     {
3467     unsigned INLVLC             : 6;
3468     unsigned                    : 2;
3469     };
3470   } __INLVLCbits_t;
3471 
3472 extern __at(0x038E) volatile __INLVLCbits_t INLVLCbits;
3473 
3474 #define _INLVLC0                0x01
3475 #define _INLVLC1                0x02
3476 #define _INLVLC2                0x04
3477 #define _INLVLC3                0x08
3478 #define _INLVLC4                0x10
3479 #define _INLVLC5                0x20
3480 
3481 //==============================================================================
3482 
3483 
3484 //==============================================================================
3485 //        IOCAP Bits
3486 
3487 extern __at(0x0391) __sfr IOCAP;
3488 
3489 typedef union
3490   {
3491   struct
3492     {
3493     unsigned IOCAP0             : 1;
3494     unsigned IOCAP1             : 1;
3495     unsigned IOCAP2             : 1;
3496     unsigned IOCAP3             : 1;
3497     unsigned IOCAP4             : 1;
3498     unsigned IOCAP5             : 1;
3499     unsigned                    : 1;
3500     unsigned                    : 1;
3501     };
3502 
3503   struct
3504     {
3505     unsigned IOCAP              : 6;
3506     unsigned                    : 2;
3507     };
3508   } __IOCAPbits_t;
3509 
3510 extern __at(0x0391) volatile __IOCAPbits_t IOCAPbits;
3511 
3512 #define _IOCAP0                 0x01
3513 #define _IOCAP1                 0x02
3514 #define _IOCAP2                 0x04
3515 #define _IOCAP3                 0x08
3516 #define _IOCAP4                 0x10
3517 #define _IOCAP5                 0x20
3518 
3519 //==============================================================================
3520 
3521 
3522 //==============================================================================
3523 //        IOCAN Bits
3524 
3525 extern __at(0x0392) __sfr IOCAN;
3526 
3527 typedef union
3528   {
3529   struct
3530     {
3531     unsigned IOCAN0             : 1;
3532     unsigned IOCAN1             : 1;
3533     unsigned IOCAN2             : 1;
3534     unsigned IOCAN3             : 1;
3535     unsigned IOCAN4             : 1;
3536     unsigned IOCAN5             : 1;
3537     unsigned                    : 1;
3538     unsigned                    : 1;
3539     };
3540 
3541   struct
3542     {
3543     unsigned IOCAN              : 6;
3544     unsigned                    : 2;
3545     };
3546   } __IOCANbits_t;
3547 
3548 extern __at(0x0392) volatile __IOCANbits_t IOCANbits;
3549 
3550 #define _IOCAN0                 0x01
3551 #define _IOCAN1                 0x02
3552 #define _IOCAN2                 0x04
3553 #define _IOCAN3                 0x08
3554 #define _IOCAN4                 0x10
3555 #define _IOCAN5                 0x20
3556 
3557 //==============================================================================
3558 
3559 
3560 //==============================================================================
3561 //        IOCAF Bits
3562 
3563 extern __at(0x0393) __sfr IOCAF;
3564 
3565 typedef union
3566   {
3567   struct
3568     {
3569     unsigned IOCAF0             : 1;
3570     unsigned IOCAF1             : 1;
3571     unsigned IOCAF2             : 1;
3572     unsigned IOCAF3             : 1;
3573     unsigned IOCAF4             : 1;
3574     unsigned IOCAF5             : 1;
3575     unsigned                    : 1;
3576     unsigned                    : 1;
3577     };
3578 
3579   struct
3580     {
3581     unsigned IOCAF              : 6;
3582     unsigned                    : 2;
3583     };
3584   } __IOCAFbits_t;
3585 
3586 extern __at(0x0393) volatile __IOCAFbits_t IOCAFbits;
3587 
3588 #define _IOCAF0                 0x01
3589 #define _IOCAF1                 0x02
3590 #define _IOCAF2                 0x04
3591 #define _IOCAF3                 0x08
3592 #define _IOCAF4                 0x10
3593 #define _IOCAF5                 0x20
3594 
3595 //==============================================================================
3596 
3597 
3598 //==============================================================================
3599 //        IOCCP Bits
3600 
3601 extern __at(0x0397) __sfr IOCCP;
3602 
3603 typedef union
3604   {
3605   struct
3606     {
3607     unsigned IOCCP0             : 1;
3608     unsigned IOCCP1             : 1;
3609     unsigned IOCCP2             : 1;
3610     unsigned IOCCP3             : 1;
3611     unsigned IOCCP4             : 1;
3612     unsigned IOCCP5             : 1;
3613     unsigned                    : 1;
3614     unsigned                    : 1;
3615     };
3616 
3617   struct
3618     {
3619     unsigned IOCCP              : 6;
3620     unsigned                    : 2;
3621     };
3622   } __IOCCPbits_t;
3623 
3624 extern __at(0x0397) volatile __IOCCPbits_t IOCCPbits;
3625 
3626 #define _IOCCP0                 0x01
3627 #define _IOCCP1                 0x02
3628 #define _IOCCP2                 0x04
3629 #define _IOCCP3                 0x08
3630 #define _IOCCP4                 0x10
3631 #define _IOCCP5                 0x20
3632 
3633 //==============================================================================
3634 
3635 
3636 //==============================================================================
3637 //        IOCCN Bits
3638 
3639 extern __at(0x0398) __sfr IOCCN;
3640 
3641 typedef union
3642   {
3643   struct
3644     {
3645     unsigned IOCCN0             : 1;
3646     unsigned IOCCN1             : 1;
3647     unsigned IOCCN2             : 1;
3648     unsigned IOCCN3             : 1;
3649     unsigned IOCCN4             : 1;
3650     unsigned IOCCN5             : 1;
3651     unsigned                    : 1;
3652     unsigned                    : 1;
3653     };
3654 
3655   struct
3656     {
3657     unsigned IOCCN              : 6;
3658     unsigned                    : 2;
3659     };
3660   } __IOCCNbits_t;
3661 
3662 extern __at(0x0398) volatile __IOCCNbits_t IOCCNbits;
3663 
3664 #define _IOCCN0                 0x01
3665 #define _IOCCN1                 0x02
3666 #define _IOCCN2                 0x04
3667 #define _IOCCN3                 0x08
3668 #define _IOCCN4                 0x10
3669 #define _IOCCN5                 0x20
3670 
3671 //==============================================================================
3672 
3673 
3674 //==============================================================================
3675 //        IOCCF Bits
3676 
3677 extern __at(0x0399) __sfr IOCCF;
3678 
3679 typedef union
3680   {
3681   struct
3682     {
3683     unsigned IOCCF0             : 1;
3684     unsigned IOCCF1             : 1;
3685     unsigned IOCCF2             : 1;
3686     unsigned IOCCF3             : 1;
3687     unsigned IOCCF4             : 1;
3688     unsigned IOCCF5             : 1;
3689     unsigned                    : 1;
3690     unsigned                    : 1;
3691     };
3692 
3693   struct
3694     {
3695     unsigned IOCCF              : 6;
3696     unsigned                    : 2;
3697     };
3698   } __IOCCFbits_t;
3699 
3700 extern __at(0x0399) volatile __IOCCFbits_t IOCCFbits;
3701 
3702 #define _IOCCF0                 0x01
3703 #define _IOCCF1                 0x02
3704 #define _IOCCF2                 0x04
3705 #define _IOCCF3                 0x08
3706 #define _IOCCF4                 0x10
3707 #define _IOCCF5                 0x20
3708 
3709 //==============================================================================
3710 
3711 extern __at(0x0415) __sfr TMR4;
3712 extern __at(0x0416) __sfr PR4;
3713 
3714 //==============================================================================
3715 //        T4CON Bits
3716 
3717 extern __at(0x0417) __sfr T4CON;
3718 
3719 typedef union
3720   {
3721   struct
3722     {
3723     unsigned T4CKPS0            : 1;
3724     unsigned T4CKPS1            : 1;
3725     unsigned TMR4ON             : 1;
3726     unsigned T4OUTPS0           : 1;
3727     unsigned T4OUTPS1           : 1;
3728     unsigned T4OUTPS2           : 1;
3729     unsigned T4OUTPS3           : 1;
3730     unsigned                    : 1;
3731     };
3732 
3733   struct
3734     {
3735     unsigned T4CKPS             : 2;
3736     unsigned                    : 6;
3737     };
3738 
3739   struct
3740     {
3741     unsigned                    : 3;
3742     unsigned T4OUTPS            : 4;
3743     unsigned                    : 1;
3744     };
3745   } __T4CONbits_t;
3746 
3747 extern __at(0x0417) volatile __T4CONbits_t T4CONbits;
3748 
3749 #define _T4CKPS0                0x01
3750 #define _T4CKPS1                0x02
3751 #define _TMR4ON                 0x04
3752 #define _T4OUTPS0               0x08
3753 #define _T4OUTPS1               0x10
3754 #define _T4OUTPS2               0x20
3755 #define _T4OUTPS3               0x40
3756 
3757 //==============================================================================
3758 
3759 extern __at(0x041C) __sfr TMR6;
3760 extern __at(0x041D) __sfr PR6;
3761 
3762 //==============================================================================
3763 //        T6CON Bits
3764 
3765 extern __at(0x041E) __sfr T6CON;
3766 
3767 typedef union
3768   {
3769   struct
3770     {
3771     unsigned T6CKPS0            : 1;
3772     unsigned T6CKPS1            : 1;
3773     unsigned TMR6ON             : 1;
3774     unsigned T6OUTPS0           : 1;
3775     unsigned T6OUTPS1           : 1;
3776     unsigned T6OUTPS2           : 1;
3777     unsigned T6OUTPS3           : 1;
3778     unsigned                    : 1;
3779     };
3780 
3781   struct
3782     {
3783     unsigned T6CKPS             : 2;
3784     unsigned                    : 6;
3785     };
3786 
3787   struct
3788     {
3789     unsigned                    : 3;
3790     unsigned T6OUTPS            : 4;
3791     unsigned                    : 1;
3792     };
3793   } __T6CONbits_t;
3794 
3795 extern __at(0x041E) volatile __T6CONbits_t T6CONbits;
3796 
3797 #define _T6CKPS0                0x01
3798 #define _T6CKPS1                0x02
3799 #define _TMR6ON                 0x04
3800 #define _T6OUTPS0               0x08
3801 #define _T6OUTPS1               0x10
3802 #define _T6OUTPS2               0x20
3803 #define _T6OUTPS3               0x40
3804 
3805 //==============================================================================
3806 
3807 
3808 //==============================================================================
3809 //        OPA1CON Bits
3810 
3811 extern __at(0x0511) __sfr OPA1CON;
3812 
3813 typedef union
3814   {
3815   struct
3816     {
3817     unsigned OPA1PCH0           : 1;
3818     unsigned OPA1PCH1           : 1;
3819     unsigned                    : 1;
3820     unsigned                    : 1;
3821     unsigned OPA1UG             : 1;
3822     unsigned                    : 1;
3823     unsigned OPA1SP             : 1;
3824     unsigned OPA1EN             : 1;
3825     };
3826 
3827   struct
3828     {
3829     unsigned OPA1PCH            : 2;
3830     unsigned                    : 6;
3831     };
3832   } __OPA1CONbits_t;
3833 
3834 extern __at(0x0511) volatile __OPA1CONbits_t OPA1CONbits;
3835 
3836 #define _OPA1PCH0               0x01
3837 #define _OPA1PCH1               0x02
3838 #define _OPA1UG                 0x10
3839 #define _OPA1SP                 0x40
3840 #define _OPA1EN                 0x80
3841 
3842 //==============================================================================
3843 
3844 
3845 //==============================================================================
3846 //        OPA2CON Bits
3847 
3848 extern __at(0x0515) __sfr OPA2CON;
3849 
3850 typedef union
3851   {
3852   struct
3853     {
3854     unsigned OPA2PCH0           : 1;
3855     unsigned OPA2PCH1           : 1;
3856     unsigned                    : 1;
3857     unsigned                    : 1;
3858     unsigned OPA2UG             : 1;
3859     unsigned                    : 1;
3860     unsigned OPA2SP             : 1;
3861     unsigned OPA2EN             : 1;
3862     };
3863 
3864   struct
3865     {
3866     unsigned OPA2PCH            : 2;
3867     unsigned                    : 6;
3868     };
3869   } __OPA2CONbits_t;
3870 
3871 extern __at(0x0515) volatile __OPA2CONbits_t OPA2CONbits;
3872 
3873 #define _OPA2PCH0               0x01
3874 #define _OPA2PCH1               0x02
3875 #define _OPA2UG                 0x10
3876 #define _OPA2SP                 0x40
3877 #define _OPA2EN                 0x80
3878 
3879 //==============================================================================
3880 
3881 
3882 //==============================================================================
3883 //        PWM3DCL Bits
3884 
3885 extern __at(0x0617) __sfr PWM3DCL;
3886 
3887 typedef union
3888   {
3889   struct
3890     {
3891     unsigned                    : 1;
3892     unsigned                    : 1;
3893     unsigned                    : 1;
3894     unsigned                    : 1;
3895     unsigned                    : 1;
3896     unsigned                    : 1;
3897     unsigned PWM3DCL0           : 1;
3898     unsigned PWM3DCL1           : 1;
3899     };
3900 
3901   struct
3902     {
3903     unsigned                    : 6;
3904     unsigned PWM3DCL            : 2;
3905     };
3906   } __PWM3DCLbits_t;
3907 
3908 extern __at(0x0617) volatile __PWM3DCLbits_t PWM3DCLbits;
3909 
3910 #define _PWM3DCL0               0x40
3911 #define _PWM3DCL1               0x80
3912 
3913 //==============================================================================
3914 
3915 
3916 //==============================================================================
3917 //        PWM3DCH Bits
3918 
3919 extern __at(0x0618) __sfr PWM3DCH;
3920 
3921 typedef struct
3922   {
3923   unsigned PWM3DCH0             : 1;
3924   unsigned PWM3DCH1             : 1;
3925   unsigned PWM3DCH2             : 1;
3926   unsigned PWM3DCH3             : 1;
3927   unsigned PWM3DCH4             : 1;
3928   unsigned PWM3DCH5             : 1;
3929   unsigned PWM3DCH6             : 1;
3930   unsigned PWM3DCH7             : 1;
3931   } __PWM3DCHbits_t;
3932 
3933 extern __at(0x0618) volatile __PWM3DCHbits_t PWM3DCHbits;
3934 
3935 #define _PWM3DCH0               0x01
3936 #define _PWM3DCH1               0x02
3937 #define _PWM3DCH2               0x04
3938 #define _PWM3DCH3               0x08
3939 #define _PWM3DCH4               0x10
3940 #define _PWM3DCH5               0x20
3941 #define _PWM3DCH6               0x40
3942 #define _PWM3DCH7               0x80
3943 
3944 //==============================================================================
3945 
3946 
3947 //==============================================================================
3948 //        PWM3CON Bits
3949 
3950 extern __at(0x0619) __sfr PWM3CON;
3951 
3952 typedef struct
3953   {
3954   unsigned                      : 1;
3955   unsigned                      : 1;
3956   unsigned                      : 1;
3957   unsigned                      : 1;
3958   unsigned PWM3POL              : 1;
3959   unsigned PWM3OUT              : 1;
3960   unsigned                      : 1;
3961   unsigned PWM3EN               : 1;
3962   } __PWM3CONbits_t;
3963 
3964 extern __at(0x0619) volatile __PWM3CONbits_t PWM3CONbits;
3965 
3966 #define _PWM3POL                0x10
3967 #define _PWM3OUT                0x20
3968 #define _PWM3EN                 0x80
3969 
3970 //==============================================================================
3971 
3972 
3973 //==============================================================================
3974 //        PWM3CON0 Bits
3975 
3976 extern __at(0x0619) __sfr PWM3CON0;
3977 
3978 typedef struct
3979   {
3980   unsigned                      : 1;
3981   unsigned                      : 1;
3982   unsigned                      : 1;
3983   unsigned                      : 1;
3984   unsigned PWM3POL              : 1;
3985   unsigned PWM3OUT              : 1;
3986   unsigned                      : 1;
3987   unsigned PWM3EN               : 1;
3988   } __PWM3CON0bits_t;
3989 
3990 extern __at(0x0619) volatile __PWM3CON0bits_t PWM3CON0bits;
3991 
3992 #define _PWM3CON0_PWM3POL       0x10
3993 #define _PWM3CON0_PWM3OUT       0x20
3994 #define _PWM3CON0_PWM3EN        0x80
3995 
3996 //==============================================================================
3997 
3998 
3999 //==============================================================================
4000 //        PWM4DCL Bits
4001 
4002 extern __at(0x061A) __sfr PWM4DCL;
4003 
4004 typedef union
4005   {
4006   struct
4007     {
4008     unsigned                    : 1;
4009     unsigned                    : 1;
4010     unsigned                    : 1;
4011     unsigned                    : 1;
4012     unsigned                    : 1;
4013     unsigned                    : 1;
4014     unsigned PWM4DCL0           : 1;
4015     unsigned PWM4DCL1           : 1;
4016     };
4017 
4018   struct
4019     {
4020     unsigned                    : 6;
4021     unsigned PWM4DCL            : 2;
4022     };
4023   } __PWM4DCLbits_t;
4024 
4025 extern __at(0x061A) volatile __PWM4DCLbits_t PWM4DCLbits;
4026 
4027 #define _PWM4DCL0               0x40
4028 #define _PWM4DCL1               0x80
4029 
4030 //==============================================================================
4031 
4032 
4033 //==============================================================================
4034 //        PWM4DCH Bits
4035 
4036 extern __at(0x061B) __sfr PWM4DCH;
4037 
4038 typedef struct
4039   {
4040   unsigned PWM4DCH0             : 1;
4041   unsigned PWM4DCH1             : 1;
4042   unsigned PWM4DCH2             : 1;
4043   unsigned PWM4DCH3             : 1;
4044   unsigned PWM4DCH4             : 1;
4045   unsigned PWM4DCH5             : 1;
4046   unsigned PWM4DCH6             : 1;
4047   unsigned PWM4DCH7             : 1;
4048   } __PWM4DCHbits_t;
4049 
4050 extern __at(0x061B) volatile __PWM4DCHbits_t PWM4DCHbits;
4051 
4052 #define _PWM4DCH0               0x01
4053 #define _PWM4DCH1               0x02
4054 #define _PWM4DCH2               0x04
4055 #define _PWM4DCH3               0x08
4056 #define _PWM4DCH4               0x10
4057 #define _PWM4DCH5               0x20
4058 #define _PWM4DCH6               0x40
4059 #define _PWM4DCH7               0x80
4060 
4061 //==============================================================================
4062 
4063 
4064 //==============================================================================
4065 //        PWM4CON Bits
4066 
4067 extern __at(0x061C) __sfr PWM4CON;
4068 
4069 typedef struct
4070   {
4071   unsigned                      : 1;
4072   unsigned                      : 1;
4073   unsigned                      : 1;
4074   unsigned                      : 1;
4075   unsigned PWM4POL              : 1;
4076   unsigned PWM4OUT              : 1;
4077   unsigned                      : 1;
4078   unsigned PWM4EN               : 1;
4079   } __PWM4CONbits_t;
4080 
4081 extern __at(0x061C) volatile __PWM4CONbits_t PWM4CONbits;
4082 
4083 #define _PWM4POL                0x10
4084 #define _PWM4OUT                0x20
4085 #define _PWM4EN                 0x80
4086 
4087 //==============================================================================
4088 
4089 
4090 //==============================================================================
4091 //        PWM4CON0 Bits
4092 
4093 extern __at(0x061C) __sfr PWM4CON0;
4094 
4095 typedef struct
4096   {
4097   unsigned                      : 1;
4098   unsigned                      : 1;
4099   unsigned                      : 1;
4100   unsigned                      : 1;
4101   unsigned PWM4POL              : 1;
4102   unsigned PWM4OUT              : 1;
4103   unsigned                      : 1;
4104   unsigned PWM4EN               : 1;
4105   } __PWM4CON0bits_t;
4106 
4107 extern __at(0x061C) volatile __PWM4CON0bits_t PWM4CON0bits;
4108 
4109 #define _PWM4CON0_PWM4POL       0x10
4110 #define _PWM4CON0_PWM4OUT       0x20
4111 #define _PWM4CON0_PWM4EN        0x80
4112 
4113 //==============================================================================
4114 
4115 
4116 //==============================================================================
4117 //        COG1PHR Bits
4118 
4119 extern __at(0x0691) __sfr COG1PHR;
4120 
4121 typedef union
4122   {
4123   struct
4124     {
4125     unsigned G1PHR0             : 1;
4126     unsigned G1PHR1             : 1;
4127     unsigned G1PHR2             : 1;
4128     unsigned G1PHR3             : 1;
4129     unsigned G1PHR4             : 1;
4130     unsigned G1PHR5             : 1;
4131     unsigned                    : 1;
4132     unsigned                    : 1;
4133     };
4134 
4135   struct
4136     {
4137     unsigned G1PHR              : 6;
4138     unsigned                    : 2;
4139     };
4140   } __COG1PHRbits_t;
4141 
4142 extern __at(0x0691) volatile __COG1PHRbits_t COG1PHRbits;
4143 
4144 #define _G1PHR0                 0x01
4145 #define _G1PHR1                 0x02
4146 #define _G1PHR2                 0x04
4147 #define _G1PHR3                 0x08
4148 #define _G1PHR4                 0x10
4149 #define _G1PHR5                 0x20
4150 
4151 //==============================================================================
4152 
4153 
4154 //==============================================================================
4155 //        COG1PHF Bits
4156 
4157 extern __at(0x0692) __sfr COG1PHF;
4158 
4159 typedef union
4160   {
4161   struct
4162     {
4163     unsigned G1PHF0             : 1;
4164     unsigned G1PHF1             : 1;
4165     unsigned G1PHF2             : 1;
4166     unsigned G1PHF3             : 1;
4167     unsigned G1PHF4             : 1;
4168     unsigned G1PHF5             : 1;
4169     unsigned                    : 1;
4170     unsigned                    : 1;
4171     };
4172 
4173   struct
4174     {
4175     unsigned G1PHF              : 6;
4176     unsigned                    : 2;
4177     };
4178   } __COG1PHFbits_t;
4179 
4180 extern __at(0x0692) volatile __COG1PHFbits_t COG1PHFbits;
4181 
4182 #define _G1PHF0                 0x01
4183 #define _G1PHF1                 0x02
4184 #define _G1PHF2                 0x04
4185 #define _G1PHF3                 0x08
4186 #define _G1PHF4                 0x10
4187 #define _G1PHF5                 0x20
4188 
4189 //==============================================================================
4190 
4191 
4192 //==============================================================================
4193 //        COG1BLKR Bits
4194 
4195 extern __at(0x0693) __sfr COG1BLKR;
4196 
4197 typedef union
4198   {
4199   struct
4200     {
4201     unsigned G1BLKR0            : 1;
4202     unsigned G1BLKR1            : 1;
4203     unsigned G1BLKR2            : 1;
4204     unsigned G1BLKR3            : 1;
4205     unsigned G1BLKR4            : 1;
4206     unsigned G1BLKR5            : 1;
4207     unsigned                    : 1;
4208     unsigned                    : 1;
4209     };
4210 
4211   struct
4212     {
4213     unsigned G1BLKR             : 6;
4214     unsigned                    : 2;
4215     };
4216   } __COG1BLKRbits_t;
4217 
4218 extern __at(0x0693) volatile __COG1BLKRbits_t COG1BLKRbits;
4219 
4220 #define _G1BLKR0                0x01
4221 #define _G1BLKR1                0x02
4222 #define _G1BLKR2                0x04
4223 #define _G1BLKR3                0x08
4224 #define _G1BLKR4                0x10
4225 #define _G1BLKR5                0x20
4226 
4227 //==============================================================================
4228 
4229 
4230 //==============================================================================
4231 //        COG1BLKF Bits
4232 
4233 extern __at(0x0694) __sfr COG1BLKF;
4234 
4235 typedef union
4236   {
4237   struct
4238     {
4239     unsigned G1BLKF0            : 1;
4240     unsigned G1BLKF1            : 1;
4241     unsigned G1BLKF2            : 1;
4242     unsigned G1BLKF3            : 1;
4243     unsigned G1BLKF4            : 1;
4244     unsigned G1BLKF5            : 1;
4245     unsigned                    : 1;
4246     unsigned                    : 1;
4247     };
4248 
4249   struct
4250     {
4251     unsigned G1BLKF             : 6;
4252     unsigned                    : 2;
4253     };
4254   } __COG1BLKFbits_t;
4255 
4256 extern __at(0x0694) volatile __COG1BLKFbits_t COG1BLKFbits;
4257 
4258 #define _G1BLKF0                0x01
4259 #define _G1BLKF1                0x02
4260 #define _G1BLKF2                0x04
4261 #define _G1BLKF3                0x08
4262 #define _G1BLKF4                0x10
4263 #define _G1BLKF5                0x20
4264 
4265 //==============================================================================
4266 
4267 
4268 //==============================================================================
4269 //        COG1DBR Bits
4270 
4271 extern __at(0x0695) __sfr COG1DBR;
4272 
4273 typedef union
4274   {
4275   struct
4276     {
4277     unsigned G1DBR0             : 1;
4278     unsigned G1DBR1             : 1;
4279     unsigned G1DBR2             : 1;
4280     unsigned G1DBR3             : 1;
4281     unsigned G1DBR4             : 1;
4282     unsigned G1DBR5             : 1;
4283     unsigned                    : 1;
4284     unsigned                    : 1;
4285     };
4286 
4287   struct
4288     {
4289     unsigned G1DBR              : 6;
4290     unsigned                    : 2;
4291     };
4292   } __COG1DBRbits_t;
4293 
4294 extern __at(0x0695) volatile __COG1DBRbits_t COG1DBRbits;
4295 
4296 #define _G1DBR0                 0x01
4297 #define _G1DBR1                 0x02
4298 #define _G1DBR2                 0x04
4299 #define _G1DBR3                 0x08
4300 #define _G1DBR4                 0x10
4301 #define _G1DBR5                 0x20
4302 
4303 //==============================================================================
4304 
4305 
4306 //==============================================================================
4307 //        COG1DBF Bits
4308 
4309 extern __at(0x0696) __sfr COG1DBF;
4310 
4311 typedef union
4312   {
4313   struct
4314     {
4315     unsigned G1DBF0             : 1;
4316     unsigned G1DBF1             : 1;
4317     unsigned G1DBF2             : 1;
4318     unsigned G1DBF3             : 1;
4319     unsigned G1DBF4             : 1;
4320     unsigned G1DBF5             : 1;
4321     unsigned                    : 1;
4322     unsigned                    : 1;
4323     };
4324 
4325   struct
4326     {
4327     unsigned G1DBF              : 6;
4328     unsigned                    : 2;
4329     };
4330   } __COG1DBFbits_t;
4331 
4332 extern __at(0x0696) volatile __COG1DBFbits_t COG1DBFbits;
4333 
4334 #define _G1DBF0                 0x01
4335 #define _G1DBF1                 0x02
4336 #define _G1DBF2                 0x04
4337 #define _G1DBF3                 0x08
4338 #define _G1DBF4                 0x10
4339 #define _G1DBF5                 0x20
4340 
4341 //==============================================================================
4342 
4343 
4344 //==============================================================================
4345 //        COG1CON0 Bits
4346 
4347 extern __at(0x0697) __sfr COG1CON0;
4348 
4349 typedef union
4350   {
4351   struct
4352     {
4353     unsigned G1MD0              : 1;
4354     unsigned G1MD1              : 1;
4355     unsigned G1MD2              : 1;
4356     unsigned G1CS0              : 1;
4357     unsigned G1CS1              : 1;
4358     unsigned                    : 1;
4359     unsigned G1LD               : 1;
4360     unsigned G1EN               : 1;
4361     };
4362 
4363   struct
4364     {
4365     unsigned G1MD               : 3;
4366     unsigned                    : 5;
4367     };
4368 
4369   struct
4370     {
4371     unsigned                    : 3;
4372     unsigned G1CS               : 2;
4373     unsigned                    : 3;
4374     };
4375   } __COG1CON0bits_t;
4376 
4377 extern __at(0x0697) volatile __COG1CON0bits_t COG1CON0bits;
4378 
4379 #define _G1MD0                  0x01
4380 #define _G1MD1                  0x02
4381 #define _G1MD2                  0x04
4382 #define _G1CS0                  0x08
4383 #define _G1CS1                  0x10
4384 #define _G1LD                   0x40
4385 #define _G1EN                   0x80
4386 
4387 //==============================================================================
4388 
4389 
4390 //==============================================================================
4391 //        COG1CON1 Bits
4392 
4393 extern __at(0x0698) __sfr COG1CON1;
4394 
4395 typedef struct
4396   {
4397   unsigned G1POLA               : 1;
4398   unsigned G1POLB               : 1;
4399   unsigned G1POLC               : 1;
4400   unsigned G1POLD               : 1;
4401   unsigned                      : 1;
4402   unsigned                      : 1;
4403   unsigned G1FDBS               : 1;
4404   unsigned G1RDBS               : 1;
4405   } __COG1CON1bits_t;
4406 
4407 extern __at(0x0698) volatile __COG1CON1bits_t COG1CON1bits;
4408 
4409 #define _G1POLA                 0x01
4410 #define _G1POLB                 0x02
4411 #define _G1POLC                 0x04
4412 #define _G1POLD                 0x08
4413 #define _G1FDBS                 0x40
4414 #define _G1RDBS                 0x80
4415 
4416 //==============================================================================
4417 
4418 
4419 //==============================================================================
4420 //        COG1RIS Bits
4421 
4422 extern __at(0x0699) __sfr COG1RIS;
4423 
4424 typedef union
4425   {
4426   struct
4427     {
4428     unsigned G1RIS0             : 1;
4429     unsigned G1RIS1             : 1;
4430     unsigned G1RIS2             : 1;
4431     unsigned G1RIS3             : 1;
4432     unsigned G1RIS4             : 1;
4433     unsigned G1RIS5             : 1;
4434     unsigned G1RIS6             : 1;
4435     unsigned                    : 1;
4436     };
4437 
4438   struct
4439     {
4440     unsigned G1RIS              : 7;
4441     unsigned                    : 1;
4442     };
4443   } __COG1RISbits_t;
4444 
4445 extern __at(0x0699) volatile __COG1RISbits_t COG1RISbits;
4446 
4447 #define _G1RIS0                 0x01
4448 #define _G1RIS1                 0x02
4449 #define _G1RIS2                 0x04
4450 #define _G1RIS3                 0x08
4451 #define _G1RIS4                 0x10
4452 #define _G1RIS5                 0x20
4453 #define _G1RIS6                 0x40
4454 
4455 //==============================================================================
4456 
4457 
4458 //==============================================================================
4459 //        COG1RSIM Bits
4460 
4461 extern __at(0x069A) __sfr COG1RSIM;
4462 
4463 typedef union
4464   {
4465   struct
4466     {
4467     unsigned G1RSIM0            : 1;
4468     unsigned G1RSIM1            : 1;
4469     unsigned G1RSIM2            : 1;
4470     unsigned G1RSIM3            : 1;
4471     unsigned G1RSIM4            : 1;
4472     unsigned G1RSIM5            : 1;
4473     unsigned G1RSIM6            : 1;
4474     unsigned                    : 1;
4475     };
4476 
4477   struct
4478     {
4479     unsigned G1RSIM             : 7;
4480     unsigned                    : 1;
4481     };
4482   } __COG1RSIMbits_t;
4483 
4484 extern __at(0x069A) volatile __COG1RSIMbits_t COG1RSIMbits;
4485 
4486 #define _G1RSIM0                0x01
4487 #define _G1RSIM1                0x02
4488 #define _G1RSIM2                0x04
4489 #define _G1RSIM3                0x08
4490 #define _G1RSIM4                0x10
4491 #define _G1RSIM5                0x20
4492 #define _G1RSIM6                0x40
4493 
4494 //==============================================================================
4495 
4496 
4497 //==============================================================================
4498 //        COG1FIS Bits
4499 
4500 extern __at(0x069B) __sfr COG1FIS;
4501 
4502 typedef union
4503   {
4504   struct
4505     {
4506     unsigned G1FIS0             : 1;
4507     unsigned G1FIS1             : 1;
4508     unsigned G1FIS2             : 1;
4509     unsigned G1FIS3             : 1;
4510     unsigned G1FIS4             : 1;
4511     unsigned G1FIS5             : 1;
4512     unsigned G1FIS6             : 1;
4513     unsigned                    : 1;
4514     };
4515 
4516   struct
4517     {
4518     unsigned G1FIS              : 7;
4519     unsigned                    : 1;
4520     };
4521   } __COG1FISbits_t;
4522 
4523 extern __at(0x069B) volatile __COG1FISbits_t COG1FISbits;
4524 
4525 #define _G1FIS0                 0x01
4526 #define _G1FIS1                 0x02
4527 #define _G1FIS2                 0x04
4528 #define _G1FIS3                 0x08
4529 #define _G1FIS4                 0x10
4530 #define _G1FIS5                 0x20
4531 #define _G1FIS6                 0x40
4532 
4533 //==============================================================================
4534 
4535 
4536 //==============================================================================
4537 //        COG1FSIM Bits
4538 
4539 extern __at(0x069C) __sfr COG1FSIM;
4540 
4541 typedef union
4542   {
4543   struct
4544     {
4545     unsigned G1FSIM0            : 1;
4546     unsigned G1FSIM1            : 1;
4547     unsigned G1FSIM2            : 1;
4548     unsigned G1FSIM3            : 1;
4549     unsigned G1FSIM4            : 1;
4550     unsigned G1FSIM5            : 1;
4551     unsigned G1FSIM6            : 1;
4552     unsigned                    : 1;
4553     };
4554 
4555   struct
4556     {
4557     unsigned G1FSIM             : 7;
4558     unsigned                    : 1;
4559     };
4560   } __COG1FSIMbits_t;
4561 
4562 extern __at(0x069C) volatile __COG1FSIMbits_t COG1FSIMbits;
4563 
4564 #define _G1FSIM0                0x01
4565 #define _G1FSIM1                0x02
4566 #define _G1FSIM2                0x04
4567 #define _G1FSIM3                0x08
4568 #define _G1FSIM4                0x10
4569 #define _G1FSIM5                0x20
4570 #define _G1FSIM6                0x40
4571 
4572 //==============================================================================
4573 
4574 
4575 //==============================================================================
4576 //        COG1ASD0 Bits
4577 
4578 extern __at(0x069D) __sfr COG1ASD0;
4579 
4580 typedef union
4581   {
4582   struct
4583     {
4584     unsigned                    : 1;
4585     unsigned                    : 1;
4586     unsigned G1ASDAC0           : 1;
4587     unsigned G1ASDAC1           : 1;
4588     unsigned G1ASDBD0           : 1;
4589     unsigned G1ASDBD1           : 1;
4590     unsigned G1ARSEN            : 1;
4591     unsigned G1ASE              : 1;
4592     };
4593 
4594   struct
4595     {
4596     unsigned                    : 2;
4597     unsigned G1ASDAC            : 2;
4598     unsigned                    : 4;
4599     };
4600 
4601   struct
4602     {
4603     unsigned                    : 4;
4604     unsigned G1ASDBD            : 2;
4605     unsigned                    : 2;
4606     };
4607   } __COG1ASD0bits_t;
4608 
4609 extern __at(0x069D) volatile __COG1ASD0bits_t COG1ASD0bits;
4610 
4611 #define _G1ASDAC0               0x04
4612 #define _G1ASDAC1               0x08
4613 #define _G1ASDBD0               0x10
4614 #define _G1ASDBD1               0x20
4615 #define _G1ARSEN                0x40
4616 #define _G1ASE                  0x80
4617 
4618 //==============================================================================
4619 
4620 
4621 //==============================================================================
4622 //        COG1ASD1 Bits
4623 
4624 extern __at(0x069E) __sfr COG1ASD1;
4625 
4626 typedef struct
4627   {
4628   unsigned G1AS0E               : 1;
4629   unsigned G1AS1E               : 1;
4630   unsigned G1AS2E               : 1;
4631   unsigned G1AS3E               : 1;
4632   unsigned                      : 1;
4633   unsigned                      : 1;
4634   unsigned                      : 1;
4635   unsigned                      : 1;
4636   } __COG1ASD1bits_t;
4637 
4638 extern __at(0x069E) volatile __COG1ASD1bits_t COG1ASD1bits;
4639 
4640 #define _G1AS0E                 0x01
4641 #define _G1AS1E                 0x02
4642 #define _G1AS2E                 0x04
4643 #define _G1AS3E                 0x08
4644 
4645 //==============================================================================
4646 
4647 
4648 //==============================================================================
4649 //        COG1STR Bits
4650 
4651 extern __at(0x069F) __sfr COG1STR;
4652 
4653 typedef struct
4654   {
4655   unsigned G1STRA               : 1;
4656   unsigned G1STRB               : 1;
4657   unsigned G1STRC               : 1;
4658   unsigned G1STRD               : 1;
4659   unsigned G1SDATA              : 1;
4660   unsigned G1SDATB              : 1;
4661   unsigned G1SDATC              : 1;
4662   unsigned G1SDATD              : 1;
4663   } __COG1STRbits_t;
4664 
4665 extern __at(0x069F) volatile __COG1STRbits_t COG1STRbits;
4666 
4667 #define _G1STRA                 0x01
4668 #define _G1STRB                 0x02
4669 #define _G1STRC                 0x04
4670 #define _G1STRD                 0x08
4671 #define _G1SDATA                0x10
4672 #define _G1SDATB                0x20
4673 #define _G1SDATC                0x40
4674 #define _G1SDATD                0x80
4675 
4676 //==============================================================================
4677 
4678 
4679 //==============================================================================
4680 //        PPSLOCK Bits
4681 
4682 extern __at(0x0E0F) __sfr PPSLOCK;
4683 
4684 typedef struct
4685   {
4686   unsigned PPSLOCKED            : 1;
4687   unsigned                      : 1;
4688   unsigned                      : 1;
4689   unsigned                      : 1;
4690   unsigned                      : 1;
4691   unsigned                      : 1;
4692   unsigned                      : 1;
4693   unsigned                      : 1;
4694   } __PPSLOCKbits_t;
4695 
4696 extern __at(0x0E0F) volatile __PPSLOCKbits_t PPSLOCKbits;
4697 
4698 #define _PPSLOCKED              0x01
4699 
4700 //==============================================================================
4701 
4702 extern __at(0x0E10) __sfr INTPPS;
4703 extern __at(0x0E11) __sfr T0CKIPPS;
4704 extern __at(0x0E12) __sfr T1CKIPPS;
4705 extern __at(0x0E13) __sfr T1GPPS;
4706 extern __at(0x0E14) __sfr CCP1PPS;
4707 extern __at(0x0E15) __sfr CCP2PPS;
4708 extern __at(0x0E17) __sfr COGINPPS;
4709 extern __at(0x0E20) __sfr SSPCLKPPS;
4710 extern __at(0x0E21) __sfr SSPDATPPS;
4711 extern __at(0x0E22) __sfr SSPSSPPS;
4712 extern __at(0x0E24) __sfr RXPPS;
4713 extern __at(0x0E25) __sfr CKPPS;
4714 extern __at(0x0E28) __sfr CLCIN0PPS;
4715 extern __at(0x0E29) __sfr CLCIN1PPS;
4716 extern __at(0x0E2A) __sfr CLCIN2PPS;
4717 extern __at(0x0E2B) __sfr CLCIN3PPS;
4718 extern __at(0x0E90) __sfr RA0PPS;
4719 extern __at(0x0E91) __sfr RA1PPS;
4720 extern __at(0x0E92) __sfr RA2PPS;
4721 extern __at(0x0E94) __sfr RA4PPS;
4722 extern __at(0x0E95) __sfr RA5PPS;
4723 extern __at(0x0EA0) __sfr RC0PPS;
4724 extern __at(0x0EA1) __sfr RC1PPS;
4725 extern __at(0x0EA2) __sfr RC2PPS;
4726 extern __at(0x0EA3) __sfr RC3PPS;
4727 extern __at(0x0EA4) __sfr RC4PPS;
4728 extern __at(0x0EA5) __sfr RC5PPS;
4729 
4730 //==============================================================================
4731 //        CLCDATA Bits
4732 
4733 extern __at(0x0F0F) __sfr CLCDATA;
4734 
4735 typedef struct
4736   {
4737   unsigned MCLC1OUT             : 1;
4738   unsigned MCLC2OUT             : 1;
4739   unsigned MCLC3OUT             : 1;
4740   unsigned                      : 1;
4741   unsigned                      : 1;
4742   unsigned                      : 1;
4743   unsigned                      : 1;
4744   unsigned                      : 1;
4745   } __CLCDATAbits_t;
4746 
4747 extern __at(0x0F0F) volatile __CLCDATAbits_t CLCDATAbits;
4748 
4749 #define _MCLC1OUT               0x01
4750 #define _MCLC2OUT               0x02
4751 #define _MCLC3OUT               0x04
4752 
4753 //==============================================================================
4754 
4755 
4756 //==============================================================================
4757 //        CLC1CON Bits
4758 
4759 extern __at(0x0F10) __sfr CLC1CON;
4760 
4761 typedef union
4762   {
4763   struct
4764     {
4765     unsigned LC1MODE0           : 1;
4766     unsigned LC1MODE1           : 1;
4767     unsigned LC1MODE2           : 1;
4768     unsigned LC1INTN            : 1;
4769     unsigned LC1INTP            : 1;
4770     unsigned LC1OUT             : 1;
4771     unsigned                    : 1;
4772     unsigned LC1EN              : 1;
4773     };
4774 
4775   struct
4776     {
4777     unsigned MODE0              : 1;
4778     unsigned MODE1              : 1;
4779     unsigned MODE2              : 1;
4780     unsigned INTN               : 1;
4781     unsigned INTP               : 1;
4782     unsigned OUT                : 1;
4783     unsigned                    : 1;
4784     unsigned EN                 : 1;
4785     };
4786 
4787   struct
4788     {
4789     unsigned MODE               : 3;
4790     unsigned                    : 5;
4791     };
4792 
4793   struct
4794     {
4795     unsigned LC1MODE            : 3;
4796     unsigned                    : 5;
4797     };
4798   } __CLC1CONbits_t;
4799 
4800 extern __at(0x0F10) volatile __CLC1CONbits_t CLC1CONbits;
4801 
4802 #define _LC1MODE0               0x01
4803 #define _MODE0                  0x01
4804 #define _LC1MODE1               0x02
4805 #define _MODE1                  0x02
4806 #define _LC1MODE2               0x04
4807 #define _MODE2                  0x04
4808 #define _LC1INTN                0x08
4809 #define _INTN                   0x08
4810 #define _LC1INTP                0x10
4811 #define _INTP                   0x10
4812 #define _LC1OUT                 0x20
4813 #define _OUT                    0x20
4814 #define _LC1EN                  0x80
4815 #define _EN                     0x80
4816 
4817 //==============================================================================
4818 
4819 
4820 //==============================================================================
4821 //        CLC1POL Bits
4822 
4823 extern __at(0x0F11) __sfr CLC1POL;
4824 
4825 typedef union
4826   {
4827   struct
4828     {
4829     unsigned LC1G1POL           : 1;
4830     unsigned LC1G2POL           : 1;
4831     unsigned LC1G3POL           : 1;
4832     unsigned LC1G4POL           : 1;
4833     unsigned                    : 1;
4834     unsigned                    : 1;
4835     unsigned                    : 1;
4836     unsigned LC1POL             : 1;
4837     };
4838 
4839   struct
4840     {
4841     unsigned G1POL              : 1;
4842     unsigned G2POL              : 1;
4843     unsigned G3POL              : 1;
4844     unsigned G4POL              : 1;
4845     unsigned                    : 1;
4846     unsigned                    : 1;
4847     unsigned                    : 1;
4848     unsigned POL                : 1;
4849     };
4850   } __CLC1POLbits_t;
4851 
4852 extern __at(0x0F11) volatile __CLC1POLbits_t CLC1POLbits;
4853 
4854 #define _LC1G1POL               0x01
4855 #define _G1POL                  0x01
4856 #define _LC1G2POL               0x02
4857 #define _G2POL                  0x02
4858 #define _LC1G3POL               0x04
4859 #define _G3POL                  0x04
4860 #define _LC1G4POL               0x08
4861 #define _G4POL                  0x08
4862 #define _LC1POL                 0x80
4863 #define _POL                    0x80
4864 
4865 //==============================================================================
4866 
4867 
4868 //==============================================================================
4869 //        CLC1SEL0 Bits
4870 
4871 extern __at(0x0F12) __sfr CLC1SEL0;
4872 
4873 typedef union
4874   {
4875   struct
4876     {
4877     unsigned LC1D1S0            : 1;
4878     unsigned LC1D1S1            : 1;
4879     unsigned LC1D1S2            : 1;
4880     unsigned LC1D1S3            : 1;
4881     unsigned LC1D1S4            : 1;
4882     unsigned                    : 1;
4883     unsigned                    : 1;
4884     unsigned                    : 1;
4885     };
4886 
4887   struct
4888     {
4889     unsigned D1S0               : 1;
4890     unsigned D1S1               : 1;
4891     unsigned D1S2               : 1;
4892     unsigned D1S3               : 1;
4893     unsigned D1S4               : 1;
4894     unsigned                    : 1;
4895     unsigned                    : 1;
4896     unsigned                    : 1;
4897     };
4898 
4899   struct
4900     {
4901     unsigned LC1D1S             : 5;
4902     unsigned                    : 3;
4903     };
4904 
4905   struct
4906     {
4907     unsigned D1S                : 5;
4908     unsigned                    : 3;
4909     };
4910   } __CLC1SEL0bits_t;
4911 
4912 extern __at(0x0F12) volatile __CLC1SEL0bits_t CLC1SEL0bits;
4913 
4914 #define _LC1D1S0                0x01
4915 #define _D1S0                   0x01
4916 #define _LC1D1S1                0x02
4917 #define _D1S1                   0x02
4918 #define _LC1D1S2                0x04
4919 #define _D1S2                   0x04
4920 #define _LC1D1S3                0x08
4921 #define _D1S3                   0x08
4922 #define _LC1D1S4                0x10
4923 #define _D1S4                   0x10
4924 
4925 //==============================================================================
4926 
4927 
4928 //==============================================================================
4929 //        CLC1SEL1 Bits
4930 
4931 extern __at(0x0F13) __sfr CLC1SEL1;
4932 
4933 typedef union
4934   {
4935   struct
4936     {
4937     unsigned LC1D2S0            : 1;
4938     unsigned LC1D2S1            : 1;
4939     unsigned LC1D2S2            : 1;
4940     unsigned LC1D2S3            : 1;
4941     unsigned LC1D2S4            : 1;
4942     unsigned                    : 1;
4943     unsigned                    : 1;
4944     unsigned                    : 1;
4945     };
4946 
4947   struct
4948     {
4949     unsigned D2S0               : 1;
4950     unsigned D2S1               : 1;
4951     unsigned D2S2               : 1;
4952     unsigned D2S3               : 1;
4953     unsigned D2S4               : 1;
4954     unsigned                    : 1;
4955     unsigned                    : 1;
4956     unsigned                    : 1;
4957     };
4958 
4959   struct
4960     {
4961     unsigned LC1D2S             : 5;
4962     unsigned                    : 3;
4963     };
4964 
4965   struct
4966     {
4967     unsigned D2S                : 5;
4968     unsigned                    : 3;
4969     };
4970   } __CLC1SEL1bits_t;
4971 
4972 extern __at(0x0F13) volatile __CLC1SEL1bits_t CLC1SEL1bits;
4973 
4974 #define _LC1D2S0                0x01
4975 #define _D2S0                   0x01
4976 #define _LC1D2S1                0x02
4977 #define _D2S1                   0x02
4978 #define _LC1D2S2                0x04
4979 #define _D2S2                   0x04
4980 #define _LC1D2S3                0x08
4981 #define _D2S3                   0x08
4982 #define _LC1D2S4                0x10
4983 #define _D2S4                   0x10
4984 
4985 //==============================================================================
4986 
4987 
4988 //==============================================================================
4989 //        CLC1SEL2 Bits
4990 
4991 extern __at(0x0F14) __sfr CLC1SEL2;
4992 
4993 typedef union
4994   {
4995   struct
4996     {
4997     unsigned LC1D3S0            : 1;
4998     unsigned LC1D3S1            : 1;
4999     unsigned LC1D3S2            : 1;
5000     unsigned LC1D3S3            : 1;
5001     unsigned LC1D3S4            : 1;
5002     unsigned                    : 1;
5003     unsigned                    : 1;
5004     unsigned                    : 1;
5005     };
5006 
5007   struct
5008     {
5009     unsigned D3S0               : 1;
5010     unsigned D3S1               : 1;
5011     unsigned D3S2               : 1;
5012     unsigned D3S3               : 1;
5013     unsigned D3S4               : 1;
5014     unsigned                    : 1;
5015     unsigned                    : 1;
5016     unsigned                    : 1;
5017     };
5018 
5019   struct
5020     {
5021     unsigned LC1D3S             : 5;
5022     unsigned                    : 3;
5023     };
5024 
5025   struct
5026     {
5027     unsigned D3S                : 5;
5028     unsigned                    : 3;
5029     };
5030   } __CLC1SEL2bits_t;
5031 
5032 extern __at(0x0F14) volatile __CLC1SEL2bits_t CLC1SEL2bits;
5033 
5034 #define _LC1D3S0                0x01
5035 #define _D3S0                   0x01
5036 #define _LC1D3S1                0x02
5037 #define _D3S1                   0x02
5038 #define _LC1D3S2                0x04
5039 #define _D3S2                   0x04
5040 #define _LC1D3S3                0x08
5041 #define _D3S3                   0x08
5042 #define _LC1D3S4                0x10
5043 #define _D3S4                   0x10
5044 
5045 //==============================================================================
5046 
5047 
5048 //==============================================================================
5049 //        CLC1SEL3 Bits
5050 
5051 extern __at(0x0F15) __sfr CLC1SEL3;
5052 
5053 typedef union
5054   {
5055   struct
5056     {
5057     unsigned LC1D4S0            : 1;
5058     unsigned LC1D4S1            : 1;
5059     unsigned LC1D4S2            : 1;
5060     unsigned LC1D4S3            : 1;
5061     unsigned LC1D4S4            : 1;
5062     unsigned                    : 1;
5063     unsigned                    : 1;
5064     unsigned                    : 1;
5065     };
5066 
5067   struct
5068     {
5069     unsigned D4S0               : 1;
5070     unsigned D4S1               : 1;
5071     unsigned D4S2               : 1;
5072     unsigned D4S3               : 1;
5073     unsigned D4S4               : 1;
5074     unsigned                    : 1;
5075     unsigned                    : 1;
5076     unsigned                    : 1;
5077     };
5078 
5079   struct
5080     {
5081     unsigned D4S                : 5;
5082     unsigned                    : 3;
5083     };
5084 
5085   struct
5086     {
5087     unsigned LC1D4S             : 5;
5088     unsigned                    : 3;
5089     };
5090   } __CLC1SEL3bits_t;
5091 
5092 extern __at(0x0F15) volatile __CLC1SEL3bits_t CLC1SEL3bits;
5093 
5094 #define _LC1D4S0                0x01
5095 #define _D4S0                   0x01
5096 #define _LC1D4S1                0x02
5097 #define _D4S1                   0x02
5098 #define _LC1D4S2                0x04
5099 #define _D4S2                   0x04
5100 #define _LC1D4S3                0x08
5101 #define _D4S3                   0x08
5102 #define _LC1D4S4                0x10
5103 #define _D4S4                   0x10
5104 
5105 //==============================================================================
5106 
5107 
5108 //==============================================================================
5109 //        CLC1GLS0 Bits
5110 
5111 extern __at(0x0F16) __sfr CLC1GLS0;
5112 
5113 typedef union
5114   {
5115   struct
5116     {
5117     unsigned LC1G1D1N           : 1;
5118     unsigned LC1G1D1T           : 1;
5119     unsigned LC1G1D2N           : 1;
5120     unsigned LC1G1D2T           : 1;
5121     unsigned LC1G1D3N           : 1;
5122     unsigned LC1G1D3T           : 1;
5123     unsigned LC1G1D4N           : 1;
5124     unsigned LC1G1D4T           : 1;
5125     };
5126 
5127   struct
5128     {
5129     unsigned D1N                : 1;
5130     unsigned D1T                : 1;
5131     unsigned D2N                : 1;
5132     unsigned D2T                : 1;
5133     unsigned D3N                : 1;
5134     unsigned D3T                : 1;
5135     unsigned D4N                : 1;
5136     unsigned D4T                : 1;
5137     };
5138   } __CLC1GLS0bits_t;
5139 
5140 extern __at(0x0F16) volatile __CLC1GLS0bits_t CLC1GLS0bits;
5141 
5142 #define _LC1G1D1N               0x01
5143 #define _D1N                    0x01
5144 #define _LC1G1D1T               0x02
5145 #define _D1T                    0x02
5146 #define _LC1G1D2N               0x04
5147 #define _D2N                    0x04
5148 #define _LC1G1D2T               0x08
5149 #define _D2T                    0x08
5150 #define _LC1G1D3N               0x10
5151 #define _D3N                    0x10
5152 #define _LC1G1D3T               0x20
5153 #define _D3T                    0x20
5154 #define _LC1G1D4N               0x40
5155 #define _D4N                    0x40
5156 #define _LC1G1D4T               0x80
5157 #define _D4T                    0x80
5158 
5159 //==============================================================================
5160 
5161 
5162 //==============================================================================
5163 //        CLC1GLS1 Bits
5164 
5165 extern __at(0x0F17) __sfr CLC1GLS1;
5166 
5167 typedef union
5168   {
5169   struct
5170     {
5171     unsigned LC1G2D1N           : 1;
5172     unsigned LC1G2D1T           : 1;
5173     unsigned LC1G2D2N           : 1;
5174     unsigned LC1G2D2T           : 1;
5175     unsigned LC1G2D3N           : 1;
5176     unsigned LC1G2D3T           : 1;
5177     unsigned LC1G2D4N           : 1;
5178     unsigned LC1G2D4T           : 1;
5179     };
5180 
5181   struct
5182     {
5183     unsigned D1N                : 1;
5184     unsigned D1T                : 1;
5185     unsigned D2N                : 1;
5186     unsigned D2T                : 1;
5187     unsigned D3N                : 1;
5188     unsigned D3T                : 1;
5189     unsigned D4N                : 1;
5190     unsigned D4T                : 1;
5191     };
5192   } __CLC1GLS1bits_t;
5193 
5194 extern __at(0x0F17) volatile __CLC1GLS1bits_t CLC1GLS1bits;
5195 
5196 #define _CLC1GLS1_LC1G2D1N      0x01
5197 #define _CLC1GLS1_D1N           0x01
5198 #define _CLC1GLS1_LC1G2D1T      0x02
5199 #define _CLC1GLS1_D1T           0x02
5200 #define _CLC1GLS1_LC1G2D2N      0x04
5201 #define _CLC1GLS1_D2N           0x04
5202 #define _CLC1GLS1_LC1G2D2T      0x08
5203 #define _CLC1GLS1_D2T           0x08
5204 #define _CLC1GLS1_LC1G2D3N      0x10
5205 #define _CLC1GLS1_D3N           0x10
5206 #define _CLC1GLS1_LC1G2D3T      0x20
5207 #define _CLC1GLS1_D3T           0x20
5208 #define _CLC1GLS1_LC1G2D4N      0x40
5209 #define _CLC1GLS1_D4N           0x40
5210 #define _CLC1GLS1_LC1G2D4T      0x80
5211 #define _CLC1GLS1_D4T           0x80
5212 
5213 //==============================================================================
5214 
5215 
5216 //==============================================================================
5217 //        CLC1GLS2 Bits
5218 
5219 extern __at(0x0F18) __sfr CLC1GLS2;
5220 
5221 typedef union
5222   {
5223   struct
5224     {
5225     unsigned LC1G3D1N           : 1;
5226     unsigned LC1G3D1T           : 1;
5227     unsigned LC1G3D2N           : 1;
5228     unsigned LC1G3D2T           : 1;
5229     unsigned LC1G3D3N           : 1;
5230     unsigned LC1G3D3T           : 1;
5231     unsigned LC1G3D4N           : 1;
5232     unsigned LC1G3D4T           : 1;
5233     };
5234 
5235   struct
5236     {
5237     unsigned D1N                : 1;
5238     unsigned D1T                : 1;
5239     unsigned D2N                : 1;
5240     unsigned D2T                : 1;
5241     unsigned D3N                : 1;
5242     unsigned D3T                : 1;
5243     unsigned D4N                : 1;
5244     unsigned D4T                : 1;
5245     };
5246   } __CLC1GLS2bits_t;
5247 
5248 extern __at(0x0F18) volatile __CLC1GLS2bits_t CLC1GLS2bits;
5249 
5250 #define _CLC1GLS2_LC1G3D1N      0x01
5251 #define _CLC1GLS2_D1N           0x01
5252 #define _CLC1GLS2_LC1G3D1T      0x02
5253 #define _CLC1GLS2_D1T           0x02
5254 #define _CLC1GLS2_LC1G3D2N      0x04
5255 #define _CLC1GLS2_D2N           0x04
5256 #define _CLC1GLS2_LC1G3D2T      0x08
5257 #define _CLC1GLS2_D2T           0x08
5258 #define _CLC1GLS2_LC1G3D3N      0x10
5259 #define _CLC1GLS2_D3N           0x10
5260 #define _CLC1GLS2_LC1G3D3T      0x20
5261 #define _CLC1GLS2_D3T           0x20
5262 #define _CLC1GLS2_LC1G3D4N      0x40
5263 #define _CLC1GLS2_D4N           0x40
5264 #define _CLC1GLS2_LC1G3D4T      0x80
5265 #define _CLC1GLS2_D4T           0x80
5266 
5267 //==============================================================================
5268 
5269 
5270 //==============================================================================
5271 //        CLC1GLS3 Bits
5272 
5273 extern __at(0x0F19) __sfr CLC1GLS3;
5274 
5275 typedef union
5276   {
5277   struct
5278     {
5279     unsigned LC1G4D1N           : 1;
5280     unsigned LC1G4D1T           : 1;
5281     unsigned LC1G4D2N           : 1;
5282     unsigned LC1G4D2T           : 1;
5283     unsigned LC1G4D3N           : 1;
5284     unsigned LC1G4D3T           : 1;
5285     unsigned LC1G4D4N           : 1;
5286     unsigned LC1G4D4T           : 1;
5287     };
5288 
5289   struct
5290     {
5291     unsigned G4D1N              : 1;
5292     unsigned G4D1T              : 1;
5293     unsigned G4D2N              : 1;
5294     unsigned G4D2T              : 1;
5295     unsigned G4D3N              : 1;
5296     unsigned G4D3T              : 1;
5297     unsigned G4D4N              : 1;
5298     unsigned G4D4T              : 1;
5299     };
5300   } __CLC1GLS3bits_t;
5301 
5302 extern __at(0x0F19) volatile __CLC1GLS3bits_t CLC1GLS3bits;
5303 
5304 #define _LC1G4D1N               0x01
5305 #define _G4D1N                  0x01
5306 #define _LC1G4D1T               0x02
5307 #define _G4D1T                  0x02
5308 #define _LC1G4D2N               0x04
5309 #define _G4D2N                  0x04
5310 #define _LC1G4D2T               0x08
5311 #define _G4D2T                  0x08
5312 #define _LC1G4D3N               0x10
5313 #define _G4D3N                  0x10
5314 #define _LC1G4D3T               0x20
5315 #define _G4D3T                  0x20
5316 #define _LC1G4D4N               0x40
5317 #define _G4D4N                  0x40
5318 #define _LC1G4D4T               0x80
5319 #define _G4D4T                  0x80
5320 
5321 //==============================================================================
5322 
5323 
5324 //==============================================================================
5325 //        CLC2CON Bits
5326 
5327 extern __at(0x0F1A) __sfr CLC2CON;
5328 
5329 typedef union
5330   {
5331   struct
5332     {
5333     unsigned LC2MODE0           : 1;
5334     unsigned LC2MODE1           : 1;
5335     unsigned LC2MODE2           : 1;
5336     unsigned LC2INTN            : 1;
5337     unsigned LC2INTP            : 1;
5338     unsigned LC2OUT             : 1;
5339     unsigned                    : 1;
5340     unsigned LC2EN              : 1;
5341     };
5342 
5343   struct
5344     {
5345     unsigned MODE0              : 1;
5346     unsigned MODE1              : 1;
5347     unsigned MODE2              : 1;
5348     unsigned INTN               : 1;
5349     unsigned INTP               : 1;
5350     unsigned OUT                : 1;
5351     unsigned                    : 1;
5352     unsigned EN                 : 1;
5353     };
5354 
5355   struct
5356     {
5357     unsigned MODE               : 3;
5358     unsigned                    : 5;
5359     };
5360 
5361   struct
5362     {
5363     unsigned LC2MODE            : 3;
5364     unsigned                    : 5;
5365     };
5366   } __CLC2CONbits_t;
5367 
5368 extern __at(0x0F1A) volatile __CLC2CONbits_t CLC2CONbits;
5369 
5370 #define _CLC2CON_LC2MODE0       0x01
5371 #define _CLC2CON_MODE0          0x01
5372 #define _CLC2CON_LC2MODE1       0x02
5373 #define _CLC2CON_MODE1          0x02
5374 #define _CLC2CON_LC2MODE2       0x04
5375 #define _CLC2CON_MODE2          0x04
5376 #define _CLC2CON_LC2INTN        0x08
5377 #define _CLC2CON_INTN           0x08
5378 #define _CLC2CON_LC2INTP        0x10
5379 #define _CLC2CON_INTP           0x10
5380 #define _CLC2CON_LC2OUT         0x20
5381 #define _CLC2CON_OUT            0x20
5382 #define _CLC2CON_LC2EN          0x80
5383 #define _CLC2CON_EN             0x80
5384 
5385 //==============================================================================
5386 
5387 
5388 //==============================================================================
5389 //        CLC2POL Bits
5390 
5391 extern __at(0x0F1B) __sfr CLC2POL;
5392 
5393 typedef union
5394   {
5395   struct
5396     {
5397     unsigned LC2G1POL           : 1;
5398     unsigned LC2G2POL           : 1;
5399     unsigned LC2G3POL           : 1;
5400     unsigned LC2G4POL           : 1;
5401     unsigned                    : 1;
5402     unsigned                    : 1;
5403     unsigned                    : 1;
5404     unsigned LC2POL             : 1;
5405     };
5406 
5407   struct
5408     {
5409     unsigned G1POL              : 1;
5410     unsigned G2POL              : 1;
5411     unsigned G3POL              : 1;
5412     unsigned G4POL              : 1;
5413     unsigned                    : 1;
5414     unsigned                    : 1;
5415     unsigned                    : 1;
5416     unsigned POL                : 1;
5417     };
5418   } __CLC2POLbits_t;
5419 
5420 extern __at(0x0F1B) volatile __CLC2POLbits_t CLC2POLbits;
5421 
5422 #define _CLC2POL_LC2G1POL       0x01
5423 #define _CLC2POL_G1POL          0x01
5424 #define _CLC2POL_LC2G2POL       0x02
5425 #define _CLC2POL_G2POL          0x02
5426 #define _CLC2POL_LC2G3POL       0x04
5427 #define _CLC2POL_G3POL          0x04
5428 #define _CLC2POL_LC2G4POL       0x08
5429 #define _CLC2POL_G4POL          0x08
5430 #define _CLC2POL_LC2POL         0x80
5431 #define _CLC2POL_POL            0x80
5432 
5433 //==============================================================================
5434 
5435 
5436 //==============================================================================
5437 //        CLC2SEL0 Bits
5438 
5439 extern __at(0x0F1C) __sfr CLC2SEL0;
5440 
5441 typedef union
5442   {
5443   struct
5444     {
5445     unsigned LC2D1S0            : 1;
5446     unsigned LC2D1S1            : 1;
5447     unsigned LC2D1S2            : 1;
5448     unsigned LC2D1S3            : 1;
5449     unsigned LC2D1S4            : 1;
5450     unsigned                    : 1;
5451     unsigned                    : 1;
5452     unsigned                    : 1;
5453     };
5454 
5455   struct
5456     {
5457     unsigned D1S0               : 1;
5458     unsigned D1S1               : 1;
5459     unsigned D1S2               : 1;
5460     unsigned D1S3               : 1;
5461     unsigned D1S4               : 1;
5462     unsigned                    : 1;
5463     unsigned                    : 1;
5464     unsigned                    : 1;
5465     };
5466 
5467   struct
5468     {
5469     unsigned D1S                : 5;
5470     unsigned                    : 3;
5471     };
5472 
5473   struct
5474     {
5475     unsigned LC2D1S             : 5;
5476     unsigned                    : 3;
5477     };
5478   } __CLC2SEL0bits_t;
5479 
5480 extern __at(0x0F1C) volatile __CLC2SEL0bits_t CLC2SEL0bits;
5481 
5482 #define _CLC2SEL0_LC2D1S0       0x01
5483 #define _CLC2SEL0_D1S0          0x01
5484 #define _CLC2SEL0_LC2D1S1       0x02
5485 #define _CLC2SEL0_D1S1          0x02
5486 #define _CLC2SEL0_LC2D1S2       0x04
5487 #define _CLC2SEL0_D1S2          0x04
5488 #define _CLC2SEL0_LC2D1S3       0x08
5489 #define _CLC2SEL0_D1S3          0x08
5490 #define _CLC2SEL0_LC2D1S4       0x10
5491 #define _CLC2SEL0_D1S4          0x10
5492 
5493 //==============================================================================
5494 
5495 
5496 //==============================================================================
5497 //        CLC2SEL1 Bits
5498 
5499 extern __at(0x0F1D) __sfr CLC2SEL1;
5500 
5501 typedef union
5502   {
5503   struct
5504     {
5505     unsigned LC2D2S0            : 1;
5506     unsigned LC2D2S1            : 1;
5507     unsigned LC2D2S2            : 1;
5508     unsigned LC2D2S3            : 1;
5509     unsigned LC2D2S4            : 1;
5510     unsigned                    : 1;
5511     unsigned                    : 1;
5512     unsigned                    : 1;
5513     };
5514 
5515   struct
5516     {
5517     unsigned D2S0               : 1;
5518     unsigned D2S1               : 1;
5519     unsigned D2S2               : 1;
5520     unsigned D2S3               : 1;
5521     unsigned D2S4               : 1;
5522     unsigned                    : 1;
5523     unsigned                    : 1;
5524     unsigned                    : 1;
5525     };
5526 
5527   struct
5528     {
5529     unsigned LC2D2S             : 5;
5530     unsigned                    : 3;
5531     };
5532 
5533   struct
5534     {
5535     unsigned D2S                : 5;
5536     unsigned                    : 3;
5537     };
5538   } __CLC2SEL1bits_t;
5539 
5540 extern __at(0x0F1D) volatile __CLC2SEL1bits_t CLC2SEL1bits;
5541 
5542 #define _CLC2SEL1_LC2D2S0       0x01
5543 #define _CLC2SEL1_D2S0          0x01
5544 #define _CLC2SEL1_LC2D2S1       0x02
5545 #define _CLC2SEL1_D2S1          0x02
5546 #define _CLC2SEL1_LC2D2S2       0x04
5547 #define _CLC2SEL1_D2S2          0x04
5548 #define _CLC2SEL1_LC2D2S3       0x08
5549 #define _CLC2SEL1_D2S3          0x08
5550 #define _CLC2SEL1_LC2D2S4       0x10
5551 #define _CLC2SEL1_D2S4          0x10
5552 
5553 //==============================================================================
5554 
5555 
5556 //==============================================================================
5557 //        CLC2SEL2 Bits
5558 
5559 extern __at(0x0F1E) __sfr CLC2SEL2;
5560 
5561 typedef union
5562   {
5563   struct
5564     {
5565     unsigned LC2D3S0            : 1;
5566     unsigned LC2D3S1            : 1;
5567     unsigned LC2D3S2            : 1;
5568     unsigned LC2D3S3            : 1;
5569     unsigned LC2D3S4            : 1;
5570     unsigned                    : 1;
5571     unsigned                    : 1;
5572     unsigned                    : 1;
5573     };
5574 
5575   struct
5576     {
5577     unsigned D3S0               : 1;
5578     unsigned D3S1               : 1;
5579     unsigned D3S2               : 1;
5580     unsigned D3S3               : 1;
5581     unsigned D3S4               : 1;
5582     unsigned                    : 1;
5583     unsigned                    : 1;
5584     unsigned                    : 1;
5585     };
5586 
5587   struct
5588     {
5589     unsigned LC2D3S             : 5;
5590     unsigned                    : 3;
5591     };
5592 
5593   struct
5594     {
5595     unsigned D3S                : 5;
5596     unsigned                    : 3;
5597     };
5598   } __CLC2SEL2bits_t;
5599 
5600 extern __at(0x0F1E) volatile __CLC2SEL2bits_t CLC2SEL2bits;
5601 
5602 #define _CLC2SEL2_LC2D3S0       0x01
5603 #define _CLC2SEL2_D3S0          0x01
5604 #define _CLC2SEL2_LC2D3S1       0x02
5605 #define _CLC2SEL2_D3S1          0x02
5606 #define _CLC2SEL2_LC2D3S2       0x04
5607 #define _CLC2SEL2_D3S2          0x04
5608 #define _CLC2SEL2_LC2D3S3       0x08
5609 #define _CLC2SEL2_D3S3          0x08
5610 #define _CLC2SEL2_LC2D3S4       0x10
5611 #define _CLC2SEL2_D3S4          0x10
5612 
5613 //==============================================================================
5614 
5615 
5616 //==============================================================================
5617 //        CLC2SEL3 Bits
5618 
5619 extern __at(0x0F1F) __sfr CLC2SEL3;
5620 
5621 typedef union
5622   {
5623   struct
5624     {
5625     unsigned LC2D4S0            : 1;
5626     unsigned LC2D4S1            : 1;
5627     unsigned LC2D4S2            : 1;
5628     unsigned LC2D4S3            : 1;
5629     unsigned LC2D4S4            : 1;
5630     unsigned                    : 1;
5631     unsigned                    : 1;
5632     unsigned                    : 1;
5633     };
5634 
5635   struct
5636     {
5637     unsigned D4S0               : 1;
5638     unsigned D4S1               : 1;
5639     unsigned D4S2               : 1;
5640     unsigned D4S3               : 1;
5641     unsigned D4S4               : 1;
5642     unsigned                    : 1;
5643     unsigned                    : 1;
5644     unsigned                    : 1;
5645     };
5646 
5647   struct
5648     {
5649     unsigned LC2D4S             : 5;
5650     unsigned                    : 3;
5651     };
5652 
5653   struct
5654     {
5655     unsigned D4S                : 5;
5656     unsigned                    : 3;
5657     };
5658   } __CLC2SEL3bits_t;
5659 
5660 extern __at(0x0F1F) volatile __CLC2SEL3bits_t CLC2SEL3bits;
5661 
5662 #define _CLC2SEL3_LC2D4S0       0x01
5663 #define _CLC2SEL3_D4S0          0x01
5664 #define _CLC2SEL3_LC2D4S1       0x02
5665 #define _CLC2SEL3_D4S1          0x02
5666 #define _CLC2SEL3_LC2D4S2       0x04
5667 #define _CLC2SEL3_D4S2          0x04
5668 #define _CLC2SEL3_LC2D4S3       0x08
5669 #define _CLC2SEL3_D4S3          0x08
5670 #define _CLC2SEL3_LC2D4S4       0x10
5671 #define _CLC2SEL3_D4S4          0x10
5672 
5673 //==============================================================================
5674 
5675 
5676 //==============================================================================
5677 //        CLC2GLS0 Bits
5678 
5679 extern __at(0x0F20) __sfr CLC2GLS0;
5680 
5681 typedef union
5682   {
5683   struct
5684     {
5685     unsigned LC2G1D1N           : 1;
5686     unsigned LC2G1D1T           : 1;
5687     unsigned LC2G1D2N           : 1;
5688     unsigned LC2G1D2T           : 1;
5689     unsigned LC2G1D3N           : 1;
5690     unsigned LC2G1D3T           : 1;
5691     unsigned LC2G1D4N           : 1;
5692     unsigned LC2G1D4T           : 1;
5693     };
5694 
5695   struct
5696     {
5697     unsigned D1N                : 1;
5698     unsigned D1T                : 1;
5699     unsigned D2N                : 1;
5700     unsigned D2T                : 1;
5701     unsigned D3N                : 1;
5702     unsigned D3T                : 1;
5703     unsigned D4N                : 1;
5704     unsigned D4T                : 1;
5705     };
5706   } __CLC2GLS0bits_t;
5707 
5708 extern __at(0x0F20) volatile __CLC2GLS0bits_t CLC2GLS0bits;
5709 
5710 #define _CLC2GLS0_LC2G1D1N      0x01
5711 #define _CLC2GLS0_D1N           0x01
5712 #define _CLC2GLS0_LC2G1D1T      0x02
5713 #define _CLC2GLS0_D1T           0x02
5714 #define _CLC2GLS0_LC2G1D2N      0x04
5715 #define _CLC2GLS0_D2N           0x04
5716 #define _CLC2GLS0_LC2G1D2T      0x08
5717 #define _CLC2GLS0_D2T           0x08
5718 #define _CLC2GLS0_LC2G1D3N      0x10
5719 #define _CLC2GLS0_D3N           0x10
5720 #define _CLC2GLS0_LC2G1D3T      0x20
5721 #define _CLC2GLS0_D3T           0x20
5722 #define _CLC2GLS0_LC2G1D4N      0x40
5723 #define _CLC2GLS0_D4N           0x40
5724 #define _CLC2GLS0_LC2G1D4T      0x80
5725 #define _CLC2GLS0_D4T           0x80
5726 
5727 //==============================================================================
5728 
5729 
5730 //==============================================================================
5731 //        CLC2GLS1 Bits
5732 
5733 extern __at(0x0F21) __sfr CLC2GLS1;
5734 
5735 typedef union
5736   {
5737   struct
5738     {
5739     unsigned LC2G2D1N           : 1;
5740     unsigned LC2G2D1T           : 1;
5741     unsigned LC2G2D2N           : 1;
5742     unsigned LC2G2D2T           : 1;
5743     unsigned LC2G2D3N           : 1;
5744     unsigned LC2G2D3T           : 1;
5745     unsigned LC2G2D4N           : 1;
5746     unsigned LC2G2D4T           : 1;
5747     };
5748 
5749   struct
5750     {
5751     unsigned D1N                : 1;
5752     unsigned D1T                : 1;
5753     unsigned D2N                : 1;
5754     unsigned D2T                : 1;
5755     unsigned D3N                : 1;
5756     unsigned D3T                : 1;
5757     unsigned D4N                : 1;
5758     unsigned D4T                : 1;
5759     };
5760   } __CLC2GLS1bits_t;
5761 
5762 extern __at(0x0F21) volatile __CLC2GLS1bits_t CLC2GLS1bits;
5763 
5764 #define _CLC2GLS1_LC2G2D1N      0x01
5765 #define _CLC2GLS1_D1N           0x01
5766 #define _CLC2GLS1_LC2G2D1T      0x02
5767 #define _CLC2GLS1_D1T           0x02
5768 #define _CLC2GLS1_LC2G2D2N      0x04
5769 #define _CLC2GLS1_D2N           0x04
5770 #define _CLC2GLS1_LC2G2D2T      0x08
5771 #define _CLC2GLS1_D2T           0x08
5772 #define _CLC2GLS1_LC2G2D3N      0x10
5773 #define _CLC2GLS1_D3N           0x10
5774 #define _CLC2GLS1_LC2G2D3T      0x20
5775 #define _CLC2GLS1_D3T           0x20
5776 #define _CLC2GLS1_LC2G2D4N      0x40
5777 #define _CLC2GLS1_D4N           0x40
5778 #define _CLC2GLS1_LC2G2D4T      0x80
5779 #define _CLC2GLS1_D4T           0x80
5780 
5781 //==============================================================================
5782 
5783 
5784 //==============================================================================
5785 //        CLC2GLS2 Bits
5786 
5787 extern __at(0x0F22) __sfr CLC2GLS2;
5788 
5789 typedef union
5790   {
5791   struct
5792     {
5793     unsigned LC2G3D1N           : 1;
5794     unsigned LC2G3D1T           : 1;
5795     unsigned LC2G3D2N           : 1;
5796     unsigned LC2G3D2T           : 1;
5797     unsigned LC2G3D3N           : 1;
5798     unsigned LC2G3D3T           : 1;
5799     unsigned LC2G3D4N           : 1;
5800     unsigned LC2G3D4T           : 1;
5801     };
5802 
5803   struct
5804     {
5805     unsigned D1N                : 1;
5806     unsigned D1T                : 1;
5807     unsigned D2N                : 1;
5808     unsigned D2T                : 1;
5809     unsigned D3N                : 1;
5810     unsigned D3T                : 1;
5811     unsigned D4N                : 1;
5812     unsigned D4T                : 1;
5813     };
5814   } __CLC2GLS2bits_t;
5815 
5816 extern __at(0x0F22) volatile __CLC2GLS2bits_t CLC2GLS2bits;
5817 
5818 #define _CLC2GLS2_LC2G3D1N      0x01
5819 #define _CLC2GLS2_D1N           0x01
5820 #define _CLC2GLS2_LC2G3D1T      0x02
5821 #define _CLC2GLS2_D1T           0x02
5822 #define _CLC2GLS2_LC2G3D2N      0x04
5823 #define _CLC2GLS2_D2N           0x04
5824 #define _CLC2GLS2_LC2G3D2T      0x08
5825 #define _CLC2GLS2_D2T           0x08
5826 #define _CLC2GLS2_LC2G3D3N      0x10
5827 #define _CLC2GLS2_D3N           0x10
5828 #define _CLC2GLS2_LC2G3D3T      0x20
5829 #define _CLC2GLS2_D3T           0x20
5830 #define _CLC2GLS2_LC2G3D4N      0x40
5831 #define _CLC2GLS2_D4N           0x40
5832 #define _CLC2GLS2_LC2G3D4T      0x80
5833 #define _CLC2GLS2_D4T           0x80
5834 
5835 //==============================================================================
5836 
5837 
5838 //==============================================================================
5839 //        CLC2GLS3 Bits
5840 
5841 extern __at(0x0F23) __sfr CLC2GLS3;
5842 
5843 typedef union
5844   {
5845   struct
5846     {
5847     unsigned LC2G4D1N           : 1;
5848     unsigned LC2G4D1T           : 1;
5849     unsigned LC2G4D2N           : 1;
5850     unsigned LC2G4D2T           : 1;
5851     unsigned LC2G4D3N           : 1;
5852     unsigned LC2G4D3T           : 1;
5853     unsigned LC2G4D4N           : 1;
5854     unsigned LC2G4D4T           : 1;
5855     };
5856 
5857   struct
5858     {
5859     unsigned G4D1N              : 1;
5860     unsigned G4D1T              : 1;
5861     unsigned G4D2N              : 1;
5862     unsigned G4D2T              : 1;
5863     unsigned G4D3N              : 1;
5864     unsigned G4D3T              : 1;
5865     unsigned G4D4N              : 1;
5866     unsigned G4D4T              : 1;
5867     };
5868   } __CLC2GLS3bits_t;
5869 
5870 extern __at(0x0F23) volatile __CLC2GLS3bits_t CLC2GLS3bits;
5871 
5872 #define _CLC2GLS3_LC2G4D1N      0x01
5873 #define _CLC2GLS3_G4D1N         0x01
5874 #define _CLC2GLS3_LC2G4D1T      0x02
5875 #define _CLC2GLS3_G4D1T         0x02
5876 #define _CLC2GLS3_LC2G4D2N      0x04
5877 #define _CLC2GLS3_G4D2N         0x04
5878 #define _CLC2GLS3_LC2G4D2T      0x08
5879 #define _CLC2GLS3_G4D2T         0x08
5880 #define _CLC2GLS3_LC2G4D3N      0x10
5881 #define _CLC2GLS3_G4D3N         0x10
5882 #define _CLC2GLS3_LC2G4D3T      0x20
5883 #define _CLC2GLS3_G4D3T         0x20
5884 #define _CLC2GLS3_LC2G4D4N      0x40
5885 #define _CLC2GLS3_G4D4N         0x40
5886 #define _CLC2GLS3_LC2G4D4T      0x80
5887 #define _CLC2GLS3_G4D4T         0x80
5888 
5889 //==============================================================================
5890 
5891 
5892 //==============================================================================
5893 //        CLC3CON Bits
5894 
5895 extern __at(0x0F24) __sfr CLC3CON;
5896 
5897 typedef union
5898   {
5899   struct
5900     {
5901     unsigned LC3MODE0           : 1;
5902     unsigned LC3MODE1           : 1;
5903     unsigned LC3MODE2           : 1;
5904     unsigned LC3INTN            : 1;
5905     unsigned LC3INTP            : 1;
5906     unsigned LC3OUT             : 1;
5907     unsigned                    : 1;
5908     unsigned LC3EN              : 1;
5909     };
5910 
5911   struct
5912     {
5913     unsigned MODE0              : 1;
5914     unsigned MODE1              : 1;
5915     unsigned MODE2              : 1;
5916     unsigned INTN               : 1;
5917     unsigned INTP               : 1;
5918     unsigned OUT                : 1;
5919     unsigned                    : 1;
5920     unsigned EN                 : 1;
5921     };
5922 
5923   struct
5924     {
5925     unsigned LC3MODE            : 3;
5926     unsigned                    : 5;
5927     };
5928 
5929   struct
5930     {
5931     unsigned MODE               : 3;
5932     unsigned                    : 5;
5933     };
5934   } __CLC3CONbits_t;
5935 
5936 extern __at(0x0F24) volatile __CLC3CONbits_t CLC3CONbits;
5937 
5938 #define _CLC3CON_LC3MODE0       0x01
5939 #define _CLC3CON_MODE0          0x01
5940 #define _CLC3CON_LC3MODE1       0x02
5941 #define _CLC3CON_MODE1          0x02
5942 #define _CLC3CON_LC3MODE2       0x04
5943 #define _CLC3CON_MODE2          0x04
5944 #define _CLC3CON_LC3INTN        0x08
5945 #define _CLC3CON_INTN           0x08
5946 #define _CLC3CON_LC3INTP        0x10
5947 #define _CLC3CON_INTP           0x10
5948 #define _CLC3CON_LC3OUT         0x20
5949 #define _CLC3CON_OUT            0x20
5950 #define _CLC3CON_LC3EN          0x80
5951 #define _CLC3CON_EN             0x80
5952 
5953 //==============================================================================
5954 
5955 
5956 //==============================================================================
5957 //        CLC3POL Bits
5958 
5959 extern __at(0x0F25) __sfr CLC3POL;
5960 
5961 typedef union
5962   {
5963   struct
5964     {
5965     unsigned LC3G1POL           : 1;
5966     unsigned LC3G2POL           : 1;
5967     unsigned LC3G3POL           : 1;
5968     unsigned LC3G4POL           : 1;
5969     unsigned                    : 1;
5970     unsigned                    : 1;
5971     unsigned                    : 1;
5972     unsigned LC3POL             : 1;
5973     };
5974 
5975   struct
5976     {
5977     unsigned G1POL              : 1;
5978     unsigned G2POL              : 1;
5979     unsigned G3POL              : 1;
5980     unsigned G4POL              : 1;
5981     unsigned                    : 1;
5982     unsigned                    : 1;
5983     unsigned                    : 1;
5984     unsigned POL                : 1;
5985     };
5986   } __CLC3POLbits_t;
5987 
5988 extern __at(0x0F25) volatile __CLC3POLbits_t CLC3POLbits;
5989 
5990 #define _CLC3POL_LC3G1POL       0x01
5991 #define _CLC3POL_G1POL          0x01
5992 #define _CLC3POL_LC3G2POL       0x02
5993 #define _CLC3POL_G2POL          0x02
5994 #define _CLC3POL_LC3G3POL       0x04
5995 #define _CLC3POL_G3POL          0x04
5996 #define _CLC3POL_LC3G4POL       0x08
5997 #define _CLC3POL_G4POL          0x08
5998 #define _CLC3POL_LC3POL         0x80
5999 #define _CLC3POL_POL            0x80
6000 
6001 //==============================================================================
6002 
6003 
6004 //==============================================================================
6005 //        CLC3SEL0 Bits
6006 
6007 extern __at(0x0F26) __sfr CLC3SEL0;
6008 
6009 typedef union
6010   {
6011   struct
6012     {
6013     unsigned LC3D1S0            : 1;
6014     unsigned LC3D1S1            : 1;
6015     unsigned LC3D1S2            : 1;
6016     unsigned LC3D1S3            : 1;
6017     unsigned LC3D1S4            : 1;
6018     unsigned                    : 1;
6019     unsigned                    : 1;
6020     unsigned                    : 1;
6021     };
6022 
6023   struct
6024     {
6025     unsigned D1S0               : 1;
6026     unsigned D1S1               : 1;
6027     unsigned D1S2               : 1;
6028     unsigned D1S3               : 1;
6029     unsigned D1S4               : 1;
6030     unsigned                    : 1;
6031     unsigned                    : 1;
6032     unsigned                    : 1;
6033     };
6034 
6035   struct
6036     {
6037     unsigned D1S                : 5;
6038     unsigned                    : 3;
6039     };
6040 
6041   struct
6042     {
6043     unsigned LC3D1S             : 5;
6044     unsigned                    : 3;
6045     };
6046   } __CLC3SEL0bits_t;
6047 
6048 extern __at(0x0F26) volatile __CLC3SEL0bits_t CLC3SEL0bits;
6049 
6050 #define _CLC3SEL0_LC3D1S0       0x01
6051 #define _CLC3SEL0_D1S0          0x01
6052 #define _CLC3SEL0_LC3D1S1       0x02
6053 #define _CLC3SEL0_D1S1          0x02
6054 #define _CLC3SEL0_LC3D1S2       0x04
6055 #define _CLC3SEL0_D1S2          0x04
6056 #define _CLC3SEL0_LC3D1S3       0x08
6057 #define _CLC3SEL0_D1S3          0x08
6058 #define _CLC3SEL0_LC3D1S4       0x10
6059 #define _CLC3SEL0_D1S4          0x10
6060 
6061 //==============================================================================
6062 
6063 
6064 //==============================================================================
6065 //        CLC3SEL1 Bits
6066 
6067 extern __at(0x0F27) __sfr CLC3SEL1;
6068 
6069 typedef union
6070   {
6071   struct
6072     {
6073     unsigned LC3D2S0            : 1;
6074     unsigned LC3D2S1            : 1;
6075     unsigned LC3D2S2            : 1;
6076     unsigned LC3D2S3            : 1;
6077     unsigned LC3D2S4            : 1;
6078     unsigned                    : 1;
6079     unsigned                    : 1;
6080     unsigned                    : 1;
6081     };
6082 
6083   struct
6084     {
6085     unsigned D2S0               : 1;
6086     unsigned D2S1               : 1;
6087     unsigned D2S2               : 1;
6088     unsigned D2S3               : 1;
6089     unsigned D2S4               : 1;
6090     unsigned                    : 1;
6091     unsigned                    : 1;
6092     unsigned                    : 1;
6093     };
6094 
6095   struct
6096     {
6097     unsigned D2S                : 5;
6098     unsigned                    : 3;
6099     };
6100 
6101   struct
6102     {
6103     unsigned LC3D2S             : 5;
6104     unsigned                    : 3;
6105     };
6106   } __CLC3SEL1bits_t;
6107 
6108 extern __at(0x0F27) volatile __CLC3SEL1bits_t CLC3SEL1bits;
6109 
6110 #define _CLC3SEL1_LC3D2S0       0x01
6111 #define _CLC3SEL1_D2S0          0x01
6112 #define _CLC3SEL1_LC3D2S1       0x02
6113 #define _CLC3SEL1_D2S1          0x02
6114 #define _CLC3SEL1_LC3D2S2       0x04
6115 #define _CLC3SEL1_D2S2          0x04
6116 #define _CLC3SEL1_LC3D2S3       0x08
6117 #define _CLC3SEL1_D2S3          0x08
6118 #define _CLC3SEL1_LC3D2S4       0x10
6119 #define _CLC3SEL1_D2S4          0x10
6120 
6121 //==============================================================================
6122 
6123 
6124 //==============================================================================
6125 //        CLC3SEL2 Bits
6126 
6127 extern __at(0x0F28) __sfr CLC3SEL2;
6128 
6129 typedef union
6130   {
6131   struct
6132     {
6133     unsigned LC3D3S0            : 1;
6134     unsigned LC3D3S1            : 1;
6135     unsigned LC3D3S2            : 1;
6136     unsigned LC3D3S3            : 1;
6137     unsigned LC3D3S4            : 1;
6138     unsigned                    : 1;
6139     unsigned                    : 1;
6140     unsigned                    : 1;
6141     };
6142 
6143   struct
6144     {
6145     unsigned D3S0               : 1;
6146     unsigned D3S1               : 1;
6147     unsigned D3S2               : 1;
6148     unsigned D3S3               : 1;
6149     unsigned D3S4               : 1;
6150     unsigned                    : 1;
6151     unsigned                    : 1;
6152     unsigned                    : 1;
6153     };
6154 
6155   struct
6156     {
6157     unsigned LC3D3S             : 5;
6158     unsigned                    : 3;
6159     };
6160 
6161   struct
6162     {
6163     unsigned D3S                : 5;
6164     unsigned                    : 3;
6165     };
6166   } __CLC3SEL2bits_t;
6167 
6168 extern __at(0x0F28) volatile __CLC3SEL2bits_t CLC3SEL2bits;
6169 
6170 #define _CLC3SEL2_LC3D3S0       0x01
6171 #define _CLC3SEL2_D3S0          0x01
6172 #define _CLC3SEL2_LC3D3S1       0x02
6173 #define _CLC3SEL2_D3S1          0x02
6174 #define _CLC3SEL2_LC3D3S2       0x04
6175 #define _CLC3SEL2_D3S2          0x04
6176 #define _CLC3SEL2_LC3D3S3       0x08
6177 #define _CLC3SEL2_D3S3          0x08
6178 #define _CLC3SEL2_LC3D3S4       0x10
6179 #define _CLC3SEL2_D3S4          0x10
6180 
6181 //==============================================================================
6182 
6183 
6184 //==============================================================================
6185 //        CLC3SEL3 Bits
6186 
6187 extern __at(0x0F29) __sfr CLC3SEL3;
6188 
6189 typedef union
6190   {
6191   struct
6192     {
6193     unsigned LC3D4S0            : 1;
6194     unsigned LC3D4S1            : 1;
6195     unsigned LC3D4S2            : 1;
6196     unsigned LC3D4S3            : 1;
6197     unsigned LC3D4S4            : 1;
6198     unsigned                    : 1;
6199     unsigned                    : 1;
6200     unsigned                    : 1;
6201     };
6202 
6203   struct
6204     {
6205     unsigned D4S0               : 1;
6206     unsigned D4S1               : 1;
6207     unsigned D4S2               : 1;
6208     unsigned D4S3               : 1;
6209     unsigned D4S4               : 1;
6210     unsigned                    : 1;
6211     unsigned                    : 1;
6212     unsigned                    : 1;
6213     };
6214 
6215   struct
6216     {
6217     unsigned LC3D4S             : 5;
6218     unsigned                    : 3;
6219     };
6220 
6221   struct
6222     {
6223     unsigned D4S                : 5;
6224     unsigned                    : 3;
6225     };
6226   } __CLC3SEL3bits_t;
6227 
6228 extern __at(0x0F29) volatile __CLC3SEL3bits_t CLC3SEL3bits;
6229 
6230 #define _CLC3SEL3_LC3D4S0       0x01
6231 #define _CLC3SEL3_D4S0          0x01
6232 #define _CLC3SEL3_LC3D4S1       0x02
6233 #define _CLC3SEL3_D4S1          0x02
6234 #define _CLC3SEL3_LC3D4S2       0x04
6235 #define _CLC3SEL3_D4S2          0x04
6236 #define _CLC3SEL3_LC3D4S3       0x08
6237 #define _CLC3SEL3_D4S3          0x08
6238 #define _CLC3SEL3_LC3D4S4       0x10
6239 #define _CLC3SEL3_D4S4          0x10
6240 
6241 //==============================================================================
6242 
6243 
6244 //==============================================================================
6245 //        CLC3GLS0 Bits
6246 
6247 extern __at(0x0F2A) __sfr CLC3GLS0;
6248 
6249 typedef union
6250   {
6251   struct
6252     {
6253     unsigned LC3G1D1N           : 1;
6254     unsigned LC3G1D1T           : 1;
6255     unsigned LC3G1D2N           : 1;
6256     unsigned LC3G1D2T           : 1;
6257     unsigned LC3G1D3N           : 1;
6258     unsigned LC3G1D3T           : 1;
6259     unsigned LC3G1D4N           : 1;
6260     unsigned LC3G1D4T           : 1;
6261     };
6262 
6263   struct
6264     {
6265     unsigned D1N                : 1;
6266     unsigned D1T                : 1;
6267     unsigned D2N                : 1;
6268     unsigned D2T                : 1;
6269     unsigned D3N                : 1;
6270     unsigned D3T                : 1;
6271     unsigned D4N                : 1;
6272     unsigned D4T                : 1;
6273     };
6274   } __CLC3GLS0bits_t;
6275 
6276 extern __at(0x0F2A) volatile __CLC3GLS0bits_t CLC3GLS0bits;
6277 
6278 #define _CLC3GLS0_LC3G1D1N      0x01
6279 #define _CLC3GLS0_D1N           0x01
6280 #define _CLC3GLS0_LC3G1D1T      0x02
6281 #define _CLC3GLS0_D1T           0x02
6282 #define _CLC3GLS0_LC3G1D2N      0x04
6283 #define _CLC3GLS0_D2N           0x04
6284 #define _CLC3GLS0_LC3G1D2T      0x08
6285 #define _CLC3GLS0_D2T           0x08
6286 #define _CLC3GLS0_LC3G1D3N      0x10
6287 #define _CLC3GLS0_D3N           0x10
6288 #define _CLC3GLS0_LC3G1D3T      0x20
6289 #define _CLC3GLS0_D3T           0x20
6290 #define _CLC3GLS0_LC3G1D4N      0x40
6291 #define _CLC3GLS0_D4N           0x40
6292 #define _CLC3GLS0_LC3G1D4T      0x80
6293 #define _CLC3GLS0_D4T           0x80
6294 
6295 //==============================================================================
6296 
6297 
6298 //==============================================================================
6299 //        CLC3GLS1 Bits
6300 
6301 extern __at(0x0F2B) __sfr CLC3GLS1;
6302 
6303 typedef union
6304   {
6305   struct
6306     {
6307     unsigned LC3G2D1N           : 1;
6308     unsigned LC3G2D1T           : 1;
6309     unsigned LC3G2D2N           : 1;
6310     unsigned LC3G2D2T           : 1;
6311     unsigned LC3G2D3N           : 1;
6312     unsigned LC3G2D3T           : 1;
6313     unsigned LC3G2D4N           : 1;
6314     unsigned LC3G2D4T           : 1;
6315     };
6316 
6317   struct
6318     {
6319     unsigned D1N                : 1;
6320     unsigned D1T                : 1;
6321     unsigned D2N                : 1;
6322     unsigned D2T                : 1;
6323     unsigned D3N                : 1;
6324     unsigned D3T                : 1;
6325     unsigned D4N                : 1;
6326     unsigned D4T                : 1;
6327     };
6328   } __CLC3GLS1bits_t;
6329 
6330 extern __at(0x0F2B) volatile __CLC3GLS1bits_t CLC3GLS1bits;
6331 
6332 #define _CLC3GLS1_LC3G2D1N      0x01
6333 #define _CLC3GLS1_D1N           0x01
6334 #define _CLC3GLS1_LC3G2D1T      0x02
6335 #define _CLC3GLS1_D1T           0x02
6336 #define _CLC3GLS1_LC3G2D2N      0x04
6337 #define _CLC3GLS1_D2N           0x04
6338 #define _CLC3GLS1_LC3G2D2T      0x08
6339 #define _CLC3GLS1_D2T           0x08
6340 #define _CLC3GLS1_LC3G2D3N      0x10
6341 #define _CLC3GLS1_D3N           0x10
6342 #define _CLC3GLS1_LC3G2D3T      0x20
6343 #define _CLC3GLS1_D3T           0x20
6344 #define _CLC3GLS1_LC3G2D4N      0x40
6345 #define _CLC3GLS1_D4N           0x40
6346 #define _CLC3GLS1_LC3G2D4T      0x80
6347 #define _CLC3GLS1_D4T           0x80
6348 
6349 //==============================================================================
6350 
6351 
6352 //==============================================================================
6353 //        CLC3GLS2 Bits
6354 
6355 extern __at(0x0F2C) __sfr CLC3GLS2;
6356 
6357 typedef union
6358   {
6359   struct
6360     {
6361     unsigned LC3G3D1N           : 1;
6362     unsigned LC3G3D1T           : 1;
6363     unsigned LC3G3D2N           : 1;
6364     unsigned LC3G3D2T           : 1;
6365     unsigned LC3G3D3N           : 1;
6366     unsigned LC3G3D3T           : 1;
6367     unsigned LC3G3D4N           : 1;
6368     unsigned LC3G3D4T           : 1;
6369     };
6370 
6371   struct
6372     {
6373     unsigned D1N                : 1;
6374     unsigned D1T                : 1;
6375     unsigned D2N                : 1;
6376     unsigned D2T                : 1;
6377     unsigned D3N                : 1;
6378     unsigned D3T                : 1;
6379     unsigned D4N                : 1;
6380     unsigned D4T                : 1;
6381     };
6382   } __CLC3GLS2bits_t;
6383 
6384 extern __at(0x0F2C) volatile __CLC3GLS2bits_t CLC3GLS2bits;
6385 
6386 #define _CLC3GLS2_LC3G3D1N      0x01
6387 #define _CLC3GLS2_D1N           0x01
6388 #define _CLC3GLS2_LC3G3D1T      0x02
6389 #define _CLC3GLS2_D1T           0x02
6390 #define _CLC3GLS2_LC3G3D2N      0x04
6391 #define _CLC3GLS2_D2N           0x04
6392 #define _CLC3GLS2_LC3G3D2T      0x08
6393 #define _CLC3GLS2_D2T           0x08
6394 #define _CLC3GLS2_LC3G3D3N      0x10
6395 #define _CLC3GLS2_D3N           0x10
6396 #define _CLC3GLS2_LC3G3D3T      0x20
6397 #define _CLC3GLS2_D3T           0x20
6398 #define _CLC3GLS2_LC3G3D4N      0x40
6399 #define _CLC3GLS2_D4N           0x40
6400 #define _CLC3GLS2_LC3G3D4T      0x80
6401 #define _CLC3GLS2_D4T           0x80
6402 
6403 //==============================================================================
6404 
6405 
6406 //==============================================================================
6407 //        CLC3GLS3 Bits
6408 
6409 extern __at(0x0F2D) __sfr CLC3GLS3;
6410 
6411 typedef union
6412   {
6413   struct
6414     {
6415     unsigned LC3G4D1N           : 1;
6416     unsigned LC3G4D1T           : 1;
6417     unsigned LC3G4D2N           : 1;
6418     unsigned LC3G4D2T           : 1;
6419     unsigned LC3G4D3N           : 1;
6420     unsigned LC3G4D3T           : 1;
6421     unsigned LC3G4D4N           : 1;
6422     unsigned LC3G4D4T           : 1;
6423     };
6424 
6425   struct
6426     {
6427     unsigned G4D1N              : 1;
6428     unsigned G4D1T              : 1;
6429     unsigned G4D2N              : 1;
6430     unsigned G4D2T              : 1;
6431     unsigned G4D3N              : 1;
6432     unsigned G4D3T              : 1;
6433     unsigned G4D4N              : 1;
6434     unsigned G4D4T              : 1;
6435     };
6436   } __CLC3GLS3bits_t;
6437 
6438 extern __at(0x0F2D) volatile __CLC3GLS3bits_t CLC3GLS3bits;
6439 
6440 #define _CLC3GLS3_LC3G4D1N      0x01
6441 #define _CLC3GLS3_G4D1N         0x01
6442 #define _CLC3GLS3_LC3G4D1T      0x02
6443 #define _CLC3GLS3_G4D1T         0x02
6444 #define _CLC3GLS3_LC3G4D2N      0x04
6445 #define _CLC3GLS3_G4D2N         0x04
6446 #define _CLC3GLS3_LC3G4D2T      0x08
6447 #define _CLC3GLS3_G4D2T         0x08
6448 #define _CLC3GLS3_LC3G4D3N      0x10
6449 #define _CLC3GLS3_G4D3N         0x10
6450 #define _CLC3GLS3_LC3G4D3T      0x20
6451 #define _CLC3GLS3_G4D3T         0x20
6452 #define _CLC3GLS3_LC3G4D4N      0x40
6453 #define _CLC3GLS3_G4D4N         0x40
6454 #define _CLC3GLS3_LC3G4D4T      0x80
6455 #define _CLC3GLS3_G4D4T         0x80
6456 
6457 //==============================================================================
6458 
6459 
6460 //==============================================================================
6461 //        STATUS_SHAD Bits
6462 
6463 extern __at(0x0FE4) __sfr STATUS_SHAD;
6464 
6465 typedef struct
6466   {
6467   unsigned C_SHAD               : 1;
6468   unsigned DC_SHAD              : 1;
6469   unsigned Z_SHAD               : 1;
6470   unsigned                      : 1;
6471   unsigned                      : 1;
6472   unsigned                      : 1;
6473   unsigned                      : 1;
6474   unsigned                      : 1;
6475   } __STATUS_SHADbits_t;
6476 
6477 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
6478 
6479 #define _C_SHAD                 0x01
6480 #define _DC_SHAD                0x02
6481 #define _Z_SHAD                 0x04
6482 
6483 //==============================================================================
6484 
6485 extern __at(0x0FE5) __sfr WREG_SHAD;
6486 extern __at(0x0FE6) __sfr BSR_SHAD;
6487 extern __at(0x0FE7) __sfr PCLATH_SHAD;
6488 extern __at(0x0FE8) __sfr FSR0L_SHAD;
6489 extern __at(0x0FE9) __sfr FSR0H_SHAD;
6490 extern __at(0x0FEA) __sfr FSR1L_SHAD;
6491 extern __at(0x0FEB) __sfr FSR1H_SHAD;
6492 extern __at(0x0FED) __sfr STKPTR;
6493 extern __at(0x0FEE) __sfr TOSL;
6494 extern __at(0x0FEF) __sfr TOSH;
6495 
6496 //==============================================================================
6497 //
6498 //        Configuration Bits
6499 //
6500 //==============================================================================
6501 
6502 #define _CONFIG1                0x8007
6503 #define _CONFIG2                0x8008
6504 
6505 //----------------------------- CONFIG1 Options -------------------------------
6506 
6507 #define _FOSC_LP                0x3FF8  // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins.
6508 #define _FOSC_XT                0x3FF9  // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins.
6509 #define _FOSC_HS                0x3FFA  // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins.
6510 #define _FOSC_EXTRC             0x3FFB  // EXTRC oscillator: External RC circuit connected to CLKIN pin.
6511 #define _FOSC_INTOSC            0x3FFC  // INTOSC oscillator: I/O function on CLKIN pin.
6512 #define _FOSC_ECL               0x3FFD  // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pins.
6513 #define _FOSC_ECM               0x3FFE  // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pins.
6514 #define _FOSC_ECH               0x3FFF  // ECH, External Clock, High Power Mode (4-20 MHz): device clock supplied to CLKIN pins.
6515 #define _WDTE_OFF               0x3FE7  // WDT disabled.
6516 #define _WDTE_SWDTEN            0x3FEF  // WDT controlled by the SWDTEN bit in the WDTCON register.
6517 #define _WDTE_NSLEEP            0x3FF7  // WDT enabled while running and disabled in Sleep.
6518 #define _WDTE_ON                0x3FFF  // WDT enabled.
6519 #define _PWRTE_ON               0x3FDF  // PWRT enabled.
6520 #define _PWRTE_OFF              0x3FFF  // PWRT disabled.
6521 #define _MCLRE_OFF              0x3FBF  // MCLR/VPP pin function is digital input.
6522 #define _MCLRE_ON               0x3FFF  // MCLR/VPP pin function is MCLR.
6523 #define _CP_ON                  0x3F7F  // Program memory code protection is enabled.
6524 #define _CP_OFF                 0x3FFF  // Program memory code protection is disabled.
6525 #define _BOREN_OFF              0x39FF  // Brown-out Reset disabled.
6526 #define _BOREN_SBODEN           0x3BFF  // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
6527 #define _BOREN_NSLEEP           0x3DFF  // Brown-out Reset enabled while running and disabled in Sleep.
6528 #define _BOREN_ON               0x3FFF  // Brown-out Reset enabled.
6529 #define _CLKOUTEN_ON            0x37FF  // CLKOUT function is enabled on the CLKOUT pin.
6530 #define _CLKOUTEN_OFF           0x3FFF  // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
6531 #define _IESO_OFF               0x2FFF  // Internal/External Switchover Mode is disabled.
6532 #define _IESO_ON                0x3FFF  // Internal/External Switchover Mode is enabled.
6533 #define _FCMEN_OFF              0x1FFF  // Fail-Safe Clock Monitor is disabled.
6534 #define _FCMEN_ON               0x3FFF  // Fail-Safe Clock Monitor is enabled.
6535 
6536 //----------------------------- CONFIG2 Options -------------------------------
6537 
6538 #define _WRT_ALL                0x3FFC  // 000h to 1FFFh write protected, no addresses may be modified by EECON control.
6539 #define _WRT_HALF               0x3FFD  // 000h to FFFh write protected, 1000h to 1FFFh may be modified by EECON control.
6540 #define _WRT_BOOT               0x3FFE  // 000h to 1FFh write protected, 200h to 1FFFh may be modified by EECON control.
6541 #define _WRT_OFF                0x3FFF  // Write protection off.
6542 #define _PPS1WAY_OFF            0x3FFB  // The PPSLOCK bit can be set and cleared repeatedly by software.
6543 #define _PPS1WAY_ON             0x3FFF  // The PPSLOCK bit cannot be cleared once it is set by software.
6544 #define _ZCDDIS_OFF             0x3F7F  // Zero-cross detect circuit is enabled at POR.
6545 #define _ZCDDIS_ON              0x3FFF  // Zero-cross detect circuit is disabled at POR.
6546 #define _PLLEN_OFF              0x3EFF  // 4x PLL is enabled when software sets the SPLLEN bit.
6547 #define _PLLEN_ON               0x3FFF  // 4x PLL is always enabled.
6548 #define _STVREN_OFF             0x3DFF  // Stack Overflow or Underflow will not cause a Reset.
6549 #define _STVREN_ON              0x3FFF  // Stack Overflow or Underflow will cause a Reset.
6550 #define _BORV_HI                0x3BFF  // Brown-out Reset Voltage (Vbor), high trip point selected.
6551 #define _BORV_LO                0x3FFF  // Brown-out Reset Voltage (Vbor), low trip point selected.
6552 #define _LPBOR_ON               0x37FF  // Low-Power BOR is enabled.
6553 #define _LPBOR_OFF              0x3FFF  // Low-Power BOR is disabled.
6554 #define _DEBUG_ON               0x2FFF  // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
6555 #define _DEBUG_OFF              0x3FFF  // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
6556 #define _LVP_OFF                0x1FFF  // High-voltage on MCLR/VPP must be used for programming.
6557 #define _LVP_ON                 0x3FFF  // Low-voltage programming enabled.
6558 
6559 //==============================================================================
6560 
6561 #define _DEVID1                 0x8006
6562 
6563 #define _IDLOC0                 0x8000
6564 #define _IDLOC1                 0x8001
6565 #define _IDLOC2                 0x8002
6566 #define _IDLOC3                 0x8003
6567 
6568 //==============================================================================
6569 
6570 #ifndef NO_BIT_DEFINES
6571 
6572 #define ADON                    ADCON0bits.ADON                 // bit 0
6573 #define GO_NOT_DONE             ADCON0bits.GO_NOT_DONE          // bit 1, shadows bit in ADCON0bits
6574 #define ADGO                    ADCON0bits.ADGO                 // bit 1, shadows bit in ADCON0bits
6575 #define GO                      ADCON0bits.GO                   // bit 1, shadows bit in ADCON0bits
6576 #define CHS0                    ADCON0bits.CHS0                 // bit 2
6577 #define CHS1                    ADCON0bits.CHS1                 // bit 3
6578 #define CHS2                    ADCON0bits.CHS2                 // bit 4
6579 #define CHS3                    ADCON0bits.CHS3                 // bit 5
6580 #define CHS4                    ADCON0bits.CHS4                 // bit 6
6581 
6582 #define ADPREF0                 ADCON1bits.ADPREF0              // bit 0
6583 #define ADPREF1                 ADCON1bits.ADPREF1              // bit 1
6584 #define ADNREF                  ADCON1bits.ADNREF               // bit 2
6585 #define ADCS0                   ADCON1bits.ADCS0                // bit 4
6586 #define ADCS1                   ADCON1bits.ADCS1                // bit 5
6587 #define ADCS2                   ADCON1bits.ADCS2                // bit 6
6588 #define ADFM                    ADCON1bits.ADFM                 // bit 7
6589 
6590 #define TRIGSEL0                ADCON2bits.TRIGSEL0             // bit 4
6591 #define TRIGSEL1                ADCON2bits.TRIGSEL1             // bit 5
6592 #define TRIGSEL2                ADCON2bits.TRIGSEL2             // bit 6
6593 #define TRIGSEL3                ADCON2bits.TRIGSEL3             // bit 7
6594 
6595 #define ANSA0                   ANSELAbits.ANSA0                // bit 0
6596 #define ANSA1                   ANSELAbits.ANSA1                // bit 1
6597 #define ANSA2                   ANSELAbits.ANSA2                // bit 2
6598 #define ANSA4                   ANSELAbits.ANSA4                // bit 4
6599 #define ANS5                    ANSELAbits.ANS5                 // bit 5
6600 
6601 #define ANSC0                   ANSELCbits.ANSC0                // bit 0
6602 #define ANSC1                   ANSELCbits.ANSC1                // bit 1
6603 #define ANSC2                   ANSELCbits.ANSC2                // bit 2
6604 #define ANSC3                   ANSELCbits.ANSC3                // bit 3
6605 #define ANSC4                   ANSELCbits.ANSC4                // bit 4
6606 #define ANSC5                   ANSELCbits.ANSC5                // bit 5
6607 
6608 #define ABDEN                   BAUD1CONbits.ABDEN              // bit 0
6609 #define WUE                     BAUD1CONbits.WUE                // bit 1
6610 #define BRG16                   BAUD1CONbits.BRG16              // bit 3
6611 #define SCKP                    BAUD1CONbits.SCKP               // bit 4
6612 #define RCIDL                   BAUD1CONbits.RCIDL              // bit 6
6613 #define ABDOVF                  BAUD1CONbits.ABDOVF             // bit 7
6614 
6615 #define BORRDY                  BORCONbits.BORRDY               // bit 0
6616 #define BORFS                   BORCONbits.BORFS                // bit 6
6617 #define SBOREN                  BORCONbits.SBOREN               // bit 7
6618 
6619 #define BSR0                    BSRbits.BSR0                    // bit 0
6620 #define BSR1                    BSRbits.BSR1                    // bit 1
6621 #define BSR2                    BSRbits.BSR2                    // bit 2
6622 #define BSR3                    BSRbits.BSR3                    // bit 3
6623 #define BSR4                    BSRbits.BSR4                    // bit 4
6624 
6625 #define CCP1M0                  CCP1CONbits.CCP1M0              // bit 0
6626 #define CCP1M1                  CCP1CONbits.CCP1M1              // bit 1
6627 #define CCP1M2                  CCP1CONbits.CCP1M2              // bit 2
6628 #define CCP1M3                  CCP1CONbits.CCP1M3              // bit 3
6629 #define DC1B0                   CCP1CONbits.DC1B0               // bit 4, shadows bit in CCP1CONbits
6630 #define CCP1Y                   CCP1CONbits.CCP1Y               // bit 4, shadows bit in CCP1CONbits
6631 #define DC1B1                   CCP1CONbits.DC1B1               // bit 5, shadows bit in CCP1CONbits
6632 #define CCP1X                   CCP1CONbits.CCP1X               // bit 5, shadows bit in CCP1CONbits
6633 
6634 #define CCP2M0                  CCP2CONbits.CCP2M0              // bit 0
6635 #define CCP2M1                  CCP2CONbits.CCP2M1              // bit 1
6636 #define CCP2M2                  CCP2CONbits.CCP2M2              // bit 2
6637 #define CCP2M3                  CCP2CONbits.CCP2M3              // bit 3
6638 #define DC2B0                   CCP2CONbits.DC2B0               // bit 4, shadows bit in CCP2CONbits
6639 #define CCP2Y                   CCP2CONbits.CCP2Y               // bit 4, shadows bit in CCP2CONbits
6640 #define DC2B1                   CCP2CONbits.DC2B1               // bit 5, shadows bit in CCP2CONbits
6641 #define CCP2X                   CCP2CONbits.CCP2X               // bit 5, shadows bit in CCP2CONbits
6642 
6643 #define C1TSEL0                 CCPTMRSbits.C1TSEL0             // bit 0
6644 #define C1TSEL1                 CCPTMRSbits.C1TSEL1             // bit 1
6645 #define C2TSEL0                 CCPTMRSbits.C2TSEL0             // bit 2
6646 #define C2TSEL1                 CCPTMRSbits.C2TSEL1             // bit 3
6647 #define P3TSEL0                 CCPTMRSbits.P3TSEL0             // bit 4
6648 #define P3TSEL1                 CCPTMRSbits.P3TSEL1             // bit 5
6649 #define P4TSEL0                 CCPTMRSbits.P4TSEL0             // bit 6
6650 #define P4TSEL1                 CCPTMRSbits.P4TSEL1             // bit 7
6651 
6652 #define LC1MODE0                CLC1CONbits.LC1MODE0            // bit 0, shadows bit in CLC1CONbits
6653 #define MODE0                   CLC1CONbits.MODE0               // bit 0, shadows bit in CLC1CONbits
6654 #define LC1MODE1                CLC1CONbits.LC1MODE1            // bit 1, shadows bit in CLC1CONbits
6655 #define MODE1                   CLC1CONbits.MODE1               // bit 1, shadows bit in CLC1CONbits
6656 #define LC1MODE2                CLC1CONbits.LC1MODE2            // bit 2, shadows bit in CLC1CONbits
6657 #define MODE2                   CLC1CONbits.MODE2               // bit 2, shadows bit in CLC1CONbits
6658 #define LC1INTN                 CLC1CONbits.LC1INTN             // bit 3, shadows bit in CLC1CONbits
6659 #define INTN                    CLC1CONbits.INTN                // bit 3, shadows bit in CLC1CONbits
6660 #define LC1INTP                 CLC1CONbits.LC1INTP             // bit 4, shadows bit in CLC1CONbits
6661 #define INTP                    CLC1CONbits.INTP                // bit 4, shadows bit in CLC1CONbits
6662 #define LC1OUT                  CLC1CONbits.LC1OUT              // bit 5, shadows bit in CLC1CONbits
6663 #define OUT                     CLC1CONbits.OUT                 // bit 5, shadows bit in CLC1CONbits
6664 #define LC1EN                   CLC1CONbits.LC1EN               // bit 7, shadows bit in CLC1CONbits
6665 #define EN                      CLC1CONbits.EN                  // bit 7, shadows bit in CLC1CONbits
6666 
6667 #define LC1G1D1N                CLC1GLS0bits.LC1G1D1N           // bit 0, shadows bit in CLC1GLS0bits
6668 #define D1N                     CLC1GLS0bits.D1N                // bit 0, shadows bit in CLC1GLS0bits
6669 #define LC1G1D1T                CLC1GLS0bits.LC1G1D1T           // bit 1, shadows bit in CLC1GLS0bits
6670 #define D1T                     CLC1GLS0bits.D1T                // bit 1, shadows bit in CLC1GLS0bits
6671 #define LC1G1D2N                CLC1GLS0bits.LC1G1D2N           // bit 2, shadows bit in CLC1GLS0bits
6672 #define D2N                     CLC1GLS0bits.D2N                // bit 2, shadows bit in CLC1GLS0bits
6673 #define LC1G1D2T                CLC1GLS0bits.LC1G1D2T           // bit 3, shadows bit in CLC1GLS0bits
6674 #define D2T                     CLC1GLS0bits.D2T                // bit 3, shadows bit in CLC1GLS0bits
6675 #define LC1G1D3N                CLC1GLS0bits.LC1G1D3N           // bit 4, shadows bit in CLC1GLS0bits
6676 #define D3N                     CLC1GLS0bits.D3N                // bit 4, shadows bit in CLC1GLS0bits
6677 #define LC1G1D3T                CLC1GLS0bits.LC1G1D3T           // bit 5, shadows bit in CLC1GLS0bits
6678 #define D3T                     CLC1GLS0bits.D3T                // bit 5, shadows bit in CLC1GLS0bits
6679 #define LC1G1D4N                CLC1GLS0bits.LC1G1D4N           // bit 6, shadows bit in CLC1GLS0bits
6680 #define D4N                     CLC1GLS0bits.D4N                // bit 6, shadows bit in CLC1GLS0bits
6681 #define LC1G1D4T                CLC1GLS0bits.LC1G1D4T           // bit 7, shadows bit in CLC1GLS0bits
6682 #define D4T                     CLC1GLS0bits.D4T                // bit 7, shadows bit in CLC1GLS0bits
6683 
6684 #define LC1G4D1N                CLC1GLS3bits.LC1G4D1N           // bit 0, shadows bit in CLC1GLS3bits
6685 #define G4D1N                   CLC1GLS3bits.G4D1N              // bit 0, shadows bit in CLC1GLS3bits
6686 #define LC1G4D1T                CLC1GLS3bits.LC1G4D1T           // bit 1, shadows bit in CLC1GLS3bits
6687 #define G4D1T                   CLC1GLS3bits.G4D1T              // bit 1, shadows bit in CLC1GLS3bits
6688 #define LC1G4D2N                CLC1GLS3bits.LC1G4D2N           // bit 2, shadows bit in CLC1GLS3bits
6689 #define G4D2N                   CLC1GLS3bits.G4D2N              // bit 2, shadows bit in CLC1GLS3bits
6690 #define LC1G4D2T                CLC1GLS3bits.LC1G4D2T           // bit 3, shadows bit in CLC1GLS3bits
6691 #define G4D2T                   CLC1GLS3bits.G4D2T              // bit 3, shadows bit in CLC1GLS3bits
6692 #define LC1G4D3N                CLC1GLS3bits.LC1G4D3N           // bit 4, shadows bit in CLC1GLS3bits
6693 #define G4D3N                   CLC1GLS3bits.G4D3N              // bit 4, shadows bit in CLC1GLS3bits
6694 #define LC1G4D3T                CLC1GLS3bits.LC1G4D3T           // bit 5, shadows bit in CLC1GLS3bits
6695 #define G4D3T                   CLC1GLS3bits.G4D3T              // bit 5, shadows bit in CLC1GLS3bits
6696 #define LC1G4D4N                CLC1GLS3bits.LC1G4D4N           // bit 6, shadows bit in CLC1GLS3bits
6697 #define G4D4N                   CLC1GLS3bits.G4D4N              // bit 6, shadows bit in CLC1GLS3bits
6698 #define LC1G4D4T                CLC1GLS3bits.LC1G4D4T           // bit 7, shadows bit in CLC1GLS3bits
6699 #define G4D4T                   CLC1GLS3bits.G4D4T              // bit 7, shadows bit in CLC1GLS3bits
6700 
6701 #define LC1G1POL                CLC1POLbits.LC1G1POL            // bit 0, shadows bit in CLC1POLbits
6702 #define G1POL                   CLC1POLbits.G1POL               // bit 0, shadows bit in CLC1POLbits
6703 #define LC1G2POL                CLC1POLbits.LC1G2POL            // bit 1, shadows bit in CLC1POLbits
6704 #define G2POL                   CLC1POLbits.G2POL               // bit 1, shadows bit in CLC1POLbits
6705 #define LC1G3POL                CLC1POLbits.LC1G3POL            // bit 2, shadows bit in CLC1POLbits
6706 #define G3POL                   CLC1POLbits.G3POL               // bit 2, shadows bit in CLC1POLbits
6707 #define LC1G4POL                CLC1POLbits.LC1G4POL            // bit 3, shadows bit in CLC1POLbits
6708 #define G4POL                   CLC1POLbits.G4POL               // bit 3, shadows bit in CLC1POLbits
6709 #define LC1POL                  CLC1POLbits.LC1POL              // bit 7, shadows bit in CLC1POLbits
6710 #define POL                     CLC1POLbits.POL                 // bit 7, shadows bit in CLC1POLbits
6711 
6712 #define LC1D1S0                 CLC1SEL0bits.LC1D1S0            // bit 0, shadows bit in CLC1SEL0bits
6713 #define D1S0                    CLC1SEL0bits.D1S0               // bit 0, shadows bit in CLC1SEL0bits
6714 #define LC1D1S1                 CLC1SEL0bits.LC1D1S1            // bit 1, shadows bit in CLC1SEL0bits
6715 #define D1S1                    CLC1SEL0bits.D1S1               // bit 1, shadows bit in CLC1SEL0bits
6716 #define LC1D1S2                 CLC1SEL0bits.LC1D1S2            // bit 2, shadows bit in CLC1SEL0bits
6717 #define D1S2                    CLC1SEL0bits.D1S2               // bit 2, shadows bit in CLC1SEL0bits
6718 #define LC1D1S3                 CLC1SEL0bits.LC1D1S3            // bit 3, shadows bit in CLC1SEL0bits
6719 #define D1S3                    CLC1SEL0bits.D1S3               // bit 3, shadows bit in CLC1SEL0bits
6720 #define LC1D1S4                 CLC1SEL0bits.LC1D1S4            // bit 4, shadows bit in CLC1SEL0bits
6721 #define D1S4                    CLC1SEL0bits.D1S4               // bit 4, shadows bit in CLC1SEL0bits
6722 
6723 #define LC1D2S0                 CLC1SEL1bits.LC1D2S0            // bit 0, shadows bit in CLC1SEL1bits
6724 #define D2S0                    CLC1SEL1bits.D2S0               // bit 0, shadows bit in CLC1SEL1bits
6725 #define LC1D2S1                 CLC1SEL1bits.LC1D2S1            // bit 1, shadows bit in CLC1SEL1bits
6726 #define D2S1                    CLC1SEL1bits.D2S1               // bit 1, shadows bit in CLC1SEL1bits
6727 #define LC1D2S2                 CLC1SEL1bits.LC1D2S2            // bit 2, shadows bit in CLC1SEL1bits
6728 #define D2S2                    CLC1SEL1bits.D2S2               // bit 2, shadows bit in CLC1SEL1bits
6729 #define LC1D2S3                 CLC1SEL1bits.LC1D2S3            // bit 3, shadows bit in CLC1SEL1bits
6730 #define D2S3                    CLC1SEL1bits.D2S3               // bit 3, shadows bit in CLC1SEL1bits
6731 #define LC1D2S4                 CLC1SEL1bits.LC1D2S4            // bit 4, shadows bit in CLC1SEL1bits
6732 #define D2S4                    CLC1SEL1bits.D2S4               // bit 4, shadows bit in CLC1SEL1bits
6733 
6734 #define LC1D3S0                 CLC1SEL2bits.LC1D3S0            // bit 0, shadows bit in CLC1SEL2bits
6735 #define D3S0                    CLC1SEL2bits.D3S0               // bit 0, shadows bit in CLC1SEL2bits
6736 #define LC1D3S1                 CLC1SEL2bits.LC1D3S1            // bit 1, shadows bit in CLC1SEL2bits
6737 #define D3S1                    CLC1SEL2bits.D3S1               // bit 1, shadows bit in CLC1SEL2bits
6738 #define LC1D3S2                 CLC1SEL2bits.LC1D3S2            // bit 2, shadows bit in CLC1SEL2bits
6739 #define D3S2                    CLC1SEL2bits.D3S2               // bit 2, shadows bit in CLC1SEL2bits
6740 #define LC1D3S3                 CLC1SEL2bits.LC1D3S3            // bit 3, shadows bit in CLC1SEL2bits
6741 #define D3S3                    CLC1SEL2bits.D3S3               // bit 3, shadows bit in CLC1SEL2bits
6742 #define LC1D3S4                 CLC1SEL2bits.LC1D3S4            // bit 4, shadows bit in CLC1SEL2bits
6743 #define D3S4                    CLC1SEL2bits.D3S4               // bit 4, shadows bit in CLC1SEL2bits
6744 
6745 #define LC1D4S0                 CLC1SEL3bits.LC1D4S0            // bit 0, shadows bit in CLC1SEL3bits
6746 #define D4S0                    CLC1SEL3bits.D4S0               // bit 0, shadows bit in CLC1SEL3bits
6747 #define LC1D4S1                 CLC1SEL3bits.LC1D4S1            // bit 1, shadows bit in CLC1SEL3bits
6748 #define D4S1                    CLC1SEL3bits.D4S1               // bit 1, shadows bit in CLC1SEL3bits
6749 #define LC1D4S2                 CLC1SEL3bits.LC1D4S2            // bit 2, shadows bit in CLC1SEL3bits
6750 #define D4S2                    CLC1SEL3bits.D4S2               // bit 2, shadows bit in CLC1SEL3bits
6751 #define LC1D4S3                 CLC1SEL3bits.LC1D4S3            // bit 3, shadows bit in CLC1SEL3bits
6752 #define D4S3                    CLC1SEL3bits.D4S3               // bit 3, shadows bit in CLC1SEL3bits
6753 #define LC1D4S4                 CLC1SEL3bits.LC1D4S4            // bit 4, shadows bit in CLC1SEL3bits
6754 #define D4S4                    CLC1SEL3bits.D4S4               // bit 4, shadows bit in CLC1SEL3bits
6755 
6756 #define MCLC1OUT                CLCDATAbits.MCLC1OUT            // bit 0
6757 #define MCLC2OUT                CLCDATAbits.MCLC2OUT            // bit 1
6758 #define MCLC3OUT                CLCDATAbits.MCLC3OUT            // bit 2
6759 
6760 #define C1SYNC                  CM1CON0bits.C1SYNC              // bit 0
6761 #define C1HYS                   CM1CON0bits.C1HYS               // bit 1
6762 #define C1SP                    CM1CON0bits.C1SP                // bit 2
6763 #define C1ZLF                   CM1CON0bits.C1ZLF               // bit 3
6764 #define C1POL                   CM1CON0bits.C1POL               // bit 4
6765 #define C1OUT                   CM1CON0bits.C1OUT               // bit 6
6766 #define C1ON                    CM1CON0bits.C1ON                // bit 7
6767 
6768 #define C1NCH0                  CM1CON1bits.C1NCH0              // bit 0
6769 #define C1NCH1                  CM1CON1bits.C1NCH1              // bit 1
6770 #define C1NCH2                  CM1CON1bits.C1NCH2              // bit 2
6771 #define C1PCH0                  CM1CON1bits.C1PCH0              // bit 3
6772 #define C1PCH1                  CM1CON1bits.C1PCH1              // bit 4
6773 #define C1PCH2                  CM1CON1bits.C1PCH2              // bit 5
6774 #define C1INTN                  CM1CON1bits.C1INTN              // bit 6
6775 #define C1INTP                  CM1CON1bits.C1INTP              // bit 7
6776 
6777 #define C2SYNC                  CM2CON0bits.C2SYNC              // bit 0
6778 #define C2HYS                   CM2CON0bits.C2HYS               // bit 1
6779 #define C2SP                    CM2CON0bits.C2SP                // bit 2
6780 #define C2ZLF                   CM2CON0bits.C2ZLF               // bit 3
6781 #define C2POL                   CM2CON0bits.C2POL               // bit 4
6782 #define C2OUT                   CM2CON0bits.C2OUT               // bit 6
6783 #define C2ON                    CM2CON0bits.C2ON                // bit 7
6784 
6785 #define C2NCH0                  CM2CON1bits.C2NCH0              // bit 0
6786 #define C2NCH1                  CM2CON1bits.C2NCH1              // bit 1
6787 #define C2NCH2                  CM2CON1bits.C2NCH2              // bit 2
6788 #define C2PCH0                  CM2CON1bits.C2PCH0              // bit 3
6789 #define C2PCH1                  CM2CON1bits.C2PCH1              // bit 4
6790 #define C2PCH2                  CM2CON1bits.C2PCH2              // bit 5
6791 #define C2INTN                  CM2CON1bits.C2INTN              // bit 6
6792 #define C2INTP                  CM2CON1bits.C2INTP              // bit 7
6793 
6794 #define MC1OUT                  CMOUTbits.MC1OUT                // bit 0
6795 #define MC2OUT                  CMOUTbits.MC2OUT                // bit 1
6796 
6797 #define G1ASDAC0                COG1ASD0bits.G1ASDAC0           // bit 2
6798 #define G1ASDAC1                COG1ASD0bits.G1ASDAC1           // bit 3
6799 #define G1ASDBD0                COG1ASD0bits.G1ASDBD0           // bit 4
6800 #define G1ASDBD1                COG1ASD0bits.G1ASDBD1           // bit 5
6801 #define G1ARSEN                 COG1ASD0bits.G1ARSEN            // bit 6
6802 #define G1ASE                   COG1ASD0bits.G1ASE              // bit 7
6803 
6804 #define G1AS0E                  COG1ASD1bits.G1AS0E             // bit 0
6805 #define G1AS1E                  COG1ASD1bits.G1AS1E             // bit 1
6806 #define G1AS2E                  COG1ASD1bits.G1AS2E             // bit 2
6807 #define G1AS3E                  COG1ASD1bits.G1AS3E             // bit 3
6808 
6809 #define G1BLKF0                 COG1BLKFbits.G1BLKF0            // bit 0
6810 #define G1BLKF1                 COG1BLKFbits.G1BLKF1            // bit 1
6811 #define G1BLKF2                 COG1BLKFbits.G1BLKF2            // bit 2
6812 #define G1BLKF3                 COG1BLKFbits.G1BLKF3            // bit 3
6813 #define G1BLKF4                 COG1BLKFbits.G1BLKF4            // bit 4
6814 #define G1BLKF5                 COG1BLKFbits.G1BLKF5            // bit 5
6815 
6816 #define G1BLKR0                 COG1BLKRbits.G1BLKR0            // bit 0
6817 #define G1BLKR1                 COG1BLKRbits.G1BLKR1            // bit 1
6818 #define G1BLKR2                 COG1BLKRbits.G1BLKR2            // bit 2
6819 #define G1BLKR3                 COG1BLKRbits.G1BLKR3            // bit 3
6820 #define G1BLKR4                 COG1BLKRbits.G1BLKR4            // bit 4
6821 #define G1BLKR5                 COG1BLKRbits.G1BLKR5            // bit 5
6822 
6823 #define G1MD0                   COG1CON0bits.G1MD0              // bit 0
6824 #define G1MD1                   COG1CON0bits.G1MD1              // bit 1
6825 #define G1MD2                   COG1CON0bits.G1MD2              // bit 2
6826 #define G1CS0                   COG1CON0bits.G1CS0              // bit 3
6827 #define G1CS1                   COG1CON0bits.G1CS1              // bit 4
6828 #define G1LD                    COG1CON0bits.G1LD               // bit 6
6829 #define G1EN                    COG1CON0bits.G1EN               // bit 7
6830 
6831 #define G1POLA                  COG1CON1bits.G1POLA             // bit 0
6832 #define G1POLB                  COG1CON1bits.G1POLB             // bit 1
6833 #define G1POLC                  COG1CON1bits.G1POLC             // bit 2
6834 #define G1POLD                  COG1CON1bits.G1POLD             // bit 3
6835 #define G1FDBS                  COG1CON1bits.G1FDBS             // bit 6
6836 #define G1RDBS                  COG1CON1bits.G1RDBS             // bit 7
6837 
6838 #define G1DBF0                  COG1DBFbits.G1DBF0              // bit 0
6839 #define G1DBF1                  COG1DBFbits.G1DBF1              // bit 1
6840 #define G1DBF2                  COG1DBFbits.G1DBF2              // bit 2
6841 #define G1DBF3                  COG1DBFbits.G1DBF3              // bit 3
6842 #define G1DBF4                  COG1DBFbits.G1DBF4              // bit 4
6843 #define G1DBF5                  COG1DBFbits.G1DBF5              // bit 5
6844 
6845 #define G1DBR0                  COG1DBRbits.G1DBR0              // bit 0
6846 #define G1DBR1                  COG1DBRbits.G1DBR1              // bit 1
6847 #define G1DBR2                  COG1DBRbits.G1DBR2              // bit 2
6848 #define G1DBR3                  COG1DBRbits.G1DBR3              // bit 3
6849 #define G1DBR4                  COG1DBRbits.G1DBR4              // bit 4
6850 #define G1DBR5                  COG1DBRbits.G1DBR5              // bit 5
6851 
6852 #define G1FIS0                  COG1FISbits.G1FIS0              // bit 0
6853 #define G1FIS1                  COG1FISbits.G1FIS1              // bit 1
6854 #define G1FIS2                  COG1FISbits.G1FIS2              // bit 2
6855 #define G1FIS3                  COG1FISbits.G1FIS3              // bit 3
6856 #define G1FIS4                  COG1FISbits.G1FIS4              // bit 4
6857 #define G1FIS5                  COG1FISbits.G1FIS5              // bit 5
6858 #define G1FIS6                  COG1FISbits.G1FIS6              // bit 6
6859 
6860 #define G1FSIM0                 COG1FSIMbits.G1FSIM0            // bit 0
6861 #define G1FSIM1                 COG1FSIMbits.G1FSIM1            // bit 1
6862 #define G1FSIM2                 COG1FSIMbits.G1FSIM2            // bit 2
6863 #define G1FSIM3                 COG1FSIMbits.G1FSIM3            // bit 3
6864 #define G1FSIM4                 COG1FSIMbits.G1FSIM4            // bit 4
6865 #define G1FSIM5                 COG1FSIMbits.G1FSIM5            // bit 5
6866 #define G1FSIM6                 COG1FSIMbits.G1FSIM6            // bit 6
6867 
6868 #define G1PHF0                  COG1PHFbits.G1PHF0              // bit 0
6869 #define G1PHF1                  COG1PHFbits.G1PHF1              // bit 1
6870 #define G1PHF2                  COG1PHFbits.G1PHF2              // bit 2
6871 #define G1PHF3                  COG1PHFbits.G1PHF3              // bit 3
6872 #define G1PHF4                  COG1PHFbits.G1PHF4              // bit 4
6873 #define G1PHF5                  COG1PHFbits.G1PHF5              // bit 5
6874 
6875 #define G1PHR0                  COG1PHRbits.G1PHR0              // bit 0
6876 #define G1PHR1                  COG1PHRbits.G1PHR1              // bit 1
6877 #define G1PHR2                  COG1PHRbits.G1PHR2              // bit 2
6878 #define G1PHR3                  COG1PHRbits.G1PHR3              // bit 3
6879 #define G1PHR4                  COG1PHRbits.G1PHR4              // bit 4
6880 #define G1PHR5                  COG1PHRbits.G1PHR5              // bit 5
6881 
6882 #define G1RIS0                  COG1RISbits.G1RIS0              // bit 0
6883 #define G1RIS1                  COG1RISbits.G1RIS1              // bit 1
6884 #define G1RIS2                  COG1RISbits.G1RIS2              // bit 2
6885 #define G1RIS3                  COG1RISbits.G1RIS3              // bit 3
6886 #define G1RIS4                  COG1RISbits.G1RIS4              // bit 4
6887 #define G1RIS5                  COG1RISbits.G1RIS5              // bit 5
6888 #define G1RIS6                  COG1RISbits.G1RIS6              // bit 6
6889 
6890 #define G1RSIM0                 COG1RSIMbits.G1RSIM0            // bit 0
6891 #define G1RSIM1                 COG1RSIMbits.G1RSIM1            // bit 1
6892 #define G1RSIM2                 COG1RSIMbits.G1RSIM2            // bit 2
6893 #define G1RSIM3                 COG1RSIMbits.G1RSIM3            // bit 3
6894 #define G1RSIM4                 COG1RSIMbits.G1RSIM4            // bit 4
6895 #define G1RSIM5                 COG1RSIMbits.G1RSIM5            // bit 5
6896 #define G1RSIM6                 COG1RSIMbits.G1RSIM6            // bit 6
6897 
6898 #define G1STRA                  COG1STRbits.G1STRA              // bit 0
6899 #define G1STRB                  COG1STRbits.G1STRB              // bit 1
6900 #define G1STRC                  COG1STRbits.G1STRC              // bit 2
6901 #define G1STRD                  COG1STRbits.G1STRD              // bit 3
6902 #define G1SDATA                 COG1STRbits.G1SDATA             // bit 4
6903 #define G1SDATB                 COG1STRbits.G1SDATB             // bit 5
6904 #define G1SDATC                 COG1STRbits.G1SDATC             // bit 6
6905 #define G1SDATD                 COG1STRbits.G1SDATD             // bit 7
6906 
6907 #define DAC1NSS                 DAC1CON0bits.DAC1NSS            // bit 0, shadows bit in DAC1CON0bits
6908 #define DACNSS                  DAC1CON0bits.DACNSS             // bit 0, shadows bit in DAC1CON0bits
6909 #define DAC1PSS0                DAC1CON0bits.DAC1PSS0           // bit 2, shadows bit in DAC1CON0bits
6910 #define DACPSS0                 DAC1CON0bits.DACPSS0            // bit 2, shadows bit in DAC1CON0bits
6911 #define DAC1PSS1                DAC1CON0bits.DAC1PSS1           // bit 3, shadows bit in DAC1CON0bits
6912 #define DACPSS1                 DAC1CON0bits.DACPSS1            // bit 3, shadows bit in DAC1CON0bits
6913 #define DAC1OE2                 DAC1CON0bits.DAC1OE2            // bit 4, shadows bit in DAC1CON0bits
6914 #define DACOE0                  DAC1CON0bits.DACOE0             // bit 4, shadows bit in DAC1CON0bits
6915 #define DAC1OE1                 DAC1CON0bits.DAC1OE1            // bit 5, shadows bit in DAC1CON0bits
6916 #define DACOE1                  DAC1CON0bits.DACOE1             // bit 5, shadows bit in DAC1CON0bits
6917 #define DAC1EN                  DAC1CON0bits.DAC1EN             // bit 7, shadows bit in DAC1CON0bits
6918 #define DACEN                   DAC1CON0bits.DACEN              // bit 7, shadows bit in DAC1CON0bits
6919 
6920 #define DAC1R0                  DAC1CON1bits.DAC1R0             // bit 0, shadows bit in DAC1CON1bits
6921 #define DACR0                   DAC1CON1bits.DACR0              // bit 0, shadows bit in DAC1CON1bits
6922 #define DAC1R1                  DAC1CON1bits.DAC1R1             // bit 1, shadows bit in DAC1CON1bits
6923 #define DACR1                   DAC1CON1bits.DACR1              // bit 1, shadows bit in DAC1CON1bits
6924 #define DAC1R2                  DAC1CON1bits.DAC1R2             // bit 2, shadows bit in DAC1CON1bits
6925 #define DACR2                   DAC1CON1bits.DACR2              // bit 2, shadows bit in DAC1CON1bits
6926 #define DAC1R3                  DAC1CON1bits.DAC1R3             // bit 3, shadows bit in DAC1CON1bits
6927 #define DACR3                   DAC1CON1bits.DACR3              // bit 3, shadows bit in DAC1CON1bits
6928 #define DAC1R4                  DAC1CON1bits.DAC1R4             // bit 4, shadows bit in DAC1CON1bits
6929 #define DACR4                   DAC1CON1bits.DACR4              // bit 4, shadows bit in DAC1CON1bits
6930 #define DAC1R5                  DAC1CON1bits.DAC1R5             // bit 5, shadows bit in DAC1CON1bits
6931 #define DACR5                   DAC1CON1bits.DACR5              // bit 5, shadows bit in DAC1CON1bits
6932 #define DAC1R6                  DAC1CON1bits.DAC1R6             // bit 6, shadows bit in DAC1CON1bits
6933 #define DACR6                   DAC1CON1bits.DACR6              // bit 6, shadows bit in DAC1CON1bits
6934 #define DAC1R7                  DAC1CON1bits.DAC1R7             // bit 7, shadows bit in DAC1CON1bits
6935 #define DACR7                   DAC1CON1bits.DACR7              // bit 7, shadows bit in DAC1CON1bits
6936 
6937 #define ADFVR0                  FVRCONbits.ADFVR0               // bit 0
6938 #define ADFVR1                  FVRCONbits.ADFVR1               // bit 1
6939 #define CDAFVR0                 FVRCONbits.CDAFVR0              // bit 2
6940 #define CDAFVR1                 FVRCONbits.CDAFVR1              // bit 3
6941 #define TSRNG                   FVRCONbits.TSRNG                // bit 4
6942 #define TSEN                    FVRCONbits.TSEN                 // bit 5
6943 #define FVRRDY                  FVRCONbits.FVRRDY               // bit 6
6944 #define FVREN                   FVRCONbits.FVREN                // bit 7
6945 
6946 #define INLVLA0                 INLVLAbits.INLVLA0              // bit 0
6947 #define INLVLA1                 INLVLAbits.INLVLA1              // bit 1
6948 #define INLVLA2                 INLVLAbits.INLVLA2              // bit 2
6949 #define INLVLA3                 INLVLAbits.INLVLA3              // bit 3
6950 #define INLVLA4                 INLVLAbits.INLVLA4              // bit 4
6951 #define INLVLA5                 INLVLAbits.INLVLA5              // bit 5
6952 
6953 #define INLVLC0                 INLVLCbits.INLVLC0              // bit 0
6954 #define INLVLC1                 INLVLCbits.INLVLC1              // bit 1
6955 #define INLVLC2                 INLVLCbits.INLVLC2              // bit 2
6956 #define INLVLC3                 INLVLCbits.INLVLC3              // bit 3
6957 #define INLVLC4                 INLVLCbits.INLVLC4              // bit 4
6958 #define INLVLC5                 INLVLCbits.INLVLC5              // bit 5
6959 
6960 #define IOCIF                   INTCONbits.IOCIF                // bit 0
6961 #define INTF                    INTCONbits.INTF                 // bit 1
6962 #define TMR0IF                  INTCONbits.TMR0IF               // bit 2, shadows bit in INTCONbits
6963 #define T0IF                    INTCONbits.T0IF                 // bit 2, shadows bit in INTCONbits
6964 #define IOCIE                   INTCONbits.IOCIE                // bit 3
6965 #define INTE                    INTCONbits.INTE                 // bit 4
6966 #define TMR0IE                  INTCONbits.TMR0IE               // bit 5, shadows bit in INTCONbits
6967 #define T0IE                    INTCONbits.T0IE                 // bit 5, shadows bit in INTCONbits
6968 #define PEIE                    INTCONbits.PEIE                 // bit 6
6969 #define GIE                     INTCONbits.GIE                  // bit 7
6970 
6971 #define IOCAF0                  IOCAFbits.IOCAF0                // bit 0
6972 #define IOCAF1                  IOCAFbits.IOCAF1                // bit 1
6973 #define IOCAF2                  IOCAFbits.IOCAF2                // bit 2
6974 #define IOCAF3                  IOCAFbits.IOCAF3                // bit 3
6975 #define IOCAF4                  IOCAFbits.IOCAF4                // bit 4
6976 #define IOCAF5                  IOCAFbits.IOCAF5                // bit 5
6977 
6978 #define IOCAN0                  IOCANbits.IOCAN0                // bit 0
6979 #define IOCAN1                  IOCANbits.IOCAN1                // bit 1
6980 #define IOCAN2                  IOCANbits.IOCAN2                // bit 2
6981 #define IOCAN3                  IOCANbits.IOCAN3                // bit 3
6982 #define IOCAN4                  IOCANbits.IOCAN4                // bit 4
6983 #define IOCAN5                  IOCANbits.IOCAN5                // bit 5
6984 
6985 #define IOCAP0                  IOCAPbits.IOCAP0                // bit 0
6986 #define IOCAP1                  IOCAPbits.IOCAP1                // bit 1
6987 #define IOCAP2                  IOCAPbits.IOCAP2                // bit 2
6988 #define IOCAP3                  IOCAPbits.IOCAP3                // bit 3
6989 #define IOCAP4                  IOCAPbits.IOCAP4                // bit 4
6990 #define IOCAP5                  IOCAPbits.IOCAP5                // bit 5
6991 
6992 #define IOCCF0                  IOCCFbits.IOCCF0                // bit 0
6993 #define IOCCF1                  IOCCFbits.IOCCF1                // bit 1
6994 #define IOCCF2                  IOCCFbits.IOCCF2                // bit 2
6995 #define IOCCF3                  IOCCFbits.IOCCF3                // bit 3
6996 #define IOCCF4                  IOCCFbits.IOCCF4                // bit 4
6997 #define IOCCF5                  IOCCFbits.IOCCF5                // bit 5
6998 
6999 #define IOCCN0                  IOCCNbits.IOCCN0                // bit 0
7000 #define IOCCN1                  IOCCNbits.IOCCN1                // bit 1
7001 #define IOCCN2                  IOCCNbits.IOCCN2                // bit 2
7002 #define IOCCN3                  IOCCNbits.IOCCN3                // bit 3
7003 #define IOCCN4                  IOCCNbits.IOCCN4                // bit 4
7004 #define IOCCN5                  IOCCNbits.IOCCN5                // bit 5
7005 
7006 #define IOCCP0                  IOCCPbits.IOCCP0                // bit 0
7007 #define IOCCP1                  IOCCPbits.IOCCP1                // bit 1
7008 #define IOCCP2                  IOCCPbits.IOCCP2                // bit 2
7009 #define IOCCP3                  IOCCPbits.IOCCP3                // bit 3
7010 #define IOCCP4                  IOCCPbits.IOCCP4                // bit 4
7011 #define IOCCP5                  IOCCPbits.IOCCP5                // bit 5
7012 
7013 #define LATA0                   LATAbits.LATA0                  // bit 0
7014 #define LATA1                   LATAbits.LATA1                  // bit 1
7015 #define LATA2                   LATAbits.LATA2                  // bit 2
7016 #define LATA4                   LATAbits.LATA4                  // bit 4
7017 #define LATA5                   LATAbits.LATA5                  // bit 5
7018 
7019 #define LATC0                   LATCbits.LATC0                  // bit 0
7020 #define LATC1                   LATCbits.LATC1                  // bit 1
7021 #define LATC2                   LATCbits.LATC2                  // bit 2
7022 #define LATC3                   LATCbits.LATC3                  // bit 3
7023 #define LATC4                   LATCbits.LATC4                  // bit 4
7024 #define LATC5                   LATCbits.LATC5                  // bit 5
7025 
7026 #define ODA0                    ODCONAbits.ODA0                 // bit 0
7027 #define ODA1                    ODCONAbits.ODA1                 // bit 1
7028 #define ODA2                    ODCONAbits.ODA2                 // bit 2
7029 #define ODA4                    ODCONAbits.ODA4                 // bit 4
7030 #define ODA5                    ODCONAbits.ODA5                 // bit 5
7031 
7032 #define ODC0                    ODCONCbits.ODC0                 // bit 0
7033 #define ODC1                    ODCONCbits.ODC1                 // bit 1
7034 #define ODC2                    ODCONCbits.ODC2                 // bit 2
7035 #define ODC3                    ODCONCbits.ODC3                 // bit 3
7036 #define ODC4                    ODCONCbits.ODC4                 // bit 4
7037 #define ODC5                    ODCONCbits.ODC5                 // bit 5
7038 
7039 #define OPA1PCH0                OPA1CONbits.OPA1PCH0            // bit 0
7040 #define OPA1PCH1                OPA1CONbits.OPA1PCH1            // bit 1
7041 #define OPA1UG                  OPA1CONbits.OPA1UG              // bit 4
7042 #define OPA1SP                  OPA1CONbits.OPA1SP              // bit 6
7043 #define OPA1EN                  OPA1CONbits.OPA1EN              // bit 7
7044 
7045 #define OPA2PCH0                OPA2CONbits.OPA2PCH0            // bit 0
7046 #define OPA2PCH1                OPA2CONbits.OPA2PCH1            // bit 1
7047 #define OPA2UG                  OPA2CONbits.OPA2UG              // bit 4
7048 #define OPA2SP                  OPA2CONbits.OPA2SP              // bit 6
7049 #define OPA2EN                  OPA2CONbits.OPA2EN              // bit 7
7050 
7051 #define PS0                     OPTION_REGbits.PS0              // bit 0
7052 #define PS1                     OPTION_REGbits.PS1              // bit 1
7053 #define PS2                     OPTION_REGbits.PS2              // bit 2
7054 #define PSA                     OPTION_REGbits.PSA              // bit 3
7055 #define TMR0SE                  OPTION_REGbits.TMR0SE           // bit 4, shadows bit in OPTION_REGbits
7056 #define T0SE                    OPTION_REGbits.T0SE             // bit 4, shadows bit in OPTION_REGbits
7057 #define TMR0CS                  OPTION_REGbits.TMR0CS           // bit 5, shadows bit in OPTION_REGbits
7058 #define T0CS                    OPTION_REGbits.T0CS             // bit 5, shadows bit in OPTION_REGbits
7059 #define INTEDG                  OPTION_REGbits.INTEDG           // bit 6
7060 #define NOT_WPUEN               OPTION_REGbits.NOT_WPUEN        // bit 7
7061 
7062 #define SCS0                    OSCCONbits.SCS0                 // bit 0
7063 #define SCS1                    OSCCONbits.SCS1                 // bit 1
7064 #define IRCF0                   OSCCONbits.IRCF0                // bit 3
7065 #define IRCF1                   OSCCONbits.IRCF1                // bit 4
7066 #define IRCF2                   OSCCONbits.IRCF2                // bit 5
7067 #define IRCF3                   OSCCONbits.IRCF3                // bit 6
7068 #define SPLLEN                  OSCCONbits.SPLLEN               // bit 7
7069 
7070 #define HFIOFS                  OSCSTATbits.HFIOFS              // bit 0
7071 #define LFIOFR                  OSCSTATbits.LFIOFR              // bit 1
7072 #define MFIOFR                  OSCSTATbits.MFIOFR              // bit 2
7073 #define HFIOFL                  OSCSTATbits.HFIOFL              // bit 3
7074 #define HFIOFR                  OSCSTATbits.HFIOFR              // bit 4
7075 #define OSTS                    OSCSTATbits.OSTS                // bit 5
7076 #define PLLR                    OSCSTATbits.PLLR                // bit 6
7077 #define SOSCR                   OSCSTATbits.SOSCR               // bit 7
7078 
7079 #define TUN0                    OSCTUNEbits.TUN0                // bit 0
7080 #define TUN1                    OSCTUNEbits.TUN1                // bit 1
7081 #define TUN2                    OSCTUNEbits.TUN2                // bit 2
7082 #define TUN3                    OSCTUNEbits.TUN3                // bit 3
7083 #define TUN4                    OSCTUNEbits.TUN4                // bit 4
7084 #define TUN5                    OSCTUNEbits.TUN5                // bit 5
7085 
7086 #define NOT_BOR                 PCONbits.NOT_BOR                // bit 0
7087 #define NOT_POR                 PCONbits.NOT_POR                // bit 1
7088 #define NOT_RI                  PCONbits.NOT_RI                 // bit 2
7089 #define NOT_RMCLR               PCONbits.NOT_RMCLR              // bit 3
7090 #define NOT_RWDT                PCONbits.NOT_RWDT               // bit 4
7091 #define STKUNF                  PCONbits.STKUNF                 // bit 6
7092 #define STKOVF                  PCONbits.STKOVF                 // bit 7
7093 
7094 #define TMR1IE                  PIE1bits.TMR1IE                 // bit 0
7095 #define TMR2IE                  PIE1bits.TMR2IE                 // bit 1
7096 #define CCP1IE                  PIE1bits.CCP1IE                 // bit 2, shadows bit in PIE1bits
7097 #define CCPIE                   PIE1bits.CCPIE                  // bit 2, shadows bit in PIE1bits
7098 #define SSP1IE                  PIE1bits.SSP1IE                 // bit 3
7099 #define TXIE                    PIE1bits.TXIE                   // bit 4
7100 #define RCIE                    PIE1bits.RCIE                   // bit 5
7101 #define ADIE                    PIE1bits.ADIE                   // bit 6
7102 #define TMR1GIE                 PIE1bits.TMR1GIE                // bit 7
7103 
7104 #define CCP2IE                  PIE2bits.CCP2IE                 // bit 0
7105 #define TMR4IE                  PIE2bits.TMR4IE                 // bit 1
7106 #define TMR6IE                  PIE2bits.TMR6IE                 // bit 2
7107 #define BCL1IE                  PIE2bits.BCL1IE                 // bit 3
7108 #define C1IE                    PIE2bits.C1IE                   // bit 5
7109 #define C2IE                    PIE2bits.C2IE                   // bit 6
7110 #define OSFIE                   PIE2bits.OSFIE                  // bit 7
7111 
7112 #define CLC1IE                  PIE3bits.CLC1IE                 // bit 0
7113 #define CLC2IE                  PIE3bits.CLC2IE                 // bit 1
7114 #define CLC3IE                  PIE3bits.CLC3IE                 // bit 2
7115 #define ZCDIE                   PIE3bits.ZCDIE                  // bit 4
7116 #define COGIE                   PIE3bits.COGIE                  // bit 5
7117 
7118 #define TMR1IF                  PIR1bits.TMR1IF                 // bit 0
7119 #define TMR2IF                  PIR1bits.TMR2IF                 // bit 1
7120 #define CCP1IF                  PIR1bits.CCP1IF                 // bit 2, shadows bit in PIR1bits
7121 #define CCPIF                   PIR1bits.CCPIF                  // bit 2, shadows bit in PIR1bits
7122 #define SSP1IF                  PIR1bits.SSP1IF                 // bit 3
7123 #define TXIF                    PIR1bits.TXIF                   // bit 4
7124 #define RCIF                    PIR1bits.RCIF                   // bit 5
7125 #define ADIF                    PIR1bits.ADIF                   // bit 6
7126 #define TMR1GIF                 PIR1bits.TMR1GIF                // bit 7
7127 
7128 #define CCP2IF                  PIR2bits.CCP2IF                 // bit 0
7129 #define TMR4IF                  PIR2bits.TMR4IF                 // bit 1
7130 #define TMR6IF                  PIR2bits.TMR6IF                 // bit 2
7131 #define BCL1IF                  PIR2bits.BCL1IF                 // bit 3
7132 #define C1IF                    PIR2bits.C1IF                   // bit 5
7133 #define C2IF                    PIR2bits.C2IF                   // bit 6
7134 #define OSFIF                   PIR2bits.OSFIF                  // bit 7
7135 
7136 #define CLC1IF                  PIR3bits.CLC1IF                 // bit 0
7137 #define CLC2IF                  PIR3bits.CLC2IF                 // bit 1
7138 #define CLC3IF                  PIR3bits.CLC3IF                 // bit 2
7139 #define ZCDIF                   PIR3bits.ZCDIF                  // bit 4
7140 #define COGIF                   PIR3bits.COGIF                  // bit 5
7141 
7142 #define RD                      PMCON1bits.RD                   // bit 0
7143 #define WR                      PMCON1bits.WR                   // bit 1
7144 #define WREN                    PMCON1bits.WREN                 // bit 2
7145 #define WRERR                   PMCON1bits.WRERR                // bit 3
7146 #define FREE                    PMCON1bits.FREE                 // bit 4
7147 #define LWLO                    PMCON1bits.LWLO                 // bit 5
7148 #define CFGS                    PMCON1bits.CFGS                 // bit 6
7149 
7150 #define RA0                     PORTAbits.RA0                   // bit 0
7151 #define RA1                     PORTAbits.RA1                   // bit 1
7152 #define RA2                     PORTAbits.RA2                   // bit 2
7153 #define RA3                     PORTAbits.RA3                   // bit 3
7154 #define RA4                     PORTAbits.RA4                   // bit 4
7155 #define RA5                     PORTAbits.RA5                   // bit 5
7156 
7157 #define RC0                     PORTCbits.RC0                   // bit 0
7158 #define RC1                     PORTCbits.RC1                   // bit 1
7159 #define RC2                     PORTCbits.RC2                   // bit 2
7160 #define RC3                     PORTCbits.RC3                   // bit 3
7161 #define RC4                     PORTCbits.RC4                   // bit 4
7162 #define RC5                     PORTCbits.RC5                   // bit 5
7163 
7164 #define PPSLOCKED               PPSLOCKbits.PPSLOCKED           // bit 0
7165 
7166 #define PWM3POL                 PWM3CONbits.PWM3POL             // bit 4
7167 #define PWM3OUT                 PWM3CONbits.PWM3OUT             // bit 5
7168 #define PWM3EN                  PWM3CONbits.PWM3EN              // bit 7
7169 
7170 #define PWM3DCH0                PWM3DCHbits.PWM3DCH0            // bit 0
7171 #define PWM3DCH1                PWM3DCHbits.PWM3DCH1            // bit 1
7172 #define PWM3DCH2                PWM3DCHbits.PWM3DCH2            // bit 2
7173 #define PWM3DCH3                PWM3DCHbits.PWM3DCH3            // bit 3
7174 #define PWM3DCH4                PWM3DCHbits.PWM3DCH4            // bit 4
7175 #define PWM3DCH5                PWM3DCHbits.PWM3DCH5            // bit 5
7176 #define PWM3DCH6                PWM3DCHbits.PWM3DCH6            // bit 6
7177 #define PWM3DCH7                PWM3DCHbits.PWM3DCH7            // bit 7
7178 
7179 #define PWM3DCL0                PWM3DCLbits.PWM3DCL0            // bit 6
7180 #define PWM3DCL1                PWM3DCLbits.PWM3DCL1            // bit 7
7181 
7182 #define PWM4POL                 PWM4CONbits.PWM4POL             // bit 4
7183 #define PWM4OUT                 PWM4CONbits.PWM4OUT             // bit 5
7184 #define PWM4EN                  PWM4CONbits.PWM4EN              // bit 7
7185 
7186 #define PWM4DCH0                PWM4DCHbits.PWM4DCH0            // bit 0
7187 #define PWM4DCH1                PWM4DCHbits.PWM4DCH1            // bit 1
7188 #define PWM4DCH2                PWM4DCHbits.PWM4DCH2            // bit 2
7189 #define PWM4DCH3                PWM4DCHbits.PWM4DCH3            // bit 3
7190 #define PWM4DCH4                PWM4DCHbits.PWM4DCH4            // bit 4
7191 #define PWM4DCH5                PWM4DCHbits.PWM4DCH5            // bit 5
7192 #define PWM4DCH6                PWM4DCHbits.PWM4DCH6            // bit 6
7193 #define PWM4DCH7                PWM4DCHbits.PWM4DCH7            // bit 7
7194 
7195 #define PWM4DCL0                PWM4DCLbits.PWM4DCL0            // bit 6
7196 #define PWM4DCL1                PWM4DCLbits.PWM4DCL1            // bit 7
7197 
7198 #define RX9D                    RC1STAbits.RX9D                 // bit 0
7199 #define OERR                    RC1STAbits.OERR                 // bit 1
7200 #define FERR                    RC1STAbits.FERR                 // bit 2
7201 #define ADDEN                   RC1STAbits.ADDEN                // bit 3
7202 #define CREN                    RC1STAbits.CREN                 // bit 4
7203 #define SREN                    RC1STAbits.SREN                 // bit 5
7204 #define RX9                     RC1STAbits.RX9                  // bit 6
7205 #define SPEN                    RC1STAbits.SPEN                 // bit 7
7206 
7207 #define SLRA0                   SLRCONAbits.SLRA0               // bit 0
7208 #define SLRA1                   SLRCONAbits.SLRA1               // bit 1
7209 #define SLRA2                   SLRCONAbits.SLRA2               // bit 2
7210 #define SLRA4                   SLRCONAbits.SLRA4               // bit 4
7211 #define SLRA5                   SLRCONAbits.SLRA5               // bit 5
7212 
7213 #define SLRC0                   SLRCONCbits.SLRC0               // bit 0
7214 #define SLRC1                   SLRCONCbits.SLRC1               // bit 1
7215 #define SLRC2                   SLRCONCbits.SLRC2               // bit 2
7216 #define SLRC3                   SLRCONCbits.SLRC3               // bit 3
7217 #define SLRC4                   SLRCONCbits.SLRC4               // bit 4
7218 #define SLRC5                   SLRCONCbits.SLRC5               // bit 5
7219 
7220 #define SSP1ADD0                SSP1ADDbits.SSP1ADD0            // bit 0, shadows bit in SSP1ADDbits
7221 #define ADD0                    SSP1ADDbits.ADD0                // bit 0, shadows bit in SSP1ADDbits
7222 #define SSP1ADD1                SSP1ADDbits.SSP1ADD1            // bit 1, shadows bit in SSP1ADDbits
7223 #define ADD1                    SSP1ADDbits.ADD1                // bit 1, shadows bit in SSP1ADDbits
7224 #define SSP1ADD2                SSP1ADDbits.SSP1ADD2            // bit 2, shadows bit in SSP1ADDbits
7225 #define ADD2                    SSP1ADDbits.ADD2                // bit 2, shadows bit in SSP1ADDbits
7226 #define SSP1ADD3                SSP1ADDbits.SSP1ADD3            // bit 3, shadows bit in SSP1ADDbits
7227 #define ADD3                    SSP1ADDbits.ADD3                // bit 3, shadows bit in SSP1ADDbits
7228 #define SSP1ADD4                SSP1ADDbits.SSP1ADD4            // bit 4, shadows bit in SSP1ADDbits
7229 #define ADD4                    SSP1ADDbits.ADD4                // bit 4, shadows bit in SSP1ADDbits
7230 #define SSP1ADD5                SSP1ADDbits.SSP1ADD5            // bit 5, shadows bit in SSP1ADDbits
7231 #define ADD5                    SSP1ADDbits.ADD5                // bit 5, shadows bit in SSP1ADDbits
7232 #define SSP1ADD6                SSP1ADDbits.SSP1ADD6            // bit 6, shadows bit in SSP1ADDbits
7233 #define ADD6                    SSP1ADDbits.ADD6                // bit 6, shadows bit in SSP1ADDbits
7234 #define SSP1ADD7                SSP1ADDbits.SSP1ADD7            // bit 7, shadows bit in SSP1ADDbits
7235 #define ADD7                    SSP1ADDbits.ADD7                // bit 7, shadows bit in SSP1ADDbits
7236 
7237 #define SSP1BUF0                SSP1BUFbits.SSP1BUF0            // bit 0, shadows bit in SSP1BUFbits
7238 #define BUF0                    SSP1BUFbits.BUF0                // bit 0, shadows bit in SSP1BUFbits
7239 #define SSP1BUF1                SSP1BUFbits.SSP1BUF1            // bit 1, shadows bit in SSP1BUFbits
7240 #define BUF1                    SSP1BUFbits.BUF1                // bit 1, shadows bit in SSP1BUFbits
7241 #define SSP1BUF2                SSP1BUFbits.SSP1BUF2            // bit 2, shadows bit in SSP1BUFbits
7242 #define BUF2                    SSP1BUFbits.BUF2                // bit 2, shadows bit in SSP1BUFbits
7243 #define SSP1BUF3                SSP1BUFbits.SSP1BUF3            // bit 3, shadows bit in SSP1BUFbits
7244 #define BUF3                    SSP1BUFbits.BUF3                // bit 3, shadows bit in SSP1BUFbits
7245 #define SSP1BUF4                SSP1BUFbits.SSP1BUF4            // bit 4, shadows bit in SSP1BUFbits
7246 #define BUF4                    SSP1BUFbits.BUF4                // bit 4, shadows bit in SSP1BUFbits
7247 #define SSP1BUF5                SSP1BUFbits.SSP1BUF5            // bit 5, shadows bit in SSP1BUFbits
7248 #define BUF5                    SSP1BUFbits.BUF5                // bit 5, shadows bit in SSP1BUFbits
7249 #define SSP1BUF6                SSP1BUFbits.SSP1BUF6            // bit 6, shadows bit in SSP1BUFbits
7250 #define BUF6                    SSP1BUFbits.BUF6                // bit 6, shadows bit in SSP1BUFbits
7251 #define SSP1BUF7                SSP1BUFbits.SSP1BUF7            // bit 7, shadows bit in SSP1BUFbits
7252 #define BUF7                    SSP1BUFbits.BUF7                // bit 7, shadows bit in SSP1BUFbits
7253 
7254 #define SSPM0                   SSP1CONbits.SSPM0               // bit 0
7255 #define SSPM1                   SSP1CONbits.SSPM1               // bit 1
7256 #define SSPM2                   SSP1CONbits.SSPM2               // bit 2
7257 #define SSPM3                   SSP1CONbits.SSPM3               // bit 3
7258 #define CKP                     SSP1CONbits.CKP                 // bit 4
7259 #define SSPEN                   SSP1CONbits.SSPEN               // bit 5
7260 #define SSPOV                   SSP1CONbits.SSPOV               // bit 6
7261 #define WCOL                    SSP1CONbits.WCOL                // bit 7
7262 
7263 #define SEN                     SSP1CON2bits.SEN                // bit 0
7264 #define RSEN                    SSP1CON2bits.RSEN               // bit 1
7265 #define PEN                     SSP1CON2bits.PEN                // bit 2
7266 #define RCEN                    SSP1CON2bits.RCEN               // bit 3
7267 #define ACKEN                   SSP1CON2bits.ACKEN              // bit 4
7268 #define ACKDT                   SSP1CON2bits.ACKDT              // bit 5
7269 #define ACKSTAT                 SSP1CON2bits.ACKSTAT            // bit 6
7270 #define GCEN                    SSP1CON2bits.GCEN               // bit 7
7271 
7272 #define DHEN                    SSP1CON3bits.DHEN               // bit 0
7273 #define AHEN                    SSP1CON3bits.AHEN               // bit 1
7274 #define SBCDE                   SSP1CON3bits.SBCDE              // bit 2
7275 #define SDAHT                   SSP1CON3bits.SDAHT              // bit 3
7276 #define BOEN                    SSP1CON3bits.BOEN               // bit 4
7277 #define SCIE                    SSP1CON3bits.SCIE               // bit 5
7278 #define PCIE                    SSP1CON3bits.PCIE               // bit 6
7279 #define ACKTIM                  SSP1CON3bits.ACKTIM             // bit 7
7280 
7281 #define SSP1MSK0                SSP1MSKbits.SSP1MSK0            // bit 0, shadows bit in SSP1MSKbits
7282 #define MSK0                    SSP1MSKbits.MSK0                // bit 0, shadows bit in SSP1MSKbits
7283 #define SSP1MSK1                SSP1MSKbits.SSP1MSK1            // bit 1, shadows bit in SSP1MSKbits
7284 #define MSK1                    SSP1MSKbits.MSK1                // bit 1, shadows bit in SSP1MSKbits
7285 #define SSP1MSK2                SSP1MSKbits.SSP1MSK2            // bit 2, shadows bit in SSP1MSKbits
7286 #define MSK2                    SSP1MSKbits.MSK2                // bit 2, shadows bit in SSP1MSKbits
7287 #define SSP1MSK3                SSP1MSKbits.SSP1MSK3            // bit 3, shadows bit in SSP1MSKbits
7288 #define MSK3                    SSP1MSKbits.MSK3                // bit 3, shadows bit in SSP1MSKbits
7289 #define SSP1MSK4                SSP1MSKbits.SSP1MSK4            // bit 4, shadows bit in SSP1MSKbits
7290 #define MSK4                    SSP1MSKbits.MSK4                // bit 4, shadows bit in SSP1MSKbits
7291 #define SSP1MSK5                SSP1MSKbits.SSP1MSK5            // bit 5, shadows bit in SSP1MSKbits
7292 #define MSK5                    SSP1MSKbits.MSK5                // bit 5, shadows bit in SSP1MSKbits
7293 #define SSP1MSK6                SSP1MSKbits.SSP1MSK6            // bit 6, shadows bit in SSP1MSKbits
7294 #define MSK6                    SSP1MSKbits.MSK6                // bit 6, shadows bit in SSP1MSKbits
7295 #define SSP1MSK7                SSP1MSKbits.SSP1MSK7            // bit 7, shadows bit in SSP1MSKbits
7296 #define MSK7                    SSP1MSKbits.MSK7                // bit 7, shadows bit in SSP1MSKbits
7297 
7298 #define BF                      SSP1STATbits.BF                 // bit 0
7299 #define UA                      SSP1STATbits.UA                 // bit 1
7300 #define R_NOT_W                 SSP1STATbits.R_NOT_W            // bit 2
7301 #define S                       SSP1STATbits.S                  // bit 3
7302 #define P                       SSP1STATbits.P                  // bit 4
7303 #define D_NOT_A                 SSP1STATbits.D_NOT_A            // bit 5
7304 #define CKE                     SSP1STATbits.CKE                // bit 6
7305 #define SMP                     SSP1STATbits.SMP                // bit 7
7306 
7307 #define C                       STATUSbits.C                    // bit 0
7308 #define DC                      STATUSbits.DC                   // bit 1
7309 #define Z                       STATUSbits.Z                    // bit 2
7310 #define NOT_PD                  STATUSbits.NOT_PD               // bit 3
7311 #define NOT_TO                  STATUSbits.NOT_TO               // bit 4
7312 
7313 #define C_SHAD                  STATUS_SHADbits.C_SHAD          // bit 0
7314 #define DC_SHAD                 STATUS_SHADbits.DC_SHAD         // bit 1
7315 #define Z_SHAD                  STATUS_SHADbits.Z_SHAD          // bit 2
7316 
7317 #define TMR1ON                  T1CONbits.TMR1ON                // bit 0
7318 #define NOT_T1SYNC              T1CONbits.NOT_T1SYNC            // bit 2
7319 #define T1OSCEN                 T1CONbits.T1OSCEN               // bit 3
7320 #define T1CKPS0                 T1CONbits.T1CKPS0               // bit 4
7321 #define T1CKPS1                 T1CONbits.T1CKPS1               // bit 5
7322 #define TMR1CS0                 T1CONbits.TMR1CS0               // bit 6
7323 #define TMR1CS1                 T1CONbits.TMR1CS1               // bit 7
7324 
7325 #define T1GSS0                  T1GCONbits.T1GSS0               // bit 0
7326 #define T1GSS1                  T1GCONbits.T1GSS1               // bit 1
7327 #define T1GVAL                  T1GCONbits.T1GVAL               // bit 2
7328 #define T1GGO_NOT_DONE          T1GCONbits.T1GGO_NOT_DONE       // bit 3
7329 #define T1GSPM                  T1GCONbits.T1GSPM               // bit 4
7330 #define T1GTM                   T1GCONbits.T1GTM                // bit 5
7331 #define T1GPOL                  T1GCONbits.T1GPOL               // bit 6
7332 #define TMR1GE                  T1GCONbits.TMR1GE               // bit 7
7333 
7334 #define T2CKPS0                 T2CONbits.T2CKPS0               // bit 0
7335 #define T2CKPS1                 T2CONbits.T2CKPS1               // bit 1
7336 #define TMR2ON                  T2CONbits.TMR2ON                // bit 2
7337 #define T2OUTPS0                T2CONbits.T2OUTPS0              // bit 3
7338 #define T2OUTPS1                T2CONbits.T2OUTPS1              // bit 4
7339 #define T2OUTPS2                T2CONbits.T2OUTPS2              // bit 5
7340 #define T2OUTPS3                T2CONbits.T2OUTPS3              // bit 6
7341 
7342 #define T4CKPS0                 T4CONbits.T4CKPS0               // bit 0
7343 #define T4CKPS1                 T4CONbits.T4CKPS1               // bit 1
7344 #define TMR4ON                  T4CONbits.TMR4ON                // bit 2
7345 #define T4OUTPS0                T4CONbits.T4OUTPS0              // bit 3
7346 #define T4OUTPS1                T4CONbits.T4OUTPS1              // bit 4
7347 #define T4OUTPS2                T4CONbits.T4OUTPS2              // bit 5
7348 #define T4OUTPS3                T4CONbits.T4OUTPS3              // bit 6
7349 
7350 #define T6CKPS0                 T6CONbits.T6CKPS0               // bit 0
7351 #define T6CKPS1                 T6CONbits.T6CKPS1               // bit 1
7352 #define TMR6ON                  T6CONbits.TMR6ON                // bit 2
7353 #define T6OUTPS0                T6CONbits.T6OUTPS0              // bit 3
7354 #define T6OUTPS1                T6CONbits.T6OUTPS1              // bit 4
7355 #define T6OUTPS2                T6CONbits.T6OUTPS2              // bit 5
7356 #define T6OUTPS3                T6CONbits.T6OUTPS3              // bit 6
7357 
7358 #define TRISA0                  TRISAbits.TRISA0                // bit 0
7359 #define TRISA1                  TRISAbits.TRISA1                // bit 1
7360 #define TRISA2                  TRISAbits.TRISA2                // bit 2
7361 #define TRISA4                  TRISAbits.TRISA4                // bit 4
7362 #define TRISA5                  TRISAbits.TRISA5                // bit 5
7363 
7364 #define TRISC0                  TRISCbits.TRISC0                // bit 0
7365 #define TRISC1                  TRISCbits.TRISC1                // bit 1
7366 #define TRISC2                  TRISCbits.TRISC2                // bit 2
7367 #define TRISC3                  TRISCbits.TRISC3                // bit 3
7368 #define TRISC4                  TRISCbits.TRISC4                // bit 4
7369 #define TRISC5                  TRISCbits.TRISC5                // bit 5
7370 
7371 #define TX9D                    TX1STAbits.TX9D                 // bit 0
7372 #define TRMT                    TX1STAbits.TRMT                 // bit 1
7373 #define BRGH                    TX1STAbits.BRGH                 // bit 2
7374 #define SENDB                   TX1STAbits.SENDB                // bit 3
7375 #define SYNC                    TX1STAbits.SYNC                 // bit 4
7376 #define TXEN                    TX1STAbits.TXEN                 // bit 5
7377 #define TX9                     TX1STAbits.TX9                  // bit 6
7378 #define CSRC                    TX1STAbits.CSRC                 // bit 7
7379 
7380 #define Reserved                VREGCONbits.Reserved            // bit 0
7381 #define VREGPM                  VREGCONbits.VREGPM              // bit 1
7382 
7383 #define SWDTEN                  WDTCONbits.SWDTEN               // bit 0
7384 #define WDTPS0                  WDTCONbits.WDTPS0               // bit 1
7385 #define WDTPS1                  WDTCONbits.WDTPS1               // bit 2
7386 #define WDTPS2                  WDTCONbits.WDTPS2               // bit 3
7387 #define WDTPS3                  WDTCONbits.WDTPS3               // bit 4
7388 #define WDTPS4                  WDTCONbits.WDTPS4               // bit 5
7389 
7390 #define WPUA0                   WPUAbits.WPUA0                  // bit 0
7391 #define WPUA1                   WPUAbits.WPUA1                  // bit 1
7392 #define WPUA2                   WPUAbits.WPUA2                  // bit 2
7393 #define WPUA3                   WPUAbits.WPUA3                  // bit 3
7394 #define WPUA4                   WPUAbits.WPUA4                  // bit 4
7395 #define WPUA5                   WPUAbits.WPUA5                  // bit 5
7396 
7397 #define WPUC0                   WPUCbits.WPUC0                  // bit 0
7398 #define WPUC1                   WPUCbits.WPUC1                  // bit 1
7399 #define WPUC2                   WPUCbits.WPUC2                  // bit 2
7400 #define WPUC3                   WPUCbits.WPUC3                  // bit 3
7401 #define WPUC4                   WPUCbits.WPUC4                  // bit 4
7402 #define WPUC5                   WPUCbits.WPUC5                  // bit 5
7403 
7404 #define ZCD1INTN                ZCD1CONbits.ZCD1INTN            // bit 0
7405 #define ZCD1INTP                ZCD1CONbits.ZCD1INTP            // bit 1
7406 #define ZCD1POL                 ZCD1CONbits.ZCD1POL             // bit 4
7407 #define ZCD1OUT                 ZCD1CONbits.ZCD1OUT             // bit 5
7408 #define ZCD1EN                  ZCD1CONbits.ZCD1EN              // bit 7
7409 
7410 #endif // #ifndef NO_BIT_DEFINES
7411 
7412 #endif // #ifndef __PIC16F1704_H__
7413