1 /*
2  * This declarations of the PIC16F1933 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:21 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 __PIC16F1933_H__
26 #define __PIC16F1933_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 PORTB_ADDR              0x000D
52 #define PORTC_ADDR              0x000E
53 #define PORTE_ADDR              0x0010
54 #define PIR1_ADDR               0x0011
55 #define PIR2_ADDR               0x0012
56 #define PIR3_ADDR               0x0013
57 #define TMR0_ADDR               0x0015
58 #define TMR1_ADDR               0x0016
59 #define TMR1L_ADDR              0x0016
60 #define TMR1H_ADDR              0x0017
61 #define T1CON_ADDR              0x0018
62 #define T1GCON_ADDR             0x0019
63 #define TMR2_ADDR               0x001A
64 #define PR2_ADDR                0x001B
65 #define T2CON_ADDR              0x001C
66 #define CPSCON0_ADDR            0x001E
67 #define CPSCON1_ADDR            0x001F
68 #define TRISA_ADDR              0x008C
69 #define TRISB_ADDR              0x008D
70 #define TRISC_ADDR              0x008E
71 #define TRISE_ADDR              0x0090
72 #define PIE1_ADDR               0x0091
73 #define PIE2_ADDR               0x0092
74 #define PIE3_ADDR               0x0093
75 #define OPTION_REG_ADDR         0x0095
76 #define PCON_ADDR               0x0096
77 #define WDTCON_ADDR             0x0097
78 #define OSCTUNE_ADDR            0x0098
79 #define OSCCON_ADDR             0x0099
80 #define OSCSTAT_ADDR            0x009A
81 #define ADRES_ADDR              0x009B
82 #define ADRESL_ADDR             0x009B
83 #define ADRESH_ADDR             0x009C
84 #define ADCON0_ADDR             0x009D
85 #define ADCON1_ADDR             0x009E
86 #define LATA_ADDR               0x010C
87 #define LATB_ADDR               0x010D
88 #define LATC_ADDR               0x010E
89 #define LATE_ADDR               0x0110
90 #define CM1CON0_ADDR            0x0111
91 #define CM1CON1_ADDR            0x0112
92 #define CM2CON0_ADDR            0x0113
93 #define CM2CON1_ADDR            0x0114
94 #define CMOUT_ADDR              0x0115
95 #define BORCON_ADDR             0x0116
96 #define FVRCON_ADDR             0x0117
97 #define DACCON0_ADDR            0x0118
98 #define DACCON1_ADDR            0x0119
99 #define SRCON0_ADDR             0x011A
100 #define SRCON1_ADDR             0x011B
101 #define APFCON_ADDR             0x011D
102 #define ANSELA_ADDR             0x018C
103 #define ANSELB_ADDR             0x018D
104 #define EEADR_ADDR              0x0191
105 #define EEADRL_ADDR             0x0191
106 #define EEADRH_ADDR             0x0192
107 #define EEDAT_ADDR              0x0193
108 #define EEDATL_ADDR             0x0193
109 #define EEDATH_ADDR             0x0194
110 #define EECON1_ADDR             0x0195
111 #define EECON2_ADDR             0x0196
112 #define RCREG_ADDR              0x0199
113 #define TXREG_ADDR              0x019A
114 #define SP1BRG_ADDR             0x019B
115 #define SP1BRGL_ADDR            0x019B
116 #define SPBRG_ADDR              0x019B
117 #define SPBRGL_ADDR             0x019B
118 #define SP1BRGH_ADDR            0x019C
119 #define SPBRGH_ADDR             0x019C
120 #define RCSTA_ADDR              0x019D
121 #define TXSTA_ADDR              0x019E
122 #define BAUDCON_ADDR            0x019F
123 #define WPUB_ADDR               0x020D
124 #define WPUE_ADDR               0x0210
125 #define SSPBUF_ADDR             0x0211
126 #define SSPADD_ADDR             0x0212
127 #define SSPMSK_ADDR             0x0213
128 #define SSPSTAT_ADDR            0x0214
129 #define SSPCON_ADDR             0x0215
130 #define SSPCON1_ADDR            0x0215
131 #define SSPCON2_ADDR            0x0216
132 #define SSPCON3_ADDR            0x0217
133 #define CCPR1_ADDR              0x0291
134 #define CCPR1L_ADDR             0x0291
135 #define CCPR1H_ADDR             0x0292
136 #define CCP1CON_ADDR            0x0293
137 #define PWM1CON_ADDR            0x0294
138 #define CCP1AS_ADDR             0x0295
139 #define ECCP1AS_ADDR            0x0295
140 #define PSTR1CON_ADDR           0x0296
141 #define CCPR2_ADDR              0x0298
142 #define CCPR2L_ADDR             0x0298
143 #define CCPR2H_ADDR             0x0299
144 #define CCP2CON_ADDR            0x029A
145 #define PWM2CON_ADDR            0x029B
146 #define CCP2AS_ADDR             0x029C
147 #define ECCP2AS_ADDR            0x029C
148 #define PSTR2CON_ADDR           0x029D
149 #define CCPTMRS0_ADDR           0x029E
150 #define CCPTMRS1_ADDR           0x029F
151 #define CCPR3_ADDR              0x0311
152 #define CCPR3L_ADDR             0x0311
153 #define CCPR3H_ADDR             0x0312
154 #define CCP3CON_ADDR            0x0313
155 #define PWM3CON_ADDR            0x0314
156 #define CCP3AS_ADDR             0x0315
157 #define ECCP3AS_ADDR            0x0315
158 #define PSTR3CON_ADDR           0x0316
159 #define CCPR4_ADDR              0x0318
160 #define CCPR4L_ADDR             0x0318
161 #define CCPR4H_ADDR             0x0319
162 #define CCP4CON_ADDR            0x031A
163 #define CCPR5_ADDR              0x031C
164 #define CCPR5L_ADDR             0x031C
165 #define CCPR5H_ADDR             0x031D
166 #define CCP5CON_ADDR            0x031E
167 #define IOCBP_ADDR              0x0394
168 #define IOCBN_ADDR              0x0395
169 #define IOCBF_ADDR              0x0396
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 LCDCON_ADDR             0x0791
177 #define LCDPS_ADDR              0x0792
178 #define LCDREF_ADDR             0x0793
179 #define LCDCST_ADDR             0x0794
180 #define LCDRL_ADDR              0x0795
181 #define LCDSE0_ADDR             0x0798
182 #define LCDSE1_ADDR             0x0799
183 #define LCDDATA0_ADDR           0x07A0
184 #define LCDDATA1_ADDR           0x07A1
185 #define LCDDATA3_ADDR           0x07A3
186 #define LCDDATA4_ADDR           0x07A4
187 #define LCDDATA6_ADDR           0x07A6
188 #define LCDDATA7_ADDR           0x07A7
189 #define LCDDATA9_ADDR           0x07A9
190 #define LCDDATA10_ADDR          0x07AA
191 #define STATUS_SHAD_ADDR        0x0FE4
192 #define WREG_SHAD_ADDR          0x0FE5
193 #define BSR_SHAD_ADDR           0x0FE6
194 #define PCLATH_SHAD_ADDR        0x0FE7
195 #define FSR0L_SHAD_ADDR         0x0FE8
196 #define FSR0H_SHAD_ADDR         0x0FE9
197 #define FSR1L_SHAD_ADDR         0x0FEA
198 #define FSR1H_SHAD_ADDR         0x0FEB
199 #define STKPTR_ADDR             0x0FED
200 #define TOSL_ADDR               0x0FEE
201 #define TOSH_ADDR               0x0FEF
202 
203 #endif // #ifndef NO_ADDR_DEFINES
204 
205 //==============================================================================
206 //
207 //	Register Definitions
208 //
209 //==============================================================================
210 
211 extern __at(0x0000) __sfr INDF0;
212 extern __at(0x0001) __sfr INDF1;
213 extern __at(0x0002) __sfr PCL;
214 
215 //==============================================================================
216 //        STATUS Bits
217 
218 extern __at(0x0003) __sfr STATUS;
219 
220 typedef struct
221   {
222   unsigned C                    : 1;
223   unsigned DC                   : 1;
224   unsigned Z                    : 1;
225   unsigned NOT_PD               : 1;
226   unsigned NOT_TO               : 1;
227   unsigned                      : 1;
228   unsigned                      : 1;
229   unsigned                      : 1;
230   } __STATUSbits_t;
231 
232 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
233 
234 #define _C                      0x01
235 #define _DC                     0x02
236 #define _Z                      0x04
237 #define _NOT_PD                 0x08
238 #define _NOT_TO                 0x10
239 
240 //==============================================================================
241 
242 extern __at(0x0004) __sfr FSR0;
243 extern __at(0x0004) __sfr FSR0L;
244 extern __at(0x0005) __sfr FSR0H;
245 extern __at(0x0006) __sfr FSR1;
246 extern __at(0x0006) __sfr FSR1L;
247 extern __at(0x0007) __sfr FSR1H;
248 
249 //==============================================================================
250 //        BSR Bits
251 
252 extern __at(0x0008) __sfr BSR;
253 
254 typedef union
255   {
256   struct
257     {
258     unsigned BSR0               : 1;
259     unsigned BSR1               : 1;
260     unsigned BSR2               : 1;
261     unsigned BSR3               : 1;
262     unsigned BSR4               : 1;
263     unsigned                    : 1;
264     unsigned                    : 1;
265     unsigned                    : 1;
266     };
267 
268   struct
269     {
270     unsigned BSR                : 5;
271     unsigned                    : 3;
272     };
273   } __BSRbits_t;
274 
275 extern __at(0x0008) volatile __BSRbits_t BSRbits;
276 
277 #define _BSR0                   0x01
278 #define _BSR1                   0x02
279 #define _BSR2                   0x04
280 #define _BSR3                   0x08
281 #define _BSR4                   0x10
282 
283 //==============================================================================
284 
285 extern __at(0x0009) __sfr WREG;
286 extern __at(0x000A) __sfr PCLATH;
287 
288 //==============================================================================
289 //        INTCON Bits
290 
291 extern __at(0x000B) __sfr INTCON;
292 
293 typedef union
294   {
295   struct
296     {
297     unsigned IOCIF              : 1;
298     unsigned INTF               : 1;
299     unsigned TMR0IF             : 1;
300     unsigned IOCIE              : 1;
301     unsigned INTE               : 1;
302     unsigned TMR0IE             : 1;
303     unsigned PEIE               : 1;
304     unsigned GIE                : 1;
305     };
306 
307   struct
308     {
309     unsigned                    : 1;
310     unsigned                    : 1;
311     unsigned T0IF               : 1;
312     unsigned                    : 1;
313     unsigned                    : 1;
314     unsigned T0IE               : 1;
315     unsigned                    : 1;
316     unsigned                    : 1;
317     };
318   } __INTCONbits_t;
319 
320 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
321 
322 #define _IOCIF                  0x01
323 #define _INTF                   0x02
324 #define _TMR0IF                 0x04
325 #define _T0IF                   0x04
326 #define _IOCIE                  0x08
327 #define _INTE                   0x10
328 #define _TMR0IE                 0x20
329 #define _T0IE                   0x20
330 #define _PEIE                   0x40
331 #define _GIE                    0x80
332 
333 //==============================================================================
334 
335 
336 //==============================================================================
337 //        PORTA Bits
338 
339 extern __at(0x000C) __sfr PORTA;
340 
341 typedef struct
342   {
343   unsigned RA0                  : 1;
344   unsigned RA1                  : 1;
345   unsigned RA2                  : 1;
346   unsigned RA3                  : 1;
347   unsigned RA4                  : 1;
348   unsigned RA5                  : 1;
349   unsigned RA6                  : 1;
350   unsigned RA7                  : 1;
351   } __PORTAbits_t;
352 
353 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
354 
355 #define _RA0                    0x01
356 #define _RA1                    0x02
357 #define _RA2                    0x04
358 #define _RA3                    0x08
359 #define _RA4                    0x10
360 #define _RA5                    0x20
361 #define _RA6                    0x40
362 #define _RA7                    0x80
363 
364 //==============================================================================
365 
366 
367 //==============================================================================
368 //        PORTB Bits
369 
370 extern __at(0x000D) __sfr PORTB;
371 
372 typedef struct
373   {
374   unsigned RB0                  : 1;
375   unsigned RB1                  : 1;
376   unsigned RB2                  : 1;
377   unsigned RB3                  : 1;
378   unsigned RB4                  : 1;
379   unsigned RB5                  : 1;
380   unsigned RB6                  : 1;
381   unsigned RB7                  : 1;
382   } __PORTBbits_t;
383 
384 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
385 
386 #define _RB0                    0x01
387 #define _RB1                    0x02
388 #define _RB2                    0x04
389 #define _RB3                    0x08
390 #define _RB4                    0x10
391 #define _RB5                    0x20
392 #define _RB6                    0x40
393 #define _RB7                    0x80
394 
395 //==============================================================================
396 
397 
398 //==============================================================================
399 //        PORTC Bits
400 
401 extern __at(0x000E) __sfr PORTC;
402 
403 typedef struct
404   {
405   unsigned RC0                  : 1;
406   unsigned RC1                  : 1;
407   unsigned RC2                  : 1;
408   unsigned RC3                  : 1;
409   unsigned RC4                  : 1;
410   unsigned RC5                  : 1;
411   unsigned RC6                  : 1;
412   unsigned RC7                  : 1;
413   } __PORTCbits_t;
414 
415 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
416 
417 #define _RC0                    0x01
418 #define _RC1                    0x02
419 #define _RC2                    0x04
420 #define _RC3                    0x08
421 #define _RC4                    0x10
422 #define _RC5                    0x20
423 #define _RC6                    0x40
424 #define _RC7                    0x80
425 
426 //==============================================================================
427 
428 
429 //==============================================================================
430 //        PORTE Bits
431 
432 extern __at(0x0010) __sfr PORTE;
433 
434 typedef struct
435   {
436   unsigned                      : 1;
437   unsigned                      : 1;
438   unsigned                      : 1;
439   unsigned RE3                  : 1;
440   unsigned                      : 1;
441   unsigned                      : 1;
442   unsigned                      : 1;
443   unsigned                      : 1;
444   } __PORTEbits_t;
445 
446 extern __at(0x0010) volatile __PORTEbits_t PORTEbits;
447 
448 #define _RE3                    0x08
449 
450 //==============================================================================
451 
452 
453 //==============================================================================
454 //        PIR1 Bits
455 
456 extern __at(0x0011) __sfr PIR1;
457 
458 typedef struct
459   {
460   unsigned TMR1IF               : 1;
461   unsigned TMR2IF               : 1;
462   unsigned CCP1IF               : 1;
463   unsigned SSPIF                : 1;
464   unsigned TXIF                 : 1;
465   unsigned RCIF                 : 1;
466   unsigned ADIF                 : 1;
467   unsigned TMR1GIF              : 1;
468   } __PIR1bits_t;
469 
470 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
471 
472 #define _TMR1IF                 0x01
473 #define _TMR2IF                 0x02
474 #define _CCP1IF                 0x04
475 #define _SSPIF                  0x08
476 #define _TXIF                   0x10
477 #define _RCIF                   0x20
478 #define _ADIF                   0x40
479 #define _TMR1GIF                0x80
480 
481 //==============================================================================
482 
483 
484 //==============================================================================
485 //        PIR2 Bits
486 
487 extern __at(0x0012) __sfr PIR2;
488 
489 typedef struct
490   {
491   unsigned CCP2IF               : 1;
492   unsigned                      : 1;
493   unsigned LCDIF                : 1;
494   unsigned BCLIF                : 1;
495   unsigned EEIF                 : 1;
496   unsigned C1IF                 : 1;
497   unsigned C2IF                 : 1;
498   unsigned OSFIF                : 1;
499   } __PIR2bits_t;
500 
501 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
502 
503 #define _CCP2IF                 0x01
504 #define _LCDIF                  0x04
505 #define _BCLIF                  0x08
506 #define _EEIF                   0x10
507 #define _C1IF                   0x20
508 #define _C2IF                   0x40
509 #define _OSFIF                  0x80
510 
511 //==============================================================================
512 
513 
514 //==============================================================================
515 //        PIR3 Bits
516 
517 extern __at(0x0013) __sfr PIR3;
518 
519 typedef struct
520   {
521   unsigned                      : 1;
522   unsigned TMR4IF               : 1;
523   unsigned                      : 1;
524   unsigned TMR6IF               : 1;
525   unsigned CCP3IF               : 1;
526   unsigned CCP4IF               : 1;
527   unsigned CCP5IF               : 1;
528   unsigned                      : 1;
529   } __PIR3bits_t;
530 
531 extern __at(0x0013) volatile __PIR3bits_t PIR3bits;
532 
533 #define _TMR4IF                 0x02
534 #define _TMR6IF                 0x08
535 #define _CCP3IF                 0x10
536 #define _CCP4IF                 0x20
537 #define _CCP5IF                 0x40
538 
539 //==============================================================================
540 
541 extern __at(0x0015) __sfr TMR0;
542 extern __at(0x0016) __sfr TMR1;
543 extern __at(0x0016) __sfr TMR1L;
544 extern __at(0x0017) __sfr TMR1H;
545 
546 //==============================================================================
547 //        T1CON Bits
548 
549 extern __at(0x0018) __sfr T1CON;
550 
551 typedef union
552   {
553   struct
554     {
555     unsigned TMR1ON             : 1;
556     unsigned                    : 1;
557     unsigned NOT_T1SYNC         : 1;
558     unsigned T1OSCEN            : 1;
559     unsigned T1CKPS0            : 1;
560     unsigned T1CKPS1            : 1;
561     unsigned TMR1CS0            : 1;
562     unsigned TMR1CS1            : 1;
563     };
564 
565   struct
566     {
567     unsigned                    : 4;
568     unsigned T1CKPS             : 2;
569     unsigned                    : 2;
570     };
571 
572   struct
573     {
574     unsigned                    : 6;
575     unsigned TMR1CS             : 2;
576     };
577   } __T1CONbits_t;
578 
579 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
580 
581 #define _TMR1ON                 0x01
582 #define _NOT_T1SYNC             0x04
583 #define _T1OSCEN                0x08
584 #define _T1CKPS0                0x10
585 #define _T1CKPS1                0x20
586 #define _TMR1CS0                0x40
587 #define _TMR1CS1                0x80
588 
589 //==============================================================================
590 
591 
592 //==============================================================================
593 //        T1GCON Bits
594 
595 extern __at(0x0019) __sfr T1GCON;
596 
597 typedef union
598   {
599   struct
600     {
601     unsigned T1GSS0             : 1;
602     unsigned T1GSS1             : 1;
603     unsigned T1GVAL             : 1;
604     unsigned T1GGO_NOT_DONE     : 1;
605     unsigned T1GSPM             : 1;
606     unsigned T1GTM              : 1;
607     unsigned T1GPOL             : 1;
608     unsigned TMR1GE             : 1;
609     };
610 
611   struct
612     {
613     unsigned                    : 1;
614     unsigned                    : 1;
615     unsigned                    : 1;
616     unsigned T1GGO              : 1;
617     unsigned                    : 1;
618     unsigned                    : 1;
619     unsigned                    : 1;
620     unsigned                    : 1;
621     };
622 
623   struct
624     {
625     unsigned T1GSS              : 2;
626     unsigned                    : 6;
627     };
628   } __T1GCONbits_t;
629 
630 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
631 
632 #define _T1GSS0                 0x01
633 #define _T1GSS1                 0x02
634 #define _T1GVAL                 0x04
635 #define _T1GGO_NOT_DONE         0x08
636 #define _T1GGO                  0x08
637 #define _T1GSPM                 0x10
638 #define _T1GTM                  0x20
639 #define _T1GPOL                 0x40
640 #define _TMR1GE                 0x80
641 
642 //==============================================================================
643 
644 extern __at(0x001A) __sfr TMR2;
645 extern __at(0x001B) __sfr PR2;
646 
647 //==============================================================================
648 //        T2CON Bits
649 
650 extern __at(0x001C) __sfr T2CON;
651 
652 typedef union
653   {
654   struct
655     {
656     unsigned T2CKPS0            : 1;
657     unsigned T2CKPS1            : 1;
658     unsigned TMR2ON             : 1;
659     unsigned T2OUTPS0           : 1;
660     unsigned T2OUTPS1           : 1;
661     unsigned T2OUTPS2           : 1;
662     unsigned T2OUTPS3           : 1;
663     unsigned                    : 1;
664     };
665 
666   struct
667     {
668     unsigned T2CKPS             : 2;
669     unsigned                    : 6;
670     };
671 
672   struct
673     {
674     unsigned                    : 3;
675     unsigned T2OUTPS            : 4;
676     unsigned                    : 1;
677     };
678   } __T2CONbits_t;
679 
680 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
681 
682 #define _T2CKPS0                0x01
683 #define _T2CKPS1                0x02
684 #define _TMR2ON                 0x04
685 #define _T2OUTPS0               0x08
686 #define _T2OUTPS1               0x10
687 #define _T2OUTPS2               0x20
688 #define _T2OUTPS3               0x40
689 
690 //==============================================================================
691 
692 
693 //==============================================================================
694 //        CPSCON0 Bits
695 
696 extern __at(0x001E) __sfr CPSCON0;
697 
698 typedef union
699   {
700   struct
701     {
702     unsigned T0XCS              : 1;
703     unsigned CPSOUT             : 1;
704     unsigned CPSRNG0            : 1;
705     unsigned CPSRNG1            : 1;
706     unsigned                    : 1;
707     unsigned                    : 1;
708     unsigned CPSRM              : 1;
709     unsigned CPSON              : 1;
710     };
711 
712   struct
713     {
714     unsigned                    : 2;
715     unsigned CPSRNG             : 2;
716     unsigned                    : 4;
717     };
718   } __CPSCON0bits_t;
719 
720 extern __at(0x001E) volatile __CPSCON0bits_t CPSCON0bits;
721 
722 #define _T0XCS                  0x01
723 #define _CPSOUT                 0x02
724 #define _CPSRNG0                0x04
725 #define _CPSRNG1                0x08
726 #define _CPSRM                  0x40
727 #define _CPSON                  0x80
728 
729 //==============================================================================
730 
731 
732 //==============================================================================
733 //        CPSCON1 Bits
734 
735 extern __at(0x001F) __sfr CPSCON1;
736 
737 typedef union
738   {
739   struct
740     {
741     unsigned CPSCH0             : 1;
742     unsigned CPSCH1             : 1;
743     unsigned CPSCH2             : 1;
744     unsigned                    : 1;
745     unsigned                    : 1;
746     unsigned                    : 1;
747     unsigned                    : 1;
748     unsigned                    : 1;
749     };
750 
751   struct
752     {
753     unsigned CPSCH              : 3;
754     unsigned                    : 5;
755     };
756   } __CPSCON1bits_t;
757 
758 extern __at(0x001F) volatile __CPSCON1bits_t CPSCON1bits;
759 
760 #define _CPSCH0                 0x01
761 #define _CPSCH1                 0x02
762 #define _CPSCH2                 0x04
763 
764 //==============================================================================
765 
766 
767 //==============================================================================
768 //        TRISA Bits
769 
770 extern __at(0x008C) __sfr TRISA;
771 
772 typedef struct
773   {
774   unsigned TRISA0               : 1;
775   unsigned TRISA1               : 1;
776   unsigned TRISA2               : 1;
777   unsigned TRISA3               : 1;
778   unsigned TRISA4               : 1;
779   unsigned TRISA5               : 1;
780   unsigned TRISA6               : 1;
781   unsigned TRISA7               : 1;
782   } __TRISAbits_t;
783 
784 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
785 
786 #define _TRISA0                 0x01
787 #define _TRISA1                 0x02
788 #define _TRISA2                 0x04
789 #define _TRISA3                 0x08
790 #define _TRISA4                 0x10
791 #define _TRISA5                 0x20
792 #define _TRISA6                 0x40
793 #define _TRISA7                 0x80
794 
795 //==============================================================================
796 
797 
798 //==============================================================================
799 //        TRISB Bits
800 
801 extern __at(0x008D) __sfr TRISB;
802 
803 typedef struct
804   {
805   unsigned TRISB0               : 1;
806   unsigned TRISB1               : 1;
807   unsigned TRISB2               : 1;
808   unsigned TRISB3               : 1;
809   unsigned TRISB4               : 1;
810   unsigned TRISB5               : 1;
811   unsigned TRISB6               : 1;
812   unsigned TRISB7               : 1;
813   } __TRISBbits_t;
814 
815 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
816 
817 #define _TRISB0                 0x01
818 #define _TRISB1                 0x02
819 #define _TRISB2                 0x04
820 #define _TRISB3                 0x08
821 #define _TRISB4                 0x10
822 #define _TRISB5                 0x20
823 #define _TRISB6                 0x40
824 #define _TRISB7                 0x80
825 
826 //==============================================================================
827 
828 
829 //==============================================================================
830 //        TRISC Bits
831 
832 extern __at(0x008E) __sfr TRISC;
833 
834 typedef struct
835   {
836   unsigned TRISC0               : 1;
837   unsigned TRISC1               : 1;
838   unsigned TRISC2               : 1;
839   unsigned TRISC3               : 1;
840   unsigned TRISC4               : 1;
841   unsigned TRISC5               : 1;
842   unsigned TRISC6               : 1;
843   unsigned TRISC7               : 1;
844   } __TRISCbits_t;
845 
846 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
847 
848 #define _TRISC0                 0x01
849 #define _TRISC1                 0x02
850 #define _TRISC2                 0x04
851 #define _TRISC3                 0x08
852 #define _TRISC4                 0x10
853 #define _TRISC5                 0x20
854 #define _TRISC6                 0x40
855 #define _TRISC7                 0x80
856 
857 //==============================================================================
858 
859 
860 //==============================================================================
861 //        TRISE Bits
862 
863 extern __at(0x0090) __sfr TRISE;
864 
865 typedef struct
866   {
867   unsigned                      : 1;
868   unsigned                      : 1;
869   unsigned                      : 1;
870   unsigned TRISE3               : 1;
871   unsigned                      : 1;
872   unsigned                      : 1;
873   unsigned                      : 1;
874   unsigned                      : 1;
875   } __TRISEbits_t;
876 
877 extern __at(0x0090) volatile __TRISEbits_t TRISEbits;
878 
879 #define _TRISE3                 0x08
880 
881 //==============================================================================
882 
883 
884 //==============================================================================
885 //        PIE1 Bits
886 
887 extern __at(0x0091) __sfr PIE1;
888 
889 typedef struct
890   {
891   unsigned TMR1IE               : 1;
892   unsigned TMR2IE               : 1;
893   unsigned CCP1IE               : 1;
894   unsigned SSPIE                : 1;
895   unsigned TXIE                 : 1;
896   unsigned RCIE                 : 1;
897   unsigned ADIE                 : 1;
898   unsigned TMR1GIE              : 1;
899   } __PIE1bits_t;
900 
901 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
902 
903 #define _TMR1IE                 0x01
904 #define _TMR2IE                 0x02
905 #define _CCP1IE                 0x04
906 #define _SSPIE                  0x08
907 #define _TXIE                   0x10
908 #define _RCIE                   0x20
909 #define _ADIE                   0x40
910 #define _TMR1GIE                0x80
911 
912 //==============================================================================
913 
914 
915 //==============================================================================
916 //        PIE2 Bits
917 
918 extern __at(0x0092) __sfr PIE2;
919 
920 typedef struct
921   {
922   unsigned CCP2IE               : 1;
923   unsigned                      : 1;
924   unsigned LCDIE                : 1;
925   unsigned BCLIE                : 1;
926   unsigned EEIE                 : 1;
927   unsigned C1IE                 : 1;
928   unsigned C2IE                 : 1;
929   unsigned OSFIE                : 1;
930   } __PIE2bits_t;
931 
932 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
933 
934 #define _CCP2IE                 0x01
935 #define _LCDIE                  0x04
936 #define _BCLIE                  0x08
937 #define _EEIE                   0x10
938 #define _C1IE                   0x20
939 #define _C2IE                   0x40
940 #define _OSFIE                  0x80
941 
942 //==============================================================================
943 
944 
945 //==============================================================================
946 //        PIE3 Bits
947 
948 extern __at(0x0093) __sfr PIE3;
949 
950 typedef struct
951   {
952   unsigned                      : 1;
953   unsigned TMR4IE               : 1;
954   unsigned                      : 1;
955   unsigned TMR6IE               : 1;
956   unsigned CCP3IE               : 1;
957   unsigned CCP4IE               : 1;
958   unsigned CCP5IE               : 1;
959   unsigned                      : 1;
960   } __PIE3bits_t;
961 
962 extern __at(0x0093) volatile __PIE3bits_t PIE3bits;
963 
964 #define _TMR4IE                 0x02
965 #define _TMR6IE                 0x08
966 #define _CCP3IE                 0x10
967 #define _CCP4IE                 0x20
968 #define _CCP5IE                 0x40
969 
970 //==============================================================================
971 
972 
973 //==============================================================================
974 //        OPTION_REG Bits
975 
976 extern __at(0x0095) __sfr OPTION_REG;
977 
978 typedef union
979   {
980   struct
981     {
982     unsigned PS0                : 1;
983     unsigned PS1                : 1;
984     unsigned PS2                : 1;
985     unsigned PSA                : 1;
986     unsigned TMR0SE             : 1;
987     unsigned TMR0CS             : 1;
988     unsigned INTEDG             : 1;
989     unsigned NOT_WPUEN          : 1;
990     };
991 
992   struct
993     {
994     unsigned                    : 1;
995     unsigned                    : 1;
996     unsigned                    : 1;
997     unsigned                    : 1;
998     unsigned T0SE               : 1;
999     unsigned T0CS               : 1;
1000     unsigned                    : 1;
1001     unsigned                    : 1;
1002     };
1003 
1004   struct
1005     {
1006     unsigned PS                 : 3;
1007     unsigned                    : 5;
1008     };
1009   } __OPTION_REGbits_t;
1010 
1011 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
1012 
1013 #define _PS0                    0x01
1014 #define _PS1                    0x02
1015 #define _PS2                    0x04
1016 #define _PSA                    0x08
1017 #define _TMR0SE                 0x10
1018 #define _T0SE                   0x10
1019 #define _TMR0CS                 0x20
1020 #define _T0CS                   0x20
1021 #define _INTEDG                 0x40
1022 #define _NOT_WPUEN              0x80
1023 
1024 //==============================================================================
1025 
1026 
1027 //==============================================================================
1028 //        PCON Bits
1029 
1030 extern __at(0x0096) __sfr PCON;
1031 
1032 typedef struct
1033   {
1034   unsigned NOT_BOR              : 1;
1035   unsigned NOT_POR              : 1;
1036   unsigned NOT_RI               : 1;
1037   unsigned NOT_RMCLR            : 1;
1038   unsigned                      : 1;
1039   unsigned                      : 1;
1040   unsigned STKUNF               : 1;
1041   unsigned STKOVF               : 1;
1042   } __PCONbits_t;
1043 
1044 extern __at(0x0096) volatile __PCONbits_t PCONbits;
1045 
1046 #define _NOT_BOR                0x01
1047 #define _NOT_POR                0x02
1048 #define _NOT_RI                 0x04
1049 #define _NOT_RMCLR              0x08
1050 #define _STKUNF                 0x40
1051 #define _STKOVF                 0x80
1052 
1053 //==============================================================================
1054 
1055 
1056 //==============================================================================
1057 //        WDTCON Bits
1058 
1059 extern __at(0x0097) __sfr WDTCON;
1060 
1061 typedef union
1062   {
1063   struct
1064     {
1065     unsigned SWDTEN             : 1;
1066     unsigned WDTPS0             : 1;
1067     unsigned WDTPS1             : 1;
1068     unsigned WDTPS2             : 1;
1069     unsigned WDTPS3             : 1;
1070     unsigned WDTPS4             : 1;
1071     unsigned                    : 1;
1072     unsigned                    : 1;
1073     };
1074 
1075   struct
1076     {
1077     unsigned                    : 1;
1078     unsigned WDTPS              : 5;
1079     unsigned                    : 2;
1080     };
1081   } __WDTCONbits_t;
1082 
1083 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
1084 
1085 #define _SWDTEN                 0x01
1086 #define _WDTPS0                 0x02
1087 #define _WDTPS1                 0x04
1088 #define _WDTPS2                 0x08
1089 #define _WDTPS3                 0x10
1090 #define _WDTPS4                 0x20
1091 
1092 //==============================================================================
1093 
1094 
1095 //==============================================================================
1096 //        OSCTUNE Bits
1097 
1098 extern __at(0x0098) __sfr OSCTUNE;
1099 
1100 typedef union
1101   {
1102   struct
1103     {
1104     unsigned TUN0               : 1;
1105     unsigned TUN1               : 1;
1106     unsigned TUN2               : 1;
1107     unsigned TUN3               : 1;
1108     unsigned TUN4               : 1;
1109     unsigned TUN5               : 1;
1110     unsigned                    : 1;
1111     unsigned                    : 1;
1112     };
1113 
1114   struct
1115     {
1116     unsigned TUN                : 6;
1117     unsigned                    : 2;
1118     };
1119   } __OSCTUNEbits_t;
1120 
1121 extern __at(0x0098) volatile __OSCTUNEbits_t OSCTUNEbits;
1122 
1123 #define _TUN0                   0x01
1124 #define _TUN1                   0x02
1125 #define _TUN2                   0x04
1126 #define _TUN3                   0x08
1127 #define _TUN4                   0x10
1128 #define _TUN5                   0x20
1129 
1130 //==============================================================================
1131 
1132 
1133 //==============================================================================
1134 //        OSCCON Bits
1135 
1136 extern __at(0x0099) __sfr OSCCON;
1137 
1138 typedef union
1139   {
1140   struct
1141     {
1142     unsigned SCS0               : 1;
1143     unsigned SCS1               : 1;
1144     unsigned                    : 1;
1145     unsigned IRCF0              : 1;
1146     unsigned IRCF1              : 1;
1147     unsigned IRCF2              : 1;
1148     unsigned IRCF3              : 1;
1149     unsigned SPLLEN             : 1;
1150     };
1151 
1152   struct
1153     {
1154     unsigned SCS                : 2;
1155     unsigned                    : 6;
1156     };
1157 
1158   struct
1159     {
1160     unsigned                    : 3;
1161     unsigned IRCF               : 4;
1162     unsigned                    : 1;
1163     };
1164   } __OSCCONbits_t;
1165 
1166 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1167 
1168 #define _SCS0                   0x01
1169 #define _SCS1                   0x02
1170 #define _IRCF0                  0x08
1171 #define _IRCF1                  0x10
1172 #define _IRCF2                  0x20
1173 #define _IRCF3                  0x40
1174 #define _SPLLEN                 0x80
1175 
1176 //==============================================================================
1177 
1178 
1179 //==============================================================================
1180 //        OSCSTAT Bits
1181 
1182 extern __at(0x009A) __sfr OSCSTAT;
1183 
1184 typedef struct
1185   {
1186   unsigned HFIOFS               : 1;
1187   unsigned LFIOFR               : 1;
1188   unsigned MFIOFR               : 1;
1189   unsigned HFIOFL               : 1;
1190   unsigned HFIOFR               : 1;
1191   unsigned OSTS                 : 1;
1192   unsigned PLLR                 : 1;
1193   unsigned T1OSCR               : 1;
1194   } __OSCSTATbits_t;
1195 
1196 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1197 
1198 #define _HFIOFS                 0x01
1199 #define _LFIOFR                 0x02
1200 #define _MFIOFR                 0x04
1201 #define _HFIOFL                 0x08
1202 #define _HFIOFR                 0x10
1203 #define _OSTS                   0x20
1204 #define _PLLR                   0x40
1205 #define _T1OSCR                 0x80
1206 
1207 //==============================================================================
1208 
1209 extern __at(0x009B) __sfr ADRES;
1210 extern __at(0x009B) __sfr ADRESL;
1211 extern __at(0x009C) __sfr ADRESH;
1212 
1213 //==============================================================================
1214 //        ADCON0 Bits
1215 
1216 extern __at(0x009D) __sfr ADCON0;
1217 
1218 typedef union
1219   {
1220   struct
1221     {
1222     unsigned ADON               : 1;
1223     unsigned GO_NOT_DONE        : 1;
1224     unsigned CHS0               : 1;
1225     unsigned CHS1               : 1;
1226     unsigned CHS2               : 1;
1227     unsigned CHS3               : 1;
1228     unsigned CHS4               : 1;
1229     unsigned                    : 1;
1230     };
1231 
1232   struct
1233     {
1234     unsigned                    : 1;
1235     unsigned ADGO               : 1;
1236     unsigned                    : 1;
1237     unsigned                    : 1;
1238     unsigned                    : 1;
1239     unsigned                    : 1;
1240     unsigned                    : 1;
1241     unsigned                    : 1;
1242     };
1243 
1244   struct
1245     {
1246     unsigned                    : 1;
1247     unsigned GO                 : 1;
1248     unsigned                    : 1;
1249     unsigned                    : 1;
1250     unsigned                    : 1;
1251     unsigned                    : 1;
1252     unsigned                    : 1;
1253     unsigned                    : 1;
1254     };
1255 
1256   struct
1257     {
1258     unsigned                    : 1;
1259     unsigned NOT_DONE           : 1;
1260     unsigned                    : 1;
1261     unsigned                    : 1;
1262     unsigned                    : 1;
1263     unsigned                    : 1;
1264     unsigned                    : 1;
1265     unsigned                    : 1;
1266     };
1267 
1268   struct
1269     {
1270     unsigned                    : 2;
1271     unsigned CHS                : 5;
1272     unsigned                    : 1;
1273     };
1274   } __ADCON0bits_t;
1275 
1276 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1277 
1278 #define _ADON                   0x01
1279 #define _GO_NOT_DONE            0x02
1280 #define _ADGO                   0x02
1281 #define _GO                     0x02
1282 #define _NOT_DONE               0x02
1283 #define _CHS0                   0x04
1284 #define _CHS1                   0x08
1285 #define _CHS2                   0x10
1286 #define _CHS3                   0x20
1287 #define _CHS4                   0x40
1288 
1289 //==============================================================================
1290 
1291 
1292 //==============================================================================
1293 //        ADCON1 Bits
1294 
1295 extern __at(0x009E) __sfr ADCON1;
1296 
1297 typedef union
1298   {
1299   struct
1300     {
1301     unsigned ADPREF0            : 1;
1302     unsigned ADPREF1            : 1;
1303     unsigned ADNREF             : 1;
1304     unsigned                    : 1;
1305     unsigned ADCS0              : 1;
1306     unsigned ADCS1              : 1;
1307     unsigned ADCS2              : 1;
1308     unsigned ADFM               : 1;
1309     };
1310 
1311   struct
1312     {
1313     unsigned ADPREF             : 2;
1314     unsigned                    : 6;
1315     };
1316 
1317   struct
1318     {
1319     unsigned                    : 4;
1320     unsigned ADCS               : 3;
1321     unsigned                    : 1;
1322     };
1323   } __ADCON1bits_t;
1324 
1325 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1326 
1327 #define _ADPREF0                0x01
1328 #define _ADPREF1                0x02
1329 #define _ADNREF                 0x04
1330 #define _ADCS0                  0x10
1331 #define _ADCS1                  0x20
1332 #define _ADCS2                  0x40
1333 #define _ADFM                   0x80
1334 
1335 //==============================================================================
1336 
1337 
1338 //==============================================================================
1339 //        LATA Bits
1340 
1341 extern __at(0x010C) __sfr LATA;
1342 
1343 typedef struct
1344   {
1345   unsigned LATA0                : 1;
1346   unsigned LATA1                : 1;
1347   unsigned LATA2                : 1;
1348   unsigned LATA3                : 1;
1349   unsigned LATA4                : 1;
1350   unsigned LATA5                : 1;
1351   unsigned LATA6                : 1;
1352   unsigned LATA7                : 1;
1353   } __LATAbits_t;
1354 
1355 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1356 
1357 #define _LATA0                  0x01
1358 #define _LATA1                  0x02
1359 #define _LATA2                  0x04
1360 #define _LATA3                  0x08
1361 #define _LATA4                  0x10
1362 #define _LATA5                  0x20
1363 #define _LATA6                  0x40
1364 #define _LATA7                  0x80
1365 
1366 //==============================================================================
1367 
1368 
1369 //==============================================================================
1370 //        LATB Bits
1371 
1372 extern __at(0x010D) __sfr LATB;
1373 
1374 typedef struct
1375   {
1376   unsigned LATB0                : 1;
1377   unsigned LATB1                : 1;
1378   unsigned LATB2                : 1;
1379   unsigned LATB3                : 1;
1380   unsigned LATB4                : 1;
1381   unsigned LATB5                : 1;
1382   unsigned LATB6                : 1;
1383   unsigned LATB7                : 1;
1384   } __LATBbits_t;
1385 
1386 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1387 
1388 #define _LATB0                  0x01
1389 #define _LATB1                  0x02
1390 #define _LATB2                  0x04
1391 #define _LATB3                  0x08
1392 #define _LATB4                  0x10
1393 #define _LATB5                  0x20
1394 #define _LATB6                  0x40
1395 #define _LATB7                  0x80
1396 
1397 //==============================================================================
1398 
1399 
1400 //==============================================================================
1401 //        LATC Bits
1402 
1403 extern __at(0x010E) __sfr LATC;
1404 
1405 typedef struct
1406   {
1407   unsigned LATC0                : 1;
1408   unsigned LATC1                : 1;
1409   unsigned LATC2                : 1;
1410   unsigned LATC3                : 1;
1411   unsigned LATC4                : 1;
1412   unsigned LATC5                : 1;
1413   unsigned LATC6                : 1;
1414   unsigned LATC7                : 1;
1415   } __LATCbits_t;
1416 
1417 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1418 
1419 #define _LATC0                  0x01
1420 #define _LATC1                  0x02
1421 #define _LATC2                  0x04
1422 #define _LATC3                  0x08
1423 #define _LATC4                  0x10
1424 #define _LATC5                  0x20
1425 #define _LATC6                  0x40
1426 #define _LATC7                  0x80
1427 
1428 //==============================================================================
1429 
1430 
1431 //==============================================================================
1432 //        LATE Bits
1433 
1434 extern __at(0x0110) __sfr LATE;
1435 
1436 typedef struct
1437   {
1438   unsigned                      : 1;
1439   unsigned                      : 1;
1440   unsigned                      : 1;
1441   unsigned LATE3                : 1;
1442   unsigned                      : 1;
1443   unsigned                      : 1;
1444   unsigned                      : 1;
1445   unsigned                      : 1;
1446   } __LATEbits_t;
1447 
1448 extern __at(0x0110) volatile __LATEbits_t LATEbits;
1449 
1450 #define _LATE3                  0x08
1451 
1452 //==============================================================================
1453 
1454 
1455 //==============================================================================
1456 //        CM1CON0 Bits
1457 
1458 extern __at(0x0111) __sfr CM1CON0;
1459 
1460 typedef struct
1461   {
1462   unsigned C1SYNC               : 1;
1463   unsigned C1HYS                : 1;
1464   unsigned C1SP                 : 1;
1465   unsigned                      : 1;
1466   unsigned C1POL                : 1;
1467   unsigned C1OE                 : 1;
1468   unsigned C1OUT                : 1;
1469   unsigned C1ON                 : 1;
1470   } __CM1CON0bits_t;
1471 
1472 extern __at(0x0111) volatile __CM1CON0bits_t CM1CON0bits;
1473 
1474 #define _C1SYNC                 0x01
1475 #define _C1HYS                  0x02
1476 #define _C1SP                   0x04
1477 #define _C1POL                  0x10
1478 #define _C1OE                   0x20
1479 #define _C1OUT                  0x40
1480 #define _C1ON                   0x80
1481 
1482 //==============================================================================
1483 
1484 
1485 //==============================================================================
1486 //        CM1CON1 Bits
1487 
1488 extern __at(0x0112) __sfr CM1CON1;
1489 
1490 typedef union
1491   {
1492   struct
1493     {
1494     unsigned C1NCH0             : 1;
1495     unsigned C1NCH1             : 1;
1496     unsigned                    : 1;
1497     unsigned                    : 1;
1498     unsigned C1PCH0             : 1;
1499     unsigned C1PCH1             : 1;
1500     unsigned C1INTN             : 1;
1501     unsigned C1INTP             : 1;
1502     };
1503 
1504   struct
1505     {
1506     unsigned C1NCH              : 2;
1507     unsigned                    : 6;
1508     };
1509 
1510   struct
1511     {
1512     unsigned                    : 4;
1513     unsigned C1PCH              : 2;
1514     unsigned                    : 2;
1515     };
1516   } __CM1CON1bits_t;
1517 
1518 extern __at(0x0112) volatile __CM1CON1bits_t CM1CON1bits;
1519 
1520 #define _C1NCH0                 0x01
1521 #define _C1NCH1                 0x02
1522 #define _C1PCH0                 0x10
1523 #define _C1PCH1                 0x20
1524 #define _C1INTN                 0x40
1525 #define _C1INTP                 0x80
1526 
1527 //==============================================================================
1528 
1529 
1530 //==============================================================================
1531 //        CM2CON0 Bits
1532 
1533 extern __at(0x0113) __sfr CM2CON0;
1534 
1535 typedef struct
1536   {
1537   unsigned C2SYNC               : 1;
1538   unsigned C2HYS                : 1;
1539   unsigned C2SP                 : 1;
1540   unsigned                      : 1;
1541   unsigned C2POL                : 1;
1542   unsigned C2OE                 : 1;
1543   unsigned C2OUT                : 1;
1544   unsigned C2ON                 : 1;
1545   } __CM2CON0bits_t;
1546 
1547 extern __at(0x0113) volatile __CM2CON0bits_t CM2CON0bits;
1548 
1549 #define _C2SYNC                 0x01
1550 #define _C2HYS                  0x02
1551 #define _C2SP                   0x04
1552 #define _C2POL                  0x10
1553 #define _C2OE                   0x20
1554 #define _C2OUT                  0x40
1555 #define _C2ON                   0x80
1556 
1557 //==============================================================================
1558 
1559 
1560 //==============================================================================
1561 //        CM2CON1 Bits
1562 
1563 extern __at(0x0114) __sfr CM2CON1;
1564 
1565 typedef union
1566   {
1567   struct
1568     {
1569     unsigned C2NCH0             : 1;
1570     unsigned C2NCH1             : 1;
1571     unsigned                    : 1;
1572     unsigned                    : 1;
1573     unsigned C2PCH0             : 1;
1574     unsigned C2PCH1             : 1;
1575     unsigned C2INTN             : 1;
1576     unsigned C2INTP             : 1;
1577     };
1578 
1579   struct
1580     {
1581     unsigned C2NCH              : 2;
1582     unsigned                    : 6;
1583     };
1584 
1585   struct
1586     {
1587     unsigned                    : 4;
1588     unsigned C2PCH              : 2;
1589     unsigned                    : 2;
1590     };
1591   } __CM2CON1bits_t;
1592 
1593 extern __at(0x0114) volatile __CM2CON1bits_t CM2CON1bits;
1594 
1595 #define _C2NCH0                 0x01
1596 #define _C2NCH1                 0x02
1597 #define _C2PCH0                 0x10
1598 #define _C2PCH1                 0x20
1599 #define _C2INTN                 0x40
1600 #define _C2INTP                 0x80
1601 
1602 //==============================================================================
1603 
1604 
1605 //==============================================================================
1606 //        CMOUT Bits
1607 
1608 extern __at(0x0115) __sfr CMOUT;
1609 
1610 typedef struct
1611   {
1612   unsigned MC1OUT               : 1;
1613   unsigned MC2OUT               : 1;
1614   unsigned                      : 1;
1615   unsigned                      : 1;
1616   unsigned                      : 1;
1617   unsigned                      : 1;
1618   unsigned                      : 1;
1619   unsigned                      : 1;
1620   } __CMOUTbits_t;
1621 
1622 extern __at(0x0115) volatile __CMOUTbits_t CMOUTbits;
1623 
1624 #define _MC1OUT                 0x01
1625 #define _MC2OUT                 0x02
1626 
1627 //==============================================================================
1628 
1629 
1630 //==============================================================================
1631 //        BORCON Bits
1632 
1633 extern __at(0x0116) __sfr BORCON;
1634 
1635 typedef struct
1636   {
1637   unsigned BORRDY               : 1;
1638   unsigned                      : 1;
1639   unsigned                      : 1;
1640   unsigned                      : 1;
1641   unsigned                      : 1;
1642   unsigned                      : 1;
1643   unsigned                      : 1;
1644   unsigned SBOREN               : 1;
1645   } __BORCONbits_t;
1646 
1647 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
1648 
1649 #define _BORRDY                 0x01
1650 #define _SBOREN                 0x80
1651 
1652 //==============================================================================
1653 
1654 
1655 //==============================================================================
1656 //        FVRCON Bits
1657 
1658 extern __at(0x0117) __sfr FVRCON;
1659 
1660 typedef union
1661   {
1662   struct
1663     {
1664     unsigned ADFVR0             : 1;
1665     unsigned ADFVR1             : 1;
1666     unsigned CDAFVR0            : 1;
1667     unsigned CDAFVR1            : 1;
1668     unsigned TSRNG              : 1;
1669     unsigned TSEN               : 1;
1670     unsigned FVRRDY             : 1;
1671     unsigned FVREN              : 1;
1672     };
1673 
1674   struct
1675     {
1676     unsigned ADFVR              : 2;
1677     unsigned                    : 6;
1678     };
1679 
1680   struct
1681     {
1682     unsigned                    : 2;
1683     unsigned CDAFVR             : 2;
1684     unsigned                    : 4;
1685     };
1686   } __FVRCONbits_t;
1687 
1688 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
1689 
1690 #define _ADFVR0                 0x01
1691 #define _ADFVR1                 0x02
1692 #define _CDAFVR0                0x04
1693 #define _CDAFVR1                0x08
1694 #define _TSRNG                  0x10
1695 #define _TSEN                   0x20
1696 #define _FVRRDY                 0x40
1697 #define _FVREN                  0x80
1698 
1699 //==============================================================================
1700 
1701 
1702 //==============================================================================
1703 //        DACCON0 Bits
1704 
1705 extern __at(0x0118) __sfr DACCON0;
1706 
1707 typedef union
1708   {
1709   struct
1710     {
1711     unsigned DACNSS             : 1;
1712     unsigned                    : 1;
1713     unsigned DACPSS0            : 1;
1714     unsigned DACPSS1            : 1;
1715     unsigned                    : 1;
1716     unsigned DACOE              : 1;
1717     unsigned DACLPS             : 1;
1718     unsigned DACEN              : 1;
1719     };
1720 
1721   struct
1722     {
1723     unsigned                    : 2;
1724     unsigned DACPSS             : 2;
1725     unsigned                    : 4;
1726     };
1727   } __DACCON0bits_t;
1728 
1729 extern __at(0x0118) volatile __DACCON0bits_t DACCON0bits;
1730 
1731 #define _DACNSS                 0x01
1732 #define _DACPSS0                0x04
1733 #define _DACPSS1                0x08
1734 #define _DACOE                  0x20
1735 #define _DACLPS                 0x40
1736 #define _DACEN                  0x80
1737 
1738 //==============================================================================
1739 
1740 
1741 //==============================================================================
1742 //        DACCON1 Bits
1743 
1744 extern __at(0x0119) __sfr DACCON1;
1745 
1746 typedef union
1747   {
1748   struct
1749     {
1750     unsigned DACR0              : 1;
1751     unsigned DACR1              : 1;
1752     unsigned DACR2              : 1;
1753     unsigned DACR3              : 1;
1754     unsigned DACR4              : 1;
1755     unsigned                    : 1;
1756     unsigned                    : 1;
1757     unsigned                    : 1;
1758     };
1759 
1760   struct
1761     {
1762     unsigned DACR               : 5;
1763     unsigned                    : 3;
1764     };
1765   } __DACCON1bits_t;
1766 
1767 extern __at(0x0119) volatile __DACCON1bits_t DACCON1bits;
1768 
1769 #define _DACR0                  0x01
1770 #define _DACR1                  0x02
1771 #define _DACR2                  0x04
1772 #define _DACR3                  0x08
1773 #define _DACR4                  0x10
1774 
1775 //==============================================================================
1776 
1777 
1778 //==============================================================================
1779 //        SRCON0 Bits
1780 
1781 extern __at(0x011A) __sfr SRCON0;
1782 
1783 typedef union
1784   {
1785   struct
1786     {
1787     unsigned SRPR               : 1;
1788     unsigned SRPS               : 1;
1789     unsigned SRNQEN             : 1;
1790     unsigned SRQEN              : 1;
1791     unsigned SRCLK0             : 1;
1792     unsigned SRCLK1             : 1;
1793     unsigned SRCLK2             : 1;
1794     unsigned SRLEN              : 1;
1795     };
1796 
1797   struct
1798     {
1799     unsigned                    : 4;
1800     unsigned SRCLK              : 3;
1801     unsigned                    : 1;
1802     };
1803   } __SRCON0bits_t;
1804 
1805 extern __at(0x011A) volatile __SRCON0bits_t SRCON0bits;
1806 
1807 #define _SRPR                   0x01
1808 #define _SRPS                   0x02
1809 #define _SRNQEN                 0x04
1810 #define _SRQEN                  0x08
1811 #define _SRCLK0                 0x10
1812 #define _SRCLK1                 0x20
1813 #define _SRCLK2                 0x40
1814 #define _SRLEN                  0x80
1815 
1816 //==============================================================================
1817 
1818 
1819 //==============================================================================
1820 //        SRCON1 Bits
1821 
1822 extern __at(0x011B) __sfr SRCON1;
1823 
1824 typedef struct
1825   {
1826   unsigned SRRC1E               : 1;
1827   unsigned SRRC2E               : 1;
1828   unsigned SRRCKE               : 1;
1829   unsigned SRRPE                : 1;
1830   unsigned SRSC1E               : 1;
1831   unsigned SRSC2E               : 1;
1832   unsigned SRSCKE               : 1;
1833   unsigned SRSPE                : 1;
1834   } __SRCON1bits_t;
1835 
1836 extern __at(0x011B) volatile __SRCON1bits_t SRCON1bits;
1837 
1838 #define _SRRC1E                 0x01
1839 #define _SRRC2E                 0x02
1840 #define _SRRCKE                 0x04
1841 #define _SRRPE                  0x08
1842 #define _SRSC1E                 0x10
1843 #define _SRSC2E                 0x20
1844 #define _SRSCKE                 0x40
1845 #define _SRSPE                  0x80
1846 
1847 //==============================================================================
1848 
1849 
1850 //==============================================================================
1851 //        APFCON Bits
1852 
1853 extern __at(0x011D) __sfr APFCON;
1854 
1855 typedef struct
1856   {
1857   unsigned CCP2SEL              : 1;
1858   unsigned SSSEL                : 1;
1859   unsigned C2OUTSEL             : 1;
1860   unsigned SRNQSEL              : 1;
1861   unsigned P2BSEL               : 1;
1862   unsigned T1GSEL               : 1;
1863   unsigned CCP3SEL              : 1;
1864   unsigned                      : 1;
1865   } __APFCONbits_t;
1866 
1867 extern __at(0x011D) volatile __APFCONbits_t APFCONbits;
1868 
1869 #define _CCP2SEL                0x01
1870 #define _SSSEL                  0x02
1871 #define _C2OUTSEL               0x04
1872 #define _SRNQSEL                0x08
1873 #define _P2BSEL                 0x10
1874 #define _T1GSEL                 0x20
1875 #define _CCP3SEL                0x40
1876 
1877 //==============================================================================
1878 
1879 
1880 //==============================================================================
1881 //        ANSELA Bits
1882 
1883 extern __at(0x018C) __sfr ANSELA;
1884 
1885 typedef union
1886   {
1887   struct
1888     {
1889     unsigned ANSA0              : 1;
1890     unsigned ANSA1              : 1;
1891     unsigned ANSA2              : 1;
1892     unsigned ANSA3              : 1;
1893     unsigned ANSA4              : 1;
1894     unsigned ANSA5              : 1;
1895     unsigned                    : 1;
1896     unsigned                    : 1;
1897     };
1898 
1899   struct
1900     {
1901     unsigned ANSA               : 6;
1902     unsigned                    : 2;
1903     };
1904   } __ANSELAbits_t;
1905 
1906 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
1907 
1908 #define _ANSA0                  0x01
1909 #define _ANSA1                  0x02
1910 #define _ANSA2                  0x04
1911 #define _ANSA3                  0x08
1912 #define _ANSA4                  0x10
1913 #define _ANSA5                  0x20
1914 
1915 //==============================================================================
1916 
1917 
1918 //==============================================================================
1919 //        ANSELB Bits
1920 
1921 extern __at(0x018D) __sfr ANSELB;
1922 
1923 typedef union
1924   {
1925   struct
1926     {
1927     unsigned ANSB0              : 1;
1928     unsigned ANSB1              : 1;
1929     unsigned ANSB2              : 1;
1930     unsigned ANSB3              : 1;
1931     unsigned ANSB4              : 1;
1932     unsigned ANSB5              : 1;
1933     unsigned                    : 1;
1934     unsigned                    : 1;
1935     };
1936 
1937   struct
1938     {
1939     unsigned ANSB               : 6;
1940     unsigned                    : 2;
1941     };
1942   } __ANSELBbits_t;
1943 
1944 extern __at(0x018D) volatile __ANSELBbits_t ANSELBbits;
1945 
1946 #define _ANSB0                  0x01
1947 #define _ANSB1                  0x02
1948 #define _ANSB2                  0x04
1949 #define _ANSB3                  0x08
1950 #define _ANSB4                  0x10
1951 #define _ANSB5                  0x20
1952 
1953 //==============================================================================
1954 
1955 extern __at(0x0191) __sfr EEADR;
1956 extern __at(0x0191) __sfr EEADRL;
1957 extern __at(0x0192) __sfr EEADRH;
1958 extern __at(0x0193) __sfr EEDAT;
1959 extern __at(0x0193) __sfr EEDATL;
1960 extern __at(0x0194) __sfr EEDATH;
1961 
1962 //==============================================================================
1963 //        EECON1 Bits
1964 
1965 extern __at(0x0195) __sfr EECON1;
1966 
1967 typedef struct
1968   {
1969   unsigned RD                   : 1;
1970   unsigned WR                   : 1;
1971   unsigned WREN                 : 1;
1972   unsigned WRERR                : 1;
1973   unsigned FREE                 : 1;
1974   unsigned LWLO                 : 1;
1975   unsigned CFGS                 : 1;
1976   unsigned EEPGD                : 1;
1977   } __EECON1bits_t;
1978 
1979 extern __at(0x0195) volatile __EECON1bits_t EECON1bits;
1980 
1981 #define _RD                     0x01
1982 #define _WR                     0x02
1983 #define _WREN                   0x04
1984 #define _WRERR                  0x08
1985 #define _FREE                   0x10
1986 #define _LWLO                   0x20
1987 #define _CFGS                   0x40
1988 #define _EEPGD                  0x80
1989 
1990 //==============================================================================
1991 
1992 extern __at(0x0196) __sfr EECON2;
1993 extern __at(0x0199) __sfr RCREG;
1994 extern __at(0x019A) __sfr TXREG;
1995 extern __at(0x019B) __sfr SP1BRG;
1996 extern __at(0x019B) __sfr SP1BRGL;
1997 extern __at(0x019B) __sfr SPBRG;
1998 extern __at(0x019B) __sfr SPBRGL;
1999 extern __at(0x019C) __sfr SP1BRGH;
2000 extern __at(0x019C) __sfr SPBRGH;
2001 
2002 //==============================================================================
2003 //        RCSTA Bits
2004 
2005 extern __at(0x019D) __sfr RCSTA;
2006 
2007 typedef struct
2008   {
2009   unsigned RX9D                 : 1;
2010   unsigned OERR                 : 1;
2011   unsigned FERR                 : 1;
2012   unsigned ADDEN                : 1;
2013   unsigned CREN                 : 1;
2014   unsigned SREN                 : 1;
2015   unsigned RX9                  : 1;
2016   unsigned SPEN                 : 1;
2017   } __RCSTAbits_t;
2018 
2019 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
2020 
2021 #define _RX9D                   0x01
2022 #define _OERR                   0x02
2023 #define _FERR                   0x04
2024 #define _ADDEN                  0x08
2025 #define _CREN                   0x10
2026 #define _SREN                   0x20
2027 #define _RX9                    0x40
2028 #define _SPEN                   0x80
2029 
2030 //==============================================================================
2031 
2032 
2033 //==============================================================================
2034 //        TXSTA Bits
2035 
2036 extern __at(0x019E) __sfr TXSTA;
2037 
2038 typedef struct
2039   {
2040   unsigned TX9D                 : 1;
2041   unsigned TRMT                 : 1;
2042   unsigned BRGH                 : 1;
2043   unsigned SENDB                : 1;
2044   unsigned SYNC                 : 1;
2045   unsigned TXEN                 : 1;
2046   unsigned TX9                  : 1;
2047   unsigned CSRC                 : 1;
2048   } __TXSTAbits_t;
2049 
2050 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
2051 
2052 #define _TX9D                   0x01
2053 #define _TRMT                   0x02
2054 #define _BRGH                   0x04
2055 #define _SENDB                  0x08
2056 #define _SYNC                   0x10
2057 #define _TXEN                   0x20
2058 #define _TX9                    0x40
2059 #define _CSRC                   0x80
2060 
2061 //==============================================================================
2062 
2063 
2064 //==============================================================================
2065 //        BAUDCON Bits
2066 
2067 extern __at(0x019F) __sfr BAUDCON;
2068 
2069 typedef struct
2070   {
2071   unsigned ABDEN                : 1;
2072   unsigned WUE                  : 1;
2073   unsigned                      : 1;
2074   unsigned BRG16                : 1;
2075   unsigned SCKP                 : 1;
2076   unsigned                      : 1;
2077   unsigned RCIDL                : 1;
2078   unsigned ABDOVF               : 1;
2079   } __BAUDCONbits_t;
2080 
2081 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
2082 
2083 #define _ABDEN                  0x01
2084 #define _WUE                    0x02
2085 #define _BRG16                  0x08
2086 #define _SCKP                   0x10
2087 #define _RCIDL                  0x40
2088 #define _ABDOVF                 0x80
2089 
2090 //==============================================================================
2091 
2092 
2093 //==============================================================================
2094 //        WPUB Bits
2095 
2096 extern __at(0x020D) __sfr WPUB;
2097 
2098 typedef struct
2099   {
2100   unsigned WPUB0                : 1;
2101   unsigned WPUB1                : 1;
2102   unsigned WPUB2                : 1;
2103   unsigned WPUB3                : 1;
2104   unsigned WPUB4                : 1;
2105   unsigned WPUB5                : 1;
2106   unsigned WPUB6                : 1;
2107   unsigned WPUB7                : 1;
2108   } __WPUBbits_t;
2109 
2110 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
2111 
2112 #define _WPUB0                  0x01
2113 #define _WPUB1                  0x02
2114 #define _WPUB2                  0x04
2115 #define _WPUB3                  0x08
2116 #define _WPUB4                  0x10
2117 #define _WPUB5                  0x20
2118 #define _WPUB6                  0x40
2119 #define _WPUB7                  0x80
2120 
2121 //==============================================================================
2122 
2123 
2124 //==============================================================================
2125 //        WPUE Bits
2126 
2127 extern __at(0x0210) __sfr WPUE;
2128 
2129 typedef struct
2130   {
2131   unsigned                      : 1;
2132   unsigned                      : 1;
2133   unsigned                      : 1;
2134   unsigned WPUE3                : 1;
2135   unsigned                      : 1;
2136   unsigned                      : 1;
2137   unsigned                      : 1;
2138   unsigned                      : 1;
2139   } __WPUEbits_t;
2140 
2141 extern __at(0x0210) volatile __WPUEbits_t WPUEbits;
2142 
2143 #define _WPUE3                  0x08
2144 
2145 //==============================================================================
2146 
2147 extern __at(0x0211) __sfr SSPBUF;
2148 extern __at(0x0212) __sfr SSPADD;
2149 extern __at(0x0213) __sfr SSPMSK;
2150 
2151 //==============================================================================
2152 //        SSPSTAT Bits
2153 
2154 extern __at(0x0214) __sfr SSPSTAT;
2155 
2156 typedef struct
2157   {
2158   unsigned BF                   : 1;
2159   unsigned UA                   : 1;
2160   unsigned R_NOT_W              : 1;
2161   unsigned S                    : 1;
2162   unsigned P                    : 1;
2163   unsigned D_NOT_A              : 1;
2164   unsigned CKE                  : 1;
2165   unsigned SMP                  : 1;
2166   } __SSPSTATbits_t;
2167 
2168 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
2169 
2170 #define _BF                     0x01
2171 #define _UA                     0x02
2172 #define _R_NOT_W                0x04
2173 #define _S                      0x08
2174 #define _P                      0x10
2175 #define _D_NOT_A                0x20
2176 #define _CKE                    0x40
2177 #define _SMP                    0x80
2178 
2179 //==============================================================================
2180 
2181 
2182 //==============================================================================
2183 //        SSPCON Bits
2184 
2185 extern __at(0x0215) __sfr SSPCON;
2186 
2187 typedef union
2188   {
2189   struct
2190     {
2191     unsigned SSPM0              : 1;
2192     unsigned SSPM1              : 1;
2193     unsigned SSPM2              : 1;
2194     unsigned SSPM3              : 1;
2195     unsigned CKP                : 1;
2196     unsigned SSPEN              : 1;
2197     unsigned SSPOV              : 1;
2198     unsigned WCOL               : 1;
2199     };
2200 
2201   struct
2202     {
2203     unsigned SSPM               : 4;
2204     unsigned                    : 4;
2205     };
2206   } __SSPCONbits_t;
2207 
2208 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
2209 
2210 #define _SSPM0                  0x01
2211 #define _SSPM1                  0x02
2212 #define _SSPM2                  0x04
2213 #define _SSPM3                  0x08
2214 #define _CKP                    0x10
2215 #define _SSPEN                  0x20
2216 #define _SSPOV                  0x40
2217 #define _WCOL                   0x80
2218 
2219 //==============================================================================
2220 
2221 
2222 //==============================================================================
2223 //        SSPCON1 Bits
2224 
2225 extern __at(0x0215) __sfr SSPCON1;
2226 
2227 typedef union
2228   {
2229   struct
2230     {
2231     unsigned SSPM0              : 1;
2232     unsigned SSPM1              : 1;
2233     unsigned SSPM2              : 1;
2234     unsigned SSPM3              : 1;
2235     unsigned CKP                : 1;
2236     unsigned SSPEN              : 1;
2237     unsigned SSPOV              : 1;
2238     unsigned WCOL               : 1;
2239     };
2240 
2241   struct
2242     {
2243     unsigned SSPM               : 4;
2244     unsigned                    : 4;
2245     };
2246   } __SSPCON1bits_t;
2247 
2248 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
2249 
2250 #define _SSPCON1_SSPM0          0x01
2251 #define _SSPCON1_SSPM1          0x02
2252 #define _SSPCON1_SSPM2          0x04
2253 #define _SSPCON1_SSPM3          0x08
2254 #define _SSPCON1_CKP            0x10
2255 #define _SSPCON1_SSPEN          0x20
2256 #define _SSPCON1_SSPOV          0x40
2257 #define _SSPCON1_WCOL           0x80
2258 
2259 //==============================================================================
2260 
2261 
2262 //==============================================================================
2263 //        SSPCON2 Bits
2264 
2265 extern __at(0x0216) __sfr SSPCON2;
2266 
2267 typedef struct
2268   {
2269   unsigned SEN                  : 1;
2270   unsigned RSEN                 : 1;
2271   unsigned PEN                  : 1;
2272   unsigned RCEN                 : 1;
2273   unsigned ACKEN                : 1;
2274   unsigned ACKDT                : 1;
2275   unsigned ACKSTAT              : 1;
2276   unsigned GCEN                 : 1;
2277   } __SSPCON2bits_t;
2278 
2279 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
2280 
2281 #define _SEN                    0x01
2282 #define _RSEN                   0x02
2283 #define _PEN                    0x04
2284 #define _RCEN                   0x08
2285 #define _ACKEN                  0x10
2286 #define _ACKDT                  0x20
2287 #define _ACKSTAT                0x40
2288 #define _GCEN                   0x80
2289 
2290 //==============================================================================
2291 
2292 
2293 //==============================================================================
2294 //        SSPCON3 Bits
2295 
2296 extern __at(0x0217) __sfr SSPCON3;
2297 
2298 typedef struct
2299   {
2300   unsigned DHEN                 : 1;
2301   unsigned AHEN                 : 1;
2302   unsigned SBCDE                : 1;
2303   unsigned SDAHT                : 1;
2304   unsigned BOEN                 : 1;
2305   unsigned SCIE                 : 1;
2306   unsigned PCIE                 : 1;
2307   unsigned ACKTIM               : 1;
2308   } __SSPCON3bits_t;
2309 
2310 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
2311 
2312 #define _DHEN                   0x01
2313 #define _AHEN                   0x02
2314 #define _SBCDE                  0x04
2315 #define _SDAHT                  0x08
2316 #define _BOEN                   0x10
2317 #define _SCIE                   0x20
2318 #define _PCIE                   0x40
2319 #define _ACKTIM                 0x80
2320 
2321 //==============================================================================
2322 
2323 extern __at(0x0291) __sfr CCPR1;
2324 extern __at(0x0291) __sfr CCPR1L;
2325 extern __at(0x0292) __sfr CCPR1H;
2326 
2327 //==============================================================================
2328 //        CCP1CON Bits
2329 
2330 extern __at(0x0293) __sfr CCP1CON;
2331 
2332 typedef union
2333   {
2334   struct
2335     {
2336     unsigned CCP1M0             : 1;
2337     unsigned CCP1M1             : 1;
2338     unsigned CCP1M2             : 1;
2339     unsigned CCP1M3             : 1;
2340     unsigned DC1B0              : 1;
2341     unsigned DC1B1              : 1;
2342     unsigned P1M0               : 1;
2343     unsigned P1M1               : 1;
2344     };
2345 
2346   struct
2347     {
2348     unsigned CCP1M              : 4;
2349     unsigned                    : 4;
2350     };
2351 
2352   struct
2353     {
2354     unsigned                    : 4;
2355     unsigned DC1B               : 2;
2356     unsigned                    : 2;
2357     };
2358 
2359   struct
2360     {
2361     unsigned                    : 6;
2362     unsigned P1M                : 2;
2363     };
2364   } __CCP1CONbits_t;
2365 
2366 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
2367 
2368 #define _CCP1M0                 0x01
2369 #define _CCP1M1                 0x02
2370 #define _CCP1M2                 0x04
2371 #define _CCP1M3                 0x08
2372 #define _DC1B0                  0x10
2373 #define _DC1B1                  0x20
2374 #define _P1M0                   0x40
2375 #define _P1M1                   0x80
2376 
2377 //==============================================================================
2378 
2379 
2380 //==============================================================================
2381 //        PWM1CON Bits
2382 
2383 extern __at(0x0294) __sfr PWM1CON;
2384 
2385 typedef union
2386   {
2387   struct
2388     {
2389     unsigned P1DC0              : 1;
2390     unsigned P1DC1              : 1;
2391     unsigned P1DC2              : 1;
2392     unsigned P1DC3              : 1;
2393     unsigned P1DC4              : 1;
2394     unsigned P1DC5              : 1;
2395     unsigned P1DC6              : 1;
2396     unsigned P1RSEN             : 1;
2397     };
2398 
2399   struct
2400     {
2401     unsigned P1DC               : 7;
2402     unsigned                    : 1;
2403     };
2404   } __PWM1CONbits_t;
2405 
2406 extern __at(0x0294) volatile __PWM1CONbits_t PWM1CONbits;
2407 
2408 #define _P1DC0                  0x01
2409 #define _P1DC1                  0x02
2410 #define _P1DC2                  0x04
2411 #define _P1DC3                  0x08
2412 #define _P1DC4                  0x10
2413 #define _P1DC5                  0x20
2414 #define _P1DC6                  0x40
2415 #define _P1RSEN                 0x80
2416 
2417 //==============================================================================
2418 
2419 
2420 //==============================================================================
2421 //        CCP1AS Bits
2422 
2423 extern __at(0x0295) __sfr CCP1AS;
2424 
2425 typedef union
2426   {
2427   struct
2428     {
2429     unsigned PSS1BD0            : 1;
2430     unsigned PSS1BD1            : 1;
2431     unsigned PSS1AC0            : 1;
2432     unsigned PSS1AC1            : 1;
2433     unsigned CCP1AS0            : 1;
2434     unsigned CCP1AS1            : 1;
2435     unsigned CCP1AS2            : 1;
2436     unsigned CCP1ASE            : 1;
2437     };
2438 
2439   struct
2440     {
2441     unsigned PSS1BD             : 2;
2442     unsigned                    : 6;
2443     };
2444 
2445   struct
2446     {
2447     unsigned                    : 2;
2448     unsigned PSS1AC             : 2;
2449     unsigned                    : 4;
2450     };
2451 
2452   struct
2453     {
2454     unsigned                    : 4;
2455     unsigned CCP1AS             : 3;
2456     unsigned                    : 1;
2457     };
2458   } __CCP1ASbits_t;
2459 
2460 extern __at(0x0295) volatile __CCP1ASbits_t CCP1ASbits;
2461 
2462 #define _PSS1BD0                0x01
2463 #define _PSS1BD1                0x02
2464 #define _PSS1AC0                0x04
2465 #define _PSS1AC1                0x08
2466 #define _CCP1AS0                0x10
2467 #define _CCP1AS1                0x20
2468 #define _CCP1AS2                0x40
2469 #define _CCP1ASE                0x80
2470 
2471 //==============================================================================
2472 
2473 
2474 //==============================================================================
2475 //        ECCP1AS Bits
2476 
2477 extern __at(0x0295) __sfr ECCP1AS;
2478 
2479 typedef union
2480   {
2481   struct
2482     {
2483     unsigned PSS1BD0            : 1;
2484     unsigned PSS1BD1            : 1;
2485     unsigned PSS1AC0            : 1;
2486     unsigned PSS1AC1            : 1;
2487     unsigned CCP1AS0            : 1;
2488     unsigned CCP1AS1            : 1;
2489     unsigned CCP1AS2            : 1;
2490     unsigned CCP1ASE            : 1;
2491     };
2492 
2493   struct
2494     {
2495     unsigned PSS1BD             : 2;
2496     unsigned                    : 6;
2497     };
2498 
2499   struct
2500     {
2501     unsigned                    : 2;
2502     unsigned PSS1AC             : 2;
2503     unsigned                    : 4;
2504     };
2505 
2506   struct
2507     {
2508     unsigned                    : 4;
2509     unsigned CCP1AS             : 3;
2510     unsigned                    : 1;
2511     };
2512   } __ECCP1ASbits_t;
2513 
2514 extern __at(0x0295) volatile __ECCP1ASbits_t ECCP1ASbits;
2515 
2516 #define _ECCP1AS_PSS1BD0        0x01
2517 #define _ECCP1AS_PSS1BD1        0x02
2518 #define _ECCP1AS_PSS1AC0        0x04
2519 #define _ECCP1AS_PSS1AC1        0x08
2520 #define _ECCP1AS_CCP1AS0        0x10
2521 #define _ECCP1AS_CCP1AS1        0x20
2522 #define _ECCP1AS_CCP1AS2        0x40
2523 #define _ECCP1AS_CCP1ASE        0x80
2524 
2525 //==============================================================================
2526 
2527 
2528 //==============================================================================
2529 //        PSTR1CON Bits
2530 
2531 extern __at(0x0296) __sfr PSTR1CON;
2532 
2533 typedef struct
2534   {
2535   unsigned STR1A                : 1;
2536   unsigned STR1B                : 1;
2537   unsigned STR1C                : 1;
2538   unsigned STR1D                : 1;
2539   unsigned STR1SYNC             : 1;
2540   unsigned                      : 1;
2541   unsigned                      : 1;
2542   unsigned                      : 1;
2543   } __PSTR1CONbits_t;
2544 
2545 extern __at(0x0296) volatile __PSTR1CONbits_t PSTR1CONbits;
2546 
2547 #define _STR1A                  0x01
2548 #define _STR1B                  0x02
2549 #define _STR1C                  0x04
2550 #define _STR1D                  0x08
2551 #define _STR1SYNC               0x10
2552 
2553 //==============================================================================
2554 
2555 extern __at(0x0298) __sfr CCPR2;
2556 extern __at(0x0298) __sfr CCPR2L;
2557 extern __at(0x0299) __sfr CCPR2H;
2558 
2559 //==============================================================================
2560 //        CCP2CON Bits
2561 
2562 extern __at(0x029A) __sfr CCP2CON;
2563 
2564 typedef union
2565   {
2566   struct
2567     {
2568     unsigned CCP2M0             : 1;
2569     unsigned CCP2M1             : 1;
2570     unsigned CCP2M2             : 1;
2571     unsigned CCP2M3             : 1;
2572     unsigned DC2B0              : 1;
2573     unsigned DC2B1              : 1;
2574     unsigned P2M0               : 1;
2575     unsigned P2M1               : 1;
2576     };
2577 
2578   struct
2579     {
2580     unsigned CCP2M              : 4;
2581     unsigned                    : 4;
2582     };
2583 
2584   struct
2585     {
2586     unsigned                    : 4;
2587     unsigned DC2B               : 2;
2588     unsigned                    : 2;
2589     };
2590 
2591   struct
2592     {
2593     unsigned                    : 6;
2594     unsigned P2M                : 2;
2595     };
2596   } __CCP2CONbits_t;
2597 
2598 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
2599 
2600 #define _CCP2M0                 0x01
2601 #define _CCP2M1                 0x02
2602 #define _CCP2M2                 0x04
2603 #define _CCP2M3                 0x08
2604 #define _DC2B0                  0x10
2605 #define _DC2B1                  0x20
2606 #define _P2M0                   0x40
2607 #define _P2M1                   0x80
2608 
2609 //==============================================================================
2610 
2611 
2612 //==============================================================================
2613 //        PWM2CON Bits
2614 
2615 extern __at(0x029B) __sfr PWM2CON;
2616 
2617 typedef union
2618   {
2619   struct
2620     {
2621     unsigned P2DC0              : 1;
2622     unsigned P2DC1              : 1;
2623     unsigned P2DC2              : 1;
2624     unsigned P2DC3              : 1;
2625     unsigned P2DC4              : 1;
2626     unsigned P2DC5              : 1;
2627     unsigned P2DC6              : 1;
2628     unsigned P2RSEN             : 1;
2629     };
2630 
2631   struct
2632     {
2633     unsigned P2DC               : 7;
2634     unsigned                    : 1;
2635     };
2636   } __PWM2CONbits_t;
2637 
2638 extern __at(0x029B) volatile __PWM2CONbits_t PWM2CONbits;
2639 
2640 #define _P2DC0                  0x01
2641 #define _P2DC1                  0x02
2642 #define _P2DC2                  0x04
2643 #define _P2DC3                  0x08
2644 #define _P2DC4                  0x10
2645 #define _P2DC5                  0x20
2646 #define _P2DC6                  0x40
2647 #define _P2RSEN                 0x80
2648 
2649 //==============================================================================
2650 
2651 
2652 //==============================================================================
2653 //        CCP2AS Bits
2654 
2655 extern __at(0x029C) __sfr CCP2AS;
2656 
2657 typedef union
2658   {
2659   struct
2660     {
2661     unsigned PSS2BD0            : 1;
2662     unsigned PSS2BD1            : 1;
2663     unsigned PSS2AC0            : 1;
2664     unsigned PSS2AC1            : 1;
2665     unsigned CCP2AS0            : 1;
2666     unsigned CCP2AS1            : 1;
2667     unsigned CCP2AS2            : 1;
2668     unsigned CCP2ASE            : 1;
2669     };
2670 
2671   struct
2672     {
2673     unsigned PSS2BD             : 2;
2674     unsigned                    : 6;
2675     };
2676 
2677   struct
2678     {
2679     unsigned                    : 2;
2680     unsigned PSS2AC             : 2;
2681     unsigned                    : 4;
2682     };
2683 
2684   struct
2685     {
2686     unsigned                    : 4;
2687     unsigned CCP2AS             : 3;
2688     unsigned                    : 1;
2689     };
2690   } __CCP2ASbits_t;
2691 
2692 extern __at(0x029C) volatile __CCP2ASbits_t CCP2ASbits;
2693 
2694 #define _PSS2BD0                0x01
2695 #define _PSS2BD1                0x02
2696 #define _PSS2AC0                0x04
2697 #define _PSS2AC1                0x08
2698 #define _CCP2AS0                0x10
2699 #define _CCP2AS1                0x20
2700 #define _CCP2AS2                0x40
2701 #define _CCP2ASE                0x80
2702 
2703 //==============================================================================
2704 
2705 
2706 //==============================================================================
2707 //        ECCP2AS Bits
2708 
2709 extern __at(0x029C) __sfr ECCP2AS;
2710 
2711 typedef union
2712   {
2713   struct
2714     {
2715     unsigned PSS2BD0            : 1;
2716     unsigned PSS2BD1            : 1;
2717     unsigned PSS2AC0            : 1;
2718     unsigned PSS2AC1            : 1;
2719     unsigned CCP2AS0            : 1;
2720     unsigned CCP2AS1            : 1;
2721     unsigned CCP2AS2            : 1;
2722     unsigned CCP2ASE            : 1;
2723     };
2724 
2725   struct
2726     {
2727     unsigned PSS2BD             : 2;
2728     unsigned                    : 6;
2729     };
2730 
2731   struct
2732     {
2733     unsigned                    : 2;
2734     unsigned PSS2AC             : 2;
2735     unsigned                    : 4;
2736     };
2737 
2738   struct
2739     {
2740     unsigned                    : 4;
2741     unsigned CCP2AS             : 3;
2742     unsigned                    : 1;
2743     };
2744   } __ECCP2ASbits_t;
2745 
2746 extern __at(0x029C) volatile __ECCP2ASbits_t ECCP2ASbits;
2747 
2748 #define _ECCP2AS_PSS2BD0        0x01
2749 #define _ECCP2AS_PSS2BD1        0x02
2750 #define _ECCP2AS_PSS2AC0        0x04
2751 #define _ECCP2AS_PSS2AC1        0x08
2752 #define _ECCP2AS_CCP2AS0        0x10
2753 #define _ECCP2AS_CCP2AS1        0x20
2754 #define _ECCP2AS_CCP2AS2        0x40
2755 #define _ECCP2AS_CCP2ASE        0x80
2756 
2757 //==============================================================================
2758 
2759 
2760 //==============================================================================
2761 //        PSTR2CON Bits
2762 
2763 extern __at(0x029D) __sfr PSTR2CON;
2764 
2765 typedef struct
2766   {
2767   unsigned STR2A                : 1;
2768   unsigned STR2B                : 1;
2769   unsigned STR2C                : 1;
2770   unsigned STR2D                : 1;
2771   unsigned STR2SYNC             : 1;
2772   unsigned                      : 1;
2773   unsigned                      : 1;
2774   unsigned                      : 1;
2775   } __PSTR2CONbits_t;
2776 
2777 extern __at(0x029D) volatile __PSTR2CONbits_t PSTR2CONbits;
2778 
2779 #define _STR2A                  0x01
2780 #define _STR2B                  0x02
2781 #define _STR2C                  0x04
2782 #define _STR2D                  0x08
2783 #define _STR2SYNC               0x10
2784 
2785 //==============================================================================
2786 
2787 
2788 //==============================================================================
2789 //        CCPTMRS0 Bits
2790 
2791 extern __at(0x029E) __sfr CCPTMRS0;
2792 
2793 typedef union
2794   {
2795   struct
2796     {
2797     unsigned C1TSEL0            : 1;
2798     unsigned C1TSEL1            : 1;
2799     unsigned C2TSEL0            : 1;
2800     unsigned C2TSEL1            : 1;
2801     unsigned C3TSEL0            : 1;
2802     unsigned C3TSEL1            : 1;
2803     unsigned C4TSEL0            : 1;
2804     unsigned C4TSEL1            : 1;
2805     };
2806 
2807   struct
2808     {
2809     unsigned C1TSEL             : 2;
2810     unsigned                    : 6;
2811     };
2812 
2813   struct
2814     {
2815     unsigned                    : 2;
2816     unsigned C2TSEL             : 2;
2817     unsigned                    : 4;
2818     };
2819 
2820   struct
2821     {
2822     unsigned                    : 4;
2823     unsigned C3TSEL             : 2;
2824     unsigned                    : 2;
2825     };
2826 
2827   struct
2828     {
2829     unsigned                    : 6;
2830     unsigned C4TSEL             : 2;
2831     };
2832   } __CCPTMRS0bits_t;
2833 
2834 extern __at(0x029E) volatile __CCPTMRS0bits_t CCPTMRS0bits;
2835 
2836 #define _C1TSEL0                0x01
2837 #define _C1TSEL1                0x02
2838 #define _C2TSEL0                0x04
2839 #define _C2TSEL1                0x08
2840 #define _C3TSEL0                0x10
2841 #define _C3TSEL1                0x20
2842 #define _C4TSEL0                0x40
2843 #define _C4TSEL1                0x80
2844 
2845 //==============================================================================
2846 
2847 
2848 //==============================================================================
2849 //        CCPTMRS1 Bits
2850 
2851 extern __at(0x029F) __sfr CCPTMRS1;
2852 
2853 typedef union
2854   {
2855   struct
2856     {
2857     unsigned C5TSEL0            : 1;
2858     unsigned C5TSEL1            : 1;
2859     unsigned                    : 1;
2860     unsigned                    : 1;
2861     unsigned                    : 1;
2862     unsigned                    : 1;
2863     unsigned                    : 1;
2864     unsigned                    : 1;
2865     };
2866 
2867   struct
2868     {
2869     unsigned C5TSEL             : 2;
2870     unsigned                    : 6;
2871     };
2872   } __CCPTMRS1bits_t;
2873 
2874 extern __at(0x029F) volatile __CCPTMRS1bits_t CCPTMRS1bits;
2875 
2876 #define _C5TSEL0                0x01
2877 #define _C5TSEL1                0x02
2878 
2879 //==============================================================================
2880 
2881 extern __at(0x0311) __sfr CCPR3;
2882 extern __at(0x0311) __sfr CCPR3L;
2883 extern __at(0x0312) __sfr CCPR3H;
2884 
2885 //==============================================================================
2886 //        CCP3CON Bits
2887 
2888 extern __at(0x0313) __sfr CCP3CON;
2889 
2890 typedef union
2891   {
2892   struct
2893     {
2894     unsigned CCP3M0             : 1;
2895     unsigned CCP3M1             : 1;
2896     unsigned CCP3M2             : 1;
2897     unsigned CCP3M3             : 1;
2898     unsigned DC3B0              : 1;
2899     unsigned DC3B1              : 1;
2900     unsigned P3M0               : 1;
2901     unsigned P3M1               : 1;
2902     };
2903 
2904   struct
2905     {
2906     unsigned CCP3M              : 4;
2907     unsigned                    : 4;
2908     };
2909 
2910   struct
2911     {
2912     unsigned                    : 4;
2913     unsigned DC3B               : 2;
2914     unsigned                    : 2;
2915     };
2916 
2917   struct
2918     {
2919     unsigned                    : 6;
2920     unsigned P3M                : 2;
2921     };
2922   } __CCP3CONbits_t;
2923 
2924 extern __at(0x0313) volatile __CCP3CONbits_t CCP3CONbits;
2925 
2926 #define _CCP3M0                 0x01
2927 #define _CCP3M1                 0x02
2928 #define _CCP3M2                 0x04
2929 #define _CCP3M3                 0x08
2930 #define _DC3B0                  0x10
2931 #define _DC3B1                  0x20
2932 #define _P3M0                   0x40
2933 #define _P3M1                   0x80
2934 
2935 //==============================================================================
2936 
2937 
2938 //==============================================================================
2939 //        PWM3CON Bits
2940 
2941 extern __at(0x0314) __sfr PWM3CON;
2942 
2943 typedef union
2944   {
2945   struct
2946     {
2947     unsigned P3DC0              : 1;
2948     unsigned P3DC1              : 1;
2949     unsigned P3DC2              : 1;
2950     unsigned P3DC3              : 1;
2951     unsigned P3DC4              : 1;
2952     unsigned P3DC5              : 1;
2953     unsigned P3DC6              : 1;
2954     unsigned P3RSEN             : 1;
2955     };
2956 
2957   struct
2958     {
2959     unsigned P3DC               : 7;
2960     unsigned                    : 1;
2961     };
2962   } __PWM3CONbits_t;
2963 
2964 extern __at(0x0314) volatile __PWM3CONbits_t PWM3CONbits;
2965 
2966 #define _P3DC0                  0x01
2967 #define _P3DC1                  0x02
2968 #define _P3DC2                  0x04
2969 #define _P3DC3                  0x08
2970 #define _P3DC4                  0x10
2971 #define _P3DC5                  0x20
2972 #define _P3DC6                  0x40
2973 #define _P3RSEN                 0x80
2974 
2975 //==============================================================================
2976 
2977 
2978 //==============================================================================
2979 //        CCP3AS Bits
2980 
2981 extern __at(0x0315) __sfr CCP3AS;
2982 
2983 typedef union
2984   {
2985   struct
2986     {
2987     unsigned PSS3BD0            : 1;
2988     unsigned PSS3BD1            : 1;
2989     unsigned PSS3AC0            : 1;
2990     unsigned PSS3AC1            : 1;
2991     unsigned CCP3AS0            : 1;
2992     unsigned CCP3AS1            : 1;
2993     unsigned CCP3AS2            : 1;
2994     unsigned CCP3ASE            : 1;
2995     };
2996 
2997   struct
2998     {
2999     unsigned PSS3BD             : 2;
3000     unsigned                    : 6;
3001     };
3002 
3003   struct
3004     {
3005     unsigned                    : 2;
3006     unsigned PSS3AC             : 2;
3007     unsigned                    : 4;
3008     };
3009 
3010   struct
3011     {
3012     unsigned                    : 4;
3013     unsigned CCP3AS             : 3;
3014     unsigned                    : 1;
3015     };
3016   } __CCP3ASbits_t;
3017 
3018 extern __at(0x0315) volatile __CCP3ASbits_t CCP3ASbits;
3019 
3020 #define _PSS3BD0                0x01
3021 #define _PSS3BD1                0x02
3022 #define _PSS3AC0                0x04
3023 #define _PSS3AC1                0x08
3024 #define _CCP3AS0                0x10
3025 #define _CCP3AS1                0x20
3026 #define _CCP3AS2                0x40
3027 #define _CCP3ASE                0x80
3028 
3029 //==============================================================================
3030 
3031 
3032 //==============================================================================
3033 //        ECCP3AS Bits
3034 
3035 extern __at(0x0315) __sfr ECCP3AS;
3036 
3037 typedef union
3038   {
3039   struct
3040     {
3041     unsigned PSS3BD0            : 1;
3042     unsigned PSS3BD1            : 1;
3043     unsigned PSS3AC0            : 1;
3044     unsigned PSS3AC1            : 1;
3045     unsigned CCP3AS0            : 1;
3046     unsigned CCP3AS1            : 1;
3047     unsigned CCP3AS2            : 1;
3048     unsigned CCP3ASE            : 1;
3049     };
3050 
3051   struct
3052     {
3053     unsigned PSS3BD             : 2;
3054     unsigned                    : 6;
3055     };
3056 
3057   struct
3058     {
3059     unsigned                    : 2;
3060     unsigned PSS3AC             : 2;
3061     unsigned                    : 4;
3062     };
3063 
3064   struct
3065     {
3066     unsigned                    : 4;
3067     unsigned CCP3AS             : 3;
3068     unsigned                    : 1;
3069     };
3070   } __ECCP3ASbits_t;
3071 
3072 extern __at(0x0315) volatile __ECCP3ASbits_t ECCP3ASbits;
3073 
3074 #define _ECCP3AS_PSS3BD0        0x01
3075 #define _ECCP3AS_PSS3BD1        0x02
3076 #define _ECCP3AS_PSS3AC0        0x04
3077 #define _ECCP3AS_PSS3AC1        0x08
3078 #define _ECCP3AS_CCP3AS0        0x10
3079 #define _ECCP3AS_CCP3AS1        0x20
3080 #define _ECCP3AS_CCP3AS2        0x40
3081 #define _ECCP3AS_CCP3ASE        0x80
3082 
3083 //==============================================================================
3084 
3085 
3086 //==============================================================================
3087 //        PSTR3CON Bits
3088 
3089 extern __at(0x0316) __sfr PSTR3CON;
3090 
3091 typedef struct
3092   {
3093   unsigned STR3A                : 1;
3094   unsigned STR3B                : 1;
3095   unsigned STR3C                : 1;
3096   unsigned STR3D                : 1;
3097   unsigned STR3SYNC             : 1;
3098   unsigned                      : 1;
3099   unsigned                      : 1;
3100   unsigned                      : 1;
3101   } __PSTR3CONbits_t;
3102 
3103 extern __at(0x0316) volatile __PSTR3CONbits_t PSTR3CONbits;
3104 
3105 #define _STR3A                  0x01
3106 #define _STR3B                  0x02
3107 #define _STR3C                  0x04
3108 #define _STR3D                  0x08
3109 #define _STR3SYNC               0x10
3110 
3111 //==============================================================================
3112 
3113 extern __at(0x0318) __sfr CCPR4;
3114 extern __at(0x0318) __sfr CCPR4L;
3115 extern __at(0x0319) __sfr CCPR4H;
3116 
3117 //==============================================================================
3118 //        CCP4CON Bits
3119 
3120 extern __at(0x031A) __sfr CCP4CON;
3121 
3122 typedef union
3123   {
3124   struct
3125     {
3126     unsigned CCP4M0             : 1;
3127     unsigned CCP4M1             : 1;
3128     unsigned CCP4M2             : 1;
3129     unsigned CCP4M3             : 1;
3130     unsigned DC4B0              : 1;
3131     unsigned DC4B1              : 1;
3132     unsigned                    : 1;
3133     unsigned                    : 1;
3134     };
3135 
3136   struct
3137     {
3138     unsigned CCP4M              : 4;
3139     unsigned                    : 4;
3140     };
3141 
3142   struct
3143     {
3144     unsigned                    : 4;
3145     unsigned DC4B               : 2;
3146     unsigned                    : 2;
3147     };
3148   } __CCP4CONbits_t;
3149 
3150 extern __at(0x031A) volatile __CCP4CONbits_t CCP4CONbits;
3151 
3152 #define _CCP4M0                 0x01
3153 #define _CCP4M1                 0x02
3154 #define _CCP4M2                 0x04
3155 #define _CCP4M3                 0x08
3156 #define _DC4B0                  0x10
3157 #define _DC4B1                  0x20
3158 
3159 //==============================================================================
3160 
3161 extern __at(0x031C) __sfr CCPR5;
3162 extern __at(0x031C) __sfr CCPR5L;
3163 extern __at(0x031D) __sfr CCPR5H;
3164 
3165 //==============================================================================
3166 //        CCP5CON Bits
3167 
3168 extern __at(0x031E) __sfr CCP5CON;
3169 
3170 typedef union
3171   {
3172   struct
3173     {
3174     unsigned CCP5M0             : 1;
3175     unsigned CCP5M1             : 1;
3176     unsigned CCP5M2             : 1;
3177     unsigned CCP5M3             : 1;
3178     unsigned DC5B0              : 1;
3179     unsigned DC5B1              : 1;
3180     unsigned                    : 1;
3181     unsigned                    : 1;
3182     };
3183 
3184   struct
3185     {
3186     unsigned CCP5M              : 4;
3187     unsigned                    : 4;
3188     };
3189 
3190   struct
3191     {
3192     unsigned                    : 4;
3193     unsigned DC5B               : 2;
3194     unsigned                    : 2;
3195     };
3196   } __CCP5CONbits_t;
3197 
3198 extern __at(0x031E) volatile __CCP5CONbits_t CCP5CONbits;
3199 
3200 #define _CCP5M0                 0x01
3201 #define _CCP5M1                 0x02
3202 #define _CCP5M2                 0x04
3203 #define _CCP5M3                 0x08
3204 #define _DC5B0                  0x10
3205 #define _DC5B1                  0x20
3206 
3207 //==============================================================================
3208 
3209 
3210 //==============================================================================
3211 //        IOCBP Bits
3212 
3213 extern __at(0x0394) __sfr IOCBP;
3214 
3215 typedef struct
3216   {
3217   unsigned IOCBP0               : 1;
3218   unsigned IOCBP1               : 1;
3219   unsigned IOCBP2               : 1;
3220   unsigned IOCBP3               : 1;
3221   unsigned IOCBP4               : 1;
3222   unsigned IOCBP5               : 1;
3223   unsigned IOCBP6               : 1;
3224   unsigned IOCBP7               : 1;
3225   } __IOCBPbits_t;
3226 
3227 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
3228 
3229 #define _IOCBP0                 0x01
3230 #define _IOCBP1                 0x02
3231 #define _IOCBP2                 0x04
3232 #define _IOCBP3                 0x08
3233 #define _IOCBP4                 0x10
3234 #define _IOCBP5                 0x20
3235 #define _IOCBP6                 0x40
3236 #define _IOCBP7                 0x80
3237 
3238 //==============================================================================
3239 
3240 
3241 //==============================================================================
3242 //        IOCBN Bits
3243 
3244 extern __at(0x0395) __sfr IOCBN;
3245 
3246 typedef struct
3247   {
3248   unsigned IOCBN0               : 1;
3249   unsigned IOCBN1               : 1;
3250   unsigned IOCBN2               : 1;
3251   unsigned IOCBN3               : 1;
3252   unsigned IOCBN4               : 1;
3253   unsigned IOCBN5               : 1;
3254   unsigned IOCBN6               : 1;
3255   unsigned IOCBN7               : 1;
3256   } __IOCBNbits_t;
3257 
3258 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
3259 
3260 #define _IOCBN0                 0x01
3261 #define _IOCBN1                 0x02
3262 #define _IOCBN2                 0x04
3263 #define _IOCBN3                 0x08
3264 #define _IOCBN4                 0x10
3265 #define _IOCBN5                 0x20
3266 #define _IOCBN6                 0x40
3267 #define _IOCBN7                 0x80
3268 
3269 //==============================================================================
3270 
3271 
3272 //==============================================================================
3273 //        IOCBF Bits
3274 
3275 extern __at(0x0396) __sfr IOCBF;
3276 
3277 typedef struct
3278   {
3279   unsigned IOCBF0               : 1;
3280   unsigned IOCBF1               : 1;
3281   unsigned IOCBF2               : 1;
3282   unsigned IOCBF3               : 1;
3283   unsigned IOCBF4               : 1;
3284   unsigned IOCBF5               : 1;
3285   unsigned IOCBF6               : 1;
3286   unsigned IOCBF7               : 1;
3287   } __IOCBFbits_t;
3288 
3289 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
3290 
3291 #define _IOCBF0                 0x01
3292 #define _IOCBF1                 0x02
3293 #define _IOCBF2                 0x04
3294 #define _IOCBF3                 0x08
3295 #define _IOCBF4                 0x10
3296 #define _IOCBF5                 0x20
3297 #define _IOCBF6                 0x40
3298 #define _IOCBF7                 0x80
3299 
3300 //==============================================================================
3301 
3302 extern __at(0x0415) __sfr TMR4;
3303 extern __at(0x0416) __sfr PR4;
3304 
3305 //==============================================================================
3306 //        T4CON Bits
3307 
3308 extern __at(0x0417) __sfr T4CON;
3309 
3310 typedef union
3311   {
3312   struct
3313     {
3314     unsigned T4CKPS0            : 1;
3315     unsigned T4CKPS1            : 1;
3316     unsigned TMR4ON             : 1;
3317     unsigned T4OUTPS0           : 1;
3318     unsigned T4OUTPS1           : 1;
3319     unsigned T4OUTPS2           : 1;
3320     unsigned T4OUTPS3           : 1;
3321     unsigned                    : 1;
3322     };
3323 
3324   struct
3325     {
3326     unsigned T4CKPS             : 2;
3327     unsigned                    : 6;
3328     };
3329 
3330   struct
3331     {
3332     unsigned                    : 3;
3333     unsigned T4OUTPS            : 4;
3334     unsigned                    : 1;
3335     };
3336   } __T4CONbits_t;
3337 
3338 extern __at(0x0417) volatile __T4CONbits_t T4CONbits;
3339 
3340 #define _T4CKPS0                0x01
3341 #define _T4CKPS1                0x02
3342 #define _TMR4ON                 0x04
3343 #define _T4OUTPS0               0x08
3344 #define _T4OUTPS1               0x10
3345 #define _T4OUTPS2               0x20
3346 #define _T4OUTPS3               0x40
3347 
3348 //==============================================================================
3349 
3350 extern __at(0x041C) __sfr TMR6;
3351 extern __at(0x041D) __sfr PR6;
3352 
3353 //==============================================================================
3354 //        T6CON Bits
3355 
3356 extern __at(0x041E) __sfr T6CON;
3357 
3358 typedef union
3359   {
3360   struct
3361     {
3362     unsigned T6CKPS0            : 1;
3363     unsigned T6CKPS1            : 1;
3364     unsigned TMR6ON             : 1;
3365     unsigned T6OUTPS0           : 1;
3366     unsigned T6OUTPS1           : 1;
3367     unsigned T6OUTPS2           : 1;
3368     unsigned T6OUTPS3           : 1;
3369     unsigned                    : 1;
3370     };
3371 
3372   struct
3373     {
3374     unsigned T6CKPS             : 2;
3375     unsigned                    : 6;
3376     };
3377 
3378   struct
3379     {
3380     unsigned                    : 3;
3381     unsigned T6OUTPS            : 4;
3382     unsigned                    : 1;
3383     };
3384   } __T6CONbits_t;
3385 
3386 extern __at(0x041E) volatile __T6CONbits_t T6CONbits;
3387 
3388 #define _T6CKPS0                0x01
3389 #define _T6CKPS1                0x02
3390 #define _TMR6ON                 0x04
3391 #define _T6OUTPS0               0x08
3392 #define _T6OUTPS1               0x10
3393 #define _T6OUTPS2               0x20
3394 #define _T6OUTPS3               0x40
3395 
3396 //==============================================================================
3397 
3398 
3399 //==============================================================================
3400 //        LCDCON Bits
3401 
3402 extern __at(0x0791) __sfr LCDCON;
3403 
3404 typedef union
3405   {
3406   struct
3407     {
3408     unsigned LMUX0              : 1;
3409     unsigned LMUX1              : 1;
3410     unsigned CS0                : 1;
3411     unsigned CS1                : 1;
3412     unsigned                    : 1;
3413     unsigned WERR               : 1;
3414     unsigned SLPEN              : 1;
3415     unsigned LCDEN              : 1;
3416     };
3417 
3418   struct
3419     {
3420     unsigned LMUX               : 2;
3421     unsigned                    : 6;
3422     };
3423 
3424   struct
3425     {
3426     unsigned                    : 2;
3427     unsigned CS                 : 2;
3428     unsigned                    : 4;
3429     };
3430   } __LCDCONbits_t;
3431 
3432 extern __at(0x0791) volatile __LCDCONbits_t LCDCONbits;
3433 
3434 #define _LMUX0                  0x01
3435 #define _LMUX1                  0x02
3436 #define _CS0                    0x04
3437 #define _CS1                    0x08
3438 #define _WERR                   0x20
3439 #define _SLPEN                  0x40
3440 #define _LCDEN                  0x80
3441 
3442 //==============================================================================
3443 
3444 
3445 //==============================================================================
3446 //        LCDPS Bits
3447 
3448 extern __at(0x0792) __sfr LCDPS;
3449 
3450 typedef union
3451   {
3452   struct
3453     {
3454     unsigned LP0                : 1;
3455     unsigned LP1                : 1;
3456     unsigned LP2                : 1;
3457     unsigned LP3                : 1;
3458     unsigned WA                 : 1;
3459     unsigned LCDA               : 1;
3460     unsigned BIASMD             : 1;
3461     unsigned WFT                : 1;
3462     };
3463 
3464   struct
3465     {
3466     unsigned LP                 : 4;
3467     unsigned                    : 4;
3468     };
3469   } __LCDPSbits_t;
3470 
3471 extern __at(0x0792) volatile __LCDPSbits_t LCDPSbits;
3472 
3473 #define _LP0                    0x01
3474 #define _LP1                    0x02
3475 #define _LP2                    0x04
3476 #define _LP3                    0x08
3477 #define _WA                     0x10
3478 #define _LCDA                   0x20
3479 #define _BIASMD                 0x40
3480 #define _WFT                    0x80
3481 
3482 //==============================================================================
3483 
3484 
3485 //==============================================================================
3486 //        LCDREF Bits
3487 
3488 extern __at(0x0793) __sfr LCDREF;
3489 
3490 typedef struct
3491   {
3492   unsigned                      : 1;
3493   unsigned VLCD1PE              : 1;
3494   unsigned VLCD2PE              : 1;
3495   unsigned VLCD3PE              : 1;
3496   unsigned                      : 1;
3497   unsigned LCDIRI               : 1;
3498   unsigned LCDIRS               : 1;
3499   unsigned LCDIRE               : 1;
3500   } __LCDREFbits_t;
3501 
3502 extern __at(0x0793) volatile __LCDREFbits_t LCDREFbits;
3503 
3504 #define _VLCD1PE                0x02
3505 #define _VLCD2PE                0x04
3506 #define _VLCD3PE                0x08
3507 #define _LCDIRI                 0x20
3508 #define _LCDIRS                 0x40
3509 #define _LCDIRE                 0x80
3510 
3511 //==============================================================================
3512 
3513 
3514 //==============================================================================
3515 //        LCDCST Bits
3516 
3517 extern __at(0x0794) __sfr LCDCST;
3518 
3519 typedef union
3520   {
3521   struct
3522     {
3523     unsigned LCDCST0            : 1;
3524     unsigned LCDCST1            : 1;
3525     unsigned LCDCST2            : 1;
3526     unsigned                    : 1;
3527     unsigned                    : 1;
3528     unsigned                    : 1;
3529     unsigned                    : 1;
3530     unsigned                    : 1;
3531     };
3532 
3533   struct
3534     {
3535     unsigned LCDCST             : 3;
3536     unsigned                    : 5;
3537     };
3538   } __LCDCSTbits_t;
3539 
3540 extern __at(0x0794) volatile __LCDCSTbits_t LCDCSTbits;
3541 
3542 #define _LCDCST0                0x01
3543 #define _LCDCST1                0x02
3544 #define _LCDCST2                0x04
3545 
3546 //==============================================================================
3547 
3548 
3549 //==============================================================================
3550 //        LCDRL Bits
3551 
3552 extern __at(0x0795) __sfr LCDRL;
3553 
3554 typedef union
3555   {
3556   struct
3557     {
3558     unsigned LRLAT0             : 1;
3559     unsigned LRLAT1             : 1;
3560     unsigned LRLAT2             : 1;
3561     unsigned                    : 1;
3562     unsigned LRLBP0             : 1;
3563     unsigned LRLBP1             : 1;
3564     unsigned LRLAP0             : 1;
3565     unsigned LRLAP1             : 1;
3566     };
3567 
3568   struct
3569     {
3570     unsigned LRLAT              : 3;
3571     unsigned                    : 5;
3572     };
3573 
3574   struct
3575     {
3576     unsigned                    : 4;
3577     unsigned LRLBP              : 2;
3578     unsigned                    : 2;
3579     };
3580 
3581   struct
3582     {
3583     unsigned                    : 6;
3584     unsigned LRLAP              : 2;
3585     };
3586   } __LCDRLbits_t;
3587 
3588 extern __at(0x0795) volatile __LCDRLbits_t LCDRLbits;
3589 
3590 #define _LRLAT0                 0x01
3591 #define _LRLAT1                 0x02
3592 #define _LRLAT2                 0x04
3593 #define _LRLBP0                 0x10
3594 #define _LRLBP1                 0x20
3595 #define _LRLAP0                 0x40
3596 #define _LRLAP1                 0x80
3597 
3598 //==============================================================================
3599 
3600 
3601 //==============================================================================
3602 //        LCDSE0 Bits
3603 
3604 extern __at(0x0798) __sfr LCDSE0;
3605 
3606 typedef struct
3607   {
3608   unsigned SE0                  : 1;
3609   unsigned SE1                  : 1;
3610   unsigned SE2                  : 1;
3611   unsigned SE3                  : 1;
3612   unsigned SE4                  : 1;
3613   unsigned SE5                  : 1;
3614   unsigned SE6                  : 1;
3615   unsigned SE7                  : 1;
3616   } __LCDSE0bits_t;
3617 
3618 extern __at(0x0798) volatile __LCDSE0bits_t LCDSE0bits;
3619 
3620 #define _SE0                    0x01
3621 #define _SE1                    0x02
3622 #define _SE2                    0x04
3623 #define _SE3                    0x08
3624 #define _SE4                    0x10
3625 #define _SE5                    0x20
3626 #define _SE6                    0x40
3627 #define _SE7                    0x80
3628 
3629 //==============================================================================
3630 
3631 
3632 //==============================================================================
3633 //        LCDSE1 Bits
3634 
3635 extern __at(0x0799) __sfr LCDSE1;
3636 
3637 typedef struct
3638   {
3639   unsigned SE8                  : 1;
3640   unsigned SE9                  : 1;
3641   unsigned SE10                 : 1;
3642   unsigned SE11                 : 1;
3643   unsigned SE12                 : 1;
3644   unsigned SE13                 : 1;
3645   unsigned SE14                 : 1;
3646   unsigned SE15                 : 1;
3647   } __LCDSE1bits_t;
3648 
3649 extern __at(0x0799) volatile __LCDSE1bits_t LCDSE1bits;
3650 
3651 #define _SE8                    0x01
3652 #define _SE9                    0x02
3653 #define _SE10                   0x04
3654 #define _SE11                   0x08
3655 #define _SE12                   0x10
3656 #define _SE13                   0x20
3657 #define _SE14                   0x40
3658 #define _SE15                   0x80
3659 
3660 //==============================================================================
3661 
3662 
3663 //==============================================================================
3664 //        LCDDATA0 Bits
3665 
3666 extern __at(0x07A0) __sfr LCDDATA0;
3667 
3668 typedef struct
3669   {
3670   unsigned SEG0COM0             : 1;
3671   unsigned SEG1COM0             : 1;
3672   unsigned SEG2COM0             : 1;
3673   unsigned SEG3COM0             : 1;
3674   unsigned SEG4COM0             : 1;
3675   unsigned SEG5COM0             : 1;
3676   unsigned SEG6COM0             : 1;
3677   unsigned SEG7COM0             : 1;
3678   } __LCDDATA0bits_t;
3679 
3680 extern __at(0x07A0) volatile __LCDDATA0bits_t LCDDATA0bits;
3681 
3682 #define _SEG0COM0               0x01
3683 #define _SEG1COM0               0x02
3684 #define _SEG2COM0               0x04
3685 #define _SEG3COM0               0x08
3686 #define _SEG4COM0               0x10
3687 #define _SEG5COM0               0x20
3688 #define _SEG6COM0               0x40
3689 #define _SEG7COM0               0x80
3690 
3691 //==============================================================================
3692 
3693 
3694 //==============================================================================
3695 //        LCDDATA1 Bits
3696 
3697 extern __at(0x07A1) __sfr LCDDATA1;
3698 
3699 typedef struct
3700   {
3701   unsigned SEG8COM0             : 1;
3702   unsigned SEG9COM0             : 1;
3703   unsigned SEG10COM0            : 1;
3704   unsigned SEG11COM0            : 1;
3705   unsigned SEG12COM0            : 1;
3706   unsigned SEG13COM0            : 1;
3707   unsigned SEG14COM0            : 1;
3708   unsigned SEG15COM0            : 1;
3709   } __LCDDATA1bits_t;
3710 
3711 extern __at(0x07A1) volatile __LCDDATA1bits_t LCDDATA1bits;
3712 
3713 #define _SEG8COM0               0x01
3714 #define _SEG9COM0               0x02
3715 #define _SEG10COM0              0x04
3716 #define _SEG11COM0              0x08
3717 #define _SEG12COM0              0x10
3718 #define _SEG13COM0              0x20
3719 #define _SEG14COM0              0x40
3720 #define _SEG15COM0              0x80
3721 
3722 //==============================================================================
3723 
3724 
3725 //==============================================================================
3726 //        LCDDATA3 Bits
3727 
3728 extern __at(0x07A3) __sfr LCDDATA3;
3729 
3730 typedef struct
3731   {
3732   unsigned SEG0COM1             : 1;
3733   unsigned SEG1COM1             : 1;
3734   unsigned SEG2COM1             : 1;
3735   unsigned SEG3COM1             : 1;
3736   unsigned SEG4COM1             : 1;
3737   unsigned SEG5COM1             : 1;
3738   unsigned SEG6COM1             : 1;
3739   unsigned SEG7COM1             : 1;
3740   } __LCDDATA3bits_t;
3741 
3742 extern __at(0x07A3) volatile __LCDDATA3bits_t LCDDATA3bits;
3743 
3744 #define _SEG0COM1               0x01
3745 #define _SEG1COM1               0x02
3746 #define _SEG2COM1               0x04
3747 #define _SEG3COM1               0x08
3748 #define _SEG4COM1               0x10
3749 #define _SEG5COM1               0x20
3750 #define _SEG6COM1               0x40
3751 #define _SEG7COM1               0x80
3752 
3753 //==============================================================================
3754 
3755 
3756 //==============================================================================
3757 //        LCDDATA4 Bits
3758 
3759 extern __at(0x07A4) __sfr LCDDATA4;
3760 
3761 typedef struct
3762   {
3763   unsigned SEG8COM1             : 1;
3764   unsigned SEG9COM1             : 1;
3765   unsigned SEG10COM1            : 1;
3766   unsigned SEG11COM1            : 1;
3767   unsigned SEG12COM1            : 1;
3768   unsigned SEG13COM1            : 1;
3769   unsigned SEG14COM1            : 1;
3770   unsigned SEG15COM1            : 1;
3771   } __LCDDATA4bits_t;
3772 
3773 extern __at(0x07A4) volatile __LCDDATA4bits_t LCDDATA4bits;
3774 
3775 #define _SEG8COM1               0x01
3776 #define _SEG9COM1               0x02
3777 #define _SEG10COM1              0x04
3778 #define _SEG11COM1              0x08
3779 #define _SEG12COM1              0x10
3780 #define _SEG13COM1              0x20
3781 #define _SEG14COM1              0x40
3782 #define _SEG15COM1              0x80
3783 
3784 //==============================================================================
3785 
3786 
3787 //==============================================================================
3788 //        LCDDATA6 Bits
3789 
3790 extern __at(0x07A6) __sfr LCDDATA6;
3791 
3792 typedef struct
3793   {
3794   unsigned SEG0COM2             : 1;
3795   unsigned SEG1COM2             : 1;
3796   unsigned SEG2COM2             : 1;
3797   unsigned SEG3COM2             : 1;
3798   unsigned SEG4COM2             : 1;
3799   unsigned SEG5COM2             : 1;
3800   unsigned SEG6COM2             : 1;
3801   unsigned SEG7COM2             : 1;
3802   } __LCDDATA6bits_t;
3803 
3804 extern __at(0x07A6) volatile __LCDDATA6bits_t LCDDATA6bits;
3805 
3806 #define _SEG0COM2               0x01
3807 #define _SEG1COM2               0x02
3808 #define _SEG2COM2               0x04
3809 #define _SEG3COM2               0x08
3810 #define _SEG4COM2               0x10
3811 #define _SEG5COM2               0x20
3812 #define _SEG6COM2               0x40
3813 #define _SEG7COM2               0x80
3814 
3815 //==============================================================================
3816 
3817 
3818 //==============================================================================
3819 //        LCDDATA7 Bits
3820 
3821 extern __at(0x07A7) __sfr LCDDATA7;
3822 
3823 typedef struct
3824   {
3825   unsigned SEG8COM2             : 1;
3826   unsigned SEG9COM2             : 1;
3827   unsigned SEG10COM2            : 1;
3828   unsigned SEG11COM2            : 1;
3829   unsigned SEG12COM2            : 1;
3830   unsigned SEG13COM2            : 1;
3831   unsigned SEG14COM2            : 1;
3832   unsigned SEG15COM2            : 1;
3833   } __LCDDATA7bits_t;
3834 
3835 extern __at(0x07A7) volatile __LCDDATA7bits_t LCDDATA7bits;
3836 
3837 #define _SEG8COM2               0x01
3838 #define _SEG9COM2               0x02
3839 #define _SEG10COM2              0x04
3840 #define _SEG11COM2              0x08
3841 #define _SEG12COM2              0x10
3842 #define _SEG13COM2              0x20
3843 #define _SEG14COM2              0x40
3844 #define _SEG15COM2              0x80
3845 
3846 //==============================================================================
3847 
3848 
3849 //==============================================================================
3850 //        LCDDATA9 Bits
3851 
3852 extern __at(0x07A9) __sfr LCDDATA9;
3853 
3854 typedef struct
3855   {
3856   unsigned SEG0COM3             : 1;
3857   unsigned SEG1COM3             : 1;
3858   unsigned SEG2COM3             : 1;
3859   unsigned SEG3COM3             : 1;
3860   unsigned SEG4COM3             : 1;
3861   unsigned SEG5COM3             : 1;
3862   unsigned SEG6COM3             : 1;
3863   unsigned SEG7COM3             : 1;
3864   } __LCDDATA9bits_t;
3865 
3866 extern __at(0x07A9) volatile __LCDDATA9bits_t LCDDATA9bits;
3867 
3868 #define _SEG0COM3               0x01
3869 #define _SEG1COM3               0x02
3870 #define _SEG2COM3               0x04
3871 #define _SEG3COM3               0x08
3872 #define _SEG4COM3               0x10
3873 #define _SEG5COM3               0x20
3874 #define _SEG6COM3               0x40
3875 #define _SEG7COM3               0x80
3876 
3877 //==============================================================================
3878 
3879 
3880 //==============================================================================
3881 //        LCDDATA10 Bits
3882 
3883 extern __at(0x07AA) __sfr LCDDATA10;
3884 
3885 typedef struct
3886   {
3887   unsigned SEG8COM3             : 1;
3888   unsigned SEG9COM3             : 1;
3889   unsigned SEG10COM3            : 1;
3890   unsigned SEG11COM3            : 1;
3891   unsigned SEG12COM3            : 1;
3892   unsigned SEG13COM3            : 1;
3893   unsigned SEG14COM3            : 1;
3894   unsigned SEG15COM3            : 1;
3895   } __LCDDATA10bits_t;
3896 
3897 extern __at(0x07AA) volatile __LCDDATA10bits_t LCDDATA10bits;
3898 
3899 #define _SEG8COM3               0x01
3900 #define _SEG9COM3               0x02
3901 #define _SEG10COM3              0x04
3902 #define _SEG11COM3              0x08
3903 #define _SEG12COM3              0x10
3904 #define _SEG13COM3              0x20
3905 #define _SEG14COM3              0x40
3906 #define _SEG15COM3              0x80
3907 
3908 //==============================================================================
3909 
3910 
3911 //==============================================================================
3912 //        STATUS_SHAD Bits
3913 
3914 extern __at(0x0FE4) __sfr STATUS_SHAD;
3915 
3916 typedef struct
3917   {
3918   unsigned C_SHAD               : 1;
3919   unsigned DC_SHAD              : 1;
3920   unsigned Z_SHAD               : 1;
3921   unsigned                      : 1;
3922   unsigned                      : 1;
3923   unsigned                      : 1;
3924   unsigned                      : 1;
3925   unsigned                      : 1;
3926   } __STATUS_SHADbits_t;
3927 
3928 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
3929 
3930 #define _C_SHAD                 0x01
3931 #define _DC_SHAD                0x02
3932 #define _Z_SHAD                 0x04
3933 
3934 //==============================================================================
3935 
3936 extern __at(0x0FE5) __sfr WREG_SHAD;
3937 extern __at(0x0FE6) __sfr BSR_SHAD;
3938 extern __at(0x0FE7) __sfr PCLATH_SHAD;
3939 extern __at(0x0FE8) __sfr FSR0L_SHAD;
3940 extern __at(0x0FE9) __sfr FSR0H_SHAD;
3941 extern __at(0x0FEA) __sfr FSR1L_SHAD;
3942 extern __at(0x0FEB) __sfr FSR1H_SHAD;
3943 extern __at(0x0FED) __sfr STKPTR;
3944 extern __at(0x0FEE) __sfr TOSL;
3945 extern __at(0x0FEF) __sfr TOSH;
3946 
3947 //==============================================================================
3948 //
3949 //        Configuration Bits
3950 //
3951 //==============================================================================
3952 
3953 #define _CONFIG1                0x8007
3954 #define _CONFIG2                0x8008
3955 
3956 //----------------------------- CONFIG1 Options -------------------------------
3957 
3958 #define _FOSC_LP                0x3FF8  // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins.
3959 #define _FOSC_XT                0x3FF9  // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins.
3960 #define _FOSC_HS                0x3FFA  // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins.
3961 #define _FOSC_EXTRC             0x3FFB  // EXTRC oscillator: External RC circuit connected to CLKIN pin.
3962 #define _FOSC_INTOSC            0x3FFC  // INTOSC oscillator: I/O function on CLKIN pin.
3963 #define _FOSC_ECL               0x3FFD  // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin.
3964 #define _FOSC_ECM               0x3FFE  // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin.
3965 #define _FOSC_ECH               0x3FFF  // ECH, External Clock, High Power Mode (4-32 MHz): device clock supplied to CLKIN pin.
3966 #define _WDTE_OFF               0x3FE7  // WDT disabled.
3967 #define _WDTE_SWDTEN            0x3FEF  // WDT controlled by the SWDTEN bit in the WDTCON register.
3968 #define _WDTE_NSLEEP            0x3FF7  // WDT enabled while running and disabled in Sleep.
3969 #define _WDTE_ON                0x3FFF  // WDT enabled.
3970 #define _PWRTE_ON               0x3FDF  // PWRT enabled.
3971 #define _PWRTE_OFF              0x3FFF  // PWRT disabled.
3972 #define _MCLRE_OFF              0x3FBF  // MCLR/VPP pin function is digital input.
3973 #define _MCLRE_ON               0x3FFF  // MCLR/VPP pin function is MCLR.
3974 #define _CP_ON                  0x3F7F  // Program memory code protection is enabled.
3975 #define _CP_OFF                 0x3FFF  // Program memory code protection is disabled.
3976 #define _CPD_ON                 0x3EFF  // Data memory code protection is enabled.
3977 #define _CPD_OFF                0x3FFF  // Data memory code protection is disabled.
3978 #define _BOREN_OFF              0x39FF  // Brown-out Reset disabled.
3979 #define _BOREN_SBODEN           0x3BFF  // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
3980 #define _BOREN_NSLEEP           0x3DFF  // Brown-out Reset enabled while running and disabled in Sleep.
3981 #define _BOREN_ON               0x3FFF  // Brown-out Reset enabled.
3982 #define _CLKOUTEN_ON            0x37FF  // CLKOUT function is enabled on the CLKOUT pin.
3983 #define _CLKOUTEN_OFF           0x3FFF  // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
3984 #define _IESO_OFF               0x2FFF  // Internal/External Switchover mode is disabled.
3985 #define _IESO_ON                0x3FFF  // Internal/External Switchover mode is enabled.
3986 #define _FCMEN_OFF              0x1FFF  // Fail-Safe Clock Monitor is disabled.
3987 #define _FCMEN_ON               0x3FFF  // Fail-Safe Clock Monitor is enabled.
3988 
3989 //----------------------------- CONFIG2 Options -------------------------------
3990 
3991 #define _WRT_ALL                0x3FFC  // 000h to FFFh write protected, no addresses may be modified by EECON control.
3992 #define _WRT_HALF               0x3FFD  // 000h to 7FFh write protected, 800h to FFFh may be modified by EECON control.
3993 #define _WRT_BOOT               0x3FFE  // 000h to 1FFh write protected, 200h to FFFh may be modified by EECON control.
3994 #define _WRT_OFF                0x3FFF  // Write protection off.
3995 #define _VCAPEN_RA0             0x3FCF  // VCAP functionality is enabled on RA0.
3996 #define _VCAPEN_RA5             0x3FDF  // VCAP functionality is enabled on RA5.
3997 #define _VCAPEN_RA6             0x3FEF  // VCAP functionality is enabled on RA6.
3998 #define _VCAPEN_OFF             0x3FFF  // All VCAP pin functionality is disabled.
3999 #define _PLLEN_OFF              0x3EFF  // 4x PLL disabled.
4000 #define _PLLEN_ON               0x3FFF  // 4x PLL enabled.
4001 #define _STVREN_OFF             0x3DFF  // Stack Overflow or Underflow will not cause a Reset.
4002 #define _STVREN_ON              0x3FFF  // Stack Overflow or Underflow will cause a Reset.
4003 #define _BORV_HI                0x3BFF  // Brown-out Reset Voltage (Vbor), high trip point selected.
4004 #define _BORV_25                0x3BFF  // Brown-out Reset Voltage (Vbor), high trip point selected.
4005 #define _BORV_LO                0x3FFF  // Brown-out Reset Voltage (Vbor), low trip point selected.
4006 #define _BORV_19                0x3FFF  // Brown-out Reset Voltage (Vbor), low trip point selected.
4007 #define _DEBUG_ON               0x2FFF  // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
4008 #define _DEBUG_OFF              0x3FFF  // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
4009 #define _LVP_OFF                0x1FFF  // High-voltage on MCLR/VPP must be used for programming.
4010 #define _LVP_ON                 0x3FFF  // Low-voltage programming enabled.
4011 
4012 //==============================================================================
4013 
4014 #define _DEVID1                 0x8006
4015 
4016 #define _IDLOC0                 0x8000
4017 #define _IDLOC1                 0x8001
4018 #define _IDLOC2                 0x8002
4019 #define _IDLOC3                 0x8003
4020 
4021 //==============================================================================
4022 
4023 #ifndef NO_BIT_DEFINES
4024 
4025 #define ADON                    ADCON0bits.ADON                 // bit 0
4026 #define GO_NOT_DONE             ADCON0bits.GO_NOT_DONE          // bit 1, shadows bit in ADCON0bits
4027 #define ADGO                    ADCON0bits.ADGO                 // bit 1, shadows bit in ADCON0bits
4028 #define GO                      ADCON0bits.GO                   // bit 1, shadows bit in ADCON0bits
4029 #define NOT_DONE                ADCON0bits.NOT_DONE             // bit 1, shadows bit in ADCON0bits
4030 #define CHS0                    ADCON0bits.CHS0                 // bit 2
4031 #define CHS1                    ADCON0bits.CHS1                 // bit 3
4032 #define CHS2                    ADCON0bits.CHS2                 // bit 4
4033 #define CHS3                    ADCON0bits.CHS3                 // bit 5
4034 #define CHS4                    ADCON0bits.CHS4                 // bit 6
4035 
4036 #define ADPREF0                 ADCON1bits.ADPREF0              // bit 0
4037 #define ADPREF1                 ADCON1bits.ADPREF1              // bit 1
4038 #define ADNREF                  ADCON1bits.ADNREF               // bit 2
4039 #define ADCS0                   ADCON1bits.ADCS0                // bit 4
4040 #define ADCS1                   ADCON1bits.ADCS1                // bit 5
4041 #define ADCS2                   ADCON1bits.ADCS2                // bit 6
4042 #define ADFM                    ADCON1bits.ADFM                 // bit 7
4043 
4044 #define ANSA0                   ANSELAbits.ANSA0                // bit 0
4045 #define ANSA1                   ANSELAbits.ANSA1                // bit 1
4046 #define ANSA2                   ANSELAbits.ANSA2                // bit 2
4047 #define ANSA3                   ANSELAbits.ANSA3                // bit 3
4048 #define ANSA4                   ANSELAbits.ANSA4                // bit 4
4049 #define ANSA5                   ANSELAbits.ANSA5                // bit 5
4050 
4051 #define ANSB0                   ANSELBbits.ANSB0                // bit 0
4052 #define ANSB1                   ANSELBbits.ANSB1                // bit 1
4053 #define ANSB2                   ANSELBbits.ANSB2                // bit 2
4054 #define ANSB3                   ANSELBbits.ANSB3                // bit 3
4055 #define ANSB4                   ANSELBbits.ANSB4                // bit 4
4056 #define ANSB5                   ANSELBbits.ANSB5                // bit 5
4057 
4058 #define CCP2SEL                 APFCONbits.CCP2SEL              // bit 0
4059 #define SSSEL                   APFCONbits.SSSEL                // bit 1
4060 #define C2OUTSEL                APFCONbits.C2OUTSEL             // bit 2
4061 #define SRNQSEL                 APFCONbits.SRNQSEL              // bit 3
4062 #define P2BSEL                  APFCONbits.P2BSEL               // bit 4
4063 #define T1GSEL                  APFCONbits.T1GSEL               // bit 5
4064 #define CCP3SEL                 APFCONbits.CCP3SEL              // bit 6
4065 
4066 #define ABDEN                   BAUDCONbits.ABDEN               // bit 0
4067 #define WUE                     BAUDCONbits.WUE                 // bit 1
4068 #define BRG16                   BAUDCONbits.BRG16               // bit 3
4069 #define SCKP                    BAUDCONbits.SCKP                // bit 4
4070 #define RCIDL                   BAUDCONbits.RCIDL               // bit 6
4071 #define ABDOVF                  BAUDCONbits.ABDOVF              // bit 7
4072 
4073 #define BORRDY                  BORCONbits.BORRDY               // bit 0
4074 #define SBOREN                  BORCONbits.SBOREN               // bit 7
4075 
4076 #define BSR0                    BSRbits.BSR0                    // bit 0
4077 #define BSR1                    BSRbits.BSR1                    // bit 1
4078 #define BSR2                    BSRbits.BSR2                    // bit 2
4079 #define BSR3                    BSRbits.BSR3                    // bit 3
4080 #define BSR4                    BSRbits.BSR4                    // bit 4
4081 
4082 #define PSS1BD0                 CCP1ASbits.PSS1BD0              // bit 0
4083 #define PSS1BD1                 CCP1ASbits.PSS1BD1              // bit 1
4084 #define PSS1AC0                 CCP1ASbits.PSS1AC0              // bit 2
4085 #define PSS1AC1                 CCP1ASbits.PSS1AC1              // bit 3
4086 #define CCP1AS0                 CCP1ASbits.CCP1AS0              // bit 4
4087 #define CCP1AS1                 CCP1ASbits.CCP1AS1              // bit 5
4088 #define CCP1AS2                 CCP1ASbits.CCP1AS2              // bit 6
4089 #define CCP1ASE                 CCP1ASbits.CCP1ASE              // bit 7
4090 
4091 #define CCP1M0                  CCP1CONbits.CCP1M0              // bit 0
4092 #define CCP1M1                  CCP1CONbits.CCP1M1              // bit 1
4093 #define CCP1M2                  CCP1CONbits.CCP1M2              // bit 2
4094 #define CCP1M3                  CCP1CONbits.CCP1M3              // bit 3
4095 #define DC1B0                   CCP1CONbits.DC1B0               // bit 4
4096 #define DC1B1                   CCP1CONbits.DC1B1               // bit 5
4097 #define P1M0                    CCP1CONbits.P1M0                // bit 6
4098 #define P1M1                    CCP1CONbits.P1M1                // bit 7
4099 
4100 #define PSS2BD0                 CCP2ASbits.PSS2BD0              // bit 0
4101 #define PSS2BD1                 CCP2ASbits.PSS2BD1              // bit 1
4102 #define PSS2AC0                 CCP2ASbits.PSS2AC0              // bit 2
4103 #define PSS2AC1                 CCP2ASbits.PSS2AC1              // bit 3
4104 #define CCP2AS0                 CCP2ASbits.CCP2AS0              // bit 4
4105 #define CCP2AS1                 CCP2ASbits.CCP2AS1              // bit 5
4106 #define CCP2AS2                 CCP2ASbits.CCP2AS2              // bit 6
4107 #define CCP2ASE                 CCP2ASbits.CCP2ASE              // bit 7
4108 
4109 #define CCP2M0                  CCP2CONbits.CCP2M0              // bit 0
4110 #define CCP2M1                  CCP2CONbits.CCP2M1              // bit 1
4111 #define CCP2M2                  CCP2CONbits.CCP2M2              // bit 2
4112 #define CCP2M3                  CCP2CONbits.CCP2M3              // bit 3
4113 #define DC2B0                   CCP2CONbits.DC2B0               // bit 4
4114 #define DC2B1                   CCP2CONbits.DC2B1               // bit 5
4115 #define P2M0                    CCP2CONbits.P2M0                // bit 6
4116 #define P2M1                    CCP2CONbits.P2M1                // bit 7
4117 
4118 #define PSS3BD0                 CCP3ASbits.PSS3BD0              // bit 0
4119 #define PSS3BD1                 CCP3ASbits.PSS3BD1              // bit 1
4120 #define PSS3AC0                 CCP3ASbits.PSS3AC0              // bit 2
4121 #define PSS3AC1                 CCP3ASbits.PSS3AC1              // bit 3
4122 #define CCP3AS0                 CCP3ASbits.CCP3AS0              // bit 4
4123 #define CCP3AS1                 CCP3ASbits.CCP3AS1              // bit 5
4124 #define CCP3AS2                 CCP3ASbits.CCP3AS2              // bit 6
4125 #define CCP3ASE                 CCP3ASbits.CCP3ASE              // bit 7
4126 
4127 #define CCP3M0                  CCP3CONbits.CCP3M0              // bit 0
4128 #define CCP3M1                  CCP3CONbits.CCP3M1              // bit 1
4129 #define CCP3M2                  CCP3CONbits.CCP3M2              // bit 2
4130 #define CCP3M3                  CCP3CONbits.CCP3M3              // bit 3
4131 #define DC3B0                   CCP3CONbits.DC3B0               // bit 4
4132 #define DC3B1                   CCP3CONbits.DC3B1               // bit 5
4133 #define P3M0                    CCP3CONbits.P3M0                // bit 6
4134 #define P3M1                    CCP3CONbits.P3M1                // bit 7
4135 
4136 #define CCP4M0                  CCP4CONbits.CCP4M0              // bit 0
4137 #define CCP4M1                  CCP4CONbits.CCP4M1              // bit 1
4138 #define CCP4M2                  CCP4CONbits.CCP4M2              // bit 2
4139 #define CCP4M3                  CCP4CONbits.CCP4M3              // bit 3
4140 #define DC4B0                   CCP4CONbits.DC4B0               // bit 4
4141 #define DC4B1                   CCP4CONbits.DC4B1               // bit 5
4142 
4143 #define CCP5M0                  CCP5CONbits.CCP5M0              // bit 0
4144 #define CCP5M1                  CCP5CONbits.CCP5M1              // bit 1
4145 #define CCP5M2                  CCP5CONbits.CCP5M2              // bit 2
4146 #define CCP5M3                  CCP5CONbits.CCP5M3              // bit 3
4147 #define DC5B0                   CCP5CONbits.DC5B0               // bit 4
4148 #define DC5B1                   CCP5CONbits.DC5B1               // bit 5
4149 
4150 #define C1TSEL0                 CCPTMRS0bits.C1TSEL0            // bit 0
4151 #define C1TSEL1                 CCPTMRS0bits.C1TSEL1            // bit 1
4152 #define C2TSEL0                 CCPTMRS0bits.C2TSEL0            // bit 2
4153 #define C2TSEL1                 CCPTMRS0bits.C2TSEL1            // bit 3
4154 #define C3TSEL0                 CCPTMRS0bits.C3TSEL0            // bit 4
4155 #define C3TSEL1                 CCPTMRS0bits.C3TSEL1            // bit 5
4156 #define C4TSEL0                 CCPTMRS0bits.C4TSEL0            // bit 6
4157 #define C4TSEL1                 CCPTMRS0bits.C4TSEL1            // bit 7
4158 
4159 #define C5TSEL0                 CCPTMRS1bits.C5TSEL0            // bit 0
4160 #define C5TSEL1                 CCPTMRS1bits.C5TSEL1            // bit 1
4161 
4162 #define C1SYNC                  CM1CON0bits.C1SYNC              // bit 0
4163 #define C1HYS                   CM1CON0bits.C1HYS               // bit 1
4164 #define C1SP                    CM1CON0bits.C1SP                // bit 2
4165 #define C1POL                   CM1CON0bits.C1POL               // bit 4
4166 #define C1OE                    CM1CON0bits.C1OE                // bit 5
4167 #define C1OUT                   CM1CON0bits.C1OUT               // bit 6
4168 #define C1ON                    CM1CON0bits.C1ON                // bit 7
4169 
4170 #define C1NCH0                  CM1CON1bits.C1NCH0              // bit 0
4171 #define C1NCH1                  CM1CON1bits.C1NCH1              // bit 1
4172 #define C1PCH0                  CM1CON1bits.C1PCH0              // bit 4
4173 #define C1PCH1                  CM1CON1bits.C1PCH1              // bit 5
4174 #define C1INTN                  CM1CON1bits.C1INTN              // bit 6
4175 #define C1INTP                  CM1CON1bits.C1INTP              // bit 7
4176 
4177 #define C2SYNC                  CM2CON0bits.C2SYNC              // bit 0
4178 #define C2HYS                   CM2CON0bits.C2HYS               // bit 1
4179 #define C2SP                    CM2CON0bits.C2SP                // bit 2
4180 #define C2POL                   CM2CON0bits.C2POL               // bit 4
4181 #define C2OE                    CM2CON0bits.C2OE                // bit 5
4182 #define C2OUT                   CM2CON0bits.C2OUT               // bit 6
4183 #define C2ON                    CM2CON0bits.C2ON                // bit 7
4184 
4185 #define C2NCH0                  CM2CON1bits.C2NCH0              // bit 0
4186 #define C2NCH1                  CM2CON1bits.C2NCH1              // bit 1
4187 #define C2PCH0                  CM2CON1bits.C2PCH0              // bit 4
4188 #define C2PCH1                  CM2CON1bits.C2PCH1              // bit 5
4189 #define C2INTN                  CM2CON1bits.C2INTN              // bit 6
4190 #define C2INTP                  CM2CON1bits.C2INTP              // bit 7
4191 
4192 #define MC1OUT                  CMOUTbits.MC1OUT                // bit 0
4193 #define MC2OUT                  CMOUTbits.MC2OUT                // bit 1
4194 
4195 #define T0XCS                   CPSCON0bits.T0XCS               // bit 0
4196 #define CPSOUT                  CPSCON0bits.CPSOUT              // bit 1
4197 #define CPSRNG0                 CPSCON0bits.CPSRNG0             // bit 2
4198 #define CPSRNG1                 CPSCON0bits.CPSRNG1             // bit 3
4199 #define CPSRM                   CPSCON0bits.CPSRM               // bit 6
4200 #define CPSON                   CPSCON0bits.CPSON               // bit 7
4201 
4202 #define CPSCH0                  CPSCON1bits.CPSCH0              // bit 0
4203 #define CPSCH1                  CPSCON1bits.CPSCH1              // bit 1
4204 #define CPSCH2                  CPSCON1bits.CPSCH2              // bit 2
4205 
4206 #define DACNSS                  DACCON0bits.DACNSS              // bit 0
4207 #define DACPSS0                 DACCON0bits.DACPSS0             // bit 2
4208 #define DACPSS1                 DACCON0bits.DACPSS1             // bit 3
4209 #define DACOE                   DACCON0bits.DACOE               // bit 5
4210 #define DACLPS                  DACCON0bits.DACLPS              // bit 6
4211 #define DACEN                   DACCON0bits.DACEN               // bit 7
4212 
4213 #define DACR0                   DACCON1bits.DACR0               // bit 0
4214 #define DACR1                   DACCON1bits.DACR1               // bit 1
4215 #define DACR2                   DACCON1bits.DACR2               // bit 2
4216 #define DACR3                   DACCON1bits.DACR3               // bit 3
4217 #define DACR4                   DACCON1bits.DACR4               // bit 4
4218 
4219 #define RD                      EECON1bits.RD                   // bit 0
4220 #define WR                      EECON1bits.WR                   // bit 1
4221 #define WREN                    EECON1bits.WREN                 // bit 2
4222 #define WRERR                   EECON1bits.WRERR                // bit 3
4223 #define FREE                    EECON1bits.FREE                 // bit 4
4224 #define LWLO                    EECON1bits.LWLO                 // bit 5
4225 #define CFGS                    EECON1bits.CFGS                 // bit 6
4226 #define EEPGD                   EECON1bits.EEPGD                // bit 7
4227 
4228 #define ADFVR0                  FVRCONbits.ADFVR0               // bit 0
4229 #define ADFVR1                  FVRCONbits.ADFVR1               // bit 1
4230 #define CDAFVR0                 FVRCONbits.CDAFVR0              // bit 2
4231 #define CDAFVR1                 FVRCONbits.CDAFVR1              // bit 3
4232 #define TSRNG                   FVRCONbits.TSRNG                // bit 4
4233 #define TSEN                    FVRCONbits.TSEN                 // bit 5
4234 #define FVRRDY                  FVRCONbits.FVRRDY               // bit 6
4235 #define FVREN                   FVRCONbits.FVREN                // bit 7
4236 
4237 #define IOCIF                   INTCONbits.IOCIF                // bit 0
4238 #define INTF                    INTCONbits.INTF                 // bit 1
4239 #define TMR0IF                  INTCONbits.TMR0IF               // bit 2, shadows bit in INTCONbits
4240 #define T0IF                    INTCONbits.T0IF                 // bit 2, shadows bit in INTCONbits
4241 #define IOCIE                   INTCONbits.IOCIE                // bit 3
4242 #define INTE                    INTCONbits.INTE                 // bit 4
4243 #define TMR0IE                  INTCONbits.TMR0IE               // bit 5, shadows bit in INTCONbits
4244 #define T0IE                    INTCONbits.T0IE                 // bit 5, shadows bit in INTCONbits
4245 #define PEIE                    INTCONbits.PEIE                 // bit 6
4246 #define GIE                     INTCONbits.GIE                  // bit 7
4247 
4248 #define IOCBF0                  IOCBFbits.IOCBF0                // bit 0
4249 #define IOCBF1                  IOCBFbits.IOCBF1                // bit 1
4250 #define IOCBF2                  IOCBFbits.IOCBF2                // bit 2
4251 #define IOCBF3                  IOCBFbits.IOCBF3                // bit 3
4252 #define IOCBF4                  IOCBFbits.IOCBF4                // bit 4
4253 #define IOCBF5                  IOCBFbits.IOCBF5                // bit 5
4254 #define IOCBF6                  IOCBFbits.IOCBF6                // bit 6
4255 #define IOCBF7                  IOCBFbits.IOCBF7                // bit 7
4256 
4257 #define IOCBN0                  IOCBNbits.IOCBN0                // bit 0
4258 #define IOCBN1                  IOCBNbits.IOCBN1                // bit 1
4259 #define IOCBN2                  IOCBNbits.IOCBN2                // bit 2
4260 #define IOCBN3                  IOCBNbits.IOCBN3                // bit 3
4261 #define IOCBN4                  IOCBNbits.IOCBN4                // bit 4
4262 #define IOCBN5                  IOCBNbits.IOCBN5                // bit 5
4263 #define IOCBN6                  IOCBNbits.IOCBN6                // bit 6
4264 #define IOCBN7                  IOCBNbits.IOCBN7                // bit 7
4265 
4266 #define IOCBP0                  IOCBPbits.IOCBP0                // bit 0
4267 #define IOCBP1                  IOCBPbits.IOCBP1                // bit 1
4268 #define IOCBP2                  IOCBPbits.IOCBP2                // bit 2
4269 #define IOCBP3                  IOCBPbits.IOCBP3                // bit 3
4270 #define IOCBP4                  IOCBPbits.IOCBP4                // bit 4
4271 #define IOCBP5                  IOCBPbits.IOCBP5                // bit 5
4272 #define IOCBP6                  IOCBPbits.IOCBP6                // bit 6
4273 #define IOCBP7                  IOCBPbits.IOCBP7                // bit 7
4274 
4275 #define LATA0                   LATAbits.LATA0                  // bit 0
4276 #define LATA1                   LATAbits.LATA1                  // bit 1
4277 #define LATA2                   LATAbits.LATA2                  // bit 2
4278 #define LATA3                   LATAbits.LATA3                  // bit 3
4279 #define LATA4                   LATAbits.LATA4                  // bit 4
4280 #define LATA5                   LATAbits.LATA5                  // bit 5
4281 #define LATA6                   LATAbits.LATA6                  // bit 6
4282 #define LATA7                   LATAbits.LATA7                  // bit 7
4283 
4284 #define LATB0                   LATBbits.LATB0                  // bit 0
4285 #define LATB1                   LATBbits.LATB1                  // bit 1
4286 #define LATB2                   LATBbits.LATB2                  // bit 2
4287 #define LATB3                   LATBbits.LATB3                  // bit 3
4288 #define LATB4                   LATBbits.LATB4                  // bit 4
4289 #define LATB5                   LATBbits.LATB5                  // bit 5
4290 #define LATB6                   LATBbits.LATB6                  // bit 6
4291 #define LATB7                   LATBbits.LATB7                  // bit 7
4292 
4293 #define LATC0                   LATCbits.LATC0                  // bit 0
4294 #define LATC1                   LATCbits.LATC1                  // bit 1
4295 #define LATC2                   LATCbits.LATC2                  // bit 2
4296 #define LATC3                   LATCbits.LATC3                  // bit 3
4297 #define LATC4                   LATCbits.LATC4                  // bit 4
4298 #define LATC5                   LATCbits.LATC5                  // bit 5
4299 #define LATC6                   LATCbits.LATC6                  // bit 6
4300 #define LATC7                   LATCbits.LATC7                  // bit 7
4301 
4302 #define LATE3                   LATEbits.LATE3                  // bit 3
4303 
4304 #define LMUX0                   LCDCONbits.LMUX0                // bit 0
4305 #define LMUX1                   LCDCONbits.LMUX1                // bit 1
4306 #define CS0                     LCDCONbits.CS0                  // bit 2
4307 #define CS1                     LCDCONbits.CS1                  // bit 3
4308 #define WERR                    LCDCONbits.WERR                 // bit 5
4309 #define SLPEN                   LCDCONbits.SLPEN                // bit 6
4310 #define LCDEN                   LCDCONbits.LCDEN                // bit 7
4311 
4312 #define LCDCST0                 LCDCSTbits.LCDCST0              // bit 0
4313 #define LCDCST1                 LCDCSTbits.LCDCST1              // bit 1
4314 #define LCDCST2                 LCDCSTbits.LCDCST2              // bit 2
4315 
4316 #define SEG0COM0                LCDDATA0bits.SEG0COM0           // bit 0
4317 #define SEG1COM0                LCDDATA0bits.SEG1COM0           // bit 1
4318 #define SEG2COM0                LCDDATA0bits.SEG2COM0           // bit 2
4319 #define SEG3COM0                LCDDATA0bits.SEG3COM0           // bit 3
4320 #define SEG4COM0                LCDDATA0bits.SEG4COM0           // bit 4
4321 #define SEG5COM0                LCDDATA0bits.SEG5COM0           // bit 5
4322 #define SEG6COM0                LCDDATA0bits.SEG6COM0           // bit 6
4323 #define SEG7COM0                LCDDATA0bits.SEG7COM0           // bit 7
4324 
4325 #define SEG8COM0                LCDDATA1bits.SEG8COM0           // bit 0
4326 #define SEG9COM0                LCDDATA1bits.SEG9COM0           // bit 1
4327 #define SEG10COM0               LCDDATA1bits.SEG10COM0          // bit 2
4328 #define SEG11COM0               LCDDATA1bits.SEG11COM0          // bit 3
4329 #define SEG12COM0               LCDDATA1bits.SEG12COM0          // bit 4
4330 #define SEG13COM0               LCDDATA1bits.SEG13COM0          // bit 5
4331 #define SEG14COM0               LCDDATA1bits.SEG14COM0          // bit 6
4332 #define SEG15COM0               LCDDATA1bits.SEG15COM0          // bit 7
4333 
4334 #define SEG0COM1                LCDDATA3bits.SEG0COM1           // bit 0
4335 #define SEG1COM1                LCDDATA3bits.SEG1COM1           // bit 1
4336 #define SEG2COM1                LCDDATA3bits.SEG2COM1           // bit 2
4337 #define SEG3COM1                LCDDATA3bits.SEG3COM1           // bit 3
4338 #define SEG4COM1                LCDDATA3bits.SEG4COM1           // bit 4
4339 #define SEG5COM1                LCDDATA3bits.SEG5COM1           // bit 5
4340 #define SEG6COM1                LCDDATA3bits.SEG6COM1           // bit 6
4341 #define SEG7COM1                LCDDATA3bits.SEG7COM1           // bit 7
4342 
4343 #define SEG8COM1                LCDDATA4bits.SEG8COM1           // bit 0
4344 #define SEG9COM1                LCDDATA4bits.SEG9COM1           // bit 1
4345 #define SEG10COM1               LCDDATA4bits.SEG10COM1          // bit 2
4346 #define SEG11COM1               LCDDATA4bits.SEG11COM1          // bit 3
4347 #define SEG12COM1               LCDDATA4bits.SEG12COM1          // bit 4
4348 #define SEG13COM1               LCDDATA4bits.SEG13COM1          // bit 5
4349 #define SEG14COM1               LCDDATA4bits.SEG14COM1          // bit 6
4350 #define SEG15COM1               LCDDATA4bits.SEG15COM1          // bit 7
4351 
4352 #define SEG0COM2                LCDDATA6bits.SEG0COM2           // bit 0
4353 #define SEG1COM2                LCDDATA6bits.SEG1COM2           // bit 1
4354 #define SEG2COM2                LCDDATA6bits.SEG2COM2           // bit 2
4355 #define SEG3COM2                LCDDATA6bits.SEG3COM2           // bit 3
4356 #define SEG4COM2                LCDDATA6bits.SEG4COM2           // bit 4
4357 #define SEG5COM2                LCDDATA6bits.SEG5COM2           // bit 5
4358 #define SEG6COM2                LCDDATA6bits.SEG6COM2           // bit 6
4359 #define SEG7COM2                LCDDATA6bits.SEG7COM2           // bit 7
4360 
4361 #define SEG8COM2                LCDDATA7bits.SEG8COM2           // bit 0
4362 #define SEG9COM2                LCDDATA7bits.SEG9COM2           // bit 1
4363 #define SEG10COM2               LCDDATA7bits.SEG10COM2          // bit 2
4364 #define SEG11COM2               LCDDATA7bits.SEG11COM2          // bit 3
4365 #define SEG12COM2               LCDDATA7bits.SEG12COM2          // bit 4
4366 #define SEG13COM2               LCDDATA7bits.SEG13COM2          // bit 5
4367 #define SEG14COM2               LCDDATA7bits.SEG14COM2          // bit 6
4368 #define SEG15COM2               LCDDATA7bits.SEG15COM2          // bit 7
4369 
4370 #define SEG0COM3                LCDDATA9bits.SEG0COM3           // bit 0
4371 #define SEG1COM3                LCDDATA9bits.SEG1COM3           // bit 1
4372 #define SEG2COM3                LCDDATA9bits.SEG2COM3           // bit 2
4373 #define SEG3COM3                LCDDATA9bits.SEG3COM3           // bit 3
4374 #define SEG4COM3                LCDDATA9bits.SEG4COM3           // bit 4
4375 #define SEG5COM3                LCDDATA9bits.SEG5COM3           // bit 5
4376 #define SEG6COM3                LCDDATA9bits.SEG6COM3           // bit 6
4377 #define SEG7COM3                LCDDATA9bits.SEG7COM3           // bit 7
4378 
4379 #define SEG8COM3                LCDDATA10bits.SEG8COM3          // bit 0
4380 #define SEG9COM3                LCDDATA10bits.SEG9COM3          // bit 1
4381 #define SEG10COM3               LCDDATA10bits.SEG10COM3         // bit 2
4382 #define SEG11COM3               LCDDATA10bits.SEG11COM3         // bit 3
4383 #define SEG12COM3               LCDDATA10bits.SEG12COM3         // bit 4
4384 #define SEG13COM3               LCDDATA10bits.SEG13COM3         // bit 5
4385 #define SEG14COM3               LCDDATA10bits.SEG14COM3         // bit 6
4386 #define SEG15COM3               LCDDATA10bits.SEG15COM3         // bit 7
4387 
4388 #define LP0                     LCDPSbits.LP0                   // bit 0
4389 #define LP1                     LCDPSbits.LP1                   // bit 1
4390 #define LP2                     LCDPSbits.LP2                   // bit 2
4391 #define LP3                     LCDPSbits.LP3                   // bit 3
4392 #define WA                      LCDPSbits.WA                    // bit 4
4393 #define LCDA                    LCDPSbits.LCDA                  // bit 5
4394 #define BIASMD                  LCDPSbits.BIASMD                // bit 6
4395 #define WFT                     LCDPSbits.WFT                   // bit 7
4396 
4397 #define VLCD1PE                 LCDREFbits.VLCD1PE              // bit 1
4398 #define VLCD2PE                 LCDREFbits.VLCD2PE              // bit 2
4399 #define VLCD3PE                 LCDREFbits.VLCD3PE              // bit 3
4400 #define LCDIRI                  LCDREFbits.LCDIRI               // bit 5
4401 #define LCDIRS                  LCDREFbits.LCDIRS               // bit 6
4402 #define LCDIRE                  LCDREFbits.LCDIRE               // bit 7
4403 
4404 #define LRLAT0                  LCDRLbits.LRLAT0                // bit 0
4405 #define LRLAT1                  LCDRLbits.LRLAT1                // bit 1
4406 #define LRLAT2                  LCDRLbits.LRLAT2                // bit 2
4407 #define LRLBP0                  LCDRLbits.LRLBP0                // bit 4
4408 #define LRLBP1                  LCDRLbits.LRLBP1                // bit 5
4409 #define LRLAP0                  LCDRLbits.LRLAP0                // bit 6
4410 #define LRLAP1                  LCDRLbits.LRLAP1                // bit 7
4411 
4412 #define SE0                     LCDSE0bits.SE0                  // bit 0
4413 #define SE1                     LCDSE0bits.SE1                  // bit 1
4414 #define SE2                     LCDSE0bits.SE2                  // bit 2
4415 #define SE3                     LCDSE0bits.SE3                  // bit 3
4416 #define SE4                     LCDSE0bits.SE4                  // bit 4
4417 #define SE5                     LCDSE0bits.SE5                  // bit 5
4418 #define SE6                     LCDSE0bits.SE6                  // bit 6
4419 #define SE7                     LCDSE0bits.SE7                  // bit 7
4420 
4421 #define SE8                     LCDSE1bits.SE8                  // bit 0
4422 #define SE9                     LCDSE1bits.SE9                  // bit 1
4423 #define SE10                    LCDSE1bits.SE10                 // bit 2
4424 #define SE11                    LCDSE1bits.SE11                 // bit 3
4425 #define SE12                    LCDSE1bits.SE12                 // bit 4
4426 #define SE13                    LCDSE1bits.SE13                 // bit 5
4427 #define SE14                    LCDSE1bits.SE14                 // bit 6
4428 #define SE15                    LCDSE1bits.SE15                 // bit 7
4429 
4430 #define PS0                     OPTION_REGbits.PS0              // bit 0
4431 #define PS1                     OPTION_REGbits.PS1              // bit 1
4432 #define PS2                     OPTION_REGbits.PS2              // bit 2
4433 #define PSA                     OPTION_REGbits.PSA              // bit 3
4434 #define TMR0SE                  OPTION_REGbits.TMR0SE           // bit 4, shadows bit in OPTION_REGbits
4435 #define T0SE                    OPTION_REGbits.T0SE             // bit 4, shadows bit in OPTION_REGbits
4436 #define TMR0CS                  OPTION_REGbits.TMR0CS           // bit 5, shadows bit in OPTION_REGbits
4437 #define T0CS                    OPTION_REGbits.T0CS             // bit 5, shadows bit in OPTION_REGbits
4438 #define INTEDG                  OPTION_REGbits.INTEDG           // bit 6
4439 #define NOT_WPUEN               OPTION_REGbits.NOT_WPUEN        // bit 7
4440 
4441 #define SCS0                    OSCCONbits.SCS0                 // bit 0
4442 #define SCS1                    OSCCONbits.SCS1                 // bit 1
4443 #define IRCF0                   OSCCONbits.IRCF0                // bit 3
4444 #define IRCF1                   OSCCONbits.IRCF1                // bit 4
4445 #define IRCF2                   OSCCONbits.IRCF2                // bit 5
4446 #define IRCF3                   OSCCONbits.IRCF3                // bit 6
4447 #define SPLLEN                  OSCCONbits.SPLLEN               // bit 7
4448 
4449 #define HFIOFS                  OSCSTATbits.HFIOFS              // bit 0
4450 #define LFIOFR                  OSCSTATbits.LFIOFR              // bit 1
4451 #define MFIOFR                  OSCSTATbits.MFIOFR              // bit 2
4452 #define HFIOFL                  OSCSTATbits.HFIOFL              // bit 3
4453 #define HFIOFR                  OSCSTATbits.HFIOFR              // bit 4
4454 #define OSTS                    OSCSTATbits.OSTS                // bit 5
4455 #define PLLR                    OSCSTATbits.PLLR                // bit 6
4456 #define T1OSCR                  OSCSTATbits.T1OSCR              // bit 7
4457 
4458 #define TUN0                    OSCTUNEbits.TUN0                // bit 0
4459 #define TUN1                    OSCTUNEbits.TUN1                // bit 1
4460 #define TUN2                    OSCTUNEbits.TUN2                // bit 2
4461 #define TUN3                    OSCTUNEbits.TUN3                // bit 3
4462 #define TUN4                    OSCTUNEbits.TUN4                // bit 4
4463 #define TUN5                    OSCTUNEbits.TUN5                // bit 5
4464 
4465 #define NOT_BOR                 PCONbits.NOT_BOR                // bit 0
4466 #define NOT_POR                 PCONbits.NOT_POR                // bit 1
4467 #define NOT_RI                  PCONbits.NOT_RI                 // bit 2
4468 #define NOT_RMCLR               PCONbits.NOT_RMCLR              // bit 3
4469 #define STKUNF                  PCONbits.STKUNF                 // bit 6
4470 #define STKOVF                  PCONbits.STKOVF                 // bit 7
4471 
4472 #define TMR1IE                  PIE1bits.TMR1IE                 // bit 0
4473 #define TMR2IE                  PIE1bits.TMR2IE                 // bit 1
4474 #define CCP1IE                  PIE1bits.CCP1IE                 // bit 2
4475 #define SSPIE                   PIE1bits.SSPIE                  // bit 3
4476 #define TXIE                    PIE1bits.TXIE                   // bit 4
4477 #define RCIE                    PIE1bits.RCIE                   // bit 5
4478 #define ADIE                    PIE1bits.ADIE                   // bit 6
4479 #define TMR1GIE                 PIE1bits.TMR1GIE                // bit 7
4480 
4481 #define CCP2IE                  PIE2bits.CCP2IE                 // bit 0
4482 #define LCDIE                   PIE2bits.LCDIE                  // bit 2
4483 #define BCLIE                   PIE2bits.BCLIE                  // bit 3
4484 #define EEIE                    PIE2bits.EEIE                   // bit 4
4485 #define C1IE                    PIE2bits.C1IE                   // bit 5
4486 #define C2IE                    PIE2bits.C2IE                   // bit 6
4487 #define OSFIE                   PIE2bits.OSFIE                  // bit 7
4488 
4489 #define TMR4IE                  PIE3bits.TMR4IE                 // bit 1
4490 #define TMR6IE                  PIE3bits.TMR6IE                 // bit 3
4491 #define CCP3IE                  PIE3bits.CCP3IE                 // bit 4
4492 #define CCP4IE                  PIE3bits.CCP4IE                 // bit 5
4493 #define CCP5IE                  PIE3bits.CCP5IE                 // bit 6
4494 
4495 #define TMR1IF                  PIR1bits.TMR1IF                 // bit 0
4496 #define TMR2IF                  PIR1bits.TMR2IF                 // bit 1
4497 #define CCP1IF                  PIR1bits.CCP1IF                 // bit 2
4498 #define SSPIF                   PIR1bits.SSPIF                  // bit 3
4499 #define TXIF                    PIR1bits.TXIF                   // bit 4
4500 #define RCIF                    PIR1bits.RCIF                   // bit 5
4501 #define ADIF                    PIR1bits.ADIF                   // bit 6
4502 #define TMR1GIF                 PIR1bits.TMR1GIF                // bit 7
4503 
4504 #define CCP2IF                  PIR2bits.CCP2IF                 // bit 0
4505 #define LCDIF                   PIR2bits.LCDIF                  // bit 2
4506 #define BCLIF                   PIR2bits.BCLIF                  // bit 3
4507 #define EEIF                    PIR2bits.EEIF                   // bit 4
4508 #define C1IF                    PIR2bits.C1IF                   // bit 5
4509 #define C2IF                    PIR2bits.C2IF                   // bit 6
4510 #define OSFIF                   PIR2bits.OSFIF                  // bit 7
4511 
4512 #define TMR4IF                  PIR3bits.TMR4IF                 // bit 1
4513 #define TMR6IF                  PIR3bits.TMR6IF                 // bit 3
4514 #define CCP3IF                  PIR3bits.CCP3IF                 // bit 4
4515 #define CCP4IF                  PIR3bits.CCP4IF                 // bit 5
4516 #define CCP5IF                  PIR3bits.CCP5IF                 // bit 6
4517 
4518 #define RA0                     PORTAbits.RA0                   // bit 0
4519 #define RA1                     PORTAbits.RA1                   // bit 1
4520 #define RA2                     PORTAbits.RA2                   // bit 2
4521 #define RA3                     PORTAbits.RA3                   // bit 3
4522 #define RA4                     PORTAbits.RA4                   // bit 4
4523 #define RA5                     PORTAbits.RA5                   // bit 5
4524 #define RA6                     PORTAbits.RA6                   // bit 6
4525 #define RA7                     PORTAbits.RA7                   // bit 7
4526 
4527 #define RB0                     PORTBbits.RB0                   // bit 0
4528 #define RB1                     PORTBbits.RB1                   // bit 1
4529 #define RB2                     PORTBbits.RB2                   // bit 2
4530 #define RB3                     PORTBbits.RB3                   // bit 3
4531 #define RB4                     PORTBbits.RB4                   // bit 4
4532 #define RB5                     PORTBbits.RB5                   // bit 5
4533 #define RB6                     PORTBbits.RB6                   // bit 6
4534 #define RB7                     PORTBbits.RB7                   // bit 7
4535 
4536 #define RC0                     PORTCbits.RC0                   // bit 0
4537 #define RC1                     PORTCbits.RC1                   // bit 1
4538 #define RC2                     PORTCbits.RC2                   // bit 2
4539 #define RC3                     PORTCbits.RC3                   // bit 3
4540 #define RC4                     PORTCbits.RC4                   // bit 4
4541 #define RC5                     PORTCbits.RC5                   // bit 5
4542 #define RC6                     PORTCbits.RC6                   // bit 6
4543 #define RC7                     PORTCbits.RC7                   // bit 7
4544 
4545 #define RE3                     PORTEbits.RE3                   // bit 3
4546 
4547 #define STR1A                   PSTR1CONbits.STR1A              // bit 0
4548 #define STR1B                   PSTR1CONbits.STR1B              // bit 1
4549 #define STR1C                   PSTR1CONbits.STR1C              // bit 2
4550 #define STR1D                   PSTR1CONbits.STR1D              // bit 3
4551 #define STR1SYNC                PSTR1CONbits.STR1SYNC           // bit 4
4552 
4553 #define STR2A                   PSTR2CONbits.STR2A              // bit 0
4554 #define STR2B                   PSTR2CONbits.STR2B              // bit 1
4555 #define STR2C                   PSTR2CONbits.STR2C              // bit 2
4556 #define STR2D                   PSTR2CONbits.STR2D              // bit 3
4557 #define STR2SYNC                PSTR2CONbits.STR2SYNC           // bit 4
4558 
4559 #define STR3A                   PSTR3CONbits.STR3A              // bit 0
4560 #define STR3B                   PSTR3CONbits.STR3B              // bit 1
4561 #define STR3C                   PSTR3CONbits.STR3C              // bit 2
4562 #define STR3D                   PSTR3CONbits.STR3D              // bit 3
4563 #define STR3SYNC                PSTR3CONbits.STR3SYNC           // bit 4
4564 
4565 #define P1DC0                   PWM1CONbits.P1DC0               // bit 0
4566 #define P1DC1                   PWM1CONbits.P1DC1               // bit 1
4567 #define P1DC2                   PWM1CONbits.P1DC2               // bit 2
4568 #define P1DC3                   PWM1CONbits.P1DC3               // bit 3
4569 #define P1DC4                   PWM1CONbits.P1DC4               // bit 4
4570 #define P1DC5                   PWM1CONbits.P1DC5               // bit 5
4571 #define P1DC6                   PWM1CONbits.P1DC6               // bit 6
4572 #define P1RSEN                  PWM1CONbits.P1RSEN              // bit 7
4573 
4574 #define P2DC0                   PWM2CONbits.P2DC0               // bit 0
4575 #define P2DC1                   PWM2CONbits.P2DC1               // bit 1
4576 #define P2DC2                   PWM2CONbits.P2DC2               // bit 2
4577 #define P2DC3                   PWM2CONbits.P2DC3               // bit 3
4578 #define P2DC4                   PWM2CONbits.P2DC4               // bit 4
4579 #define P2DC5                   PWM2CONbits.P2DC5               // bit 5
4580 #define P2DC6                   PWM2CONbits.P2DC6               // bit 6
4581 #define P2RSEN                  PWM2CONbits.P2RSEN              // bit 7
4582 
4583 #define P3DC0                   PWM3CONbits.P3DC0               // bit 0
4584 #define P3DC1                   PWM3CONbits.P3DC1               // bit 1
4585 #define P3DC2                   PWM3CONbits.P3DC2               // bit 2
4586 #define P3DC3                   PWM3CONbits.P3DC3               // bit 3
4587 #define P3DC4                   PWM3CONbits.P3DC4               // bit 4
4588 #define P3DC5                   PWM3CONbits.P3DC5               // bit 5
4589 #define P3DC6                   PWM3CONbits.P3DC6               // bit 6
4590 #define P3RSEN                  PWM3CONbits.P3RSEN              // bit 7
4591 
4592 #define RX9D                    RCSTAbits.RX9D                  // bit 0
4593 #define OERR                    RCSTAbits.OERR                  // bit 1
4594 #define FERR                    RCSTAbits.FERR                  // bit 2
4595 #define ADDEN                   RCSTAbits.ADDEN                 // bit 3
4596 #define CREN                    RCSTAbits.CREN                  // bit 4
4597 #define SREN                    RCSTAbits.SREN                  // bit 5
4598 #define RX9                     RCSTAbits.RX9                   // bit 6
4599 #define SPEN                    RCSTAbits.SPEN                  // bit 7
4600 
4601 #define SRPR                    SRCON0bits.SRPR                 // bit 0
4602 #define SRPS                    SRCON0bits.SRPS                 // bit 1
4603 #define SRNQEN                  SRCON0bits.SRNQEN               // bit 2
4604 #define SRQEN                   SRCON0bits.SRQEN                // bit 3
4605 #define SRCLK0                  SRCON0bits.SRCLK0               // bit 4
4606 #define SRCLK1                  SRCON0bits.SRCLK1               // bit 5
4607 #define SRCLK2                  SRCON0bits.SRCLK2               // bit 6
4608 #define SRLEN                   SRCON0bits.SRLEN                // bit 7
4609 
4610 #define SRRC1E                  SRCON1bits.SRRC1E               // bit 0
4611 #define SRRC2E                  SRCON1bits.SRRC2E               // bit 1
4612 #define SRRCKE                  SRCON1bits.SRRCKE               // bit 2
4613 #define SRRPE                   SRCON1bits.SRRPE                // bit 3
4614 #define SRSC1E                  SRCON1bits.SRSC1E               // bit 4
4615 #define SRSC2E                  SRCON1bits.SRSC2E               // bit 5
4616 #define SRSCKE                  SRCON1bits.SRSCKE               // bit 6
4617 #define SRSPE                   SRCON1bits.SRSPE                // bit 7
4618 
4619 #define SSPM0                   SSPCONbits.SSPM0                // bit 0
4620 #define SSPM1                   SSPCONbits.SSPM1                // bit 1
4621 #define SSPM2                   SSPCONbits.SSPM2                // bit 2
4622 #define SSPM3                   SSPCONbits.SSPM3                // bit 3
4623 #define CKP                     SSPCONbits.CKP                  // bit 4
4624 #define SSPEN                   SSPCONbits.SSPEN                // bit 5
4625 #define SSPOV                   SSPCONbits.SSPOV                // bit 6
4626 #define WCOL                    SSPCONbits.WCOL                 // bit 7
4627 
4628 #define SEN                     SSPCON2bits.SEN                 // bit 0
4629 #define RSEN                    SSPCON2bits.RSEN                // bit 1
4630 #define PEN                     SSPCON2bits.PEN                 // bit 2
4631 #define RCEN                    SSPCON2bits.RCEN                // bit 3
4632 #define ACKEN                   SSPCON2bits.ACKEN               // bit 4
4633 #define ACKDT                   SSPCON2bits.ACKDT               // bit 5
4634 #define ACKSTAT                 SSPCON2bits.ACKSTAT             // bit 6
4635 #define GCEN                    SSPCON2bits.GCEN                // bit 7
4636 
4637 #define DHEN                    SSPCON3bits.DHEN                // bit 0
4638 #define AHEN                    SSPCON3bits.AHEN                // bit 1
4639 #define SBCDE                   SSPCON3bits.SBCDE               // bit 2
4640 #define SDAHT                   SSPCON3bits.SDAHT               // bit 3
4641 #define BOEN                    SSPCON3bits.BOEN                // bit 4
4642 #define SCIE                    SSPCON3bits.SCIE                // bit 5
4643 #define PCIE                    SSPCON3bits.PCIE                // bit 6
4644 #define ACKTIM                  SSPCON3bits.ACKTIM              // bit 7
4645 
4646 #define BF                      SSPSTATbits.BF                  // bit 0
4647 #define UA                      SSPSTATbits.UA                  // bit 1
4648 #define R_NOT_W                 SSPSTATbits.R_NOT_W             // bit 2
4649 #define S                       SSPSTATbits.S                   // bit 3
4650 #define P                       SSPSTATbits.P                   // bit 4
4651 #define D_NOT_A                 SSPSTATbits.D_NOT_A             // bit 5
4652 #define CKE                     SSPSTATbits.CKE                 // bit 6
4653 #define SMP                     SSPSTATbits.SMP                 // bit 7
4654 
4655 #define C                       STATUSbits.C                    // bit 0
4656 #define DC                      STATUSbits.DC                   // bit 1
4657 #define Z                       STATUSbits.Z                    // bit 2
4658 #define NOT_PD                  STATUSbits.NOT_PD               // bit 3
4659 #define NOT_TO                  STATUSbits.NOT_TO               // bit 4
4660 
4661 #define C_SHAD                  STATUS_SHADbits.C_SHAD          // bit 0
4662 #define DC_SHAD                 STATUS_SHADbits.DC_SHAD         // bit 1
4663 #define Z_SHAD                  STATUS_SHADbits.Z_SHAD          // bit 2
4664 
4665 #define TMR1ON                  T1CONbits.TMR1ON                // bit 0
4666 #define NOT_T1SYNC              T1CONbits.NOT_T1SYNC            // bit 2
4667 #define T1OSCEN                 T1CONbits.T1OSCEN               // bit 3
4668 #define T1CKPS0                 T1CONbits.T1CKPS0               // bit 4
4669 #define T1CKPS1                 T1CONbits.T1CKPS1               // bit 5
4670 #define TMR1CS0                 T1CONbits.TMR1CS0               // bit 6
4671 #define TMR1CS1                 T1CONbits.TMR1CS1               // bit 7
4672 
4673 #define T1GSS0                  T1GCONbits.T1GSS0               // bit 0
4674 #define T1GSS1                  T1GCONbits.T1GSS1               // bit 1
4675 #define T1GVAL                  T1GCONbits.T1GVAL               // bit 2
4676 #define T1GGO_NOT_DONE          T1GCONbits.T1GGO_NOT_DONE       // bit 3, shadows bit in T1GCONbits
4677 #define T1GGO                   T1GCONbits.T1GGO                // bit 3, shadows bit in T1GCONbits
4678 #define T1GSPM                  T1GCONbits.T1GSPM               // bit 4
4679 #define T1GTM                   T1GCONbits.T1GTM                // bit 5
4680 #define T1GPOL                  T1GCONbits.T1GPOL               // bit 6
4681 #define TMR1GE                  T1GCONbits.TMR1GE               // bit 7
4682 
4683 #define T2CKPS0                 T2CONbits.T2CKPS0               // bit 0
4684 #define T2CKPS1                 T2CONbits.T2CKPS1               // bit 1
4685 #define TMR2ON                  T2CONbits.TMR2ON                // bit 2
4686 #define T2OUTPS0                T2CONbits.T2OUTPS0              // bit 3
4687 #define T2OUTPS1                T2CONbits.T2OUTPS1              // bit 4
4688 #define T2OUTPS2                T2CONbits.T2OUTPS2              // bit 5
4689 #define T2OUTPS3                T2CONbits.T2OUTPS3              // bit 6
4690 
4691 #define T4CKPS0                 T4CONbits.T4CKPS0               // bit 0
4692 #define T4CKPS1                 T4CONbits.T4CKPS1               // bit 1
4693 #define TMR4ON                  T4CONbits.TMR4ON                // bit 2
4694 #define T4OUTPS0                T4CONbits.T4OUTPS0              // bit 3
4695 #define T4OUTPS1                T4CONbits.T4OUTPS1              // bit 4
4696 #define T4OUTPS2                T4CONbits.T4OUTPS2              // bit 5
4697 #define T4OUTPS3                T4CONbits.T4OUTPS3              // bit 6
4698 
4699 #define T6CKPS0                 T6CONbits.T6CKPS0               // bit 0
4700 #define T6CKPS1                 T6CONbits.T6CKPS1               // bit 1
4701 #define TMR6ON                  T6CONbits.TMR6ON                // bit 2
4702 #define T6OUTPS0                T6CONbits.T6OUTPS0              // bit 3
4703 #define T6OUTPS1                T6CONbits.T6OUTPS1              // bit 4
4704 #define T6OUTPS2                T6CONbits.T6OUTPS2              // bit 5
4705 #define T6OUTPS3                T6CONbits.T6OUTPS3              // bit 6
4706 
4707 #define TRISA0                  TRISAbits.TRISA0                // bit 0
4708 #define TRISA1                  TRISAbits.TRISA1                // bit 1
4709 #define TRISA2                  TRISAbits.TRISA2                // bit 2
4710 #define TRISA3                  TRISAbits.TRISA3                // bit 3
4711 #define TRISA4                  TRISAbits.TRISA4                // bit 4
4712 #define TRISA5                  TRISAbits.TRISA5                // bit 5
4713 #define TRISA6                  TRISAbits.TRISA6                // bit 6
4714 #define TRISA7                  TRISAbits.TRISA7                // bit 7
4715 
4716 #define TRISB0                  TRISBbits.TRISB0                // bit 0
4717 #define TRISB1                  TRISBbits.TRISB1                // bit 1
4718 #define TRISB2                  TRISBbits.TRISB2                // bit 2
4719 #define TRISB3                  TRISBbits.TRISB3                // bit 3
4720 #define TRISB4                  TRISBbits.TRISB4                // bit 4
4721 #define TRISB5                  TRISBbits.TRISB5                // bit 5
4722 #define TRISB6                  TRISBbits.TRISB6                // bit 6
4723 #define TRISB7                  TRISBbits.TRISB7                // bit 7
4724 
4725 #define TRISC0                  TRISCbits.TRISC0                // bit 0
4726 #define TRISC1                  TRISCbits.TRISC1                // bit 1
4727 #define TRISC2                  TRISCbits.TRISC2                // bit 2
4728 #define TRISC3                  TRISCbits.TRISC3                // bit 3
4729 #define TRISC4                  TRISCbits.TRISC4                // bit 4
4730 #define TRISC5                  TRISCbits.TRISC5                // bit 5
4731 #define TRISC6                  TRISCbits.TRISC6                // bit 6
4732 #define TRISC7                  TRISCbits.TRISC7                // bit 7
4733 
4734 #define TRISE3                  TRISEbits.TRISE3                // bit 3
4735 
4736 #define TX9D                    TXSTAbits.TX9D                  // bit 0
4737 #define TRMT                    TXSTAbits.TRMT                  // bit 1
4738 #define BRGH                    TXSTAbits.BRGH                  // bit 2
4739 #define SENDB                   TXSTAbits.SENDB                 // bit 3
4740 #define SYNC                    TXSTAbits.SYNC                  // bit 4
4741 #define TXEN                    TXSTAbits.TXEN                  // bit 5
4742 #define TX9                     TXSTAbits.TX9                   // bit 6
4743 #define CSRC                    TXSTAbits.CSRC                  // bit 7
4744 
4745 #define SWDTEN                  WDTCONbits.SWDTEN               // bit 0
4746 #define WDTPS0                  WDTCONbits.WDTPS0               // bit 1
4747 #define WDTPS1                  WDTCONbits.WDTPS1               // bit 2
4748 #define WDTPS2                  WDTCONbits.WDTPS2               // bit 3
4749 #define WDTPS3                  WDTCONbits.WDTPS3               // bit 4
4750 #define WDTPS4                  WDTCONbits.WDTPS4               // bit 5
4751 
4752 #define WPUB0                   WPUBbits.WPUB0                  // bit 0
4753 #define WPUB1                   WPUBbits.WPUB1                  // bit 1
4754 #define WPUB2                   WPUBbits.WPUB2                  // bit 2
4755 #define WPUB3                   WPUBbits.WPUB3                  // bit 3
4756 #define WPUB4                   WPUBbits.WPUB4                  // bit 4
4757 #define WPUB5                   WPUBbits.WPUB5                  // bit 5
4758 #define WPUB6                   WPUBbits.WPUB6                  // bit 6
4759 #define WPUB7                   WPUBbits.WPUB7                  // bit 7
4760 
4761 #define WPUE3                   WPUEbits.WPUE3                  // bit 3
4762 
4763 #endif // #ifndef NO_BIT_DEFINES
4764 
4765 #endif // #ifndef __PIC16F1933_H__
4766