1 /*
2  * This declarations of the PIC16F1947 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:23 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 __PIC16F1947_H__
26 #define __PIC16F1947_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 PORTD_ADDR              0x000F
54 #define PORTE_ADDR              0x0010
55 #define PIR1_ADDR               0x0011
56 #define PIR2_ADDR               0x0012
57 #define PIR3_ADDR               0x0013
58 #define PIR4_ADDR               0x0014
59 #define TMR0_ADDR               0x0015
60 #define TMR1_ADDR               0x0016
61 #define TMR1L_ADDR              0x0016
62 #define TMR1H_ADDR              0x0017
63 #define T1CON_ADDR              0x0018
64 #define T1GCON_ADDR             0x0019
65 #define TMR2_ADDR               0x001A
66 #define PR2_ADDR                0x001B
67 #define T2CON_ADDR              0x001C
68 #define CPSCON0_ADDR            0x001E
69 #define CPSCON1_ADDR            0x001F
70 #define TRISA_ADDR              0x008C
71 #define TRISB_ADDR              0x008D
72 #define TRISC_ADDR              0x008E
73 #define TRISD_ADDR              0x008F
74 #define TRISE_ADDR              0x0090
75 #define PIE1_ADDR               0x0091
76 #define PIE2_ADDR               0x0092
77 #define PIE3_ADDR               0x0093
78 #define PIE4_ADDR               0x0094
79 #define OPTION_REG_ADDR         0x0095
80 #define PCON_ADDR               0x0096
81 #define WDTCON_ADDR             0x0097
82 #define OSCTUNE_ADDR            0x0098
83 #define OSCCON_ADDR             0x0099
84 #define OSCSTAT_ADDR            0x009A
85 #define ADRES_ADDR              0x009B
86 #define ADRESL_ADDR             0x009B
87 #define ADRESH_ADDR             0x009C
88 #define ADCON0_ADDR             0x009D
89 #define ADCON1_ADDR             0x009E
90 #define LATA_ADDR               0x010C
91 #define LATB_ADDR               0x010D
92 #define LATC_ADDR               0x010E
93 #define LATD_ADDR               0x010F
94 #define LATE_ADDR               0x0110
95 #define CM1CON0_ADDR            0x0111
96 #define CM1CON1_ADDR            0x0112
97 #define CM2CON0_ADDR            0x0113
98 #define CM2CON1_ADDR            0x0114
99 #define CMOUT_ADDR              0x0115
100 #define BORCON_ADDR             0x0116
101 #define FVRCON_ADDR             0x0117
102 #define DACCON0_ADDR            0x0118
103 #define DACCON1_ADDR            0x0119
104 #define SRCON0_ADDR             0x011A
105 #define SRCON1_ADDR             0x011B
106 #define APFCON_ADDR             0x011D
107 #define CM3CON0_ADDR            0x011E
108 #define CM3CON1_ADDR            0x011F
109 #define ANSELA_ADDR             0x018C
110 #define ANSELE_ADDR             0x0190
111 #define EEADR_ADDR              0x0191
112 #define EEADRL_ADDR             0x0191
113 #define EEADRH_ADDR             0x0192
114 #define EEDAT_ADDR              0x0193
115 #define EEDATL_ADDR             0x0193
116 #define EEDATH_ADDR             0x0194
117 #define EECON1_ADDR             0x0195
118 #define EECON2_ADDR             0x0196
119 #define RC1REG_ADDR             0x0199
120 #define RCREG_ADDR              0x0199
121 #define TX1REG_ADDR             0x019A
122 #define TXREG_ADDR              0x019A
123 #define SP1BRG_ADDR             0x019B
124 #define SP1BRGL_ADDR            0x019B
125 #define SPBRG_ADDR              0x019B
126 #define SPBRGL_ADDR             0x019B
127 #define SP1BRGH_ADDR            0x019C
128 #define SPBRGH_ADDR             0x019C
129 #define RC1STA_ADDR             0x019D
130 #define RCSTA_ADDR              0x019D
131 #define TX1STA_ADDR             0x019E
132 #define TXSTA_ADDR              0x019E
133 #define BAUD1CON_ADDR           0x019F
134 #define BAUDCON_ADDR            0x019F
135 #define WPUB_ADDR               0x020D
136 #define SSP1BUF_ADDR            0x0211
137 #define SSPBUF_ADDR             0x0211
138 #define SSP1ADD_ADDR            0x0212
139 #define SSPADD_ADDR             0x0212
140 #define SSP1MSK_ADDR            0x0213
141 #define SSPMSK_ADDR             0x0213
142 #define SSP1STAT_ADDR           0x0214
143 #define SSPSTAT_ADDR            0x0214
144 #define SSP1CON1_ADDR           0x0215
145 #define SSPCON_ADDR             0x0215
146 #define SSPCON1_ADDR            0x0215
147 #define SSP1CON2_ADDR           0x0216
148 #define SSPCON2_ADDR            0x0216
149 #define SSP1CON3_ADDR           0x0217
150 #define SSPCON3_ADDR            0x0217
151 #define SSP2BUF_ADDR            0x0219
152 #define SSP2ADD_ADDR            0x021A
153 #define SSP2MSK_ADDR            0x021B
154 #define SSP2STAT_ADDR           0x021C
155 #define SSP2CON1_ADDR           0x021D
156 #define SSP2CON2_ADDR           0x021E
157 #define SSP2CON3_ADDR           0x021F
158 #define PORTF_ADDR              0x028C
159 #define PORTG_ADDR              0x028D
160 #define CCPR1_ADDR              0x0291
161 #define CCPR1L_ADDR             0x0291
162 #define CCPR1H_ADDR             0x0292
163 #define CCP1CON_ADDR            0x0293
164 #define PWM1CON_ADDR            0x0294
165 #define CCP1AS_ADDR             0x0295
166 #define ECCP1AS_ADDR            0x0295
167 #define PSTR1CON_ADDR           0x0296
168 #define CCPR2_ADDR              0x0298
169 #define CCPR2L_ADDR             0x0298
170 #define CCPR2H_ADDR             0x0299
171 #define CCP2CON_ADDR            0x029A
172 #define PWM2CON_ADDR            0x029B
173 #define CCP2AS_ADDR             0x029C
174 #define ECCP2AS_ADDR            0x029C
175 #define PSTR2CON_ADDR           0x029D
176 #define CCPTMRS0_ADDR           0x029E
177 #define CCPTMRS1_ADDR           0x029F
178 #define TRISF_ADDR              0x030C
179 #define TRISG_ADDR              0x030D
180 #define CCPR3_ADDR              0x0311
181 #define CCPR3L_ADDR             0x0311
182 #define CCPR3H_ADDR             0x0312
183 #define CCP3CON_ADDR            0x0313
184 #define PWM3CON_ADDR            0x0314
185 #define CCP3AS_ADDR             0x0315
186 #define ECCP3AS_ADDR            0x0315
187 #define PSTR3CON_ADDR           0x0316
188 #define CCPR4_ADDR              0x0318
189 #define CCPR4L_ADDR             0x0318
190 #define CCPR4H_ADDR             0x0319
191 #define CCP4CON_ADDR            0x031A
192 #define CCPR5_ADDR              0x031C
193 #define CCPR5L_ADDR             0x031C
194 #define CCPR5H_ADDR             0x031D
195 #define CCP5CON_ADDR            0x031E
196 #define LATF_ADDR               0x038C
197 #define LATG_ADDR               0x038D
198 #define IOCBP_ADDR              0x0394
199 #define IOCBN_ADDR              0x0395
200 #define IOCBF_ADDR              0x0396
201 #define ANSELF_ADDR             0x040C
202 #define ANSELG_ADDR             0x040D
203 #define TMR4_ADDR               0x0415
204 #define PR4_ADDR                0x0416
205 #define T4CON_ADDR              0x0417
206 #define TMR6_ADDR               0x041C
207 #define PR6_ADDR                0x041D
208 #define T6CON_ADDR              0x041E
209 #define WPUG_ADDR               0x048D
210 #define RC2REG_ADDR             0x0491
211 #define TX2REG_ADDR             0x0492
212 #define SP2BRGL_ADDR            0x0493
213 #define SPBRG2_ADDR             0x0493
214 #define SP2BRGH_ADDR            0x0494
215 #define RC2STA_ADDR             0x0495
216 #define TX2STA_ADDR             0x0496
217 #define BAUD2CON_ADDR           0x0497
218 #define LCDCON_ADDR             0x0791
219 #define LCDPS_ADDR              0x0792
220 #define LCDREF_ADDR             0x0793
221 #define LCDCST_ADDR             0x0794
222 #define LCDRL_ADDR              0x0795
223 #define LCDSE0_ADDR             0x0798
224 #define LCDSE1_ADDR             0x0799
225 #define LCDSE2_ADDR             0x079A
226 #define LCDSE3_ADDR             0x079B
227 #define LCDSE4_ADDR             0x079C
228 #define LCDSE5_ADDR             0x079D
229 #define LCDDATA0_ADDR           0x07A0
230 #define LCDDATA1_ADDR           0x07A1
231 #define LCDDATA2_ADDR           0x07A2
232 #define LCDDATA3_ADDR           0x07A3
233 #define LCDDATA4_ADDR           0x07A4
234 #define LCDDATA5_ADDR           0x07A5
235 #define LCDDATA6_ADDR           0x07A6
236 #define LCDDATA7_ADDR           0x07A7
237 #define LCDDATA8_ADDR           0x07A8
238 #define LCDDATA9_ADDR           0x07A9
239 #define LCDDATA10_ADDR          0x07AA
240 #define LCDDATA11_ADDR          0x07AB
241 #define LCDDATA12_ADDR          0x07AC
242 #define LCDDATA13_ADDR          0x07AD
243 #define LCDDATA14_ADDR          0x07AE
244 #define LCDDATA15_ADDR          0x07AF
245 #define LCDDATA16_ADDR          0x07B0
246 #define LCDDATA17_ADDR          0x07B1
247 #define LCDDATA18_ADDR          0x07B2
248 #define LCDDATA19_ADDR          0x07B3
249 #define LCDDATA20_ADDR          0x07B4
250 #define LCDDATA21_ADDR          0x07B5
251 #define LCDDATA22_ADDR          0x07B6
252 #define LCDDATA23_ADDR          0x07B7
253 #define STATUS_SHAD_ADDR        0x0FE4
254 #define WREG_SHAD_ADDR          0x0FE5
255 #define BSR_SHAD_ADDR           0x0FE6
256 #define PCLATH_SHAD_ADDR        0x0FE7
257 #define FSR0L_SHAD_ADDR         0x0FE8
258 #define FSR0H_SHAD_ADDR         0x0FE9
259 #define FSR1L_SHAD_ADDR         0x0FEA
260 #define FSR1H_SHAD_ADDR         0x0FEB
261 #define STKPTR_ADDR             0x0FED
262 #define TOSL_ADDR               0x0FEE
263 #define TOSH_ADDR               0x0FEF
264 
265 #endif // #ifndef NO_ADDR_DEFINES
266 
267 //==============================================================================
268 //
269 //	Register Definitions
270 //
271 //==============================================================================
272 
273 extern __at(0x0000) __sfr INDF0;
274 extern __at(0x0001) __sfr INDF1;
275 extern __at(0x0002) __sfr PCL;
276 
277 //==============================================================================
278 //        STATUS Bits
279 
280 extern __at(0x0003) __sfr STATUS;
281 
282 typedef struct
283   {
284   unsigned C                    : 1;
285   unsigned DC                   : 1;
286   unsigned Z                    : 1;
287   unsigned NOT_PD               : 1;
288   unsigned NOT_TO               : 1;
289   unsigned                      : 1;
290   unsigned                      : 1;
291   unsigned                      : 1;
292   } __STATUSbits_t;
293 
294 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
295 
296 #define _C                      0x01
297 #define _DC                     0x02
298 #define _Z                      0x04
299 #define _NOT_PD                 0x08
300 #define _NOT_TO                 0x10
301 
302 //==============================================================================
303 
304 extern __at(0x0004) __sfr FSR0;
305 extern __at(0x0004) __sfr FSR0L;
306 extern __at(0x0005) __sfr FSR0H;
307 extern __at(0x0006) __sfr FSR1;
308 extern __at(0x0006) __sfr FSR1L;
309 extern __at(0x0007) __sfr FSR1H;
310 
311 //==============================================================================
312 //        BSR Bits
313 
314 extern __at(0x0008) __sfr BSR;
315 
316 typedef union
317   {
318   struct
319     {
320     unsigned BSR0               : 1;
321     unsigned BSR1               : 1;
322     unsigned BSR2               : 1;
323     unsigned BSR3               : 1;
324     unsigned BSR4               : 1;
325     unsigned                    : 1;
326     unsigned                    : 1;
327     unsigned                    : 1;
328     };
329 
330   struct
331     {
332     unsigned BSR                : 5;
333     unsigned                    : 3;
334     };
335   } __BSRbits_t;
336 
337 extern __at(0x0008) volatile __BSRbits_t BSRbits;
338 
339 #define _BSR0                   0x01
340 #define _BSR1                   0x02
341 #define _BSR2                   0x04
342 #define _BSR3                   0x08
343 #define _BSR4                   0x10
344 
345 //==============================================================================
346 
347 extern __at(0x0009) __sfr WREG;
348 extern __at(0x000A) __sfr PCLATH;
349 
350 //==============================================================================
351 //        INTCON Bits
352 
353 extern __at(0x000B) __sfr INTCON;
354 
355 typedef union
356   {
357   struct
358     {
359     unsigned IOCIF              : 1;
360     unsigned INTF               : 1;
361     unsigned TMR0IF             : 1;
362     unsigned IOCIE              : 1;
363     unsigned INTE               : 1;
364     unsigned TMR0IE             : 1;
365     unsigned PEIE               : 1;
366     unsigned GIE                : 1;
367     };
368 
369   struct
370     {
371     unsigned                    : 1;
372     unsigned                    : 1;
373     unsigned T0IF               : 1;
374     unsigned                    : 1;
375     unsigned                    : 1;
376     unsigned T0IE               : 1;
377     unsigned                    : 1;
378     unsigned                    : 1;
379     };
380   } __INTCONbits_t;
381 
382 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
383 
384 #define _IOCIF                  0x01
385 #define _INTF                   0x02
386 #define _TMR0IF                 0x04
387 #define _T0IF                   0x04
388 #define _IOCIE                  0x08
389 #define _INTE                   0x10
390 #define _TMR0IE                 0x20
391 #define _T0IE                   0x20
392 #define _PEIE                   0x40
393 #define _GIE                    0x80
394 
395 //==============================================================================
396 
397 
398 //==============================================================================
399 //        PORTA Bits
400 
401 extern __at(0x000C) __sfr PORTA;
402 
403 typedef union
404   {
405   struct
406     {
407     unsigned RA0                : 1;
408     unsigned RA1                : 1;
409     unsigned RA2                : 1;
410     unsigned RA3                : 1;
411     unsigned RA4                : 1;
412     unsigned RA5                : 1;
413     unsigned RA6                : 1;
414     unsigned RA7                : 1;
415     };
416 
417   struct
418     {
419     unsigned AN0                : 1;
420     unsigned AN1                : 1;
421     unsigned AN2                : 1;
422     unsigned AN3                : 1;
423     unsigned SEG14              : 1;
424     unsigned AN4                : 1;
425     unsigned SEG36              : 1;
426     unsigned SEG37              : 1;
427     };
428 
429   struct
430     {
431     unsigned CPS0               : 1;
432     unsigned CPS1               : 1;
433     unsigned CPS2               : 1;
434     unsigned CPS3               : 1;
435     unsigned T0CKI              : 1;
436     unsigned CPS4               : 1;
437     unsigned OSC2               : 1;
438     unsigned OSC1               : 1;
439     };
440 
441   struct
442     {
443     unsigned SEG33              : 1;
444     unsigned SEG18              : 1;
445     unsigned SEG34              : 1;
446     unsigned SEG35              : 1;
447     unsigned                    : 1;
448     unsigned SEG15              : 1;
449     unsigned CLKOUT             : 1;
450     unsigned CLKIN              : 1;
451     };
452 
453   struct
454     {
455     unsigned                    : 1;
456     unsigned                    : 1;
457     unsigned VREFM              : 1;
458     unsigned VREFP              : 1;
459     unsigned                    : 1;
460     unsigned                    : 1;
461     unsigned                    : 1;
462     unsigned                    : 1;
463     };
464   } __PORTAbits_t;
465 
466 extern __at(0x000C) volatile __PORTAbits_t PORTAbits;
467 
468 #define _RA0                    0x01
469 #define _AN0                    0x01
470 #define _CPS0                   0x01
471 #define _SEG33                  0x01
472 #define _RA1                    0x02
473 #define _AN1                    0x02
474 #define _CPS1                   0x02
475 #define _SEG18                  0x02
476 #define _RA2                    0x04
477 #define _AN2                    0x04
478 #define _CPS2                   0x04
479 #define _SEG34                  0x04
480 #define _VREFM                  0x04
481 #define _RA3                    0x08
482 #define _AN3                    0x08
483 #define _CPS3                   0x08
484 #define _SEG35                  0x08
485 #define _VREFP                  0x08
486 #define _RA4                    0x10
487 #define _SEG14                  0x10
488 #define _T0CKI                  0x10
489 #define _RA5                    0x20
490 #define _AN4                    0x20
491 #define _CPS4                   0x20
492 #define _SEG15                  0x20
493 #define _RA6                    0x40
494 #define _SEG36                  0x40
495 #define _OSC2                   0x40
496 #define _CLKOUT                 0x40
497 #define _RA7                    0x80
498 #define _SEG37                  0x80
499 #define _OSC1                   0x80
500 #define _CLKIN                  0x80
501 
502 //==============================================================================
503 
504 
505 //==============================================================================
506 //        PORTB Bits
507 
508 extern __at(0x000D) __sfr PORTB;
509 
510 typedef union
511   {
512   struct
513     {
514     unsigned RB0                : 1;
515     unsigned RB1                : 1;
516     unsigned RB2                : 1;
517     unsigned RB3                : 1;
518     unsigned RB4                : 1;
519     unsigned RB5                : 1;
520     unsigned RB6                : 1;
521     unsigned RB7                : 1;
522     };
523 
524   struct
525     {
526     unsigned SEG30              : 1;
527     unsigned SEG8               : 1;
528     unsigned SEG9               : 1;
529     unsigned SEG10              : 1;
530     unsigned SEG11              : 1;
531     unsigned SEG29              : 1;
532     unsigned SEG38              : 1;
533     unsigned SEG39              : 1;
534     };
535 
536   struct
537     {
538     unsigned SRI                : 1;
539     unsigned                    : 1;
540     unsigned                    : 1;
541     unsigned                    : 1;
542     unsigned                    : 1;
543     unsigned T1G                : 1;
544     unsigned                    : 1;
545     unsigned                    : 1;
546     };
547 
548   struct
549     {
550     unsigned FLT0               : 1;
551     unsigned                    : 1;
552     unsigned                    : 1;
553     unsigned                    : 1;
554     unsigned                    : 1;
555     unsigned                    : 1;
556     unsigned                    : 1;
557     unsigned                    : 1;
558     };
559   } __PORTBbits_t;
560 
561 extern __at(0x000D) volatile __PORTBbits_t PORTBbits;
562 
563 #define _RB0                    0x01
564 #define _SEG30                  0x01
565 #define _SRI                    0x01
566 #define _FLT0                   0x01
567 #define _RB1                    0x02
568 #define _SEG8                   0x02
569 #define _RB2                    0x04
570 #define _SEG9                   0x04
571 #define _RB3                    0x08
572 #define _SEG10                  0x08
573 #define _RB4                    0x10
574 #define _SEG11                  0x10
575 #define _RB5                    0x20
576 #define _SEG29                  0x20
577 #define _T1G                    0x20
578 #define _RB6                    0x40
579 #define _SEG38                  0x40
580 #define _RB7                    0x80
581 #define _SEG39                  0x80
582 
583 //==============================================================================
584 
585 
586 //==============================================================================
587 //        PORTC Bits
588 
589 extern __at(0x000E) __sfr PORTC;
590 
591 typedef union
592   {
593   struct
594     {
595     unsigned RC0                : 1;
596     unsigned RC1                : 1;
597     unsigned RC2                : 1;
598     unsigned RC3                : 1;
599     unsigned RC4                : 1;
600     unsigned RC5                : 1;
601     unsigned RC6                : 1;
602     unsigned RC7                : 1;
603     };
604 
605   struct
606     {
607     unsigned SEG40              : 1;
608     unsigned SEG32              : 1;
609     unsigned SEG13              : 1;
610     unsigned SEG17              : 1;
611     unsigned SEG16              : 1;
612     unsigned SEG12              : 1;
613     unsigned SEG27              : 1;
614     unsigned SEG28              : 1;
615     };
616 
617   struct
618     {
619     unsigned T1OSO              : 1;
620     unsigned T1OSI              : 1;
621     unsigned CCP1               : 1;
622     unsigned SCK1               : 1;
623     unsigned SDI1               : 1;
624     unsigned SDO1               : 1;
625     unsigned TX1                : 1;
626     unsigned RX1                : 1;
627     };
628 
629   struct
630     {
631     unsigned T1CKI              : 1;
632     unsigned CCP2               : 1;
633     unsigned P1A                : 1;
634     unsigned SCL1               : 1;
635     unsigned SDA1               : 1;
636     unsigned                    : 1;
637     unsigned CK1                : 1;
638     unsigned DT1                : 1;
639     };
640 
641   struct
642     {
643     unsigned                    : 1;
644     unsigned P2A                : 1;
645     unsigned                    : 1;
646     unsigned                    : 1;
647     unsigned                    : 1;
648     unsigned                    : 1;
649     unsigned                    : 1;
650     unsigned                    : 1;
651     };
652   } __PORTCbits_t;
653 
654 extern __at(0x000E) volatile __PORTCbits_t PORTCbits;
655 
656 #define _RC0                    0x01
657 #define _SEG40                  0x01
658 #define _T1OSO                  0x01
659 #define _T1CKI                  0x01
660 #define _RC1                    0x02
661 #define _SEG32                  0x02
662 #define _T1OSI                  0x02
663 #define _CCP2                   0x02
664 #define _P2A                    0x02
665 #define _RC2                    0x04
666 #define _SEG13                  0x04
667 #define _CCP1                   0x04
668 #define _P1A                    0x04
669 #define _RC3                    0x08
670 #define _SEG17                  0x08
671 #define _SCK1                   0x08
672 #define _SCL1                   0x08
673 #define _RC4                    0x10
674 #define _SEG16                  0x10
675 #define _SDI1                   0x10
676 #define _SDA1                   0x10
677 #define _RC5                    0x20
678 #define _SEG12                  0x20
679 #define _SDO1                   0x20
680 #define _RC6                    0x40
681 #define _SEG27                  0x40
682 #define _TX1                    0x40
683 #define _CK1                    0x40
684 #define _RC7                    0x80
685 #define _SEG28                  0x80
686 #define _RX1                    0x80
687 #define _DT1                    0x80
688 
689 //==============================================================================
690 
691 
692 //==============================================================================
693 //        PORTD Bits
694 
695 extern __at(0x000F) __sfr PORTD;
696 
697 typedef union
698   {
699   struct
700     {
701     unsigned RD0                : 1;
702     unsigned RD1                : 1;
703     unsigned RD2                : 1;
704     unsigned RD3                : 1;
705     unsigned RD4                : 1;
706     unsigned RD5                : 1;
707     unsigned RD6                : 1;
708     unsigned RD7                : 1;
709     };
710 
711   struct
712     {
713     unsigned SEG0               : 1;
714     unsigned SEG1               : 1;
715     unsigned SEG2               : 1;
716     unsigned SEG3               : 1;
717     unsigned SEG4               : 1;
718     unsigned SEG5               : 1;
719     unsigned SEG6               : 1;
720     unsigned SEG7               : 1;
721     };
722 
723   struct
724     {
725     unsigned P2D                : 1;
726     unsigned P2C                : 1;
727     unsigned P2B                : 1;
728     unsigned P3C                : 1;
729     unsigned P3B                : 1;
730     unsigned P1C                : 1;
731     unsigned P1B                : 1;
732     unsigned NOT_SS2            : 1;
733     };
734 
735   struct
736     {
737     unsigned                    : 1;
738     unsigned                    : 1;
739     unsigned                    : 1;
740     unsigned                    : 1;
741     unsigned SDO2               : 1;
742     unsigned SDI2               : 1;
743     unsigned SCK2               : 1;
744     unsigned                    : 1;
745     };
746 
747   struct
748     {
749     unsigned                    : 1;
750     unsigned                    : 1;
751     unsigned                    : 1;
752     unsigned                    : 1;
753     unsigned                    : 1;
754     unsigned SDA2               : 1;
755     unsigned SCL2               : 1;
756     unsigned                    : 1;
757     };
758   } __PORTDbits_t;
759 
760 extern __at(0x000F) volatile __PORTDbits_t PORTDbits;
761 
762 #define _RD0                    0x01
763 #define _SEG0                   0x01
764 #define _P2D                    0x01
765 #define _RD1                    0x02
766 #define _SEG1                   0x02
767 #define _P2C                    0x02
768 #define _RD2                    0x04
769 #define _SEG2                   0x04
770 #define _P2B                    0x04
771 #define _RD3                    0x08
772 #define _SEG3                   0x08
773 #define _P3C                    0x08
774 #define _RD4                    0x10
775 #define _SEG4                   0x10
776 #define _P3B                    0x10
777 #define _SDO2                   0x10
778 #define _RD5                    0x20
779 #define _SEG5                   0x20
780 #define _P1C                    0x20
781 #define _SDI2                   0x20
782 #define _SDA2                   0x20
783 #define _RD6                    0x40
784 #define _SEG6                   0x40
785 #define _P1B                    0x40
786 #define _SCK2                   0x40
787 #define _SCL2                   0x40
788 #define _RD7                    0x80
789 #define _SEG7                   0x80
790 #define _NOT_SS2                0x80
791 
792 //==============================================================================
793 
794 
795 //==============================================================================
796 //        PORTE Bits
797 
798 extern __at(0x0010) __sfr PORTE;
799 
800 typedef union
801   {
802   struct
803     {
804     unsigned RE0                : 1;
805     unsigned RE1                : 1;
806     unsigned RE2                : 1;
807     unsigned RE3                : 1;
808     unsigned RE4                : 1;
809     unsigned RE5                : 1;
810     unsigned RE6                : 1;
811     unsigned RE7                : 1;
812     };
813 
814   struct
815     {
816     unsigned VLCD1              : 1;
817     unsigned VLCD2              : 1;
818     unsigned VLCD3              : 1;
819     unsigned COM0               : 1;
820     unsigned COM1               : 1;
821     unsigned COM2               : 1;
822     unsigned COM3               : 1;
823     unsigned SEG31              : 1;
824     };
825 
826   struct
827     {
828     unsigned P2D                : 1;
829     unsigned P2C                : 1;
830     unsigned P2B                : 1;
831     unsigned P3C                : 1;
832     unsigned P3B                : 1;
833     unsigned P1C                : 1;
834     unsigned P1B                : 1;
835     unsigned P2A                : 1;
836     };
837 
838   struct
839     {
840     unsigned                    : 1;
841     unsigned                    : 1;
842     unsigned                    : 1;
843     unsigned                    : 1;
844     unsigned                    : 1;
845     unsigned                    : 1;
846     unsigned                    : 1;
847     unsigned CCP2               : 1;
848     };
849 
850   struct
851     {
852     unsigned                    : 3;
853     unsigned COM                : 4;
854     unsigned                    : 1;
855     };
856   } __PORTEbits_t;
857 
858 extern __at(0x0010) volatile __PORTEbits_t PORTEbits;
859 
860 #define _PORTE_RE0              0x01
861 #define _PORTE_VLCD1            0x01
862 #define _PORTE_P2D              0x01
863 #define _PORTE_RE1              0x02
864 #define _PORTE_VLCD2            0x02
865 #define _PORTE_P2C              0x02
866 #define _PORTE_RE2              0x04
867 #define _PORTE_VLCD3            0x04
868 #define _PORTE_P2B              0x04
869 #define _PORTE_RE3              0x08
870 #define _PORTE_COM0             0x08
871 #define _PORTE_P3C              0x08
872 #define _PORTE_RE4              0x10
873 #define _PORTE_COM1             0x10
874 #define _PORTE_P3B              0x10
875 #define _PORTE_RE5              0x20
876 #define _PORTE_COM2             0x20
877 #define _PORTE_P1C              0x20
878 #define _PORTE_RE6              0x40
879 #define _PORTE_COM3             0x40
880 #define _PORTE_P1B              0x40
881 #define _PORTE_RE7              0x80
882 #define _PORTE_SEG31            0x80
883 #define _PORTE_P2A              0x80
884 #define _PORTE_CCP2             0x80
885 
886 //==============================================================================
887 
888 
889 //==============================================================================
890 //        PIR1 Bits
891 
892 extern __at(0x0011) __sfr PIR1;
893 
894 typedef union
895   {
896   struct
897     {
898     unsigned TMR1IF             : 1;
899     unsigned TMR2IF             : 1;
900     unsigned CCP1IF             : 1;
901     unsigned SSP1IF             : 1;
902     unsigned TX1IF              : 1;
903     unsigned RC1IF              : 1;
904     unsigned ADIF               : 1;
905     unsigned TMR1GIF            : 1;
906     };
907 
908   struct
909     {
910     unsigned                    : 1;
911     unsigned                    : 1;
912     unsigned                    : 1;
913     unsigned SSPIF              : 1;
914     unsigned TXIF               : 1;
915     unsigned RCIF               : 1;
916     unsigned                    : 1;
917     unsigned                    : 1;
918     };
919   } __PIR1bits_t;
920 
921 extern __at(0x0011) volatile __PIR1bits_t PIR1bits;
922 
923 #define _TMR1IF                 0x01
924 #define _TMR2IF                 0x02
925 #define _CCP1IF                 0x04
926 #define _SSP1IF                 0x08
927 #define _SSPIF                  0x08
928 #define _TX1IF                  0x10
929 #define _TXIF                   0x10
930 #define _RC1IF                  0x20
931 #define _RCIF                   0x20
932 #define _ADIF                   0x40
933 #define _TMR1GIF                0x80
934 
935 //==============================================================================
936 
937 
938 //==============================================================================
939 //        PIR2 Bits
940 
941 extern __at(0x0012) __sfr PIR2;
942 
943 typedef struct
944   {
945   unsigned CCP2IF               : 1;
946   unsigned C3IF                 : 1;
947   unsigned LCDIF                : 1;
948   unsigned BCLIF                : 1;
949   unsigned EEIF                 : 1;
950   unsigned C1IF                 : 1;
951   unsigned C2IF                 : 1;
952   unsigned OSFIF                : 1;
953   } __PIR2bits_t;
954 
955 extern __at(0x0012) volatile __PIR2bits_t PIR2bits;
956 
957 #define _CCP2IF                 0x01
958 #define _C3IF                   0x02
959 #define _LCDIF                  0x04
960 #define _BCLIF                  0x08
961 #define _EEIF                   0x10
962 #define _C1IF                   0x20
963 #define _C2IF                   0x40
964 #define _OSFIF                  0x80
965 
966 //==============================================================================
967 
968 
969 //==============================================================================
970 //        PIR3 Bits
971 
972 extern __at(0x0013) __sfr PIR3;
973 
974 typedef struct
975   {
976   unsigned                      : 1;
977   unsigned TMR4IF               : 1;
978   unsigned                      : 1;
979   unsigned TMR6IF               : 1;
980   unsigned CCP3IF               : 1;
981   unsigned CCP4IF               : 1;
982   unsigned CCP5IF               : 1;
983   unsigned                      : 1;
984   } __PIR3bits_t;
985 
986 extern __at(0x0013) volatile __PIR3bits_t PIR3bits;
987 
988 #define _TMR4IF                 0x02
989 #define _TMR6IF                 0x08
990 #define _CCP3IF                 0x10
991 #define _CCP4IF                 0x20
992 #define _CCP5IF                 0x40
993 
994 //==============================================================================
995 
996 
997 //==============================================================================
998 //        PIR4 Bits
999 
1000 extern __at(0x0014) __sfr PIR4;
1001 
1002 typedef struct
1003   {
1004   unsigned SSP2IF               : 1;
1005   unsigned BCL2IF               : 1;
1006   unsigned                      : 1;
1007   unsigned                      : 1;
1008   unsigned TX2IF                : 1;
1009   unsigned RC2IF                : 1;
1010   unsigned                      : 1;
1011   unsigned                      : 1;
1012   } __PIR4bits_t;
1013 
1014 extern __at(0x0014) volatile __PIR4bits_t PIR4bits;
1015 
1016 #define _SSP2IF                 0x01
1017 #define _BCL2IF                 0x02
1018 #define _TX2IF                  0x10
1019 #define _RC2IF                  0x20
1020 
1021 //==============================================================================
1022 
1023 extern __at(0x0015) __sfr TMR0;
1024 extern __at(0x0016) __sfr TMR1;
1025 extern __at(0x0016) __sfr TMR1L;
1026 extern __at(0x0017) __sfr TMR1H;
1027 
1028 //==============================================================================
1029 //        T1CON Bits
1030 
1031 extern __at(0x0018) __sfr T1CON;
1032 
1033 typedef union
1034   {
1035   struct
1036     {
1037     unsigned TMR1ON             : 1;
1038     unsigned                    : 1;
1039     unsigned NOT_T1SYNC         : 1;
1040     unsigned T1OSCEN            : 1;
1041     unsigned T1CKPS0            : 1;
1042     unsigned T1CKPS1            : 1;
1043     unsigned TMR1CS0            : 1;
1044     unsigned TMR1CS1            : 1;
1045     };
1046 
1047   struct
1048     {
1049     unsigned                    : 4;
1050     unsigned T1CKPS             : 2;
1051     unsigned                    : 2;
1052     };
1053 
1054   struct
1055     {
1056     unsigned                    : 6;
1057     unsigned TMR1CS             : 2;
1058     };
1059   } __T1CONbits_t;
1060 
1061 extern __at(0x0018) volatile __T1CONbits_t T1CONbits;
1062 
1063 #define _TMR1ON                 0x01
1064 #define _NOT_T1SYNC             0x04
1065 #define _T1OSCEN                0x08
1066 #define _T1CKPS0                0x10
1067 #define _T1CKPS1                0x20
1068 #define _TMR1CS0                0x40
1069 #define _TMR1CS1                0x80
1070 
1071 //==============================================================================
1072 
1073 
1074 //==============================================================================
1075 //        T1GCON Bits
1076 
1077 extern __at(0x0019) __sfr T1GCON;
1078 
1079 typedef union
1080   {
1081   struct
1082     {
1083     unsigned T1GSS0             : 1;
1084     unsigned T1GSS1             : 1;
1085     unsigned T1GVAL             : 1;
1086     unsigned T1GGO_NOT_DONE     : 1;
1087     unsigned T1GSPM             : 1;
1088     unsigned T1GTM              : 1;
1089     unsigned T1GPOL             : 1;
1090     unsigned TMR1GE             : 1;
1091     };
1092 
1093   struct
1094     {
1095     unsigned                    : 1;
1096     unsigned                    : 1;
1097     unsigned                    : 1;
1098     unsigned T1GGO              : 1;
1099     unsigned                    : 1;
1100     unsigned                    : 1;
1101     unsigned                    : 1;
1102     unsigned                    : 1;
1103     };
1104 
1105   struct
1106     {
1107     unsigned T1GSS              : 2;
1108     unsigned                    : 6;
1109     };
1110   } __T1GCONbits_t;
1111 
1112 extern __at(0x0019) volatile __T1GCONbits_t T1GCONbits;
1113 
1114 #define _T1GSS0                 0x01
1115 #define _T1GSS1                 0x02
1116 #define _T1GVAL                 0x04
1117 #define _T1GGO_NOT_DONE         0x08
1118 #define _T1GGO                  0x08
1119 #define _T1GSPM                 0x10
1120 #define _T1GTM                  0x20
1121 #define _T1GPOL                 0x40
1122 #define _TMR1GE                 0x80
1123 
1124 //==============================================================================
1125 
1126 extern __at(0x001A) __sfr TMR2;
1127 extern __at(0x001B) __sfr PR2;
1128 
1129 //==============================================================================
1130 //        T2CON Bits
1131 
1132 extern __at(0x001C) __sfr T2CON;
1133 
1134 typedef union
1135   {
1136   struct
1137     {
1138     unsigned T2CKPS0            : 1;
1139     unsigned T2CKPS1            : 1;
1140     unsigned TMR2ON             : 1;
1141     unsigned T2OUTPS0           : 1;
1142     unsigned T2OUTPS1           : 1;
1143     unsigned T2OUTPS2           : 1;
1144     unsigned T2OUTPS3           : 1;
1145     unsigned                    : 1;
1146     };
1147 
1148   struct
1149     {
1150     unsigned T2CKPS             : 2;
1151     unsigned                    : 6;
1152     };
1153 
1154   struct
1155     {
1156     unsigned                    : 3;
1157     unsigned T2OUTPS            : 4;
1158     unsigned                    : 1;
1159     };
1160   } __T2CONbits_t;
1161 
1162 extern __at(0x001C) volatile __T2CONbits_t T2CONbits;
1163 
1164 #define _T2CKPS0                0x01
1165 #define _T2CKPS1                0x02
1166 #define _TMR2ON                 0x04
1167 #define _T2OUTPS0               0x08
1168 #define _T2OUTPS1               0x10
1169 #define _T2OUTPS2               0x20
1170 #define _T2OUTPS3               0x40
1171 
1172 //==============================================================================
1173 
1174 
1175 //==============================================================================
1176 //        CPSCON0 Bits
1177 
1178 extern __at(0x001E) __sfr CPSCON0;
1179 
1180 typedef union
1181   {
1182   struct
1183     {
1184     unsigned T0XCS              : 1;
1185     unsigned CPSOUT             : 1;
1186     unsigned CPSRNG0            : 1;
1187     unsigned CPSRNG1            : 1;
1188     unsigned                    : 1;
1189     unsigned                    : 1;
1190     unsigned CPSRM              : 1;
1191     unsigned CPSON              : 1;
1192     };
1193 
1194   struct
1195     {
1196     unsigned                    : 2;
1197     unsigned CPSRNG             : 2;
1198     unsigned                    : 4;
1199     };
1200   } __CPSCON0bits_t;
1201 
1202 extern __at(0x001E) volatile __CPSCON0bits_t CPSCON0bits;
1203 
1204 #define _T0XCS                  0x01
1205 #define _CPSOUT                 0x02
1206 #define _CPSRNG0                0x04
1207 #define _CPSRNG1                0x08
1208 #define _CPSRM                  0x40
1209 #define _CPSON                  0x80
1210 
1211 //==============================================================================
1212 
1213 
1214 //==============================================================================
1215 //        CPSCON1 Bits
1216 
1217 extern __at(0x001F) __sfr CPSCON1;
1218 
1219 typedef union
1220   {
1221   struct
1222     {
1223     unsigned CPSCH0             : 1;
1224     unsigned CPSCH1             : 1;
1225     unsigned CPSCH2             : 1;
1226     unsigned CPSCH3             : 1;
1227     unsigned CPSCH4             : 1;
1228     unsigned                    : 1;
1229     unsigned                    : 1;
1230     unsigned                    : 1;
1231     };
1232 
1233   struct
1234     {
1235     unsigned CPSCH              : 5;
1236     unsigned                    : 3;
1237     };
1238   } __CPSCON1bits_t;
1239 
1240 extern __at(0x001F) volatile __CPSCON1bits_t CPSCON1bits;
1241 
1242 #define _CPSCH0                 0x01
1243 #define _CPSCH1                 0x02
1244 #define _CPSCH2                 0x04
1245 #define _CPSCH3                 0x08
1246 #define _CPSCH4                 0x10
1247 
1248 //==============================================================================
1249 
1250 
1251 //==============================================================================
1252 //        TRISA Bits
1253 
1254 extern __at(0x008C) __sfr TRISA;
1255 
1256 typedef struct
1257   {
1258   unsigned TRISA0               : 1;
1259   unsigned TRISA1               : 1;
1260   unsigned TRISA2               : 1;
1261   unsigned TRISA3               : 1;
1262   unsigned TRISA4               : 1;
1263   unsigned TRISA5               : 1;
1264   unsigned TRISA6               : 1;
1265   unsigned TRISA7               : 1;
1266   } __TRISAbits_t;
1267 
1268 extern __at(0x008C) volatile __TRISAbits_t TRISAbits;
1269 
1270 #define _TRISA0                 0x01
1271 #define _TRISA1                 0x02
1272 #define _TRISA2                 0x04
1273 #define _TRISA3                 0x08
1274 #define _TRISA4                 0x10
1275 #define _TRISA5                 0x20
1276 #define _TRISA6                 0x40
1277 #define _TRISA7                 0x80
1278 
1279 //==============================================================================
1280 
1281 
1282 //==============================================================================
1283 //        TRISB Bits
1284 
1285 extern __at(0x008D) __sfr TRISB;
1286 
1287 typedef struct
1288   {
1289   unsigned TRISB0               : 1;
1290   unsigned TRISB1               : 1;
1291   unsigned TRISB2               : 1;
1292   unsigned TRISB3               : 1;
1293   unsigned TRISB4               : 1;
1294   unsigned TRISB5               : 1;
1295   unsigned TRISB6               : 1;
1296   unsigned TRISB7               : 1;
1297   } __TRISBbits_t;
1298 
1299 extern __at(0x008D) volatile __TRISBbits_t TRISBbits;
1300 
1301 #define _TRISB0                 0x01
1302 #define _TRISB1                 0x02
1303 #define _TRISB2                 0x04
1304 #define _TRISB3                 0x08
1305 #define _TRISB4                 0x10
1306 #define _TRISB5                 0x20
1307 #define _TRISB6                 0x40
1308 #define _TRISB7                 0x80
1309 
1310 //==============================================================================
1311 
1312 
1313 //==============================================================================
1314 //        TRISC Bits
1315 
1316 extern __at(0x008E) __sfr TRISC;
1317 
1318 typedef struct
1319   {
1320   unsigned TRISC0               : 1;
1321   unsigned TRISC1               : 1;
1322   unsigned TRISC2               : 1;
1323   unsigned TRISC3               : 1;
1324   unsigned TRISC4               : 1;
1325   unsigned TRISC5               : 1;
1326   unsigned TRISC6               : 1;
1327   unsigned TRISC7               : 1;
1328   } __TRISCbits_t;
1329 
1330 extern __at(0x008E) volatile __TRISCbits_t TRISCbits;
1331 
1332 #define _TRISC0                 0x01
1333 #define _TRISC1                 0x02
1334 #define _TRISC2                 0x04
1335 #define _TRISC3                 0x08
1336 #define _TRISC4                 0x10
1337 #define _TRISC5                 0x20
1338 #define _TRISC6                 0x40
1339 #define _TRISC7                 0x80
1340 
1341 //==============================================================================
1342 
1343 
1344 //==============================================================================
1345 //        TRISD Bits
1346 
1347 extern __at(0x008F) __sfr TRISD;
1348 
1349 typedef struct
1350   {
1351   unsigned TRISD0               : 1;
1352   unsigned TRISD1               : 1;
1353   unsigned TRISD2               : 1;
1354   unsigned TRISD3               : 1;
1355   unsigned TRISD4               : 1;
1356   unsigned TRISD5               : 1;
1357   unsigned TRISD6               : 1;
1358   unsigned TRISD7               : 1;
1359   } __TRISDbits_t;
1360 
1361 extern __at(0x008F) volatile __TRISDbits_t TRISDbits;
1362 
1363 #define _TRISD0                 0x01
1364 #define _TRISD1                 0x02
1365 #define _TRISD2                 0x04
1366 #define _TRISD3                 0x08
1367 #define _TRISD4                 0x10
1368 #define _TRISD5                 0x20
1369 #define _TRISD6                 0x40
1370 #define _TRISD7                 0x80
1371 
1372 //==============================================================================
1373 
1374 
1375 //==============================================================================
1376 //        TRISE Bits
1377 
1378 extern __at(0x0090) __sfr TRISE;
1379 
1380 typedef struct
1381   {
1382   unsigned TRISE0               : 1;
1383   unsigned TRISE1               : 1;
1384   unsigned TRISE2               : 1;
1385   unsigned TRISE3               : 1;
1386   unsigned TRISE4               : 1;
1387   unsigned TRISE5               : 1;
1388   unsigned TRISE6               : 1;
1389   unsigned TRISE7               : 1;
1390   } __TRISEbits_t;
1391 
1392 extern __at(0x0090) volatile __TRISEbits_t TRISEbits;
1393 
1394 #define _TRISE0                 0x01
1395 #define _TRISE1                 0x02
1396 #define _TRISE2                 0x04
1397 #define _TRISE3                 0x08
1398 #define _TRISE4                 0x10
1399 #define _TRISE5                 0x20
1400 #define _TRISE6                 0x40
1401 #define _TRISE7                 0x80
1402 
1403 //==============================================================================
1404 
1405 
1406 //==============================================================================
1407 //        PIE1 Bits
1408 
1409 extern __at(0x0091) __sfr PIE1;
1410 
1411 typedef union
1412   {
1413   struct
1414     {
1415     unsigned TMR1IE             : 1;
1416     unsigned TMR2IE             : 1;
1417     unsigned CCP1IE             : 1;
1418     unsigned SSP1IE             : 1;
1419     unsigned TX1IE              : 1;
1420     unsigned RC1IE              : 1;
1421     unsigned ADIE               : 1;
1422     unsigned TMR1GIE            : 1;
1423     };
1424 
1425   struct
1426     {
1427     unsigned                    : 1;
1428     unsigned                    : 1;
1429     unsigned                    : 1;
1430     unsigned SSPIE              : 1;
1431     unsigned TXIE               : 1;
1432     unsigned RCIE               : 1;
1433     unsigned                    : 1;
1434     unsigned                    : 1;
1435     };
1436   } __PIE1bits_t;
1437 
1438 extern __at(0x0091) volatile __PIE1bits_t PIE1bits;
1439 
1440 #define _TMR1IE                 0x01
1441 #define _TMR2IE                 0x02
1442 #define _CCP1IE                 0x04
1443 #define _SSP1IE                 0x08
1444 #define _SSPIE                  0x08
1445 #define _TX1IE                  0x10
1446 #define _TXIE                   0x10
1447 #define _RC1IE                  0x20
1448 #define _RCIE                   0x20
1449 #define _ADIE                   0x40
1450 #define _TMR1GIE                0x80
1451 
1452 //==============================================================================
1453 
1454 
1455 //==============================================================================
1456 //        PIE2 Bits
1457 
1458 extern __at(0x0092) __sfr PIE2;
1459 
1460 typedef struct
1461   {
1462   unsigned CCP2IE               : 1;
1463   unsigned C3IE                 : 1;
1464   unsigned LCDIE                : 1;
1465   unsigned BCLIE                : 1;
1466   unsigned EEIE                 : 1;
1467   unsigned C1IE                 : 1;
1468   unsigned C2IE                 : 1;
1469   unsigned OSFIE                : 1;
1470   } __PIE2bits_t;
1471 
1472 extern __at(0x0092) volatile __PIE2bits_t PIE2bits;
1473 
1474 #define _CCP2IE                 0x01
1475 #define _C3IE                   0x02
1476 #define _LCDIE                  0x04
1477 #define _BCLIE                  0x08
1478 #define _EEIE                   0x10
1479 #define _C1IE                   0x20
1480 #define _C2IE                   0x40
1481 #define _OSFIE                  0x80
1482 
1483 //==============================================================================
1484 
1485 
1486 //==============================================================================
1487 //        PIE3 Bits
1488 
1489 extern __at(0x0093) __sfr PIE3;
1490 
1491 typedef struct
1492   {
1493   unsigned                      : 1;
1494   unsigned TMR4IE               : 1;
1495   unsigned                      : 1;
1496   unsigned TMR6IE               : 1;
1497   unsigned CCP3IE               : 1;
1498   unsigned CCP4IE               : 1;
1499   unsigned CCP5IE               : 1;
1500   unsigned                      : 1;
1501   } __PIE3bits_t;
1502 
1503 extern __at(0x0093) volatile __PIE3bits_t PIE3bits;
1504 
1505 #define _TMR4IE                 0x02
1506 #define _TMR6IE                 0x08
1507 #define _CCP3IE                 0x10
1508 #define _CCP4IE                 0x20
1509 #define _CCP5IE                 0x40
1510 
1511 //==============================================================================
1512 
1513 
1514 //==============================================================================
1515 //        PIE4 Bits
1516 
1517 extern __at(0x0094) __sfr PIE4;
1518 
1519 typedef struct
1520   {
1521   unsigned SSP2IE               : 1;
1522   unsigned BCL2IE               : 1;
1523   unsigned                      : 1;
1524   unsigned                      : 1;
1525   unsigned TX2IE                : 1;
1526   unsigned RC2IE                : 1;
1527   unsigned                      : 1;
1528   unsigned                      : 1;
1529   } __PIE4bits_t;
1530 
1531 extern __at(0x0094) volatile __PIE4bits_t PIE4bits;
1532 
1533 #define _SSP2IE                 0x01
1534 #define _BCL2IE                 0x02
1535 #define _TX2IE                  0x10
1536 #define _RC2IE                  0x20
1537 
1538 //==============================================================================
1539 
1540 
1541 //==============================================================================
1542 //        OPTION_REG Bits
1543 
1544 extern __at(0x0095) __sfr OPTION_REG;
1545 
1546 typedef union
1547   {
1548   struct
1549     {
1550     unsigned PS0                : 1;
1551     unsigned PS1                : 1;
1552     unsigned PS2                : 1;
1553     unsigned PSA                : 1;
1554     unsigned T0SE               : 1;
1555     unsigned T0CS               : 1;
1556     unsigned INTEDG             : 1;
1557     unsigned NOT_WPUEN          : 1;
1558     };
1559 
1560   struct
1561     {
1562     unsigned                    : 1;
1563     unsigned                    : 1;
1564     unsigned                    : 1;
1565     unsigned                    : 1;
1566     unsigned TMR0SE             : 1;
1567     unsigned TMR0CS             : 1;
1568     unsigned                    : 1;
1569     unsigned                    : 1;
1570     };
1571 
1572   struct
1573     {
1574     unsigned PS                 : 3;
1575     unsigned                    : 5;
1576     };
1577   } __OPTION_REGbits_t;
1578 
1579 extern __at(0x0095) volatile __OPTION_REGbits_t OPTION_REGbits;
1580 
1581 #define _PS0                    0x01
1582 #define _PS1                    0x02
1583 #define _PS2                    0x04
1584 #define _PSA                    0x08
1585 #define _T0SE                   0x10
1586 #define _TMR0SE                 0x10
1587 #define _T0CS                   0x20
1588 #define _TMR0CS                 0x20
1589 #define _INTEDG                 0x40
1590 #define _NOT_WPUEN              0x80
1591 
1592 //==============================================================================
1593 
1594 
1595 //==============================================================================
1596 //        PCON Bits
1597 
1598 extern __at(0x0096) __sfr PCON;
1599 
1600 typedef struct
1601   {
1602   unsigned NOT_BOR              : 1;
1603   unsigned NOT_POR              : 1;
1604   unsigned NOT_RI               : 1;
1605   unsigned NOT_RMCLR            : 1;
1606   unsigned                      : 1;
1607   unsigned                      : 1;
1608   unsigned STKUNF               : 1;
1609   unsigned STKOVF               : 1;
1610   } __PCONbits_t;
1611 
1612 extern __at(0x0096) volatile __PCONbits_t PCONbits;
1613 
1614 #define _NOT_BOR                0x01
1615 #define _NOT_POR                0x02
1616 #define _NOT_RI                 0x04
1617 #define _NOT_RMCLR              0x08
1618 #define _STKUNF                 0x40
1619 #define _STKOVF                 0x80
1620 
1621 //==============================================================================
1622 
1623 
1624 //==============================================================================
1625 //        WDTCON Bits
1626 
1627 extern __at(0x0097) __sfr WDTCON;
1628 
1629 typedef union
1630   {
1631   struct
1632     {
1633     unsigned SWDTEN             : 1;
1634     unsigned WDTPS0             : 1;
1635     unsigned WDTPS1             : 1;
1636     unsigned WDTPS2             : 1;
1637     unsigned WDTPS3             : 1;
1638     unsigned WDTPS4             : 1;
1639     unsigned                    : 1;
1640     unsigned                    : 1;
1641     };
1642 
1643   struct
1644     {
1645     unsigned                    : 1;
1646     unsigned WDTPS              : 5;
1647     unsigned                    : 2;
1648     };
1649   } __WDTCONbits_t;
1650 
1651 extern __at(0x0097) volatile __WDTCONbits_t WDTCONbits;
1652 
1653 #define _SWDTEN                 0x01
1654 #define _WDTPS0                 0x02
1655 #define _WDTPS1                 0x04
1656 #define _WDTPS2                 0x08
1657 #define _WDTPS3                 0x10
1658 #define _WDTPS4                 0x20
1659 
1660 //==============================================================================
1661 
1662 
1663 //==============================================================================
1664 //        OSCTUNE Bits
1665 
1666 extern __at(0x0098) __sfr OSCTUNE;
1667 
1668 typedef union
1669   {
1670   struct
1671     {
1672     unsigned TUN0               : 1;
1673     unsigned TUN1               : 1;
1674     unsigned TUN2               : 1;
1675     unsigned TUN3               : 1;
1676     unsigned TUN4               : 1;
1677     unsigned TUN5               : 1;
1678     unsigned                    : 1;
1679     unsigned                    : 1;
1680     };
1681 
1682   struct
1683     {
1684     unsigned TUN                : 6;
1685     unsigned                    : 2;
1686     };
1687   } __OSCTUNEbits_t;
1688 
1689 extern __at(0x0098) volatile __OSCTUNEbits_t OSCTUNEbits;
1690 
1691 #define _TUN0                   0x01
1692 #define _TUN1                   0x02
1693 #define _TUN2                   0x04
1694 #define _TUN3                   0x08
1695 #define _TUN4                   0x10
1696 #define _TUN5                   0x20
1697 
1698 //==============================================================================
1699 
1700 
1701 //==============================================================================
1702 //        OSCCON Bits
1703 
1704 extern __at(0x0099) __sfr OSCCON;
1705 
1706 typedef union
1707   {
1708   struct
1709     {
1710     unsigned SCS0               : 1;
1711     unsigned SCS1               : 1;
1712     unsigned                    : 1;
1713     unsigned IRCF0              : 1;
1714     unsigned IRCF1              : 1;
1715     unsigned IRCF2              : 1;
1716     unsigned IRCF3              : 1;
1717     unsigned SPLLEN             : 1;
1718     };
1719 
1720   struct
1721     {
1722     unsigned SCS                : 2;
1723     unsigned                    : 6;
1724     };
1725 
1726   struct
1727     {
1728     unsigned                    : 3;
1729     unsigned IRCF               : 4;
1730     unsigned                    : 1;
1731     };
1732   } __OSCCONbits_t;
1733 
1734 extern __at(0x0099) volatile __OSCCONbits_t OSCCONbits;
1735 
1736 #define _SCS0                   0x01
1737 #define _SCS1                   0x02
1738 #define _IRCF0                  0x08
1739 #define _IRCF1                  0x10
1740 #define _IRCF2                  0x20
1741 #define _IRCF3                  0x40
1742 #define _SPLLEN                 0x80
1743 
1744 //==============================================================================
1745 
1746 
1747 //==============================================================================
1748 //        OSCSTAT Bits
1749 
1750 extern __at(0x009A) __sfr OSCSTAT;
1751 
1752 typedef struct
1753   {
1754   unsigned HFIOFS               : 1;
1755   unsigned LFIOFR               : 1;
1756   unsigned MFIOFR               : 1;
1757   unsigned HFIOFL               : 1;
1758   unsigned HFIOFR               : 1;
1759   unsigned OSTS                 : 1;
1760   unsigned PLLR                 : 1;
1761   unsigned T1OSCR               : 1;
1762   } __OSCSTATbits_t;
1763 
1764 extern __at(0x009A) volatile __OSCSTATbits_t OSCSTATbits;
1765 
1766 #define _HFIOFS                 0x01
1767 #define _LFIOFR                 0x02
1768 #define _MFIOFR                 0x04
1769 #define _HFIOFL                 0x08
1770 #define _HFIOFR                 0x10
1771 #define _OSTS                   0x20
1772 #define _PLLR                   0x40
1773 #define _T1OSCR                 0x80
1774 
1775 //==============================================================================
1776 
1777 extern __at(0x009B) __sfr ADRES;
1778 extern __at(0x009B) __sfr ADRESL;
1779 extern __at(0x009C) __sfr ADRESH;
1780 
1781 //==============================================================================
1782 //        ADCON0 Bits
1783 
1784 extern __at(0x009D) __sfr ADCON0;
1785 
1786 typedef union
1787   {
1788   struct
1789     {
1790     unsigned ADON               : 1;
1791     unsigned GO_NOT_DONE        : 1;
1792     unsigned CHS0               : 1;
1793     unsigned CHS1               : 1;
1794     unsigned CHS2               : 1;
1795     unsigned CHS3               : 1;
1796     unsigned CHS4               : 1;
1797     unsigned                    : 1;
1798     };
1799 
1800   struct
1801     {
1802     unsigned                    : 1;
1803     unsigned ADGO               : 1;
1804     unsigned                    : 1;
1805     unsigned                    : 1;
1806     unsigned                    : 1;
1807     unsigned                    : 1;
1808     unsigned                    : 1;
1809     unsigned                    : 1;
1810     };
1811 
1812   struct
1813     {
1814     unsigned                    : 1;
1815     unsigned GO                 : 1;
1816     unsigned                    : 1;
1817     unsigned                    : 1;
1818     unsigned                    : 1;
1819     unsigned                    : 1;
1820     unsigned                    : 1;
1821     unsigned                    : 1;
1822     };
1823 
1824   struct
1825     {
1826     unsigned                    : 1;
1827     unsigned NOT_DONE           : 1;
1828     unsigned                    : 1;
1829     unsigned                    : 1;
1830     unsigned                    : 1;
1831     unsigned                    : 1;
1832     unsigned                    : 1;
1833     unsigned                    : 1;
1834     };
1835 
1836   struct
1837     {
1838     unsigned                    : 2;
1839     unsigned CHS                : 5;
1840     unsigned                    : 1;
1841     };
1842   } __ADCON0bits_t;
1843 
1844 extern __at(0x009D) volatile __ADCON0bits_t ADCON0bits;
1845 
1846 #define _ADON                   0x01
1847 #define _GO_NOT_DONE            0x02
1848 #define _ADGO                   0x02
1849 #define _GO                     0x02
1850 #define _NOT_DONE               0x02
1851 #define _CHS0                   0x04
1852 #define _CHS1                   0x08
1853 #define _CHS2                   0x10
1854 #define _CHS3                   0x20
1855 #define _CHS4                   0x40
1856 
1857 //==============================================================================
1858 
1859 
1860 //==============================================================================
1861 //        ADCON1 Bits
1862 
1863 extern __at(0x009E) __sfr ADCON1;
1864 
1865 typedef union
1866   {
1867   struct
1868     {
1869     unsigned ADPREF0            : 1;
1870     unsigned ADPREF1            : 1;
1871     unsigned ADNREF             : 1;
1872     unsigned                    : 1;
1873     unsigned ADCS0              : 1;
1874     unsigned ADCS1              : 1;
1875     unsigned ADCS2              : 1;
1876     unsigned ADFM               : 1;
1877     };
1878 
1879   struct
1880     {
1881     unsigned ADPREF             : 2;
1882     unsigned                    : 6;
1883     };
1884 
1885   struct
1886     {
1887     unsigned                    : 4;
1888     unsigned ADCS               : 3;
1889     unsigned                    : 1;
1890     };
1891   } __ADCON1bits_t;
1892 
1893 extern __at(0x009E) volatile __ADCON1bits_t ADCON1bits;
1894 
1895 #define _ADPREF0                0x01
1896 #define _ADPREF1                0x02
1897 #define _ADNREF                 0x04
1898 #define _ADCS0                  0x10
1899 #define _ADCS1                  0x20
1900 #define _ADCS2                  0x40
1901 #define _ADFM                   0x80
1902 
1903 //==============================================================================
1904 
1905 
1906 //==============================================================================
1907 //        LATA Bits
1908 
1909 extern __at(0x010C) __sfr LATA;
1910 
1911 typedef struct
1912   {
1913   unsigned LATA0                : 1;
1914   unsigned LATA1                : 1;
1915   unsigned LATA2                : 1;
1916   unsigned LATA3                : 1;
1917   unsigned LATA4                : 1;
1918   unsigned LATA5                : 1;
1919   unsigned LATA6                : 1;
1920   unsigned LATA7                : 1;
1921   } __LATAbits_t;
1922 
1923 extern __at(0x010C) volatile __LATAbits_t LATAbits;
1924 
1925 #define _LATA0                  0x01
1926 #define _LATA1                  0x02
1927 #define _LATA2                  0x04
1928 #define _LATA3                  0x08
1929 #define _LATA4                  0x10
1930 #define _LATA5                  0x20
1931 #define _LATA6                  0x40
1932 #define _LATA7                  0x80
1933 
1934 //==============================================================================
1935 
1936 
1937 //==============================================================================
1938 //        LATB Bits
1939 
1940 extern __at(0x010D) __sfr LATB;
1941 
1942 typedef struct
1943   {
1944   unsigned LATB0                : 1;
1945   unsigned LATB1                : 1;
1946   unsigned LATB2                : 1;
1947   unsigned LATB3                : 1;
1948   unsigned LATB4                : 1;
1949   unsigned LATB5                : 1;
1950   unsigned LATB6                : 1;
1951   unsigned LATB7                : 1;
1952   } __LATBbits_t;
1953 
1954 extern __at(0x010D) volatile __LATBbits_t LATBbits;
1955 
1956 #define _LATB0                  0x01
1957 #define _LATB1                  0x02
1958 #define _LATB2                  0x04
1959 #define _LATB3                  0x08
1960 #define _LATB4                  0x10
1961 #define _LATB5                  0x20
1962 #define _LATB6                  0x40
1963 #define _LATB7                  0x80
1964 
1965 //==============================================================================
1966 
1967 
1968 //==============================================================================
1969 //        LATC Bits
1970 
1971 extern __at(0x010E) __sfr LATC;
1972 
1973 typedef struct
1974   {
1975   unsigned LATC0                : 1;
1976   unsigned LATC1                : 1;
1977   unsigned LATC2                : 1;
1978   unsigned LATC3                : 1;
1979   unsigned LATC4                : 1;
1980   unsigned LATC5                : 1;
1981   unsigned LATC6                : 1;
1982   unsigned LATC7                : 1;
1983   } __LATCbits_t;
1984 
1985 extern __at(0x010E) volatile __LATCbits_t LATCbits;
1986 
1987 #define _LATC0                  0x01
1988 #define _LATC1                  0x02
1989 #define _LATC2                  0x04
1990 #define _LATC3                  0x08
1991 #define _LATC4                  0x10
1992 #define _LATC5                  0x20
1993 #define _LATC6                  0x40
1994 #define _LATC7                  0x80
1995 
1996 //==============================================================================
1997 
1998 
1999 //==============================================================================
2000 //        LATD Bits
2001 
2002 extern __at(0x010F) __sfr LATD;
2003 
2004 typedef struct
2005   {
2006   unsigned LATD0                : 1;
2007   unsigned LATD1                : 1;
2008   unsigned LATD2                : 1;
2009   unsigned LATD3                : 1;
2010   unsigned LATD4                : 1;
2011   unsigned LATD5                : 1;
2012   unsigned LATD6                : 1;
2013   unsigned LATD7                : 1;
2014   } __LATDbits_t;
2015 
2016 extern __at(0x010F) volatile __LATDbits_t LATDbits;
2017 
2018 #define _LATD0                  0x01
2019 #define _LATD1                  0x02
2020 #define _LATD2                  0x04
2021 #define _LATD3                  0x08
2022 #define _LATD4                  0x10
2023 #define _LATD5                  0x20
2024 #define _LATD6                  0x40
2025 #define _LATD7                  0x80
2026 
2027 //==============================================================================
2028 
2029 
2030 //==============================================================================
2031 //        LATE Bits
2032 
2033 extern __at(0x0110) __sfr LATE;
2034 
2035 typedef struct
2036   {
2037   unsigned LATE0                : 1;
2038   unsigned LATE1                : 1;
2039   unsigned LATE2                : 1;
2040   unsigned LATE3                : 1;
2041   unsigned LATE4                : 1;
2042   unsigned LATE5                : 1;
2043   unsigned LATE6                : 1;
2044   unsigned LATE7                : 1;
2045   } __LATEbits_t;
2046 
2047 extern __at(0x0110) volatile __LATEbits_t LATEbits;
2048 
2049 #define _LATE0                  0x01
2050 #define _LATE1                  0x02
2051 #define _LATE2                  0x04
2052 #define _LATE3                  0x08
2053 #define _LATE4                  0x10
2054 #define _LATE5                  0x20
2055 #define _LATE6                  0x40
2056 #define _LATE7                  0x80
2057 
2058 //==============================================================================
2059 
2060 
2061 //==============================================================================
2062 //        CM1CON0 Bits
2063 
2064 extern __at(0x0111) __sfr CM1CON0;
2065 
2066 typedef struct
2067   {
2068   unsigned C1SYNC               : 1;
2069   unsigned C1HYS                : 1;
2070   unsigned C1SP                 : 1;
2071   unsigned                      : 1;
2072   unsigned C1POL                : 1;
2073   unsigned C1OE                 : 1;
2074   unsigned C1OUT                : 1;
2075   unsigned C1ON                 : 1;
2076   } __CM1CON0bits_t;
2077 
2078 extern __at(0x0111) volatile __CM1CON0bits_t CM1CON0bits;
2079 
2080 #define _C1SYNC                 0x01
2081 #define _C1HYS                  0x02
2082 #define _C1SP                   0x04
2083 #define _C1POL                  0x10
2084 #define _C1OE                   0x20
2085 #define _C1OUT                  0x40
2086 #define _C1ON                   0x80
2087 
2088 //==============================================================================
2089 
2090 
2091 //==============================================================================
2092 //        CM1CON1 Bits
2093 
2094 extern __at(0x0112) __sfr CM1CON1;
2095 
2096 typedef union
2097   {
2098   struct
2099     {
2100     unsigned C1NCH0             : 1;
2101     unsigned C1NCH1             : 1;
2102     unsigned                    : 1;
2103     unsigned                    : 1;
2104     unsigned C1PCH0             : 1;
2105     unsigned C1PCH1             : 1;
2106     unsigned C1INTN             : 1;
2107     unsigned C1INTP             : 1;
2108     };
2109 
2110   struct
2111     {
2112     unsigned C1NCH              : 2;
2113     unsigned                    : 6;
2114     };
2115 
2116   struct
2117     {
2118     unsigned                    : 4;
2119     unsigned C1PCH              : 2;
2120     unsigned                    : 2;
2121     };
2122   } __CM1CON1bits_t;
2123 
2124 extern __at(0x0112) volatile __CM1CON1bits_t CM1CON1bits;
2125 
2126 #define _C1NCH0                 0x01
2127 #define _C1NCH1                 0x02
2128 #define _C1PCH0                 0x10
2129 #define _C1PCH1                 0x20
2130 #define _C1INTN                 0x40
2131 #define _C1INTP                 0x80
2132 
2133 //==============================================================================
2134 
2135 
2136 //==============================================================================
2137 //        CM2CON0 Bits
2138 
2139 extern __at(0x0113) __sfr CM2CON0;
2140 
2141 typedef struct
2142   {
2143   unsigned C2SYNC               : 1;
2144   unsigned C2HYS                : 1;
2145   unsigned C2SP                 : 1;
2146   unsigned                      : 1;
2147   unsigned C2POL                : 1;
2148   unsigned C2OE                 : 1;
2149   unsigned C2OUT                : 1;
2150   unsigned C2ON                 : 1;
2151   } __CM2CON0bits_t;
2152 
2153 extern __at(0x0113) volatile __CM2CON0bits_t CM2CON0bits;
2154 
2155 #define _C2SYNC                 0x01
2156 #define _C2HYS                  0x02
2157 #define _C2SP                   0x04
2158 #define _C2POL                  0x10
2159 #define _C2OE                   0x20
2160 #define _C2OUT                  0x40
2161 #define _C2ON                   0x80
2162 
2163 //==============================================================================
2164 
2165 
2166 //==============================================================================
2167 //        CM2CON1 Bits
2168 
2169 extern __at(0x0114) __sfr CM2CON1;
2170 
2171 typedef union
2172   {
2173   struct
2174     {
2175     unsigned C2NCH0             : 1;
2176     unsigned C2NCH1             : 1;
2177     unsigned                    : 1;
2178     unsigned                    : 1;
2179     unsigned C2PCH0             : 1;
2180     unsigned C2PCH1             : 1;
2181     unsigned C2INTN             : 1;
2182     unsigned C2INTP             : 1;
2183     };
2184 
2185   struct
2186     {
2187     unsigned C2NCH              : 2;
2188     unsigned                    : 6;
2189     };
2190 
2191   struct
2192     {
2193     unsigned                    : 4;
2194     unsigned C2PCH              : 2;
2195     unsigned                    : 2;
2196     };
2197   } __CM2CON1bits_t;
2198 
2199 extern __at(0x0114) volatile __CM2CON1bits_t CM2CON1bits;
2200 
2201 #define _C2NCH0                 0x01
2202 #define _C2NCH1                 0x02
2203 #define _C2PCH0                 0x10
2204 #define _C2PCH1                 0x20
2205 #define _C2INTN                 0x40
2206 #define _C2INTP                 0x80
2207 
2208 //==============================================================================
2209 
2210 
2211 //==============================================================================
2212 //        CMOUT Bits
2213 
2214 extern __at(0x0115) __sfr CMOUT;
2215 
2216 typedef struct
2217   {
2218   unsigned MC1OUT               : 1;
2219   unsigned MC2OUT               : 1;
2220   unsigned MC3OUT               : 1;
2221   unsigned                      : 1;
2222   unsigned                      : 1;
2223   unsigned                      : 1;
2224   unsigned                      : 1;
2225   unsigned                      : 1;
2226   } __CMOUTbits_t;
2227 
2228 extern __at(0x0115) volatile __CMOUTbits_t CMOUTbits;
2229 
2230 #define _MC1OUT                 0x01
2231 #define _MC2OUT                 0x02
2232 #define _MC3OUT                 0x04
2233 
2234 //==============================================================================
2235 
2236 
2237 //==============================================================================
2238 //        BORCON Bits
2239 
2240 extern __at(0x0116) __sfr BORCON;
2241 
2242 typedef struct
2243   {
2244   unsigned BORRDY               : 1;
2245   unsigned                      : 1;
2246   unsigned                      : 1;
2247   unsigned                      : 1;
2248   unsigned                      : 1;
2249   unsigned                      : 1;
2250   unsigned                      : 1;
2251   unsigned SBOREN               : 1;
2252   } __BORCONbits_t;
2253 
2254 extern __at(0x0116) volatile __BORCONbits_t BORCONbits;
2255 
2256 #define _BORRDY                 0x01
2257 #define _SBOREN                 0x80
2258 
2259 //==============================================================================
2260 
2261 
2262 //==============================================================================
2263 //        FVRCON Bits
2264 
2265 extern __at(0x0117) __sfr FVRCON;
2266 
2267 typedef union
2268   {
2269   struct
2270     {
2271     unsigned ADFVR0             : 1;
2272     unsigned ADFVR1             : 1;
2273     unsigned CDAFVR0            : 1;
2274     unsigned CDAFVR1            : 1;
2275     unsigned TSRNG              : 1;
2276     unsigned TSEN               : 1;
2277     unsigned FVRRDY             : 1;
2278     unsigned FVREN              : 1;
2279     };
2280 
2281   struct
2282     {
2283     unsigned ADFVR              : 2;
2284     unsigned                    : 6;
2285     };
2286 
2287   struct
2288     {
2289     unsigned                    : 2;
2290     unsigned CDAFVR             : 2;
2291     unsigned                    : 4;
2292     };
2293   } __FVRCONbits_t;
2294 
2295 extern __at(0x0117) volatile __FVRCONbits_t FVRCONbits;
2296 
2297 #define _ADFVR0                 0x01
2298 #define _ADFVR1                 0x02
2299 #define _CDAFVR0                0x04
2300 #define _CDAFVR1                0x08
2301 #define _TSRNG                  0x10
2302 #define _TSEN                   0x20
2303 #define _FVRRDY                 0x40
2304 #define _FVREN                  0x80
2305 
2306 //==============================================================================
2307 
2308 
2309 //==============================================================================
2310 //        DACCON0 Bits
2311 
2312 extern __at(0x0118) __sfr DACCON0;
2313 
2314 typedef union
2315   {
2316   struct
2317     {
2318     unsigned DACNSS             : 1;
2319     unsigned                    : 1;
2320     unsigned DACPSS0            : 1;
2321     unsigned DACPSS1            : 1;
2322     unsigned                    : 1;
2323     unsigned DACOE              : 1;
2324     unsigned DACLPS             : 1;
2325     unsigned DACEN              : 1;
2326     };
2327 
2328   struct
2329     {
2330     unsigned                    : 2;
2331     unsigned DACPSS             : 2;
2332     unsigned                    : 4;
2333     };
2334   } __DACCON0bits_t;
2335 
2336 extern __at(0x0118) volatile __DACCON0bits_t DACCON0bits;
2337 
2338 #define _DACNSS                 0x01
2339 #define _DACPSS0                0x04
2340 #define _DACPSS1                0x08
2341 #define _DACOE                  0x20
2342 #define _DACLPS                 0x40
2343 #define _DACEN                  0x80
2344 
2345 //==============================================================================
2346 
2347 
2348 //==============================================================================
2349 //        DACCON1 Bits
2350 
2351 extern __at(0x0119) __sfr DACCON1;
2352 
2353 typedef union
2354   {
2355   struct
2356     {
2357     unsigned DACR0              : 1;
2358     unsigned DACR1              : 1;
2359     unsigned DACR2              : 1;
2360     unsigned DACR3              : 1;
2361     unsigned DACR4              : 1;
2362     unsigned                    : 1;
2363     unsigned                    : 1;
2364     unsigned                    : 1;
2365     };
2366 
2367   struct
2368     {
2369     unsigned DACR               : 5;
2370     unsigned                    : 3;
2371     };
2372   } __DACCON1bits_t;
2373 
2374 extern __at(0x0119) volatile __DACCON1bits_t DACCON1bits;
2375 
2376 #define _DACR0                  0x01
2377 #define _DACR1                  0x02
2378 #define _DACR2                  0x04
2379 #define _DACR3                  0x08
2380 #define _DACR4                  0x10
2381 
2382 //==============================================================================
2383 
2384 
2385 //==============================================================================
2386 //        SRCON0 Bits
2387 
2388 extern __at(0x011A) __sfr SRCON0;
2389 
2390 typedef union
2391   {
2392   struct
2393     {
2394     unsigned SRPR               : 1;
2395     unsigned SRPS               : 1;
2396     unsigned SRNQEN             : 1;
2397     unsigned SRQEN              : 1;
2398     unsigned SRCLK0             : 1;
2399     unsigned SRCLK1             : 1;
2400     unsigned SRCLK2             : 1;
2401     unsigned SRLEN              : 1;
2402     };
2403 
2404   struct
2405     {
2406     unsigned                    : 4;
2407     unsigned SRCLK              : 3;
2408     unsigned                    : 1;
2409     };
2410   } __SRCON0bits_t;
2411 
2412 extern __at(0x011A) volatile __SRCON0bits_t SRCON0bits;
2413 
2414 #define _SRPR                   0x01
2415 #define _SRPS                   0x02
2416 #define _SRNQEN                 0x04
2417 #define _SRQEN                  0x08
2418 #define _SRCLK0                 0x10
2419 #define _SRCLK1                 0x20
2420 #define _SRCLK2                 0x40
2421 #define _SRLEN                  0x80
2422 
2423 //==============================================================================
2424 
2425 
2426 //==============================================================================
2427 //        SRCON1 Bits
2428 
2429 extern __at(0x011B) __sfr SRCON1;
2430 
2431 typedef struct
2432   {
2433   unsigned SRRC1E               : 1;
2434   unsigned SRRC2E               : 1;
2435   unsigned SRRCKE               : 1;
2436   unsigned SRRPE                : 1;
2437   unsigned SRSC1E               : 1;
2438   unsigned SRSC2E               : 1;
2439   unsigned SRSCKE               : 1;
2440   unsigned SRSPE                : 1;
2441   } __SRCON1bits_t;
2442 
2443 extern __at(0x011B) volatile __SRCON1bits_t SRCON1bits;
2444 
2445 #define _SRRC1E                 0x01
2446 #define _SRRC2E                 0x02
2447 #define _SRRCKE                 0x04
2448 #define _SRRPE                  0x08
2449 #define _SRSC1E                 0x10
2450 #define _SRSC2E                 0x20
2451 #define _SRSCKE                 0x40
2452 #define _SRSPE                  0x80
2453 
2454 //==============================================================================
2455 
2456 
2457 //==============================================================================
2458 //        APFCON Bits
2459 
2460 extern __at(0x011D) __sfr APFCON;
2461 
2462 typedef struct
2463   {
2464   unsigned P1BSEL               : 1;
2465   unsigned P1CSEL               : 1;
2466   unsigned CCP2SEL              : 1;
2467   unsigned P2BSEL               : 1;
2468   unsigned P2CSEL               : 1;
2469   unsigned P2DSEL               : 1;
2470   unsigned P3BSEL               : 1;
2471   unsigned P3CSEL               : 1;
2472   } __APFCONbits_t;
2473 
2474 extern __at(0x011D) volatile __APFCONbits_t APFCONbits;
2475 
2476 #define _P1BSEL                 0x01
2477 #define _P1CSEL                 0x02
2478 #define _CCP2SEL                0x04
2479 #define _P2BSEL                 0x08
2480 #define _P2CSEL                 0x10
2481 #define _P2DSEL                 0x20
2482 #define _P3BSEL                 0x40
2483 #define _P3CSEL                 0x80
2484 
2485 //==============================================================================
2486 
2487 
2488 //==============================================================================
2489 //        CM3CON0 Bits
2490 
2491 extern __at(0x011E) __sfr CM3CON0;
2492 
2493 typedef struct
2494   {
2495   unsigned C3SYNC               : 1;
2496   unsigned C3HYS                : 1;
2497   unsigned C3SP                 : 1;
2498   unsigned                      : 1;
2499   unsigned C3POL                : 1;
2500   unsigned C3OE                 : 1;
2501   unsigned C3OUT                : 1;
2502   unsigned C3ON                 : 1;
2503   } __CM3CON0bits_t;
2504 
2505 extern __at(0x011E) volatile __CM3CON0bits_t CM3CON0bits;
2506 
2507 #define _C3SYNC                 0x01
2508 #define _C3HYS                  0x02
2509 #define _C3SP                   0x04
2510 #define _C3POL                  0x10
2511 #define _C3OE                   0x20
2512 #define _C3OUT                  0x40
2513 #define _C3ON                   0x80
2514 
2515 //==============================================================================
2516 
2517 
2518 //==============================================================================
2519 //        CM3CON1 Bits
2520 
2521 extern __at(0x011F) __sfr CM3CON1;
2522 
2523 typedef union
2524   {
2525   struct
2526     {
2527     unsigned C3NCH0             : 1;
2528     unsigned C3NCH1             : 1;
2529     unsigned                    : 1;
2530     unsigned                    : 1;
2531     unsigned C3PCH0             : 1;
2532     unsigned C3PCH1             : 1;
2533     unsigned C3INTN             : 1;
2534     unsigned C3INTP             : 1;
2535     };
2536 
2537   struct
2538     {
2539     unsigned C3NCH              : 2;
2540     unsigned                    : 6;
2541     };
2542 
2543   struct
2544     {
2545     unsigned                    : 4;
2546     unsigned C3PCH              : 2;
2547     unsigned                    : 2;
2548     };
2549   } __CM3CON1bits_t;
2550 
2551 extern __at(0x011F) volatile __CM3CON1bits_t CM3CON1bits;
2552 
2553 #define _C3NCH0                 0x01
2554 #define _C3NCH1                 0x02
2555 #define _C3PCH0                 0x10
2556 #define _C3PCH1                 0x20
2557 #define _C3INTN                 0x40
2558 #define _C3INTP                 0x80
2559 
2560 //==============================================================================
2561 
2562 
2563 //==============================================================================
2564 //        ANSELA Bits
2565 
2566 extern __at(0x018C) __sfr ANSELA;
2567 
2568 typedef struct
2569   {
2570   unsigned ANSA0                : 1;
2571   unsigned ANSA1                : 1;
2572   unsigned ANSA2                : 1;
2573   unsigned ANSA3                : 1;
2574   unsigned                      : 1;
2575   unsigned ANSA5                : 1;
2576   unsigned                      : 1;
2577   unsigned                      : 1;
2578   } __ANSELAbits_t;
2579 
2580 extern __at(0x018C) volatile __ANSELAbits_t ANSELAbits;
2581 
2582 #define _ANSA0                  0x01
2583 #define _ANSA1                  0x02
2584 #define _ANSA2                  0x04
2585 #define _ANSA3                  0x08
2586 #define _ANSA5                  0x20
2587 
2588 //==============================================================================
2589 
2590 
2591 //==============================================================================
2592 //        ANSELE Bits
2593 
2594 extern __at(0x0190) __sfr ANSELE;
2595 
2596 typedef union
2597   {
2598   struct
2599     {
2600     unsigned ANSE0              : 1;
2601     unsigned ANSE1              : 1;
2602     unsigned ANSE2              : 1;
2603     unsigned                    : 1;
2604     unsigned                    : 1;
2605     unsigned                    : 1;
2606     unsigned                    : 1;
2607     unsigned                    : 1;
2608     };
2609 
2610   struct
2611     {
2612     unsigned ANSE               : 3;
2613     unsigned                    : 5;
2614     };
2615   } __ANSELEbits_t;
2616 
2617 extern __at(0x0190) volatile __ANSELEbits_t ANSELEbits;
2618 
2619 #define _ANSE0                  0x01
2620 #define _ANSE1                  0x02
2621 #define _ANSE2                  0x04
2622 
2623 //==============================================================================
2624 
2625 extern __at(0x0191) __sfr EEADR;
2626 extern __at(0x0191) __sfr EEADRL;
2627 extern __at(0x0192) __sfr EEADRH;
2628 extern __at(0x0193) __sfr EEDAT;
2629 extern __at(0x0193) __sfr EEDATL;
2630 extern __at(0x0194) __sfr EEDATH;
2631 
2632 //==============================================================================
2633 //        EECON1 Bits
2634 
2635 extern __at(0x0195) __sfr EECON1;
2636 
2637 typedef struct
2638   {
2639   unsigned RD                   : 1;
2640   unsigned WR                   : 1;
2641   unsigned WREN                 : 1;
2642   unsigned WRERR                : 1;
2643   unsigned FREE                 : 1;
2644   unsigned LWLO                 : 1;
2645   unsigned CFGS                 : 1;
2646   unsigned EEPGD                : 1;
2647   } __EECON1bits_t;
2648 
2649 extern __at(0x0195) volatile __EECON1bits_t EECON1bits;
2650 
2651 #define _RD                     0x01
2652 #define _WR                     0x02
2653 #define _WREN                   0x04
2654 #define _WRERR                  0x08
2655 #define _FREE                   0x10
2656 #define _LWLO                   0x20
2657 #define _CFGS                   0x40
2658 #define _EEPGD                  0x80
2659 
2660 //==============================================================================
2661 
2662 extern __at(0x0196) __sfr EECON2;
2663 extern __at(0x0199) __sfr RC1REG;
2664 extern __at(0x0199) __sfr RCREG;
2665 extern __at(0x019A) __sfr TX1REG;
2666 extern __at(0x019A) __sfr TXREG;
2667 extern __at(0x019B) __sfr SP1BRG;
2668 extern __at(0x019B) __sfr SP1BRGL;
2669 extern __at(0x019B) __sfr SPBRG;
2670 extern __at(0x019B) __sfr SPBRGL;
2671 extern __at(0x019C) __sfr SP1BRGH;
2672 extern __at(0x019C) __sfr SPBRGH;
2673 
2674 //==============================================================================
2675 //        RC1STA Bits
2676 
2677 extern __at(0x019D) __sfr RC1STA;
2678 
2679 typedef struct
2680   {
2681   unsigned RX9D                 : 1;
2682   unsigned OERR                 : 1;
2683   unsigned FERR                 : 1;
2684   unsigned ADDEN                : 1;
2685   unsigned CREN                 : 1;
2686   unsigned SREN                 : 1;
2687   unsigned RX9                  : 1;
2688   unsigned SPEN                 : 1;
2689   } __RC1STAbits_t;
2690 
2691 extern __at(0x019D) volatile __RC1STAbits_t RC1STAbits;
2692 
2693 #define _RX9D                   0x01
2694 #define _OERR                   0x02
2695 #define _FERR                   0x04
2696 #define _ADDEN                  0x08
2697 #define _CREN                   0x10
2698 #define _SREN                   0x20
2699 #define _RX9                    0x40
2700 #define _SPEN                   0x80
2701 
2702 //==============================================================================
2703 
2704 
2705 //==============================================================================
2706 //        RCSTA Bits
2707 
2708 extern __at(0x019D) __sfr RCSTA;
2709 
2710 typedef struct
2711   {
2712   unsigned RX9D                 : 1;
2713   unsigned OERR                 : 1;
2714   unsigned FERR                 : 1;
2715   unsigned ADDEN                : 1;
2716   unsigned CREN                 : 1;
2717   unsigned SREN                 : 1;
2718   unsigned RX9                  : 1;
2719   unsigned SPEN                 : 1;
2720   } __RCSTAbits_t;
2721 
2722 extern __at(0x019D) volatile __RCSTAbits_t RCSTAbits;
2723 
2724 #define _RCSTA_RX9D             0x01
2725 #define _RCSTA_OERR             0x02
2726 #define _RCSTA_FERR             0x04
2727 #define _RCSTA_ADDEN            0x08
2728 #define _RCSTA_CREN             0x10
2729 #define _RCSTA_SREN             0x20
2730 #define _RCSTA_RX9              0x40
2731 #define _RCSTA_SPEN             0x80
2732 
2733 //==============================================================================
2734 
2735 
2736 //==============================================================================
2737 //        TX1STA Bits
2738 
2739 extern __at(0x019E) __sfr TX1STA;
2740 
2741 typedef struct
2742   {
2743   unsigned TX9D                 : 1;
2744   unsigned TRMT                 : 1;
2745   unsigned BRGH                 : 1;
2746   unsigned SENDB                : 1;
2747   unsigned SYNC                 : 1;
2748   unsigned TXEN                 : 1;
2749   unsigned TX9                  : 1;
2750   unsigned CSRC                 : 1;
2751   } __TX1STAbits_t;
2752 
2753 extern __at(0x019E) volatile __TX1STAbits_t TX1STAbits;
2754 
2755 #define _TX9D                   0x01
2756 #define _TRMT                   0x02
2757 #define _BRGH                   0x04
2758 #define _SENDB                  0x08
2759 #define _SYNC                   0x10
2760 #define _TXEN                   0x20
2761 #define _TX9                    0x40
2762 #define _CSRC                   0x80
2763 
2764 //==============================================================================
2765 
2766 
2767 //==============================================================================
2768 //        TXSTA Bits
2769 
2770 extern __at(0x019E) __sfr TXSTA;
2771 
2772 typedef struct
2773   {
2774   unsigned TX9D                 : 1;
2775   unsigned TRMT                 : 1;
2776   unsigned BRGH                 : 1;
2777   unsigned SENDB                : 1;
2778   unsigned SYNC                 : 1;
2779   unsigned TXEN                 : 1;
2780   unsigned TX9                  : 1;
2781   unsigned CSRC                 : 1;
2782   } __TXSTAbits_t;
2783 
2784 extern __at(0x019E) volatile __TXSTAbits_t TXSTAbits;
2785 
2786 #define _TXSTA_TX9D             0x01
2787 #define _TXSTA_TRMT             0x02
2788 #define _TXSTA_BRGH             0x04
2789 #define _TXSTA_SENDB            0x08
2790 #define _TXSTA_SYNC             0x10
2791 #define _TXSTA_TXEN             0x20
2792 #define _TXSTA_TX9              0x40
2793 #define _TXSTA_CSRC             0x80
2794 
2795 //==============================================================================
2796 
2797 
2798 //==============================================================================
2799 //        BAUD1CON Bits
2800 
2801 extern __at(0x019F) __sfr BAUD1CON;
2802 
2803 typedef struct
2804   {
2805   unsigned ABDEN                : 1;
2806   unsigned WUE                  : 1;
2807   unsigned                      : 1;
2808   unsigned BRG16                : 1;
2809   unsigned SCKP                 : 1;
2810   unsigned                      : 1;
2811   unsigned RCIDL                : 1;
2812   unsigned ABDOVF               : 1;
2813   } __BAUD1CONbits_t;
2814 
2815 extern __at(0x019F) volatile __BAUD1CONbits_t BAUD1CONbits;
2816 
2817 #define _ABDEN                  0x01
2818 #define _WUE                    0x02
2819 #define _BRG16                  0x08
2820 #define _SCKP                   0x10
2821 #define _RCIDL                  0x40
2822 #define _ABDOVF                 0x80
2823 
2824 //==============================================================================
2825 
2826 
2827 //==============================================================================
2828 //        BAUDCON Bits
2829 
2830 extern __at(0x019F) __sfr BAUDCON;
2831 
2832 typedef struct
2833   {
2834   unsigned ABDEN                : 1;
2835   unsigned WUE                  : 1;
2836   unsigned                      : 1;
2837   unsigned BRG16                : 1;
2838   unsigned SCKP                 : 1;
2839   unsigned                      : 1;
2840   unsigned RCIDL                : 1;
2841   unsigned ABDOVF               : 1;
2842   } __BAUDCONbits_t;
2843 
2844 extern __at(0x019F) volatile __BAUDCONbits_t BAUDCONbits;
2845 
2846 #define _BAUDCON_ABDEN          0x01
2847 #define _BAUDCON_WUE            0x02
2848 #define _BAUDCON_BRG16          0x08
2849 #define _BAUDCON_SCKP           0x10
2850 #define _BAUDCON_RCIDL          0x40
2851 #define _BAUDCON_ABDOVF         0x80
2852 
2853 //==============================================================================
2854 
2855 
2856 //==============================================================================
2857 //        WPUB Bits
2858 
2859 extern __at(0x020D) __sfr WPUB;
2860 
2861 typedef struct
2862   {
2863   unsigned WPUB0                : 1;
2864   unsigned WPUB1                : 1;
2865   unsigned WPUB2                : 1;
2866   unsigned WPUB3                : 1;
2867   unsigned WPUB4                : 1;
2868   unsigned WPUB5                : 1;
2869   unsigned WPUB6                : 1;
2870   unsigned WPUB7                : 1;
2871   } __WPUBbits_t;
2872 
2873 extern __at(0x020D) volatile __WPUBbits_t WPUBbits;
2874 
2875 #define _WPUB0                  0x01
2876 #define _WPUB1                  0x02
2877 #define _WPUB2                  0x04
2878 #define _WPUB3                  0x08
2879 #define _WPUB4                  0x10
2880 #define _WPUB5                  0x20
2881 #define _WPUB6                  0x40
2882 #define _WPUB7                  0x80
2883 
2884 //==============================================================================
2885 
2886 extern __at(0x0211) __sfr SSP1BUF;
2887 extern __at(0x0211) __sfr SSPBUF;
2888 extern __at(0x0212) __sfr SSP1ADD;
2889 extern __at(0x0212) __sfr SSPADD;
2890 extern __at(0x0213) __sfr SSP1MSK;
2891 extern __at(0x0213) __sfr SSPMSK;
2892 
2893 //==============================================================================
2894 //        SSP1STAT Bits
2895 
2896 extern __at(0x0214) __sfr SSP1STAT;
2897 
2898 typedef struct
2899   {
2900   unsigned BF                   : 1;
2901   unsigned UA                   : 1;
2902   unsigned R_NOT_W              : 1;
2903   unsigned S                    : 1;
2904   unsigned P                    : 1;
2905   unsigned D_NOT_A              : 1;
2906   unsigned CKE                  : 1;
2907   unsigned SMP                  : 1;
2908   } __SSP1STATbits_t;
2909 
2910 extern __at(0x0214) volatile __SSP1STATbits_t SSP1STATbits;
2911 
2912 #define _BF                     0x01
2913 #define _UA                     0x02
2914 #define _R_NOT_W                0x04
2915 #define _S                      0x08
2916 #define _P                      0x10
2917 #define _D_NOT_A                0x20
2918 #define _CKE                    0x40
2919 #define _SMP                    0x80
2920 
2921 //==============================================================================
2922 
2923 
2924 //==============================================================================
2925 //        SSPSTAT Bits
2926 
2927 extern __at(0x0214) __sfr SSPSTAT;
2928 
2929 typedef struct
2930   {
2931   unsigned BF                   : 1;
2932   unsigned UA                   : 1;
2933   unsigned R_NOT_W              : 1;
2934   unsigned S                    : 1;
2935   unsigned P                    : 1;
2936   unsigned D_NOT_A              : 1;
2937   unsigned CKE                  : 1;
2938   unsigned SMP                  : 1;
2939   } __SSPSTATbits_t;
2940 
2941 extern __at(0x0214) volatile __SSPSTATbits_t SSPSTATbits;
2942 
2943 #define _SSPSTAT_BF             0x01
2944 #define _SSPSTAT_UA             0x02
2945 #define _SSPSTAT_R_NOT_W        0x04
2946 #define _SSPSTAT_S              0x08
2947 #define _SSPSTAT_P              0x10
2948 #define _SSPSTAT_D_NOT_A        0x20
2949 #define _SSPSTAT_CKE            0x40
2950 #define _SSPSTAT_SMP            0x80
2951 
2952 //==============================================================================
2953 
2954 
2955 //==============================================================================
2956 //        SSP1CON1 Bits
2957 
2958 extern __at(0x0215) __sfr SSP1CON1;
2959 
2960 typedef union
2961   {
2962   struct
2963     {
2964     unsigned SSPM0              : 1;
2965     unsigned SSPM1              : 1;
2966     unsigned SSPM2              : 1;
2967     unsigned SSPM3              : 1;
2968     unsigned CKP                : 1;
2969     unsigned SSPEN              : 1;
2970     unsigned SSPOV              : 1;
2971     unsigned WCOL               : 1;
2972     };
2973 
2974   struct
2975     {
2976     unsigned SSPM               : 4;
2977     unsigned                    : 4;
2978     };
2979   } __SSP1CON1bits_t;
2980 
2981 extern __at(0x0215) volatile __SSP1CON1bits_t SSP1CON1bits;
2982 
2983 #define _SSPM0                  0x01
2984 #define _SSPM1                  0x02
2985 #define _SSPM2                  0x04
2986 #define _SSPM3                  0x08
2987 #define _CKP                    0x10
2988 #define _SSPEN                  0x20
2989 #define _SSPOV                  0x40
2990 #define _WCOL                   0x80
2991 
2992 //==============================================================================
2993 
2994 
2995 //==============================================================================
2996 //        SSPCON Bits
2997 
2998 extern __at(0x0215) __sfr SSPCON;
2999 
3000 typedef union
3001   {
3002   struct
3003     {
3004     unsigned SSPM0              : 1;
3005     unsigned SSPM1              : 1;
3006     unsigned SSPM2              : 1;
3007     unsigned SSPM3              : 1;
3008     unsigned CKP                : 1;
3009     unsigned SSPEN              : 1;
3010     unsigned SSPOV              : 1;
3011     unsigned WCOL               : 1;
3012     };
3013 
3014   struct
3015     {
3016     unsigned SSPM               : 4;
3017     unsigned                    : 4;
3018     };
3019   } __SSPCONbits_t;
3020 
3021 extern __at(0x0215) volatile __SSPCONbits_t SSPCONbits;
3022 
3023 #define _SSPCON_SSPM0           0x01
3024 #define _SSPCON_SSPM1           0x02
3025 #define _SSPCON_SSPM2           0x04
3026 #define _SSPCON_SSPM3           0x08
3027 #define _SSPCON_CKP             0x10
3028 #define _SSPCON_SSPEN           0x20
3029 #define _SSPCON_SSPOV           0x40
3030 #define _SSPCON_WCOL            0x80
3031 
3032 //==============================================================================
3033 
3034 
3035 //==============================================================================
3036 //        SSPCON1 Bits
3037 
3038 extern __at(0x0215) __sfr SSPCON1;
3039 
3040 typedef union
3041   {
3042   struct
3043     {
3044     unsigned SSPM0              : 1;
3045     unsigned SSPM1              : 1;
3046     unsigned SSPM2              : 1;
3047     unsigned SSPM3              : 1;
3048     unsigned CKP                : 1;
3049     unsigned SSPEN              : 1;
3050     unsigned SSPOV              : 1;
3051     unsigned WCOL               : 1;
3052     };
3053 
3054   struct
3055     {
3056     unsigned SSPM               : 4;
3057     unsigned                    : 4;
3058     };
3059   } __SSPCON1bits_t;
3060 
3061 extern __at(0x0215) volatile __SSPCON1bits_t SSPCON1bits;
3062 
3063 #define _SSPCON1_SSPM0          0x01
3064 #define _SSPCON1_SSPM1          0x02
3065 #define _SSPCON1_SSPM2          0x04
3066 #define _SSPCON1_SSPM3          0x08
3067 #define _SSPCON1_CKP            0x10
3068 #define _SSPCON1_SSPEN          0x20
3069 #define _SSPCON1_SSPOV          0x40
3070 #define _SSPCON1_WCOL           0x80
3071 
3072 //==============================================================================
3073 
3074 
3075 //==============================================================================
3076 //        SSP1CON2 Bits
3077 
3078 extern __at(0x0216) __sfr SSP1CON2;
3079 
3080 typedef struct
3081   {
3082   unsigned SEN                  : 1;
3083   unsigned RSEN                 : 1;
3084   unsigned PEN                  : 1;
3085   unsigned RCEN                 : 1;
3086   unsigned ACKEN                : 1;
3087   unsigned ACKDT                : 1;
3088   unsigned ACKSTAT              : 1;
3089   unsigned GCEN                 : 1;
3090   } __SSP1CON2bits_t;
3091 
3092 extern __at(0x0216) volatile __SSP1CON2bits_t SSP1CON2bits;
3093 
3094 #define _SEN                    0x01
3095 #define _RSEN                   0x02
3096 #define _PEN                    0x04
3097 #define _RCEN                   0x08
3098 #define _ACKEN                  0x10
3099 #define _ACKDT                  0x20
3100 #define _ACKSTAT                0x40
3101 #define _GCEN                   0x80
3102 
3103 //==============================================================================
3104 
3105 
3106 //==============================================================================
3107 //        SSPCON2 Bits
3108 
3109 extern __at(0x0216) __sfr SSPCON2;
3110 
3111 typedef struct
3112   {
3113   unsigned SEN                  : 1;
3114   unsigned RSEN                 : 1;
3115   unsigned PEN                  : 1;
3116   unsigned RCEN                 : 1;
3117   unsigned ACKEN                : 1;
3118   unsigned ACKDT                : 1;
3119   unsigned ACKSTAT              : 1;
3120   unsigned GCEN                 : 1;
3121   } __SSPCON2bits_t;
3122 
3123 extern __at(0x0216) volatile __SSPCON2bits_t SSPCON2bits;
3124 
3125 #define _SSPCON2_SEN            0x01
3126 #define _SSPCON2_RSEN           0x02
3127 #define _SSPCON2_PEN            0x04
3128 #define _SSPCON2_RCEN           0x08
3129 #define _SSPCON2_ACKEN          0x10
3130 #define _SSPCON2_ACKDT          0x20
3131 #define _SSPCON2_ACKSTAT        0x40
3132 #define _SSPCON2_GCEN           0x80
3133 
3134 //==============================================================================
3135 
3136 
3137 //==============================================================================
3138 //        SSP1CON3 Bits
3139 
3140 extern __at(0x0217) __sfr SSP1CON3;
3141 
3142 typedef struct
3143   {
3144   unsigned DHEN                 : 1;
3145   unsigned AHEN                 : 1;
3146   unsigned SBCDE                : 1;
3147   unsigned SDAHT                : 1;
3148   unsigned BOEN                 : 1;
3149   unsigned SCIE                 : 1;
3150   unsigned PCIE                 : 1;
3151   unsigned ACKTIM               : 1;
3152   } __SSP1CON3bits_t;
3153 
3154 extern __at(0x0217) volatile __SSP1CON3bits_t SSP1CON3bits;
3155 
3156 #define _DHEN                   0x01
3157 #define _AHEN                   0x02
3158 #define _SBCDE                  0x04
3159 #define _SDAHT                  0x08
3160 #define _BOEN                   0x10
3161 #define _SCIE                   0x20
3162 #define _PCIE                   0x40
3163 #define _ACKTIM                 0x80
3164 
3165 //==============================================================================
3166 
3167 
3168 //==============================================================================
3169 //        SSPCON3 Bits
3170 
3171 extern __at(0x0217) __sfr SSPCON3;
3172 
3173 typedef struct
3174   {
3175   unsigned DHEN                 : 1;
3176   unsigned AHEN                 : 1;
3177   unsigned SBCDE                : 1;
3178   unsigned SDAHT                : 1;
3179   unsigned BOEN                 : 1;
3180   unsigned SCIE                 : 1;
3181   unsigned PCIE                 : 1;
3182   unsigned ACKTIM               : 1;
3183   } __SSPCON3bits_t;
3184 
3185 extern __at(0x0217) volatile __SSPCON3bits_t SSPCON3bits;
3186 
3187 #define _SSPCON3_DHEN           0x01
3188 #define _SSPCON3_AHEN           0x02
3189 #define _SSPCON3_SBCDE          0x04
3190 #define _SSPCON3_SDAHT          0x08
3191 #define _SSPCON3_BOEN           0x10
3192 #define _SSPCON3_SCIE           0x20
3193 #define _SSPCON3_PCIE           0x40
3194 #define _SSPCON3_ACKTIM         0x80
3195 
3196 //==============================================================================
3197 
3198 extern __at(0x0219) __sfr SSP2BUF;
3199 extern __at(0x021A) __sfr SSP2ADD;
3200 extern __at(0x021B) __sfr SSP2MSK;
3201 
3202 //==============================================================================
3203 //        SSP2STAT Bits
3204 
3205 extern __at(0x021C) __sfr SSP2STAT;
3206 
3207 typedef struct
3208   {
3209   unsigned BF                   : 1;
3210   unsigned UA                   : 1;
3211   unsigned R_NOT_W              : 1;
3212   unsigned S                    : 1;
3213   unsigned P                    : 1;
3214   unsigned D_NOT_A              : 1;
3215   unsigned CKE                  : 1;
3216   unsigned SMP                  : 1;
3217   } __SSP2STATbits_t;
3218 
3219 extern __at(0x021C) volatile __SSP2STATbits_t SSP2STATbits;
3220 
3221 #define _SSP2STAT_BF            0x01
3222 #define _SSP2STAT_UA            0x02
3223 #define _SSP2STAT_R_NOT_W       0x04
3224 #define _SSP2STAT_S             0x08
3225 #define _SSP2STAT_P             0x10
3226 #define _SSP2STAT_D_NOT_A       0x20
3227 #define _SSP2STAT_CKE           0x40
3228 #define _SSP2STAT_SMP           0x80
3229 
3230 //==============================================================================
3231 
3232 
3233 //==============================================================================
3234 //        SSP2CON1 Bits
3235 
3236 extern __at(0x021D) __sfr SSP2CON1;
3237 
3238 typedef union
3239   {
3240   struct
3241     {
3242     unsigned SSPM0              : 1;
3243     unsigned SSPM1              : 1;
3244     unsigned SSPM2              : 1;
3245     unsigned SSPM3              : 1;
3246     unsigned CKP                : 1;
3247     unsigned SSPEN              : 1;
3248     unsigned SSPOV              : 1;
3249     unsigned WCOL               : 1;
3250     };
3251 
3252   struct
3253     {
3254     unsigned SSPM               : 4;
3255     unsigned                    : 4;
3256     };
3257   } __SSP2CON1bits_t;
3258 
3259 extern __at(0x021D) volatile __SSP2CON1bits_t SSP2CON1bits;
3260 
3261 #define _SSP2CON1_SSPM0         0x01
3262 #define _SSP2CON1_SSPM1         0x02
3263 #define _SSP2CON1_SSPM2         0x04
3264 #define _SSP2CON1_SSPM3         0x08
3265 #define _SSP2CON1_CKP           0x10
3266 #define _SSP2CON1_SSPEN         0x20
3267 #define _SSP2CON1_SSPOV         0x40
3268 #define _SSP2CON1_WCOL          0x80
3269 
3270 //==============================================================================
3271 
3272 
3273 //==============================================================================
3274 //        SSP2CON2 Bits
3275 
3276 extern __at(0x021E) __sfr SSP2CON2;
3277 
3278 typedef struct
3279   {
3280   unsigned SEN                  : 1;
3281   unsigned RSEN                 : 1;
3282   unsigned PEN                  : 1;
3283   unsigned RCEN                 : 1;
3284   unsigned ACKEN                : 1;
3285   unsigned ACKDT                : 1;
3286   unsigned ACKSTAT              : 1;
3287   unsigned GCEN                 : 1;
3288   } __SSP2CON2bits_t;
3289 
3290 extern __at(0x021E) volatile __SSP2CON2bits_t SSP2CON2bits;
3291 
3292 #define _SSP2CON2_SEN           0x01
3293 #define _SSP2CON2_RSEN          0x02
3294 #define _SSP2CON2_PEN           0x04
3295 #define _SSP2CON2_RCEN          0x08
3296 #define _SSP2CON2_ACKEN         0x10
3297 #define _SSP2CON2_ACKDT         0x20
3298 #define _SSP2CON2_ACKSTAT       0x40
3299 #define _SSP2CON2_GCEN          0x80
3300 
3301 //==============================================================================
3302 
3303 
3304 //==============================================================================
3305 //        SSP2CON3 Bits
3306 
3307 extern __at(0x021F) __sfr SSP2CON3;
3308 
3309 typedef struct
3310   {
3311   unsigned DHEN                 : 1;
3312   unsigned AHEN                 : 1;
3313   unsigned SBCDE                : 1;
3314   unsigned SDAHT                : 1;
3315   unsigned BOEN                 : 1;
3316   unsigned SCIE                 : 1;
3317   unsigned PCIE                 : 1;
3318   unsigned ACKTIM               : 1;
3319   } __SSP2CON3bits_t;
3320 
3321 extern __at(0x021F) volatile __SSP2CON3bits_t SSP2CON3bits;
3322 
3323 #define _SSP2CON3_DHEN          0x01
3324 #define _SSP2CON3_AHEN          0x02
3325 #define _SSP2CON3_SBCDE         0x04
3326 #define _SSP2CON3_SDAHT         0x08
3327 #define _SSP2CON3_BOEN          0x10
3328 #define _SSP2CON3_SCIE          0x20
3329 #define _SSP2CON3_PCIE          0x40
3330 #define _SSP2CON3_ACKTIM        0x80
3331 
3332 //==============================================================================
3333 
3334 
3335 //==============================================================================
3336 //        PORTF Bits
3337 
3338 extern __at(0x028C) __sfr PORTF;
3339 
3340 typedef union
3341   {
3342   struct
3343     {
3344     unsigned RF0                : 1;
3345     unsigned RF1                : 1;
3346     unsigned RF2                : 1;
3347     unsigned RF3                : 1;
3348     unsigned RF4                : 1;
3349     unsigned RF5                : 1;
3350     unsigned RF6                : 1;
3351     unsigned RF7                : 1;
3352     };
3353 
3354   struct
3355     {
3356     unsigned AN16               : 1;
3357     unsigned AN6                : 1;
3358     unsigned AN7                : 1;
3359     unsigned AN8                : 1;
3360     unsigned AN9                : 1;
3361     unsigned AN10               : 1;
3362     unsigned AN11               : 1;
3363     unsigned AN5                : 1;
3364     };
3365 
3366   struct
3367     {
3368     unsigned SEG41              : 1;
3369     unsigned SEG19              : 1;
3370     unsigned SEG20              : 1;
3371     unsigned SEG21              : 1;
3372     unsigned SEG22              : 1;
3373     unsigned SEG23              : 1;
3374     unsigned SEG24              : 1;
3375     unsigned SEG25              : 1;
3376     };
3377 
3378   struct
3379     {
3380     unsigned CPS16              : 1;
3381     unsigned CPS6               : 1;
3382     unsigned CPS7               : 1;
3383     unsigned CPS8               : 1;
3384     unsigned CPS9               : 1;
3385     unsigned CPS10              : 1;
3386     unsigned CPS11              : 1;
3387     unsigned CPS5               : 1;
3388     };
3389 
3390   struct
3391     {
3392     unsigned C1IN0N             : 1;
3393     unsigned C2OUT              : 1;
3394     unsigned C1OUT              : 1;
3395     unsigned C1IN2N             : 1;
3396     unsigned C2INP              : 1;
3397     unsigned C1IN1N             : 1;
3398     unsigned C1INP              : 1;
3399     unsigned C1IN3N             : 1;
3400     };
3401 
3402   struct
3403     {
3404     unsigned C2IN0N             : 1;
3405     unsigned SRNQ               : 1;
3406     unsigned SRQ                : 1;
3407     unsigned C2IN2N             : 1;
3408     unsigned                    : 1;
3409     unsigned C2IN1N             : 1;
3410     unsigned                    : 1;
3411     unsigned C2IN3N             : 1;
3412     };
3413 
3414   struct
3415     {
3416     unsigned                    : 1;
3417     unsigned                    : 1;
3418     unsigned                    : 1;
3419     unsigned C3IN2N             : 1;
3420     unsigned                    : 1;
3421     unsigned DACOUT             : 1;
3422     unsigned                    : 1;
3423     unsigned C3IN3N             : 1;
3424     };
3425   } __PORTFbits_t;
3426 
3427 extern __at(0x028C) volatile __PORTFbits_t PORTFbits;
3428 
3429 #define _PORTF_RF0              0x01
3430 #define _PORTF_AN16             0x01
3431 #define _PORTF_SEG41            0x01
3432 #define _PORTF_CPS16            0x01
3433 #define _PORTF_C1IN0N           0x01
3434 #define _PORTF_C2IN0N           0x01
3435 #define _PORTF_RF1              0x02
3436 #define _PORTF_AN6              0x02
3437 #define _PORTF_SEG19            0x02
3438 #define _PORTF_CPS6             0x02
3439 #define _PORTF_C2OUT            0x02
3440 #define _PORTF_SRNQ             0x02
3441 #define _PORTF_RF2              0x04
3442 #define _PORTF_AN7              0x04
3443 #define _PORTF_SEG20            0x04
3444 #define _PORTF_CPS7             0x04
3445 #define _PORTF_C1OUT            0x04
3446 #define _PORTF_SRQ              0x04
3447 #define _PORTF_RF3              0x08
3448 #define _PORTF_AN8              0x08
3449 #define _PORTF_SEG21            0x08
3450 #define _PORTF_CPS8             0x08
3451 #define _PORTF_C1IN2N           0x08
3452 #define _PORTF_C2IN2N           0x08
3453 #define _PORTF_C3IN2N           0x08
3454 #define _PORTF_RF4              0x10
3455 #define _PORTF_AN9              0x10
3456 #define _PORTF_SEG22            0x10
3457 #define _PORTF_CPS9             0x10
3458 #define _PORTF_C2INP            0x10
3459 #define _PORTF_RF5              0x20
3460 #define _PORTF_AN10             0x20
3461 #define _PORTF_SEG23            0x20
3462 #define _PORTF_CPS10            0x20
3463 #define _PORTF_C1IN1N           0x20
3464 #define _PORTF_C2IN1N           0x20
3465 #define _PORTF_DACOUT           0x20
3466 #define _PORTF_RF6              0x40
3467 #define _PORTF_AN11             0x40
3468 #define _PORTF_SEG24            0x40
3469 #define _PORTF_CPS11            0x40
3470 #define _PORTF_C1INP            0x40
3471 #define _PORTF_RF7              0x80
3472 #define _PORTF_AN5              0x80
3473 #define _PORTF_SEG25            0x80
3474 #define _PORTF_CPS5             0x80
3475 #define _PORTF_C1IN3N           0x80
3476 #define _PORTF_C2IN3N           0x80
3477 #define _PORTF_C3IN3N           0x80
3478 
3479 //==============================================================================
3480 
3481 
3482 //==============================================================================
3483 //        PORTG Bits
3484 
3485 extern __at(0x028D) __sfr PORTG;
3486 
3487 typedef union
3488   {
3489   struct
3490     {
3491     unsigned RG0                : 1;
3492     unsigned RG1                : 1;
3493     unsigned RG2                : 1;
3494     unsigned RG3                : 1;
3495     unsigned RG4                : 1;
3496     unsigned RG5                : 1;
3497     unsigned                    : 1;
3498     unsigned                    : 1;
3499     };
3500 
3501   struct
3502     {
3503     unsigned SEG42              : 1;
3504     unsigned AN15               : 1;
3505     unsigned AN14               : 1;
3506     unsigned AN13               : 1;
3507     unsigned AN12               : 1;
3508     unsigned NOT_MCLR           : 1;
3509     unsigned                    : 1;
3510     unsigned                    : 1;
3511     };
3512 
3513   struct
3514     {
3515     unsigned CCP3               : 1;
3516     unsigned SEG43              : 1;
3517     unsigned SEG44              : 1;
3518     unsigned SEG45              : 1;
3519     unsigned SEG26              : 1;
3520     unsigned                    : 1;
3521     unsigned                    : 1;
3522     unsigned                    : 1;
3523     };
3524 
3525   struct
3526     {
3527     unsigned P3A                : 1;
3528     unsigned CPS15              : 1;
3529     unsigned CPS14              : 1;
3530     unsigned CPS13              : 1;
3531     unsigned CPS12              : 1;
3532     unsigned                    : 1;
3533     unsigned                    : 1;
3534     unsigned                    : 1;
3535     };
3536 
3537   struct
3538     {
3539     unsigned                    : 1;
3540     unsigned C3OUT              : 1;
3541     unsigned C3INP              : 1;
3542     unsigned C3IN0N             : 1;
3543     unsigned C3IN1N             : 1;
3544     unsigned                    : 1;
3545     unsigned                    : 1;
3546     unsigned                    : 1;
3547     };
3548 
3549   struct
3550     {
3551     unsigned                    : 1;
3552     unsigned TX2                : 1;
3553     unsigned RX2                : 1;
3554     unsigned CCP4               : 1;
3555     unsigned CCP5               : 1;
3556     unsigned                    : 1;
3557     unsigned                    : 1;
3558     unsigned                    : 1;
3559     };
3560 
3561   struct
3562     {
3563     unsigned                    : 1;
3564     unsigned CK2                : 1;
3565     unsigned DT2                : 1;
3566     unsigned P3D                : 1;
3567     unsigned P1D                : 1;
3568     unsigned                    : 1;
3569     unsigned                    : 1;
3570     unsigned                    : 1;
3571     };
3572 
3573   struct
3574     {
3575     unsigned RG                 : 6;
3576     unsigned                    : 2;
3577     };
3578   } __PORTGbits_t;
3579 
3580 extern __at(0x028D) volatile __PORTGbits_t PORTGbits;
3581 
3582 #define _PORTG_RG0              0x01
3583 #define _PORTG_SEG42            0x01
3584 #define _PORTG_CCP3             0x01
3585 #define _PORTG_P3A              0x01
3586 #define _PORTG_RG1              0x02
3587 #define _PORTG_AN15             0x02
3588 #define _PORTG_SEG43            0x02
3589 #define _PORTG_CPS15            0x02
3590 #define _PORTG_C3OUT            0x02
3591 #define _PORTG_TX2              0x02
3592 #define _PORTG_CK2              0x02
3593 #define _PORTG_RG2              0x04
3594 #define _PORTG_AN14             0x04
3595 #define _PORTG_SEG44            0x04
3596 #define _PORTG_CPS14            0x04
3597 #define _PORTG_C3INP            0x04
3598 #define _PORTG_RX2              0x04
3599 #define _PORTG_DT2              0x04
3600 #define _PORTG_RG3              0x08
3601 #define _PORTG_AN13             0x08
3602 #define _PORTG_SEG45            0x08
3603 #define _PORTG_CPS13            0x08
3604 #define _PORTG_C3IN0N           0x08
3605 #define _PORTG_CCP4             0x08
3606 #define _PORTG_P3D              0x08
3607 #define _PORTG_RG4              0x10
3608 #define _PORTG_AN12             0x10
3609 #define _PORTG_SEG26            0x10
3610 #define _PORTG_CPS12            0x10
3611 #define _PORTG_C3IN1N           0x10
3612 #define _PORTG_CCP5             0x10
3613 #define _PORTG_P1D              0x10
3614 #define _PORTG_RG5              0x20
3615 #define _PORTG_NOT_MCLR         0x20
3616 
3617 //==============================================================================
3618 
3619 extern __at(0x0291) __sfr CCPR1;
3620 extern __at(0x0291) __sfr CCPR1L;
3621 extern __at(0x0292) __sfr CCPR1H;
3622 
3623 //==============================================================================
3624 //        CCP1CON Bits
3625 
3626 extern __at(0x0293) __sfr CCP1CON;
3627 
3628 typedef union
3629   {
3630   struct
3631     {
3632     unsigned CCP1M0             : 1;
3633     unsigned CCP1M1             : 1;
3634     unsigned CCP1M2             : 1;
3635     unsigned CCP1M3             : 1;
3636     unsigned DC1B0              : 1;
3637     unsigned DC1B1              : 1;
3638     unsigned P1M0               : 1;
3639     unsigned P1M1               : 1;
3640     };
3641 
3642   struct
3643     {
3644     unsigned CCP1M              : 4;
3645     unsigned                    : 4;
3646     };
3647 
3648   struct
3649     {
3650     unsigned                    : 4;
3651     unsigned DC1B               : 2;
3652     unsigned                    : 2;
3653     };
3654 
3655   struct
3656     {
3657     unsigned                    : 6;
3658     unsigned P1M                : 2;
3659     };
3660   } __CCP1CONbits_t;
3661 
3662 extern __at(0x0293) volatile __CCP1CONbits_t CCP1CONbits;
3663 
3664 #define _CCP1M0                 0x01
3665 #define _CCP1M1                 0x02
3666 #define _CCP1M2                 0x04
3667 #define _CCP1M3                 0x08
3668 #define _DC1B0                  0x10
3669 #define _DC1B1                  0x20
3670 #define _P1M0                   0x40
3671 #define _P1M1                   0x80
3672 
3673 //==============================================================================
3674 
3675 
3676 //==============================================================================
3677 //        PWM1CON Bits
3678 
3679 extern __at(0x0294) __sfr PWM1CON;
3680 
3681 typedef union
3682   {
3683   struct
3684     {
3685     unsigned P1DC0              : 1;
3686     unsigned P1DC1              : 1;
3687     unsigned P1DC2              : 1;
3688     unsigned P1DC3              : 1;
3689     unsigned P1DC4              : 1;
3690     unsigned P1DC5              : 1;
3691     unsigned P1DC6              : 1;
3692     unsigned P1RSEN             : 1;
3693     };
3694 
3695   struct
3696     {
3697     unsigned P1DC               : 7;
3698     unsigned                    : 1;
3699     };
3700   } __PWM1CONbits_t;
3701 
3702 extern __at(0x0294) volatile __PWM1CONbits_t PWM1CONbits;
3703 
3704 #define _P1DC0                  0x01
3705 #define _P1DC1                  0x02
3706 #define _P1DC2                  0x04
3707 #define _P1DC3                  0x08
3708 #define _P1DC4                  0x10
3709 #define _P1DC5                  0x20
3710 #define _P1DC6                  0x40
3711 #define _P1RSEN                 0x80
3712 
3713 //==============================================================================
3714 
3715 
3716 //==============================================================================
3717 //        CCP1AS Bits
3718 
3719 extern __at(0x0295) __sfr CCP1AS;
3720 
3721 typedef union
3722   {
3723   struct
3724     {
3725     unsigned PSS1BD0            : 1;
3726     unsigned PSS1BD1            : 1;
3727     unsigned PSS1AC0            : 1;
3728     unsigned PSS1AC1            : 1;
3729     unsigned CCP1AS0            : 1;
3730     unsigned CCP1AS1            : 1;
3731     unsigned CCP1AS2            : 1;
3732     unsigned CCP1ASE            : 1;
3733     };
3734 
3735   struct
3736     {
3737     unsigned PSS1BD             : 2;
3738     unsigned                    : 6;
3739     };
3740 
3741   struct
3742     {
3743     unsigned                    : 2;
3744     unsigned PSS1AC             : 2;
3745     unsigned                    : 4;
3746     };
3747 
3748   struct
3749     {
3750     unsigned                    : 4;
3751     unsigned CCP1AS             : 3;
3752     unsigned                    : 1;
3753     };
3754   } __CCP1ASbits_t;
3755 
3756 extern __at(0x0295) volatile __CCP1ASbits_t CCP1ASbits;
3757 
3758 #define _PSS1BD0                0x01
3759 #define _PSS1BD1                0x02
3760 #define _PSS1AC0                0x04
3761 #define _PSS1AC1                0x08
3762 #define _CCP1AS0                0x10
3763 #define _CCP1AS1                0x20
3764 #define _CCP1AS2                0x40
3765 #define _CCP1ASE                0x80
3766 
3767 //==============================================================================
3768 
3769 
3770 //==============================================================================
3771 //        ECCP1AS Bits
3772 
3773 extern __at(0x0295) __sfr ECCP1AS;
3774 
3775 typedef union
3776   {
3777   struct
3778     {
3779     unsigned PSS1BD0            : 1;
3780     unsigned PSS1BD1            : 1;
3781     unsigned PSS1AC0            : 1;
3782     unsigned PSS1AC1            : 1;
3783     unsigned CCP1AS0            : 1;
3784     unsigned CCP1AS1            : 1;
3785     unsigned CCP1AS2            : 1;
3786     unsigned CCP1ASE            : 1;
3787     };
3788 
3789   struct
3790     {
3791     unsigned PSS1BD             : 2;
3792     unsigned                    : 6;
3793     };
3794 
3795   struct
3796     {
3797     unsigned                    : 2;
3798     unsigned PSS1AC             : 2;
3799     unsigned                    : 4;
3800     };
3801 
3802   struct
3803     {
3804     unsigned                    : 4;
3805     unsigned CCP1AS             : 3;
3806     unsigned                    : 1;
3807     };
3808   } __ECCP1ASbits_t;
3809 
3810 extern __at(0x0295) volatile __ECCP1ASbits_t ECCP1ASbits;
3811 
3812 #define _ECCP1AS_PSS1BD0        0x01
3813 #define _ECCP1AS_PSS1BD1        0x02
3814 #define _ECCP1AS_PSS1AC0        0x04
3815 #define _ECCP1AS_PSS1AC1        0x08
3816 #define _ECCP1AS_CCP1AS0        0x10
3817 #define _ECCP1AS_CCP1AS1        0x20
3818 #define _ECCP1AS_CCP1AS2        0x40
3819 #define _ECCP1AS_CCP1ASE        0x80
3820 
3821 //==============================================================================
3822 
3823 
3824 //==============================================================================
3825 //        PSTR1CON Bits
3826 
3827 extern __at(0x0296) __sfr PSTR1CON;
3828 
3829 typedef struct
3830   {
3831   unsigned STR1A                : 1;
3832   unsigned STR1B                : 1;
3833   unsigned STR1C                : 1;
3834   unsigned STR1D                : 1;
3835   unsigned STR1SYNC             : 1;
3836   unsigned                      : 1;
3837   unsigned                      : 1;
3838   unsigned                      : 1;
3839   } __PSTR1CONbits_t;
3840 
3841 extern __at(0x0296) volatile __PSTR1CONbits_t PSTR1CONbits;
3842 
3843 #define _STR1A                  0x01
3844 #define _STR1B                  0x02
3845 #define _STR1C                  0x04
3846 #define _STR1D                  0x08
3847 #define _STR1SYNC               0x10
3848 
3849 //==============================================================================
3850 
3851 extern __at(0x0298) __sfr CCPR2;
3852 extern __at(0x0298) __sfr CCPR2L;
3853 extern __at(0x0299) __sfr CCPR2H;
3854 
3855 //==============================================================================
3856 //        CCP2CON Bits
3857 
3858 extern __at(0x029A) __sfr CCP2CON;
3859 
3860 typedef union
3861   {
3862   struct
3863     {
3864     unsigned CCP2M0             : 1;
3865     unsigned CCP2M1             : 1;
3866     unsigned CCP2M2             : 1;
3867     unsigned CCP2M3             : 1;
3868     unsigned DC2B0              : 1;
3869     unsigned DC2B1              : 1;
3870     unsigned P2M0               : 1;
3871     unsigned P2M1               : 1;
3872     };
3873 
3874   struct
3875     {
3876     unsigned CCP2M              : 4;
3877     unsigned                    : 4;
3878     };
3879 
3880   struct
3881     {
3882     unsigned                    : 4;
3883     unsigned DC2B               : 2;
3884     unsigned                    : 2;
3885     };
3886 
3887   struct
3888     {
3889     unsigned                    : 6;
3890     unsigned P2M                : 2;
3891     };
3892   } __CCP2CONbits_t;
3893 
3894 extern __at(0x029A) volatile __CCP2CONbits_t CCP2CONbits;
3895 
3896 #define _CCP2M0                 0x01
3897 #define _CCP2M1                 0x02
3898 #define _CCP2M2                 0x04
3899 #define _CCP2M3                 0x08
3900 #define _DC2B0                  0x10
3901 #define _DC2B1                  0x20
3902 #define _P2M0                   0x40
3903 #define _P2M1                   0x80
3904 
3905 //==============================================================================
3906 
3907 
3908 //==============================================================================
3909 //        PWM2CON Bits
3910 
3911 extern __at(0x029B) __sfr PWM2CON;
3912 
3913 typedef union
3914   {
3915   struct
3916     {
3917     unsigned P2DC0              : 1;
3918     unsigned P2DC1              : 1;
3919     unsigned P2DC2              : 1;
3920     unsigned P2DC3              : 1;
3921     unsigned P2DC4              : 1;
3922     unsigned P2DC5              : 1;
3923     unsigned P2DC6              : 1;
3924     unsigned P2RSEN             : 1;
3925     };
3926 
3927   struct
3928     {
3929     unsigned P2DC               : 7;
3930     unsigned                    : 1;
3931     };
3932   } __PWM2CONbits_t;
3933 
3934 extern __at(0x029B) volatile __PWM2CONbits_t PWM2CONbits;
3935 
3936 #define _P2DC0                  0x01
3937 #define _P2DC1                  0x02
3938 #define _P2DC2                  0x04
3939 #define _P2DC3                  0x08
3940 #define _P2DC4                  0x10
3941 #define _P2DC5                  0x20
3942 #define _P2DC6                  0x40
3943 #define _P2RSEN                 0x80
3944 
3945 //==============================================================================
3946 
3947 
3948 //==============================================================================
3949 //        CCP2AS Bits
3950 
3951 extern __at(0x029C) __sfr CCP2AS;
3952 
3953 typedef union
3954   {
3955   struct
3956     {
3957     unsigned PSS2BD0            : 1;
3958     unsigned PSS2BD1            : 1;
3959     unsigned PSS2AC0            : 1;
3960     unsigned PSS2AC1            : 1;
3961     unsigned CCP2AS0            : 1;
3962     unsigned CCP2AS1            : 1;
3963     unsigned CCP2AS2            : 1;
3964     unsigned CCP2ASE            : 1;
3965     };
3966 
3967   struct
3968     {
3969     unsigned PSS2BD             : 2;
3970     unsigned                    : 6;
3971     };
3972 
3973   struct
3974     {
3975     unsigned                    : 2;
3976     unsigned PSS2AC             : 2;
3977     unsigned                    : 4;
3978     };
3979 
3980   struct
3981     {
3982     unsigned                    : 4;
3983     unsigned CCP2AS             : 3;
3984     unsigned                    : 1;
3985     };
3986   } __CCP2ASbits_t;
3987 
3988 extern __at(0x029C) volatile __CCP2ASbits_t CCP2ASbits;
3989 
3990 #define _PSS2BD0                0x01
3991 #define _PSS2BD1                0x02
3992 #define _PSS2AC0                0x04
3993 #define _PSS2AC1                0x08
3994 #define _CCP2AS0                0x10
3995 #define _CCP2AS1                0x20
3996 #define _CCP2AS2                0x40
3997 #define _CCP2ASE                0x80
3998 
3999 //==============================================================================
4000 
4001 
4002 //==============================================================================
4003 //        ECCP2AS Bits
4004 
4005 extern __at(0x029C) __sfr ECCP2AS;
4006 
4007 typedef union
4008   {
4009   struct
4010     {
4011     unsigned PSS2BD0            : 1;
4012     unsigned PSS2BD1            : 1;
4013     unsigned PSS2AC0            : 1;
4014     unsigned PSS2AC1            : 1;
4015     unsigned CCP2AS0            : 1;
4016     unsigned CCP2AS1            : 1;
4017     unsigned CCP2AS2            : 1;
4018     unsigned CCP2ASE            : 1;
4019     };
4020 
4021   struct
4022     {
4023     unsigned PSS2BD             : 2;
4024     unsigned                    : 6;
4025     };
4026 
4027   struct
4028     {
4029     unsigned                    : 2;
4030     unsigned PSS2AC             : 2;
4031     unsigned                    : 4;
4032     };
4033 
4034   struct
4035     {
4036     unsigned                    : 4;
4037     unsigned CCP2AS             : 3;
4038     unsigned                    : 1;
4039     };
4040   } __ECCP2ASbits_t;
4041 
4042 extern __at(0x029C) volatile __ECCP2ASbits_t ECCP2ASbits;
4043 
4044 #define _ECCP2AS_PSS2BD0        0x01
4045 #define _ECCP2AS_PSS2BD1        0x02
4046 #define _ECCP2AS_PSS2AC0        0x04
4047 #define _ECCP2AS_PSS2AC1        0x08
4048 #define _ECCP2AS_CCP2AS0        0x10
4049 #define _ECCP2AS_CCP2AS1        0x20
4050 #define _ECCP2AS_CCP2AS2        0x40
4051 #define _ECCP2AS_CCP2ASE        0x80
4052 
4053 //==============================================================================
4054 
4055 
4056 //==============================================================================
4057 //        PSTR2CON Bits
4058 
4059 extern __at(0x029D) __sfr PSTR2CON;
4060 
4061 typedef struct
4062   {
4063   unsigned STR2A                : 1;
4064   unsigned STR2B                : 1;
4065   unsigned STR2C                : 1;
4066   unsigned STR2D                : 1;
4067   unsigned STR2SYNC             : 1;
4068   unsigned                      : 1;
4069   unsigned                      : 1;
4070   unsigned                      : 1;
4071   } __PSTR2CONbits_t;
4072 
4073 extern __at(0x029D) volatile __PSTR2CONbits_t PSTR2CONbits;
4074 
4075 #define _STR2A                  0x01
4076 #define _STR2B                  0x02
4077 #define _STR2C                  0x04
4078 #define _STR2D                  0x08
4079 #define _STR2SYNC               0x10
4080 
4081 //==============================================================================
4082 
4083 
4084 //==============================================================================
4085 //        CCPTMRS0 Bits
4086 
4087 extern __at(0x029E) __sfr CCPTMRS0;
4088 
4089 typedef union
4090   {
4091   struct
4092     {
4093     unsigned C1TSEL0            : 1;
4094     unsigned C1TSEL1            : 1;
4095     unsigned C2TSEL0            : 1;
4096     unsigned C2TSEL1            : 1;
4097     unsigned C3TSEL0            : 1;
4098     unsigned C3TSEL1            : 1;
4099     unsigned C4TSEL0            : 1;
4100     unsigned C4TSEL1            : 1;
4101     };
4102 
4103   struct
4104     {
4105     unsigned C1TSEL             : 2;
4106     unsigned                    : 6;
4107     };
4108 
4109   struct
4110     {
4111     unsigned                    : 2;
4112     unsigned C2TSEL             : 2;
4113     unsigned                    : 4;
4114     };
4115 
4116   struct
4117     {
4118     unsigned                    : 4;
4119     unsigned C3TSEL             : 2;
4120     unsigned                    : 2;
4121     };
4122 
4123   struct
4124     {
4125     unsigned                    : 6;
4126     unsigned C4TSEL             : 2;
4127     };
4128   } __CCPTMRS0bits_t;
4129 
4130 extern __at(0x029E) volatile __CCPTMRS0bits_t CCPTMRS0bits;
4131 
4132 #define _C1TSEL0                0x01
4133 #define _C1TSEL1                0x02
4134 #define _C2TSEL0                0x04
4135 #define _C2TSEL1                0x08
4136 #define _C3TSEL0                0x10
4137 #define _C3TSEL1                0x20
4138 #define _C4TSEL0                0x40
4139 #define _C4TSEL1                0x80
4140 
4141 //==============================================================================
4142 
4143 
4144 //==============================================================================
4145 //        CCPTMRS1 Bits
4146 
4147 extern __at(0x029F) __sfr CCPTMRS1;
4148 
4149 typedef union
4150   {
4151   struct
4152     {
4153     unsigned C5TSEL0            : 1;
4154     unsigned C5TSEL1            : 1;
4155     unsigned                    : 1;
4156     unsigned                    : 1;
4157     unsigned                    : 1;
4158     unsigned                    : 1;
4159     unsigned                    : 1;
4160     unsigned                    : 1;
4161     };
4162 
4163   struct
4164     {
4165     unsigned C5TSEL             : 2;
4166     unsigned                    : 6;
4167     };
4168   } __CCPTMRS1bits_t;
4169 
4170 extern __at(0x029F) volatile __CCPTMRS1bits_t CCPTMRS1bits;
4171 
4172 #define _C5TSEL0                0x01
4173 #define _C5TSEL1                0x02
4174 
4175 //==============================================================================
4176 
4177 
4178 //==============================================================================
4179 //        TRISF Bits
4180 
4181 extern __at(0x030C) __sfr TRISF;
4182 
4183 typedef struct
4184   {
4185   unsigned TRISF0               : 1;
4186   unsigned TRISF1               : 1;
4187   unsigned TRISF2               : 1;
4188   unsigned TRISF3               : 1;
4189   unsigned TRISF4               : 1;
4190   unsigned TRISF5               : 1;
4191   unsigned TRISF6               : 1;
4192   unsigned TRISF7               : 1;
4193   } __TRISFbits_t;
4194 
4195 extern __at(0x030C) volatile __TRISFbits_t TRISFbits;
4196 
4197 #define _TRISF0                 0x01
4198 #define _TRISF1                 0x02
4199 #define _TRISF2                 0x04
4200 #define _TRISF3                 0x08
4201 #define _TRISF4                 0x10
4202 #define _TRISF5                 0x20
4203 #define _TRISF6                 0x40
4204 #define _TRISF7                 0x80
4205 
4206 //==============================================================================
4207 
4208 
4209 //==============================================================================
4210 //        TRISG Bits
4211 
4212 extern __at(0x030D) __sfr TRISG;
4213 
4214 typedef union
4215   {
4216   struct
4217     {
4218     unsigned TRISG0             : 1;
4219     unsigned TRISG1             : 1;
4220     unsigned TRISG2             : 1;
4221     unsigned TRISG3             : 1;
4222     unsigned TRISG4             : 1;
4223     unsigned TRISG5             : 1;
4224     unsigned                    : 1;
4225     unsigned                    : 1;
4226     };
4227 
4228   struct
4229     {
4230     unsigned TRISG              : 6;
4231     unsigned                    : 2;
4232     };
4233   } __TRISGbits_t;
4234 
4235 extern __at(0x030D) volatile __TRISGbits_t TRISGbits;
4236 
4237 #define _TRISG0                 0x01
4238 #define _TRISG1                 0x02
4239 #define _TRISG2                 0x04
4240 #define _TRISG3                 0x08
4241 #define _TRISG4                 0x10
4242 #define _TRISG5                 0x20
4243 
4244 //==============================================================================
4245 
4246 extern __at(0x0311) __sfr CCPR3;
4247 extern __at(0x0311) __sfr CCPR3L;
4248 extern __at(0x0312) __sfr CCPR3H;
4249 
4250 //==============================================================================
4251 //        CCP3CON Bits
4252 
4253 extern __at(0x0313) __sfr CCP3CON;
4254 
4255 typedef union
4256   {
4257   struct
4258     {
4259     unsigned CCP3M0             : 1;
4260     unsigned CCP3M1             : 1;
4261     unsigned CCP3M2             : 1;
4262     unsigned CCP3M3             : 1;
4263     unsigned DC3B0              : 1;
4264     unsigned DC3B1              : 1;
4265     unsigned P3M0               : 1;
4266     unsigned P3M1               : 1;
4267     };
4268 
4269   struct
4270     {
4271     unsigned CCP3M              : 4;
4272     unsigned                    : 4;
4273     };
4274 
4275   struct
4276     {
4277     unsigned                    : 4;
4278     unsigned DC3B               : 2;
4279     unsigned                    : 2;
4280     };
4281 
4282   struct
4283     {
4284     unsigned                    : 6;
4285     unsigned P3M                : 2;
4286     };
4287   } __CCP3CONbits_t;
4288 
4289 extern __at(0x0313) volatile __CCP3CONbits_t CCP3CONbits;
4290 
4291 #define _CCP3M0                 0x01
4292 #define _CCP3M1                 0x02
4293 #define _CCP3M2                 0x04
4294 #define _CCP3M3                 0x08
4295 #define _DC3B0                  0x10
4296 #define _DC3B1                  0x20
4297 #define _P3M0                   0x40
4298 #define _P3M1                   0x80
4299 
4300 //==============================================================================
4301 
4302 
4303 //==============================================================================
4304 //        PWM3CON Bits
4305 
4306 extern __at(0x0314) __sfr PWM3CON;
4307 
4308 typedef union
4309   {
4310   struct
4311     {
4312     unsigned P3DC0              : 1;
4313     unsigned P3DC1              : 1;
4314     unsigned P3DC2              : 1;
4315     unsigned P3DC3              : 1;
4316     unsigned P3DC4              : 1;
4317     unsigned P3DC5              : 1;
4318     unsigned P3DC6              : 1;
4319     unsigned P3RSEN             : 1;
4320     };
4321 
4322   struct
4323     {
4324     unsigned P3DC               : 7;
4325     unsigned                    : 1;
4326     };
4327   } __PWM3CONbits_t;
4328 
4329 extern __at(0x0314) volatile __PWM3CONbits_t PWM3CONbits;
4330 
4331 #define _P3DC0                  0x01
4332 #define _P3DC1                  0x02
4333 #define _P3DC2                  0x04
4334 #define _P3DC3                  0x08
4335 #define _P3DC4                  0x10
4336 #define _P3DC5                  0x20
4337 #define _P3DC6                  0x40
4338 #define _P3RSEN                 0x80
4339 
4340 //==============================================================================
4341 
4342 
4343 //==============================================================================
4344 //        CCP3AS Bits
4345 
4346 extern __at(0x0315) __sfr CCP3AS;
4347 
4348 typedef union
4349   {
4350   struct
4351     {
4352     unsigned PSS3BD0            : 1;
4353     unsigned PSS3BD1            : 1;
4354     unsigned PSS3AC0            : 1;
4355     unsigned PSS3AC1            : 1;
4356     unsigned CCP3AS0            : 1;
4357     unsigned CCP3AS1            : 1;
4358     unsigned CCP3AS2            : 1;
4359     unsigned CCP3ASE            : 1;
4360     };
4361 
4362   struct
4363     {
4364     unsigned PSS3BD             : 2;
4365     unsigned                    : 6;
4366     };
4367 
4368   struct
4369     {
4370     unsigned                    : 2;
4371     unsigned PSS3AC             : 2;
4372     unsigned                    : 4;
4373     };
4374 
4375   struct
4376     {
4377     unsigned                    : 4;
4378     unsigned CCP3AS             : 3;
4379     unsigned                    : 1;
4380     };
4381   } __CCP3ASbits_t;
4382 
4383 extern __at(0x0315) volatile __CCP3ASbits_t CCP3ASbits;
4384 
4385 #define _PSS3BD0                0x01
4386 #define _PSS3BD1                0x02
4387 #define _PSS3AC0                0x04
4388 #define _PSS3AC1                0x08
4389 #define _CCP3AS0                0x10
4390 #define _CCP3AS1                0x20
4391 #define _CCP3AS2                0x40
4392 #define _CCP3ASE                0x80
4393 
4394 //==============================================================================
4395 
4396 
4397 //==============================================================================
4398 //        ECCP3AS Bits
4399 
4400 extern __at(0x0315) __sfr ECCP3AS;
4401 
4402 typedef union
4403   {
4404   struct
4405     {
4406     unsigned PSS3BD0            : 1;
4407     unsigned PSS3BD1            : 1;
4408     unsigned PSS3AC0            : 1;
4409     unsigned PSS3AC1            : 1;
4410     unsigned CCP3AS0            : 1;
4411     unsigned CCP3AS1            : 1;
4412     unsigned CCP3AS2            : 1;
4413     unsigned CCP3ASE            : 1;
4414     };
4415 
4416   struct
4417     {
4418     unsigned PSS3BD             : 2;
4419     unsigned                    : 6;
4420     };
4421 
4422   struct
4423     {
4424     unsigned                    : 2;
4425     unsigned PSS3AC             : 2;
4426     unsigned                    : 4;
4427     };
4428 
4429   struct
4430     {
4431     unsigned                    : 4;
4432     unsigned CCP3AS             : 3;
4433     unsigned                    : 1;
4434     };
4435   } __ECCP3ASbits_t;
4436 
4437 extern __at(0x0315) volatile __ECCP3ASbits_t ECCP3ASbits;
4438 
4439 #define _ECCP3AS_PSS3BD0        0x01
4440 #define _ECCP3AS_PSS3BD1        0x02
4441 #define _ECCP3AS_PSS3AC0        0x04
4442 #define _ECCP3AS_PSS3AC1        0x08
4443 #define _ECCP3AS_CCP3AS0        0x10
4444 #define _ECCP3AS_CCP3AS1        0x20
4445 #define _ECCP3AS_CCP3AS2        0x40
4446 #define _ECCP3AS_CCP3ASE        0x80
4447 
4448 //==============================================================================
4449 
4450 
4451 //==============================================================================
4452 //        PSTR3CON Bits
4453 
4454 extern __at(0x0316) __sfr PSTR3CON;
4455 
4456 typedef struct
4457   {
4458   unsigned STR3A                : 1;
4459   unsigned STR3B                : 1;
4460   unsigned STR3C                : 1;
4461   unsigned STR3D                : 1;
4462   unsigned STR3SYNC             : 1;
4463   unsigned                      : 1;
4464   unsigned                      : 1;
4465   unsigned                      : 1;
4466   } __PSTR3CONbits_t;
4467 
4468 extern __at(0x0316) volatile __PSTR3CONbits_t PSTR3CONbits;
4469 
4470 #define _STR3A                  0x01
4471 #define _STR3B                  0x02
4472 #define _STR3C                  0x04
4473 #define _STR3D                  0x08
4474 #define _STR3SYNC               0x10
4475 
4476 //==============================================================================
4477 
4478 extern __at(0x0318) __sfr CCPR4;
4479 extern __at(0x0318) __sfr CCPR4L;
4480 extern __at(0x0319) __sfr CCPR4H;
4481 
4482 //==============================================================================
4483 //        CCP4CON Bits
4484 
4485 extern __at(0x031A) __sfr CCP4CON;
4486 
4487 typedef union
4488   {
4489   struct
4490     {
4491     unsigned CCP4M0             : 1;
4492     unsigned CCP4M1             : 1;
4493     unsigned CCP4M2             : 1;
4494     unsigned CCP4M3             : 1;
4495     unsigned DC4B0              : 1;
4496     unsigned DC4B1              : 1;
4497     unsigned                    : 1;
4498     unsigned                    : 1;
4499     };
4500 
4501   struct
4502     {
4503     unsigned CCP4M              : 4;
4504     unsigned                    : 4;
4505     };
4506 
4507   struct
4508     {
4509     unsigned                    : 4;
4510     unsigned DC4B               : 2;
4511     unsigned                    : 2;
4512     };
4513   } __CCP4CONbits_t;
4514 
4515 extern __at(0x031A) volatile __CCP4CONbits_t CCP4CONbits;
4516 
4517 #define _CCP4M0                 0x01
4518 #define _CCP4M1                 0x02
4519 #define _CCP4M2                 0x04
4520 #define _CCP4M3                 0x08
4521 #define _DC4B0                  0x10
4522 #define _DC4B1                  0x20
4523 
4524 //==============================================================================
4525 
4526 extern __at(0x031C) __sfr CCPR5;
4527 extern __at(0x031C) __sfr CCPR5L;
4528 extern __at(0x031D) __sfr CCPR5H;
4529 
4530 //==============================================================================
4531 //        CCP5CON Bits
4532 
4533 extern __at(0x031E) __sfr CCP5CON;
4534 
4535 typedef union
4536   {
4537   struct
4538     {
4539     unsigned CCP5M0             : 1;
4540     unsigned CCP5M1             : 1;
4541     unsigned CCP5M2             : 1;
4542     unsigned CCP5M3             : 1;
4543     unsigned DC5B0              : 1;
4544     unsigned DC5B1              : 1;
4545     unsigned                    : 1;
4546     unsigned                    : 1;
4547     };
4548 
4549   struct
4550     {
4551     unsigned CCP5M              : 4;
4552     unsigned                    : 4;
4553     };
4554 
4555   struct
4556     {
4557     unsigned                    : 4;
4558     unsigned DC5B               : 2;
4559     unsigned                    : 2;
4560     };
4561   } __CCP5CONbits_t;
4562 
4563 extern __at(0x031E) volatile __CCP5CONbits_t CCP5CONbits;
4564 
4565 #define _CCP5M0                 0x01
4566 #define _CCP5M1                 0x02
4567 #define _CCP5M2                 0x04
4568 #define _CCP5M3                 0x08
4569 #define _DC5B0                  0x10
4570 #define _DC5B1                  0x20
4571 
4572 //==============================================================================
4573 
4574 
4575 //==============================================================================
4576 //        LATF Bits
4577 
4578 extern __at(0x038C) __sfr LATF;
4579 
4580 typedef struct
4581   {
4582   unsigned LATF0                : 1;
4583   unsigned LATF1                : 1;
4584   unsigned LATF2                : 1;
4585   unsigned LATF3                : 1;
4586   unsigned LATF4                : 1;
4587   unsigned LATF5                : 1;
4588   unsigned LATF6                : 1;
4589   unsigned LATF7                : 1;
4590   } __LATFbits_t;
4591 
4592 extern __at(0x038C) volatile __LATFbits_t LATFbits;
4593 
4594 #define _LATF0                  0x01
4595 #define _LATF1                  0x02
4596 #define _LATF2                  0x04
4597 #define _LATF3                  0x08
4598 #define _LATF4                  0x10
4599 #define _LATF5                  0x20
4600 #define _LATF6                  0x40
4601 #define _LATF7                  0x80
4602 
4603 //==============================================================================
4604 
4605 
4606 //==============================================================================
4607 //        LATG Bits
4608 
4609 extern __at(0x038D) __sfr LATG;
4610 
4611 typedef union
4612   {
4613   struct
4614     {
4615     unsigned LATG0              : 1;
4616     unsigned LATG1              : 1;
4617     unsigned LATG2              : 1;
4618     unsigned LATG3              : 1;
4619     unsigned LATG4              : 1;
4620     unsigned LATG5              : 1;
4621     unsigned                    : 1;
4622     unsigned                    : 1;
4623     };
4624 
4625   struct
4626     {
4627     unsigned LATG               : 6;
4628     unsigned                    : 2;
4629     };
4630   } __LATGbits_t;
4631 
4632 extern __at(0x038D) volatile __LATGbits_t LATGbits;
4633 
4634 #define _LATG0                  0x01
4635 #define _LATG1                  0x02
4636 #define _LATG2                  0x04
4637 #define _LATG3                  0x08
4638 #define _LATG4                  0x10
4639 #define _LATG5                  0x20
4640 
4641 //==============================================================================
4642 
4643 
4644 //==============================================================================
4645 //        IOCBP Bits
4646 
4647 extern __at(0x0394) __sfr IOCBP;
4648 
4649 typedef struct
4650   {
4651   unsigned IOCBP0               : 1;
4652   unsigned IOCBP1               : 1;
4653   unsigned IOCBP2               : 1;
4654   unsigned IOCBP3               : 1;
4655   unsigned IOCBP4               : 1;
4656   unsigned IOCBP5               : 1;
4657   unsigned IOCBP6               : 1;
4658   unsigned IOCBP7               : 1;
4659   } __IOCBPbits_t;
4660 
4661 extern __at(0x0394) volatile __IOCBPbits_t IOCBPbits;
4662 
4663 #define _IOCBP0                 0x01
4664 #define _IOCBP1                 0x02
4665 #define _IOCBP2                 0x04
4666 #define _IOCBP3                 0x08
4667 #define _IOCBP4                 0x10
4668 #define _IOCBP5                 0x20
4669 #define _IOCBP6                 0x40
4670 #define _IOCBP7                 0x80
4671 
4672 //==============================================================================
4673 
4674 
4675 //==============================================================================
4676 //        IOCBN Bits
4677 
4678 extern __at(0x0395) __sfr IOCBN;
4679 
4680 typedef struct
4681   {
4682   unsigned IOCBN0               : 1;
4683   unsigned IOCBN1               : 1;
4684   unsigned IOCBN2               : 1;
4685   unsigned IOCBN3               : 1;
4686   unsigned IOCBN4               : 1;
4687   unsigned IOCBN5               : 1;
4688   unsigned IOCBN6               : 1;
4689   unsigned IOCBN7               : 1;
4690   } __IOCBNbits_t;
4691 
4692 extern __at(0x0395) volatile __IOCBNbits_t IOCBNbits;
4693 
4694 #define _IOCBN0                 0x01
4695 #define _IOCBN1                 0x02
4696 #define _IOCBN2                 0x04
4697 #define _IOCBN3                 0x08
4698 #define _IOCBN4                 0x10
4699 #define _IOCBN5                 0x20
4700 #define _IOCBN6                 0x40
4701 #define _IOCBN7                 0x80
4702 
4703 //==============================================================================
4704 
4705 
4706 //==============================================================================
4707 //        IOCBF Bits
4708 
4709 extern __at(0x0396) __sfr IOCBF;
4710 
4711 typedef struct
4712   {
4713   unsigned IOCBF0               : 1;
4714   unsigned IOCBF1               : 1;
4715   unsigned IOCBF2               : 1;
4716   unsigned IOCBF3               : 1;
4717   unsigned IOCBF4               : 1;
4718   unsigned IOCBF5               : 1;
4719   unsigned IOCBF6               : 1;
4720   unsigned IOCBF7               : 1;
4721   } __IOCBFbits_t;
4722 
4723 extern __at(0x0396) volatile __IOCBFbits_t IOCBFbits;
4724 
4725 #define _IOCBF0                 0x01
4726 #define _IOCBF1                 0x02
4727 #define _IOCBF2                 0x04
4728 #define _IOCBF3                 0x08
4729 #define _IOCBF4                 0x10
4730 #define _IOCBF5                 0x20
4731 #define _IOCBF6                 0x40
4732 #define _IOCBF7                 0x80
4733 
4734 //==============================================================================
4735 
4736 
4737 //==============================================================================
4738 //        ANSELF Bits
4739 
4740 extern __at(0x040C) __sfr ANSELF;
4741 
4742 typedef struct
4743   {
4744   unsigned ANSF0                : 1;
4745   unsigned ANSF1                : 1;
4746   unsigned ANSF2                : 1;
4747   unsigned ANSF3                : 1;
4748   unsigned ANSF4                : 1;
4749   unsigned ANSF5                : 1;
4750   unsigned ANSF6                : 1;
4751   unsigned ANSF7                : 1;
4752   } __ANSELFbits_t;
4753 
4754 extern __at(0x040C) volatile __ANSELFbits_t ANSELFbits;
4755 
4756 #define _ANSF0                  0x01
4757 #define _ANSF1                  0x02
4758 #define _ANSF2                  0x04
4759 #define _ANSF3                  0x08
4760 #define _ANSF4                  0x10
4761 #define _ANSF5                  0x20
4762 #define _ANSF6                  0x40
4763 #define _ANSF7                  0x80
4764 
4765 //==============================================================================
4766 
4767 
4768 //==============================================================================
4769 //        ANSELG Bits
4770 
4771 extern __at(0x040D) __sfr ANSELG;
4772 
4773 typedef struct
4774   {
4775   unsigned                      : 1;
4776   unsigned ANSG1                : 1;
4777   unsigned ANSG2                : 1;
4778   unsigned ANSG3                : 1;
4779   unsigned ANSG4                : 1;
4780   unsigned                      : 1;
4781   unsigned                      : 1;
4782   unsigned                      : 1;
4783   } __ANSELGbits_t;
4784 
4785 extern __at(0x040D) volatile __ANSELGbits_t ANSELGbits;
4786 
4787 #define _ANSG1                  0x02
4788 #define _ANSG2                  0x04
4789 #define _ANSG3                  0x08
4790 #define _ANSG4                  0x10
4791 
4792 //==============================================================================
4793 
4794 extern __at(0x0415) __sfr TMR4;
4795 extern __at(0x0416) __sfr PR4;
4796 
4797 //==============================================================================
4798 //        T4CON Bits
4799 
4800 extern __at(0x0417) __sfr T4CON;
4801 
4802 typedef union
4803   {
4804   struct
4805     {
4806     unsigned T4CKPS0            : 1;
4807     unsigned T4CKPS1            : 1;
4808     unsigned TMR4ON             : 1;
4809     unsigned T4OUTPS0           : 1;
4810     unsigned T4OUTPS1           : 1;
4811     unsigned T4OUTPS2           : 1;
4812     unsigned T4OUTPS3           : 1;
4813     unsigned                    : 1;
4814     };
4815 
4816   struct
4817     {
4818     unsigned T4CKPS             : 2;
4819     unsigned                    : 6;
4820     };
4821 
4822   struct
4823     {
4824     unsigned                    : 3;
4825     unsigned T4OUTPS            : 4;
4826     unsigned                    : 1;
4827     };
4828   } __T4CONbits_t;
4829 
4830 extern __at(0x0417) volatile __T4CONbits_t T4CONbits;
4831 
4832 #define _T4CKPS0                0x01
4833 #define _T4CKPS1                0x02
4834 #define _TMR4ON                 0x04
4835 #define _T4OUTPS0               0x08
4836 #define _T4OUTPS1               0x10
4837 #define _T4OUTPS2               0x20
4838 #define _T4OUTPS3               0x40
4839 
4840 //==============================================================================
4841 
4842 extern __at(0x041C) __sfr TMR6;
4843 extern __at(0x041D) __sfr PR6;
4844 
4845 //==============================================================================
4846 //        T6CON Bits
4847 
4848 extern __at(0x041E) __sfr T6CON;
4849 
4850 typedef union
4851   {
4852   struct
4853     {
4854     unsigned T6CKPS0            : 1;
4855     unsigned T6CKPS1            : 1;
4856     unsigned TMR6ON             : 1;
4857     unsigned T6OUTPS0           : 1;
4858     unsigned T6OUTPS1           : 1;
4859     unsigned T6OUTPS2           : 1;
4860     unsigned T6OUTPS3           : 1;
4861     unsigned                    : 1;
4862     };
4863 
4864   struct
4865     {
4866     unsigned T6CKPS             : 2;
4867     unsigned                    : 6;
4868     };
4869 
4870   struct
4871     {
4872     unsigned                    : 3;
4873     unsigned T6OUTPS            : 4;
4874     unsigned                    : 1;
4875     };
4876   } __T6CONbits_t;
4877 
4878 extern __at(0x041E) volatile __T6CONbits_t T6CONbits;
4879 
4880 #define _T6CKPS0                0x01
4881 #define _T6CKPS1                0x02
4882 #define _TMR6ON                 0x04
4883 #define _T6OUTPS0               0x08
4884 #define _T6OUTPS1               0x10
4885 #define _T6OUTPS2               0x20
4886 #define _T6OUTPS3               0x40
4887 
4888 //==============================================================================
4889 
4890 
4891 //==============================================================================
4892 //        WPUG Bits
4893 
4894 extern __at(0x048D) __sfr WPUG;
4895 
4896 typedef struct
4897   {
4898   unsigned                      : 1;
4899   unsigned                      : 1;
4900   unsigned                      : 1;
4901   unsigned                      : 1;
4902   unsigned                      : 1;
4903   unsigned WPUG5                : 1;
4904   unsigned                      : 1;
4905   unsigned                      : 1;
4906   } __WPUGbits_t;
4907 
4908 extern __at(0x048D) volatile __WPUGbits_t WPUGbits;
4909 
4910 #define _WPUG5                  0x20
4911 
4912 //==============================================================================
4913 
4914 extern __at(0x0491) __sfr RC2REG;
4915 extern __at(0x0492) __sfr TX2REG;
4916 extern __at(0x0493) __sfr SP2BRGL;
4917 extern __at(0x0493) __sfr SPBRG2;
4918 extern __at(0x0494) __sfr SP2BRGH;
4919 
4920 //==============================================================================
4921 //        RC2STA Bits
4922 
4923 extern __at(0x0495) __sfr RC2STA;
4924 
4925 typedef struct
4926   {
4927   unsigned RX9D                 : 1;
4928   unsigned OERR                 : 1;
4929   unsigned FERR                 : 1;
4930   unsigned ADDEN                : 1;
4931   unsigned CREN                 : 1;
4932   unsigned SREN                 : 1;
4933   unsigned RX9                  : 1;
4934   unsigned SPEN                 : 1;
4935   } __RC2STAbits_t;
4936 
4937 extern __at(0x0495) volatile __RC2STAbits_t RC2STAbits;
4938 
4939 #define _RC2STA_RX9D            0x01
4940 #define _RC2STA_OERR            0x02
4941 #define _RC2STA_FERR            0x04
4942 #define _RC2STA_ADDEN           0x08
4943 #define _RC2STA_CREN            0x10
4944 #define _RC2STA_SREN            0x20
4945 #define _RC2STA_RX9             0x40
4946 #define _RC2STA_SPEN            0x80
4947 
4948 //==============================================================================
4949 
4950 
4951 //==============================================================================
4952 //        TX2STA Bits
4953 
4954 extern __at(0x0496) __sfr TX2STA;
4955 
4956 typedef struct
4957   {
4958   unsigned TX9D                 : 1;
4959   unsigned TRMT                 : 1;
4960   unsigned BRGH                 : 1;
4961   unsigned SENDB                : 1;
4962   unsigned SYNC                 : 1;
4963   unsigned TXEN                 : 1;
4964   unsigned TX9                  : 1;
4965   unsigned CSRC                 : 1;
4966   } __TX2STAbits_t;
4967 
4968 extern __at(0x0496) volatile __TX2STAbits_t TX2STAbits;
4969 
4970 #define _TX2STA_TX9D            0x01
4971 #define _TX2STA_TRMT            0x02
4972 #define _TX2STA_BRGH            0x04
4973 #define _TX2STA_SENDB           0x08
4974 #define _TX2STA_SYNC            0x10
4975 #define _TX2STA_TXEN            0x20
4976 #define _TX2STA_TX9             0x40
4977 #define _TX2STA_CSRC            0x80
4978 
4979 //==============================================================================
4980 
4981 
4982 //==============================================================================
4983 //        BAUD2CON Bits
4984 
4985 extern __at(0x0497) __sfr BAUD2CON;
4986 
4987 typedef struct
4988   {
4989   unsigned ABDEN                : 1;
4990   unsigned WUE                  : 1;
4991   unsigned                      : 1;
4992   unsigned BRG16                : 1;
4993   unsigned SCKP                 : 1;
4994   unsigned                      : 1;
4995   unsigned RCIDL                : 1;
4996   unsigned ABDOVF               : 1;
4997   } __BAUD2CONbits_t;
4998 
4999 extern __at(0x0497) volatile __BAUD2CONbits_t BAUD2CONbits;
5000 
5001 #define _BAUD2CON_ABDEN         0x01
5002 #define _BAUD2CON_WUE           0x02
5003 #define _BAUD2CON_BRG16         0x08
5004 #define _BAUD2CON_SCKP          0x10
5005 #define _BAUD2CON_RCIDL         0x40
5006 #define _BAUD2CON_ABDOVF        0x80
5007 
5008 //==============================================================================
5009 
5010 
5011 //==============================================================================
5012 //        LCDCON Bits
5013 
5014 extern __at(0x0791) __sfr LCDCON;
5015 
5016 typedef union
5017   {
5018   struct
5019     {
5020     unsigned LMUX0              : 1;
5021     unsigned LMUX1              : 1;
5022     unsigned CS0                : 1;
5023     unsigned CS1                : 1;
5024     unsigned                    : 1;
5025     unsigned WERR               : 1;
5026     unsigned SLPEN              : 1;
5027     unsigned LCDEN              : 1;
5028     };
5029 
5030   struct
5031     {
5032     unsigned LMUX               : 2;
5033     unsigned                    : 6;
5034     };
5035 
5036   struct
5037     {
5038     unsigned                    : 2;
5039     unsigned CS                 : 2;
5040     unsigned                    : 4;
5041     };
5042   } __LCDCONbits_t;
5043 
5044 extern __at(0x0791) volatile __LCDCONbits_t LCDCONbits;
5045 
5046 #define _LMUX0                  0x01
5047 #define _LMUX1                  0x02
5048 #define _CS0                    0x04
5049 #define _CS1                    0x08
5050 #define _WERR                   0x20
5051 #define _SLPEN                  0x40
5052 #define _LCDEN                  0x80
5053 
5054 //==============================================================================
5055 
5056 
5057 //==============================================================================
5058 //        LCDPS Bits
5059 
5060 extern __at(0x0792) __sfr LCDPS;
5061 
5062 typedef union
5063   {
5064   struct
5065     {
5066     unsigned LP0                : 1;
5067     unsigned LP1                : 1;
5068     unsigned LP2                : 1;
5069     unsigned LP3                : 1;
5070     unsigned WA                 : 1;
5071     unsigned LCDA               : 1;
5072     unsigned BIASMD             : 1;
5073     unsigned WFT                : 1;
5074     };
5075 
5076   struct
5077     {
5078     unsigned LP                 : 4;
5079     unsigned                    : 4;
5080     };
5081   } __LCDPSbits_t;
5082 
5083 extern __at(0x0792) volatile __LCDPSbits_t LCDPSbits;
5084 
5085 #define _LP0                    0x01
5086 #define _LP1                    0x02
5087 #define _LP2                    0x04
5088 #define _LP3                    0x08
5089 #define _WA                     0x10
5090 #define _LCDA                   0x20
5091 #define _BIASMD                 0x40
5092 #define _WFT                    0x80
5093 
5094 //==============================================================================
5095 
5096 
5097 //==============================================================================
5098 //        LCDREF Bits
5099 
5100 extern __at(0x0793) __sfr LCDREF;
5101 
5102 typedef struct
5103   {
5104   unsigned                      : 1;
5105   unsigned VLCD1PE              : 1;
5106   unsigned VLCD2PE              : 1;
5107   unsigned VLCD3PE              : 1;
5108   unsigned                      : 1;
5109   unsigned LCDIRI               : 1;
5110   unsigned LCDIRS               : 1;
5111   unsigned LCDIRE               : 1;
5112   } __LCDREFbits_t;
5113 
5114 extern __at(0x0793) volatile __LCDREFbits_t LCDREFbits;
5115 
5116 #define _VLCD1PE                0x02
5117 #define _VLCD2PE                0x04
5118 #define _VLCD3PE                0x08
5119 #define _LCDIRI                 0x20
5120 #define _LCDIRS                 0x40
5121 #define _LCDIRE                 0x80
5122 
5123 //==============================================================================
5124 
5125 
5126 //==============================================================================
5127 //        LCDCST Bits
5128 
5129 extern __at(0x0794) __sfr LCDCST;
5130 
5131 typedef union
5132   {
5133   struct
5134     {
5135     unsigned LCDCST0            : 1;
5136     unsigned LCDCST1            : 1;
5137     unsigned LCDCST2            : 1;
5138     unsigned                    : 1;
5139     unsigned                    : 1;
5140     unsigned                    : 1;
5141     unsigned                    : 1;
5142     unsigned                    : 1;
5143     };
5144 
5145   struct
5146     {
5147     unsigned LCDCST             : 3;
5148     unsigned                    : 5;
5149     };
5150   } __LCDCSTbits_t;
5151 
5152 extern __at(0x0794) volatile __LCDCSTbits_t LCDCSTbits;
5153 
5154 #define _LCDCST0                0x01
5155 #define _LCDCST1                0x02
5156 #define _LCDCST2                0x04
5157 
5158 //==============================================================================
5159 
5160 
5161 //==============================================================================
5162 //        LCDRL Bits
5163 
5164 extern __at(0x0795) __sfr LCDRL;
5165 
5166 typedef union
5167   {
5168   struct
5169     {
5170     unsigned LRLAT0             : 1;
5171     unsigned LRLAT1             : 1;
5172     unsigned LRLAT2             : 1;
5173     unsigned                    : 1;
5174     unsigned LRLBP0             : 1;
5175     unsigned LRLBP1             : 1;
5176     unsigned LRLAP0             : 1;
5177     unsigned LRLAP1             : 1;
5178     };
5179 
5180   struct
5181     {
5182     unsigned LRLAT              : 3;
5183     unsigned                    : 5;
5184     };
5185 
5186   struct
5187     {
5188     unsigned                    : 4;
5189     unsigned LRLBP              : 2;
5190     unsigned                    : 2;
5191     };
5192 
5193   struct
5194     {
5195     unsigned                    : 6;
5196     unsigned LRLAP              : 2;
5197     };
5198   } __LCDRLbits_t;
5199 
5200 extern __at(0x0795) volatile __LCDRLbits_t LCDRLbits;
5201 
5202 #define _LRLAT0                 0x01
5203 #define _LRLAT1                 0x02
5204 #define _LRLAT2                 0x04
5205 #define _LRLBP0                 0x10
5206 #define _LRLBP1                 0x20
5207 #define _LRLAP0                 0x40
5208 #define _LRLAP1                 0x80
5209 
5210 //==============================================================================
5211 
5212 
5213 //==============================================================================
5214 //        LCDSE0 Bits
5215 
5216 extern __at(0x0798) __sfr LCDSE0;
5217 
5218 typedef struct
5219   {
5220   unsigned SE0                  : 1;
5221   unsigned SE1                  : 1;
5222   unsigned SE2                  : 1;
5223   unsigned SE3                  : 1;
5224   unsigned SE4                  : 1;
5225   unsigned SE5                  : 1;
5226   unsigned SE6                  : 1;
5227   unsigned SE7                  : 1;
5228   } __LCDSE0bits_t;
5229 
5230 extern __at(0x0798) volatile __LCDSE0bits_t LCDSE0bits;
5231 
5232 #define _SE0                    0x01
5233 #define _SE1                    0x02
5234 #define _SE2                    0x04
5235 #define _SE3                    0x08
5236 #define _SE4                    0x10
5237 #define _SE5                    0x20
5238 #define _SE6                    0x40
5239 #define _SE7                    0x80
5240 
5241 //==============================================================================
5242 
5243 
5244 //==============================================================================
5245 //        LCDSE1 Bits
5246 
5247 extern __at(0x0799) __sfr LCDSE1;
5248 
5249 typedef struct
5250   {
5251   unsigned SE8                  : 1;
5252   unsigned SE9                  : 1;
5253   unsigned SE10                 : 1;
5254   unsigned SE11                 : 1;
5255   unsigned SE12                 : 1;
5256   unsigned SE13                 : 1;
5257   unsigned SE14                 : 1;
5258   unsigned SE15                 : 1;
5259   } __LCDSE1bits_t;
5260 
5261 extern __at(0x0799) volatile __LCDSE1bits_t LCDSE1bits;
5262 
5263 #define _SE8                    0x01
5264 #define _SE9                    0x02
5265 #define _SE10                   0x04
5266 #define _SE11                   0x08
5267 #define _SE12                   0x10
5268 #define _SE13                   0x20
5269 #define _SE14                   0x40
5270 #define _SE15                   0x80
5271 
5272 //==============================================================================
5273 
5274 
5275 //==============================================================================
5276 //        LCDSE2 Bits
5277 
5278 extern __at(0x079A) __sfr LCDSE2;
5279 
5280 typedef struct
5281   {
5282   unsigned SE16                 : 1;
5283   unsigned SE17                 : 1;
5284   unsigned SE18                 : 1;
5285   unsigned SE19                 : 1;
5286   unsigned SE20                 : 1;
5287   unsigned SE21                 : 1;
5288   unsigned SE22                 : 1;
5289   unsigned SE23                 : 1;
5290   } __LCDSE2bits_t;
5291 
5292 extern __at(0x079A) volatile __LCDSE2bits_t LCDSE2bits;
5293 
5294 #define _SE16                   0x01
5295 #define _SE17                   0x02
5296 #define _SE18                   0x04
5297 #define _SE19                   0x08
5298 #define _SE20                   0x10
5299 #define _SE21                   0x20
5300 #define _SE22                   0x40
5301 #define _SE23                   0x80
5302 
5303 //==============================================================================
5304 
5305 
5306 //==============================================================================
5307 //        LCDSE3 Bits
5308 
5309 extern __at(0x079B) __sfr LCDSE3;
5310 
5311 typedef struct
5312   {
5313   unsigned SE24                 : 1;
5314   unsigned SE25                 : 1;
5315   unsigned SE26                 : 1;
5316   unsigned SE27                 : 1;
5317   unsigned SE28                 : 1;
5318   unsigned SE29                 : 1;
5319   unsigned SE30                 : 1;
5320   unsigned SE31                 : 1;
5321   } __LCDSE3bits_t;
5322 
5323 extern __at(0x079B) volatile __LCDSE3bits_t LCDSE3bits;
5324 
5325 #define _SE24                   0x01
5326 #define _SE25                   0x02
5327 #define _SE26                   0x04
5328 #define _SE27                   0x08
5329 #define _SE28                   0x10
5330 #define _SE29                   0x20
5331 #define _SE30                   0x40
5332 #define _SE31                   0x80
5333 
5334 //==============================================================================
5335 
5336 
5337 //==============================================================================
5338 //        LCDSE4 Bits
5339 
5340 extern __at(0x079C) __sfr LCDSE4;
5341 
5342 typedef struct
5343   {
5344   unsigned SE32                 : 1;
5345   unsigned SE33                 : 1;
5346   unsigned SE34                 : 1;
5347   unsigned SE35                 : 1;
5348   unsigned SE36                 : 1;
5349   unsigned SE37                 : 1;
5350   unsigned SE38                 : 1;
5351   unsigned SE39                 : 1;
5352   } __LCDSE4bits_t;
5353 
5354 extern __at(0x079C) volatile __LCDSE4bits_t LCDSE4bits;
5355 
5356 #define _SE32                   0x01
5357 #define _SE33                   0x02
5358 #define _SE34                   0x04
5359 #define _SE35                   0x08
5360 #define _SE36                   0x10
5361 #define _SE37                   0x20
5362 #define _SE38                   0x40
5363 #define _SE39                   0x80
5364 
5365 //==============================================================================
5366 
5367 
5368 //==============================================================================
5369 //        LCDSE5 Bits
5370 
5371 extern __at(0x079D) __sfr LCDSE5;
5372 
5373 typedef struct
5374   {
5375   unsigned SE40                 : 1;
5376   unsigned SE41                 : 1;
5377   unsigned SE42                 : 1;
5378   unsigned SE43                 : 1;
5379   unsigned SE44                 : 1;
5380   unsigned SE45                 : 1;
5381   unsigned                      : 1;
5382   unsigned                      : 1;
5383   } __LCDSE5bits_t;
5384 
5385 extern __at(0x079D) volatile __LCDSE5bits_t LCDSE5bits;
5386 
5387 #define _SE40                   0x01
5388 #define _SE41                   0x02
5389 #define _SE42                   0x04
5390 #define _SE43                   0x08
5391 #define _SE44                   0x10
5392 #define _SE45                   0x20
5393 
5394 //==============================================================================
5395 
5396 
5397 //==============================================================================
5398 //        LCDDATA0 Bits
5399 
5400 extern __at(0x07A0) __sfr LCDDATA0;
5401 
5402 typedef struct
5403   {
5404   unsigned SEG0COM0             : 1;
5405   unsigned SEG1COM0             : 1;
5406   unsigned SEG2COM0             : 1;
5407   unsigned SEG3COM0             : 1;
5408   unsigned SEG4COM0             : 1;
5409   unsigned SEG5COM0             : 1;
5410   unsigned SEG6COM0             : 1;
5411   unsigned SEG7COM0             : 1;
5412   } __LCDDATA0bits_t;
5413 
5414 extern __at(0x07A0) volatile __LCDDATA0bits_t LCDDATA0bits;
5415 
5416 #define _SEG0COM0               0x01
5417 #define _SEG1COM0               0x02
5418 #define _SEG2COM0               0x04
5419 #define _SEG3COM0               0x08
5420 #define _SEG4COM0               0x10
5421 #define _SEG5COM0               0x20
5422 #define _SEG6COM0               0x40
5423 #define _SEG7COM0               0x80
5424 
5425 //==============================================================================
5426 
5427 
5428 //==============================================================================
5429 //        LCDDATA1 Bits
5430 
5431 extern __at(0x07A1) __sfr LCDDATA1;
5432 
5433 typedef struct
5434   {
5435   unsigned SEG8COM0             : 1;
5436   unsigned SEG9COM0             : 1;
5437   unsigned SEG10COM0            : 1;
5438   unsigned SEG11COM0            : 1;
5439   unsigned SEG12COM0            : 1;
5440   unsigned SEG13COM0            : 1;
5441   unsigned SEG14COM0            : 1;
5442   unsigned SEG15COM0            : 1;
5443   } __LCDDATA1bits_t;
5444 
5445 extern __at(0x07A1) volatile __LCDDATA1bits_t LCDDATA1bits;
5446 
5447 #define _SEG8COM0               0x01
5448 #define _SEG9COM0               0x02
5449 #define _SEG10COM0              0x04
5450 #define _SEG11COM0              0x08
5451 #define _SEG12COM0              0x10
5452 #define _SEG13COM0              0x20
5453 #define _SEG14COM0              0x40
5454 #define _SEG15COM0              0x80
5455 
5456 //==============================================================================
5457 
5458 
5459 //==============================================================================
5460 //        LCDDATA2 Bits
5461 
5462 extern __at(0x07A2) __sfr LCDDATA2;
5463 
5464 typedef struct
5465   {
5466   unsigned SEG16COM0            : 1;
5467   unsigned SEG17COM0            : 1;
5468   unsigned SEG18COM0            : 1;
5469   unsigned SEG19COM0            : 1;
5470   unsigned SEG20COM0            : 1;
5471   unsigned SEG21COM0            : 1;
5472   unsigned SEG22COM0            : 1;
5473   unsigned SEG23COM0            : 1;
5474   } __LCDDATA2bits_t;
5475 
5476 extern __at(0x07A2) volatile __LCDDATA2bits_t LCDDATA2bits;
5477 
5478 #define _SEG16COM0              0x01
5479 #define _SEG17COM0              0x02
5480 #define _SEG18COM0              0x04
5481 #define _SEG19COM0              0x08
5482 #define _SEG20COM0              0x10
5483 #define _SEG21COM0              0x20
5484 #define _SEG22COM0              0x40
5485 #define _SEG23COM0              0x80
5486 
5487 //==============================================================================
5488 
5489 
5490 //==============================================================================
5491 //        LCDDATA3 Bits
5492 
5493 extern __at(0x07A3) __sfr LCDDATA3;
5494 
5495 typedef struct
5496   {
5497   unsigned SEG0COM1             : 1;
5498   unsigned SEG1COM1             : 1;
5499   unsigned SEG2COM1             : 1;
5500   unsigned SEG3COM1             : 1;
5501   unsigned SEG4COM1             : 1;
5502   unsigned SEG5COM1             : 1;
5503   unsigned SEG6COM1             : 1;
5504   unsigned SEG7COM1             : 1;
5505   } __LCDDATA3bits_t;
5506 
5507 extern __at(0x07A3) volatile __LCDDATA3bits_t LCDDATA3bits;
5508 
5509 #define _SEG0COM1               0x01
5510 #define _SEG1COM1               0x02
5511 #define _SEG2COM1               0x04
5512 #define _SEG3COM1               0x08
5513 #define _SEG4COM1               0x10
5514 #define _SEG5COM1               0x20
5515 #define _SEG6COM1               0x40
5516 #define _SEG7COM1               0x80
5517 
5518 //==============================================================================
5519 
5520 
5521 //==============================================================================
5522 //        LCDDATA4 Bits
5523 
5524 extern __at(0x07A4) __sfr LCDDATA4;
5525 
5526 typedef struct
5527   {
5528   unsigned SEG8COM1             : 1;
5529   unsigned SEG9COM1             : 1;
5530   unsigned SEG10COM1            : 1;
5531   unsigned SEG11COM1            : 1;
5532   unsigned SEG12COM1            : 1;
5533   unsigned SEG13COM1            : 1;
5534   unsigned SEG14COM1            : 1;
5535   unsigned SEG15COM1            : 1;
5536   } __LCDDATA4bits_t;
5537 
5538 extern __at(0x07A4) volatile __LCDDATA4bits_t LCDDATA4bits;
5539 
5540 #define _SEG8COM1               0x01
5541 #define _SEG9COM1               0x02
5542 #define _SEG10COM1              0x04
5543 #define _SEG11COM1              0x08
5544 #define _SEG12COM1              0x10
5545 #define _SEG13COM1              0x20
5546 #define _SEG14COM1              0x40
5547 #define _SEG15COM1              0x80
5548 
5549 //==============================================================================
5550 
5551 
5552 //==============================================================================
5553 //        LCDDATA5 Bits
5554 
5555 extern __at(0x07A5) __sfr LCDDATA5;
5556 
5557 typedef struct
5558   {
5559   unsigned SEG16COM1            : 1;
5560   unsigned SEG17COM1            : 1;
5561   unsigned SEG18COM1            : 1;
5562   unsigned SEG19COM1            : 1;
5563   unsigned SEG20COM1            : 1;
5564   unsigned SEG21COM1            : 1;
5565   unsigned SEG22COM1            : 1;
5566   unsigned SEG23COM1            : 1;
5567   } __LCDDATA5bits_t;
5568 
5569 extern __at(0x07A5) volatile __LCDDATA5bits_t LCDDATA5bits;
5570 
5571 #define _SEG16COM1              0x01
5572 #define _SEG17COM1              0x02
5573 #define _SEG18COM1              0x04
5574 #define _SEG19COM1              0x08
5575 #define _SEG20COM1              0x10
5576 #define _SEG21COM1              0x20
5577 #define _SEG22COM1              0x40
5578 #define _SEG23COM1              0x80
5579 
5580 //==============================================================================
5581 
5582 
5583 //==============================================================================
5584 //        LCDDATA6 Bits
5585 
5586 extern __at(0x07A6) __sfr LCDDATA6;
5587 
5588 typedef struct
5589   {
5590   unsigned SEG0COM2             : 1;
5591   unsigned SEG1COM2             : 1;
5592   unsigned SEG2COM2             : 1;
5593   unsigned SEG3COM2             : 1;
5594   unsigned SEG4COM2             : 1;
5595   unsigned SEG5COM2             : 1;
5596   unsigned SEG6COM2             : 1;
5597   unsigned SEG7COM2             : 1;
5598   } __LCDDATA6bits_t;
5599 
5600 extern __at(0x07A6) volatile __LCDDATA6bits_t LCDDATA6bits;
5601 
5602 #define _SEG0COM2               0x01
5603 #define _SEG1COM2               0x02
5604 #define _SEG2COM2               0x04
5605 #define _SEG3COM2               0x08
5606 #define _SEG4COM2               0x10
5607 #define _SEG5COM2               0x20
5608 #define _SEG6COM2               0x40
5609 #define _SEG7COM2               0x80
5610 
5611 //==============================================================================
5612 
5613 
5614 //==============================================================================
5615 //        LCDDATA7 Bits
5616 
5617 extern __at(0x07A7) __sfr LCDDATA7;
5618 
5619 typedef struct
5620   {
5621   unsigned SEG8COM2             : 1;
5622   unsigned SEG9COM2             : 1;
5623   unsigned SEG10COM2            : 1;
5624   unsigned SEG11COM2            : 1;
5625   unsigned SEG12COM2            : 1;
5626   unsigned SEG13COM2            : 1;
5627   unsigned SEG14COM2            : 1;
5628   unsigned SEG15COM2            : 1;
5629   } __LCDDATA7bits_t;
5630 
5631 extern __at(0x07A7) volatile __LCDDATA7bits_t LCDDATA7bits;
5632 
5633 #define _SEG8COM2               0x01
5634 #define _SEG9COM2               0x02
5635 #define _SEG10COM2              0x04
5636 #define _SEG11COM2              0x08
5637 #define _SEG12COM2              0x10
5638 #define _SEG13COM2              0x20
5639 #define _SEG14COM2              0x40
5640 #define _SEG15COM2              0x80
5641 
5642 //==============================================================================
5643 
5644 
5645 //==============================================================================
5646 //        LCDDATA8 Bits
5647 
5648 extern __at(0x07A8) __sfr LCDDATA8;
5649 
5650 typedef struct
5651   {
5652   unsigned SEG16COM2            : 1;
5653   unsigned SEG17COM2            : 1;
5654   unsigned SEG18COM2            : 1;
5655   unsigned SEG19COM2            : 1;
5656   unsigned SEG20COM2            : 1;
5657   unsigned SEG21COM2            : 1;
5658   unsigned SEG22COM2            : 1;
5659   unsigned SEG23COM2            : 1;
5660   } __LCDDATA8bits_t;
5661 
5662 extern __at(0x07A8) volatile __LCDDATA8bits_t LCDDATA8bits;
5663 
5664 #define _SEG16COM2              0x01
5665 #define _SEG17COM2              0x02
5666 #define _SEG18COM2              0x04
5667 #define _SEG19COM2              0x08
5668 #define _SEG20COM2              0x10
5669 #define _SEG21COM2              0x20
5670 #define _SEG22COM2              0x40
5671 #define _SEG23COM2              0x80
5672 
5673 //==============================================================================
5674 
5675 
5676 //==============================================================================
5677 //        LCDDATA9 Bits
5678 
5679 extern __at(0x07A9) __sfr LCDDATA9;
5680 
5681 typedef struct
5682   {
5683   unsigned SEG0COM3             : 1;
5684   unsigned SEG1COM3             : 1;
5685   unsigned SEG2COM3             : 1;
5686   unsigned SEG3COM3             : 1;
5687   unsigned SEG4COM3             : 1;
5688   unsigned SEG5COM3             : 1;
5689   unsigned SEG6COM3             : 1;
5690   unsigned SEG7COM3             : 1;
5691   } __LCDDATA9bits_t;
5692 
5693 extern __at(0x07A9) volatile __LCDDATA9bits_t LCDDATA9bits;
5694 
5695 #define _SEG0COM3               0x01
5696 #define _SEG1COM3               0x02
5697 #define _SEG2COM3               0x04
5698 #define _SEG3COM3               0x08
5699 #define _SEG4COM3               0x10
5700 #define _SEG5COM3               0x20
5701 #define _SEG6COM3               0x40
5702 #define _SEG7COM3               0x80
5703 
5704 //==============================================================================
5705 
5706 
5707 //==============================================================================
5708 //        LCDDATA10 Bits
5709 
5710 extern __at(0x07AA) __sfr LCDDATA10;
5711 
5712 typedef struct
5713   {
5714   unsigned SEG8COM3             : 1;
5715   unsigned SEG9COM3             : 1;
5716   unsigned SEG10COM3            : 1;
5717   unsigned SEG11COM3            : 1;
5718   unsigned SEG12COM3            : 1;
5719   unsigned SEG13COM3            : 1;
5720   unsigned SEG14COM3            : 1;
5721   unsigned SEG15COM3            : 1;
5722   } __LCDDATA10bits_t;
5723 
5724 extern __at(0x07AA) volatile __LCDDATA10bits_t LCDDATA10bits;
5725 
5726 #define _SEG8COM3               0x01
5727 #define _SEG9COM3               0x02
5728 #define _SEG10COM3              0x04
5729 #define _SEG11COM3              0x08
5730 #define _SEG12COM3              0x10
5731 #define _SEG13COM3              0x20
5732 #define _SEG14COM3              0x40
5733 #define _SEG15COM3              0x80
5734 
5735 //==============================================================================
5736 
5737 
5738 //==============================================================================
5739 //        LCDDATA11 Bits
5740 
5741 extern __at(0x07AB) __sfr LCDDATA11;
5742 
5743 typedef struct
5744   {
5745   unsigned SEG16COM3            : 1;
5746   unsigned SEG17COM3            : 1;
5747   unsigned SEG18COM3            : 1;
5748   unsigned SEG19COM3            : 1;
5749   unsigned SEG20COM3            : 1;
5750   unsigned SEG21COM3            : 1;
5751   unsigned SEG22COM3            : 1;
5752   unsigned SEG23COM3            : 1;
5753   } __LCDDATA11bits_t;
5754 
5755 extern __at(0x07AB) volatile __LCDDATA11bits_t LCDDATA11bits;
5756 
5757 #define _SEG16COM3              0x01
5758 #define _SEG17COM3              0x02
5759 #define _SEG18COM3              0x04
5760 #define _SEG19COM3              0x08
5761 #define _SEG20COM3              0x10
5762 #define _SEG21COM3              0x20
5763 #define _SEG22COM3              0x40
5764 #define _SEG23COM3              0x80
5765 
5766 //==============================================================================
5767 
5768 
5769 //==============================================================================
5770 //        LCDDATA12 Bits
5771 
5772 extern __at(0x07AC) __sfr LCDDATA12;
5773 
5774 typedef struct
5775   {
5776   unsigned SEG24COM0            : 1;
5777   unsigned SEG25COM0            : 1;
5778   unsigned SEG26COM0            : 1;
5779   unsigned SEG27COM0            : 1;
5780   unsigned SEG28COM0            : 1;
5781   unsigned SEG29COM0            : 1;
5782   unsigned SEG30COM0            : 1;
5783   unsigned SEG31COM0            : 1;
5784   } __LCDDATA12bits_t;
5785 
5786 extern __at(0x07AC) volatile __LCDDATA12bits_t LCDDATA12bits;
5787 
5788 #define _SEG24COM0              0x01
5789 #define _SEG25COM0              0x02
5790 #define _SEG26COM0              0x04
5791 #define _SEG27COM0              0x08
5792 #define _SEG28COM0              0x10
5793 #define _SEG29COM0              0x20
5794 #define _SEG30COM0              0x40
5795 #define _SEG31COM0              0x80
5796 
5797 //==============================================================================
5798 
5799 
5800 //==============================================================================
5801 //        LCDDATA13 Bits
5802 
5803 extern __at(0x07AD) __sfr LCDDATA13;
5804 
5805 typedef struct
5806   {
5807   unsigned SEG32COM0            : 1;
5808   unsigned SEG33COM0            : 1;
5809   unsigned SEG34COM0            : 1;
5810   unsigned SEG35COM0            : 1;
5811   unsigned SEG36COM0            : 1;
5812   unsigned SEG37COM0            : 1;
5813   unsigned SEG38COM0            : 1;
5814   unsigned SEG39COM0            : 1;
5815   } __LCDDATA13bits_t;
5816 
5817 extern __at(0x07AD) volatile __LCDDATA13bits_t LCDDATA13bits;
5818 
5819 #define _SEG32COM0              0x01
5820 #define _SEG33COM0              0x02
5821 #define _SEG34COM0              0x04
5822 #define _SEG35COM0              0x08
5823 #define _SEG36COM0              0x10
5824 #define _SEG37COM0              0x20
5825 #define _SEG38COM0              0x40
5826 #define _SEG39COM0              0x80
5827 
5828 //==============================================================================
5829 
5830 
5831 //==============================================================================
5832 //        LCDDATA14 Bits
5833 
5834 extern __at(0x07AE) __sfr LCDDATA14;
5835 
5836 typedef struct
5837   {
5838   unsigned SEG40COM0            : 1;
5839   unsigned SEG41COM0            : 1;
5840   unsigned SEG42COM0            : 1;
5841   unsigned SEG43COM0            : 1;
5842   unsigned SEG44COM0            : 1;
5843   unsigned SEG45COM0            : 1;
5844   unsigned                      : 1;
5845   unsigned                      : 1;
5846   } __LCDDATA14bits_t;
5847 
5848 extern __at(0x07AE) volatile __LCDDATA14bits_t LCDDATA14bits;
5849 
5850 #define _SEG40COM0              0x01
5851 #define _SEG41COM0              0x02
5852 #define _SEG42COM0              0x04
5853 #define _SEG43COM0              0x08
5854 #define _SEG44COM0              0x10
5855 #define _SEG45COM0              0x20
5856 
5857 //==============================================================================
5858 
5859 
5860 //==============================================================================
5861 //        LCDDATA15 Bits
5862 
5863 extern __at(0x07AF) __sfr LCDDATA15;
5864 
5865 typedef struct
5866   {
5867   unsigned SEG24COM1            : 1;
5868   unsigned SEG25COM1            : 1;
5869   unsigned SEG26COM1            : 1;
5870   unsigned SEG27COM1            : 1;
5871   unsigned SEG28COM1            : 1;
5872   unsigned SEG29COM1            : 1;
5873   unsigned SEG30COM1            : 1;
5874   unsigned SEG31COM1            : 1;
5875   } __LCDDATA15bits_t;
5876 
5877 extern __at(0x07AF) volatile __LCDDATA15bits_t LCDDATA15bits;
5878 
5879 #define _SEG24COM1              0x01
5880 #define _SEG25COM1              0x02
5881 #define _SEG26COM1              0x04
5882 #define _SEG27COM1              0x08
5883 #define _SEG28COM1              0x10
5884 #define _SEG29COM1              0x20
5885 #define _SEG30COM1              0x40
5886 #define _SEG31COM1              0x80
5887 
5888 //==============================================================================
5889 
5890 
5891 //==============================================================================
5892 //        LCDDATA16 Bits
5893 
5894 extern __at(0x07B0) __sfr LCDDATA16;
5895 
5896 typedef struct
5897   {
5898   unsigned SEG32COM1            : 1;
5899   unsigned SEG33COM1            : 1;
5900   unsigned SEG34COM1            : 1;
5901   unsigned SEG35COM1            : 1;
5902   unsigned SEG36COM1            : 1;
5903   unsigned SEG37COM1            : 1;
5904   unsigned SEG38COM1            : 1;
5905   unsigned SEG39COM1            : 1;
5906   } __LCDDATA16bits_t;
5907 
5908 extern __at(0x07B0) volatile __LCDDATA16bits_t LCDDATA16bits;
5909 
5910 #define _SEG32COM1              0x01
5911 #define _SEG33COM1              0x02
5912 #define _SEG34COM1              0x04
5913 #define _SEG35COM1              0x08
5914 #define _SEG36COM1              0x10
5915 #define _SEG37COM1              0x20
5916 #define _SEG38COM1              0x40
5917 #define _SEG39COM1              0x80
5918 
5919 //==============================================================================
5920 
5921 
5922 //==============================================================================
5923 //        LCDDATA17 Bits
5924 
5925 extern __at(0x07B1) __sfr LCDDATA17;
5926 
5927 typedef struct
5928   {
5929   unsigned SEG40COM1            : 1;
5930   unsigned SEG41COM1            : 1;
5931   unsigned SEG42COM1            : 1;
5932   unsigned SEG43COM1            : 1;
5933   unsigned SEG44COM1            : 1;
5934   unsigned SEG45COM1            : 1;
5935   unsigned                      : 1;
5936   unsigned                      : 1;
5937   } __LCDDATA17bits_t;
5938 
5939 extern __at(0x07B1) volatile __LCDDATA17bits_t LCDDATA17bits;
5940 
5941 #define _SEG40COM1              0x01
5942 #define _SEG41COM1              0x02
5943 #define _SEG42COM1              0x04
5944 #define _SEG43COM1              0x08
5945 #define _SEG44COM1              0x10
5946 #define _SEG45COM1              0x20
5947 
5948 //==============================================================================
5949 
5950 
5951 //==============================================================================
5952 //        LCDDATA18 Bits
5953 
5954 extern __at(0x07B2) __sfr LCDDATA18;
5955 
5956 typedef struct
5957   {
5958   unsigned SEG24COM2            : 1;
5959   unsigned SEG25COM2            : 1;
5960   unsigned SEG26COM2            : 1;
5961   unsigned SEG27COM2            : 1;
5962   unsigned SEG28COM2            : 1;
5963   unsigned SEG29COM2            : 1;
5964   unsigned SEG30COM2            : 1;
5965   unsigned SEG31COM2            : 1;
5966   } __LCDDATA18bits_t;
5967 
5968 extern __at(0x07B2) volatile __LCDDATA18bits_t LCDDATA18bits;
5969 
5970 #define _SEG24COM2              0x01
5971 #define _SEG25COM2              0x02
5972 #define _SEG26COM2              0x04
5973 #define _SEG27COM2              0x08
5974 #define _SEG28COM2              0x10
5975 #define _SEG29COM2              0x20
5976 #define _SEG30COM2              0x40
5977 #define _SEG31COM2              0x80
5978 
5979 //==============================================================================
5980 
5981 
5982 //==============================================================================
5983 //        LCDDATA19 Bits
5984 
5985 extern __at(0x07B3) __sfr LCDDATA19;
5986 
5987 typedef struct
5988   {
5989   unsigned SEG32COM2            : 1;
5990   unsigned SEG33COM2            : 1;
5991   unsigned SEG34COM2            : 1;
5992   unsigned SEG35COM2            : 1;
5993   unsigned SEG36COM2            : 1;
5994   unsigned SEG37COM2            : 1;
5995   unsigned SEG38COM2            : 1;
5996   unsigned SEG39COM2            : 1;
5997   } __LCDDATA19bits_t;
5998 
5999 extern __at(0x07B3) volatile __LCDDATA19bits_t LCDDATA19bits;
6000 
6001 #define _SEG32COM2              0x01
6002 #define _SEG33COM2              0x02
6003 #define _SEG34COM2              0x04
6004 #define _SEG35COM2              0x08
6005 #define _SEG36COM2              0x10
6006 #define _SEG37COM2              0x20
6007 #define _SEG38COM2              0x40
6008 #define _SEG39COM2              0x80
6009 
6010 //==============================================================================
6011 
6012 
6013 //==============================================================================
6014 //        LCDDATA20 Bits
6015 
6016 extern __at(0x07B4) __sfr LCDDATA20;
6017 
6018 typedef struct
6019   {
6020   unsigned SEG40COM2            : 1;
6021   unsigned SEG41COM2            : 1;
6022   unsigned SEG42COM2            : 1;
6023   unsigned SEG43COM2            : 1;
6024   unsigned SEG44COM2            : 1;
6025   unsigned SEG45COM2            : 1;
6026   unsigned                      : 1;
6027   unsigned                      : 1;
6028   } __LCDDATA20bits_t;
6029 
6030 extern __at(0x07B4) volatile __LCDDATA20bits_t LCDDATA20bits;
6031 
6032 #define _SEG40COM2              0x01
6033 #define _SEG41COM2              0x02
6034 #define _SEG42COM2              0x04
6035 #define _SEG43COM2              0x08
6036 #define _SEG44COM2              0x10
6037 #define _SEG45COM2              0x20
6038 
6039 //==============================================================================
6040 
6041 
6042 //==============================================================================
6043 //        LCDDATA21 Bits
6044 
6045 extern __at(0x07B5) __sfr LCDDATA21;
6046 
6047 typedef struct
6048   {
6049   unsigned SEG24COM3            : 1;
6050   unsigned SEG25COM3            : 1;
6051   unsigned SEG26COM3            : 1;
6052   unsigned SEG27COM3            : 1;
6053   unsigned SEG28COM3            : 1;
6054   unsigned SEG29COM3            : 1;
6055   unsigned SEG30COM3            : 1;
6056   unsigned SEG31COM3            : 1;
6057   } __LCDDATA21bits_t;
6058 
6059 extern __at(0x07B5) volatile __LCDDATA21bits_t LCDDATA21bits;
6060 
6061 #define _SEG24COM3              0x01
6062 #define _SEG25COM3              0x02
6063 #define _SEG26COM3              0x04
6064 #define _SEG27COM3              0x08
6065 #define _SEG28COM3              0x10
6066 #define _SEG29COM3              0x20
6067 #define _SEG30COM3              0x40
6068 #define _SEG31COM3              0x80
6069 
6070 //==============================================================================
6071 
6072 
6073 //==============================================================================
6074 //        LCDDATA22 Bits
6075 
6076 extern __at(0x07B6) __sfr LCDDATA22;
6077 
6078 typedef struct
6079   {
6080   unsigned SEG32COM3            : 1;
6081   unsigned SEG33COM3            : 1;
6082   unsigned SEG34COM3            : 1;
6083   unsigned SEG35COM3            : 1;
6084   unsigned SEG36COM3            : 1;
6085   unsigned SEG37COM3            : 1;
6086   unsigned SEG38COM3            : 1;
6087   unsigned SEG39COM3            : 1;
6088   } __LCDDATA22bits_t;
6089 
6090 extern __at(0x07B6) volatile __LCDDATA22bits_t LCDDATA22bits;
6091 
6092 #define _SEG32COM3              0x01
6093 #define _SEG33COM3              0x02
6094 #define _SEG34COM3              0x04
6095 #define _SEG35COM3              0x08
6096 #define _SEG36COM3              0x10
6097 #define _SEG37COM3              0x20
6098 #define _SEG38COM3              0x40
6099 #define _SEG39COM3              0x80
6100 
6101 //==============================================================================
6102 
6103 
6104 //==============================================================================
6105 //        LCDDATA23 Bits
6106 
6107 extern __at(0x07B7) __sfr LCDDATA23;
6108 
6109 typedef struct
6110   {
6111   unsigned SEG40COM3            : 1;
6112   unsigned SEG41COM3            : 1;
6113   unsigned SEG42COM3            : 1;
6114   unsigned SEG43COM3            : 1;
6115   unsigned SEG44COM3            : 1;
6116   unsigned SEG45COM3            : 1;
6117   unsigned                      : 1;
6118   unsigned                      : 1;
6119   } __LCDDATA23bits_t;
6120 
6121 extern __at(0x07B7) volatile __LCDDATA23bits_t LCDDATA23bits;
6122 
6123 #define _SEG40COM3              0x01
6124 #define _SEG41COM3              0x02
6125 #define _SEG42COM3              0x04
6126 #define _SEG43COM3              0x08
6127 #define _SEG44COM3              0x10
6128 #define _SEG45COM3              0x20
6129 
6130 //==============================================================================
6131 
6132 
6133 //==============================================================================
6134 //        STATUS_SHAD Bits
6135 
6136 extern __at(0x0FE4) __sfr STATUS_SHAD;
6137 
6138 typedef struct
6139   {
6140   unsigned C_SHAD               : 1;
6141   unsigned DC_SHAD              : 1;
6142   unsigned Z_SHAD               : 1;
6143   unsigned                      : 1;
6144   unsigned                      : 1;
6145   unsigned                      : 1;
6146   unsigned                      : 1;
6147   unsigned                      : 1;
6148   } __STATUS_SHADbits_t;
6149 
6150 extern __at(0x0FE4) volatile __STATUS_SHADbits_t STATUS_SHADbits;
6151 
6152 #define _C_SHAD                 0x01
6153 #define _DC_SHAD                0x02
6154 #define _Z_SHAD                 0x04
6155 
6156 //==============================================================================
6157 
6158 extern __at(0x0FE5) __sfr WREG_SHAD;
6159 extern __at(0x0FE6) __sfr BSR_SHAD;
6160 extern __at(0x0FE7) __sfr PCLATH_SHAD;
6161 extern __at(0x0FE8) __sfr FSR0L_SHAD;
6162 extern __at(0x0FE9) __sfr FSR0H_SHAD;
6163 extern __at(0x0FEA) __sfr FSR1L_SHAD;
6164 extern __at(0x0FEB) __sfr FSR1H_SHAD;
6165 extern __at(0x0FED) __sfr STKPTR;
6166 extern __at(0x0FEE) __sfr TOSL;
6167 extern __at(0x0FEF) __sfr TOSH;
6168 
6169 //==============================================================================
6170 //
6171 //        Configuration Bits
6172 //
6173 //==============================================================================
6174 
6175 #define _CONFIG1                0x8007
6176 #define _CONFIG2                0x8008
6177 
6178 //----------------------------- CONFIG1 Options -------------------------------
6179 
6180 #define _FOSC_LP                0x3FF8  // LP Oscillator, Low-power crystal connected between OSC1 and OSC2 pins.
6181 #define _FOSC_XT                0x3FF9  // XT Oscillator, Crystal/resonator connected between OSC1 and OSC2 pins.
6182 #define _FOSC_HS                0x3FFA  // HS Oscillator, High-speed crystal/resonator connected between OSC1 and OSC2 pins.
6183 #define _FOSC_EXTRC             0x3FFB  // EXTRC oscillator: External RC circuit connected to CLKIN pin.
6184 #define _FOSC_INTOSC            0x3FFC  // INTOSC oscillator: I/O function on CLKIN pin.
6185 #define _FOSC_ECL               0x3FFD  // ECL, External Clock, Low Power Mode (0-0.5 MHz): device clock supplied to CLKIN pin.
6186 #define _FOSC_ECM               0x3FFE  // ECM, External Clock, Medium Power Mode (0.5-4 MHz): device clock supplied to CLKIN pin.
6187 #define _FOSC_ECH               0x3FFF  // ECH, External Clock, High Power Mode (4-32 MHz): device clock supplied to CLKIN pin.
6188 #define _WDTE_OFF               0x3FE7  // WDT disabled.
6189 #define _WDTE_SWDTEN            0x3FEF  // WDT controlled by the SWDTEN bit in the WDTCON register.
6190 #define _WDTE_NSLEEP            0x3FF7  // WDT enabled while running and disabled in Sleep.
6191 #define _WDTE_ON                0x3FFF  // WDT enabled.
6192 #define _PWRTE_ON               0x3FDF  // PWRT enabled.
6193 #define _PWRTE_OFF              0x3FFF  // PWRT disabled.
6194 #define _MCLRE_OFF              0x3FBF  // MCLR/VPP pin function is digital input.
6195 #define _MCLRE_ON               0x3FFF  // MCLR/VPP pin function is MCLR.
6196 #define _CP_ON                  0x3F7F  // Program memory code protection is enabled.
6197 #define _CP_OFF                 0x3FFF  // Program memory code protection is disabled.
6198 #define _CPD_ON                 0x3EFF  // Data memory code protection is enabled.
6199 #define _CPD_OFF                0x3FFF  // Data memory code protection is disabled.
6200 #define _BOREN_OFF              0x39FF  // Brown-out Reset disabled.
6201 #define _BOREN_SBODEN           0x3BFF  // Brown-out Reset controlled by the SBOREN bit in the BORCON register.
6202 #define _BOREN_NSLEEP           0x3DFF  // Brown-out Reset enabled while running and disabled in Sleep.
6203 #define _BOREN_ON               0x3FFF  // Brown-out Reset enabled.
6204 #define _CLKOUTEN_ON            0x37FF  // CLKOUT function is enabled on the CLKOUT pin.
6205 #define _CLKOUTEN_OFF           0x3FFF  // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin.
6206 #define _IESO_OFF               0x2FFF  // Internal/External Switchover mode is disabled.
6207 #define _IESO_ON                0x3FFF  // Internal/External Switchover mode is enabled.
6208 #define _FCMEN_OFF              0x1FFF  // Fail-Safe Clock Monitor is disabled.
6209 #define _FCMEN_ON               0x3FFF  // Fail-Safe Clock Monitor is enabled.
6210 
6211 //----------------------------- CONFIG2 Options -------------------------------
6212 
6213 #define _WRT_ALL                0x3FFC  // 000h to 3FFFh write protected, no addresses may be modified by EECON control.
6214 #define _WRT_HALF               0x3FFD  // 000h to 1FFFh write protected, 2000h to 3FFFh may be modified by EECON control.
6215 #define _WRT_BOOT               0x3FFE  // 000h to 1FFh write protected, 200h to 3FFFh may be modified by EECON control.
6216 #define _WRT_OFF                0x3FFF  // Write protection off.
6217 #define _VCAPEN_ON              0x3FEF  // VCAP functionality is enabled on VCAP pin.
6218 #define _VCAPEN_OFF             0x3FFF  // VCAP pin functionality is disabled.
6219 #define _PLLEN_OFF              0x3EFF  // 4x PLL disabled.
6220 #define _PLLEN_ON               0x3FFF  // 4x PLL enabled.
6221 #define _STVREN_OFF             0x3DFF  // Stack Overflow or Underflow will not cause a Reset.
6222 #define _STVREN_ON              0x3FFF  // Stack Overflow or Underflow will cause a Reset.
6223 #define _BORV_HI                0x3BFF  // Brown-out Reset Voltage (Vbor), high trip point selected.
6224 #define _BORV_25                0x3BFF  // Brown-out Reset Voltage (Vbor), high trip point selected.
6225 #define _BORV_LO                0x3FFF  // Brown-out Reset Voltage (Vbor), low trip point selected.
6226 #define _BORV_19                0x3FFF  // Brown-out Reset Voltage (Vbor), low trip point selected.
6227 #define _DEBUG_ON               0x2FFF  // In-Circuit Debugger enabled, ICSPCLK and ICSPDAT are dedicated to the debugger.
6228 #define _DEBUG_OFF              0x3FFF  // In-Circuit Debugger disabled, ICSPCLK and ICSPDAT are general purpose I/O pins.
6229 #define _LVP_OFF                0x1FFF  // High-voltage on MCLR/VPP must be used for programming.
6230 #define _LVP_ON                 0x3FFF  // Low-voltage programming enabled.
6231 
6232 //==============================================================================
6233 
6234 #define _DEVID1                 0x8006
6235 
6236 #define _IDLOC0                 0x8000
6237 #define _IDLOC1                 0x8001
6238 #define _IDLOC2                 0x8002
6239 #define _IDLOC3                 0x8003
6240 
6241 //==============================================================================
6242 
6243 #ifndef NO_BIT_DEFINES
6244 
6245 #define ADON                    ADCON0bits.ADON                 // bit 0
6246 #define GO_NOT_DONE             ADCON0bits.GO_NOT_DONE          // bit 1, shadows bit in ADCON0bits
6247 #define ADGO                    ADCON0bits.ADGO                 // bit 1, shadows bit in ADCON0bits
6248 #define GO                      ADCON0bits.GO                   // bit 1, shadows bit in ADCON0bits
6249 #define NOT_DONE                ADCON0bits.NOT_DONE             // bit 1, shadows bit in ADCON0bits
6250 #define CHS0                    ADCON0bits.CHS0                 // bit 2
6251 #define CHS1                    ADCON0bits.CHS1                 // bit 3
6252 #define CHS2                    ADCON0bits.CHS2                 // bit 4
6253 #define CHS3                    ADCON0bits.CHS3                 // bit 5
6254 #define CHS4                    ADCON0bits.CHS4                 // bit 6
6255 
6256 #define ADPREF0                 ADCON1bits.ADPREF0              // bit 0
6257 #define ADPREF1                 ADCON1bits.ADPREF1              // bit 1
6258 #define ADNREF                  ADCON1bits.ADNREF               // bit 2
6259 #define ADCS0                   ADCON1bits.ADCS0                // bit 4
6260 #define ADCS1                   ADCON1bits.ADCS1                // bit 5
6261 #define ADCS2                   ADCON1bits.ADCS2                // bit 6
6262 #define ADFM                    ADCON1bits.ADFM                 // bit 7
6263 
6264 #define ANSA0                   ANSELAbits.ANSA0                // bit 0
6265 #define ANSA1                   ANSELAbits.ANSA1                // bit 1
6266 #define ANSA2                   ANSELAbits.ANSA2                // bit 2
6267 #define ANSA3                   ANSELAbits.ANSA3                // bit 3
6268 #define ANSA5                   ANSELAbits.ANSA5                // bit 5
6269 
6270 #define ANSE0                   ANSELEbits.ANSE0                // bit 0
6271 #define ANSE1                   ANSELEbits.ANSE1                // bit 1
6272 #define ANSE2                   ANSELEbits.ANSE2                // bit 2
6273 
6274 #define ANSF0                   ANSELFbits.ANSF0                // bit 0
6275 #define ANSF1                   ANSELFbits.ANSF1                // bit 1
6276 #define ANSF2                   ANSELFbits.ANSF2                // bit 2
6277 #define ANSF3                   ANSELFbits.ANSF3                // bit 3
6278 #define ANSF4                   ANSELFbits.ANSF4                // bit 4
6279 #define ANSF5                   ANSELFbits.ANSF5                // bit 5
6280 #define ANSF6                   ANSELFbits.ANSF6                // bit 6
6281 #define ANSF7                   ANSELFbits.ANSF7                // bit 7
6282 
6283 #define ANSG1                   ANSELGbits.ANSG1                // bit 1
6284 #define ANSG2                   ANSELGbits.ANSG2                // bit 2
6285 #define ANSG3                   ANSELGbits.ANSG3                // bit 3
6286 #define ANSG4                   ANSELGbits.ANSG4                // bit 4
6287 
6288 #define P1BSEL                  APFCONbits.P1BSEL               // bit 0
6289 #define P1CSEL                  APFCONbits.P1CSEL               // bit 1
6290 #define CCP2SEL                 APFCONbits.CCP2SEL              // bit 2
6291 #define P2BSEL                  APFCONbits.P2BSEL               // bit 3
6292 #define P2CSEL                  APFCONbits.P2CSEL               // bit 4
6293 #define P2DSEL                  APFCONbits.P2DSEL               // bit 5
6294 #define P3BSEL                  APFCONbits.P3BSEL               // bit 6
6295 #define P3CSEL                  APFCONbits.P3CSEL               // bit 7
6296 
6297 #define ABDEN                   BAUD1CONbits.ABDEN              // bit 0
6298 #define WUE                     BAUD1CONbits.WUE                // bit 1
6299 #define BRG16                   BAUD1CONbits.BRG16              // bit 3
6300 #define SCKP                    BAUD1CONbits.SCKP               // bit 4
6301 #define RCIDL                   BAUD1CONbits.RCIDL              // bit 6
6302 #define ABDOVF                  BAUD1CONbits.ABDOVF             // bit 7
6303 
6304 #define BORRDY                  BORCONbits.BORRDY               // bit 0
6305 #define SBOREN                  BORCONbits.SBOREN               // bit 7
6306 
6307 #define BSR0                    BSRbits.BSR0                    // bit 0
6308 #define BSR1                    BSRbits.BSR1                    // bit 1
6309 #define BSR2                    BSRbits.BSR2                    // bit 2
6310 #define BSR3                    BSRbits.BSR3                    // bit 3
6311 #define BSR4                    BSRbits.BSR4                    // bit 4
6312 
6313 #define PSS1BD0                 CCP1ASbits.PSS1BD0              // bit 0
6314 #define PSS1BD1                 CCP1ASbits.PSS1BD1              // bit 1
6315 #define PSS1AC0                 CCP1ASbits.PSS1AC0              // bit 2
6316 #define PSS1AC1                 CCP1ASbits.PSS1AC1              // bit 3
6317 #define CCP1AS0                 CCP1ASbits.CCP1AS0              // bit 4
6318 #define CCP1AS1                 CCP1ASbits.CCP1AS1              // bit 5
6319 #define CCP1AS2                 CCP1ASbits.CCP1AS2              // bit 6
6320 #define CCP1ASE                 CCP1ASbits.CCP1ASE              // bit 7
6321 
6322 #define CCP1M0                  CCP1CONbits.CCP1M0              // bit 0
6323 #define CCP1M1                  CCP1CONbits.CCP1M1              // bit 1
6324 #define CCP1M2                  CCP1CONbits.CCP1M2              // bit 2
6325 #define CCP1M3                  CCP1CONbits.CCP1M3              // bit 3
6326 #define DC1B0                   CCP1CONbits.DC1B0               // bit 4
6327 #define DC1B1                   CCP1CONbits.DC1B1               // bit 5
6328 #define P1M0                    CCP1CONbits.P1M0                // bit 6
6329 #define P1M1                    CCP1CONbits.P1M1                // bit 7
6330 
6331 #define PSS2BD0                 CCP2ASbits.PSS2BD0              // bit 0
6332 #define PSS2BD1                 CCP2ASbits.PSS2BD1              // bit 1
6333 #define PSS2AC0                 CCP2ASbits.PSS2AC0              // bit 2
6334 #define PSS2AC1                 CCP2ASbits.PSS2AC1              // bit 3
6335 #define CCP2AS0                 CCP2ASbits.CCP2AS0              // bit 4
6336 #define CCP2AS1                 CCP2ASbits.CCP2AS1              // bit 5
6337 #define CCP2AS2                 CCP2ASbits.CCP2AS2              // bit 6
6338 #define CCP2ASE                 CCP2ASbits.CCP2ASE              // bit 7
6339 
6340 #define CCP2M0                  CCP2CONbits.CCP2M0              // bit 0
6341 #define CCP2M1                  CCP2CONbits.CCP2M1              // bit 1
6342 #define CCP2M2                  CCP2CONbits.CCP2M2              // bit 2
6343 #define CCP2M3                  CCP2CONbits.CCP2M3              // bit 3
6344 #define DC2B0                   CCP2CONbits.DC2B0               // bit 4
6345 #define DC2B1                   CCP2CONbits.DC2B1               // bit 5
6346 #define P2M0                    CCP2CONbits.P2M0                // bit 6
6347 #define P2M1                    CCP2CONbits.P2M1                // bit 7
6348 
6349 #define PSS3BD0                 CCP3ASbits.PSS3BD0              // bit 0
6350 #define PSS3BD1                 CCP3ASbits.PSS3BD1              // bit 1
6351 #define PSS3AC0                 CCP3ASbits.PSS3AC0              // bit 2
6352 #define PSS3AC1                 CCP3ASbits.PSS3AC1              // bit 3
6353 #define CCP3AS0                 CCP3ASbits.CCP3AS0              // bit 4
6354 #define CCP3AS1                 CCP3ASbits.CCP3AS1              // bit 5
6355 #define CCP3AS2                 CCP3ASbits.CCP3AS2              // bit 6
6356 #define CCP3ASE                 CCP3ASbits.CCP3ASE              // bit 7
6357 
6358 #define CCP3M0                  CCP3CONbits.CCP3M0              // bit 0
6359 #define CCP3M1                  CCP3CONbits.CCP3M1              // bit 1
6360 #define CCP3M2                  CCP3CONbits.CCP3M2              // bit 2
6361 #define CCP3M3                  CCP3CONbits.CCP3M3              // bit 3
6362 #define DC3B0                   CCP3CONbits.DC3B0               // bit 4
6363 #define DC3B1                   CCP3CONbits.DC3B1               // bit 5
6364 #define P3M0                    CCP3CONbits.P3M0                // bit 6
6365 #define P3M1                    CCP3CONbits.P3M1                // bit 7
6366 
6367 #define CCP4M0                  CCP4CONbits.CCP4M0              // bit 0
6368 #define CCP4M1                  CCP4CONbits.CCP4M1              // bit 1
6369 #define CCP4M2                  CCP4CONbits.CCP4M2              // bit 2
6370 #define CCP4M3                  CCP4CONbits.CCP4M3              // bit 3
6371 #define DC4B0                   CCP4CONbits.DC4B0               // bit 4
6372 #define DC4B1                   CCP4CONbits.DC4B1               // bit 5
6373 
6374 #define CCP5M0                  CCP5CONbits.CCP5M0              // bit 0
6375 #define CCP5M1                  CCP5CONbits.CCP5M1              // bit 1
6376 #define CCP5M2                  CCP5CONbits.CCP5M2              // bit 2
6377 #define CCP5M3                  CCP5CONbits.CCP5M3              // bit 3
6378 #define DC5B0                   CCP5CONbits.DC5B0               // bit 4
6379 #define DC5B1                   CCP5CONbits.DC5B1               // bit 5
6380 
6381 #define C1TSEL0                 CCPTMRS0bits.C1TSEL0            // bit 0
6382 #define C1TSEL1                 CCPTMRS0bits.C1TSEL1            // bit 1
6383 #define C2TSEL0                 CCPTMRS0bits.C2TSEL0            // bit 2
6384 #define C2TSEL1                 CCPTMRS0bits.C2TSEL1            // bit 3
6385 #define C3TSEL0                 CCPTMRS0bits.C3TSEL0            // bit 4
6386 #define C3TSEL1                 CCPTMRS0bits.C3TSEL1            // bit 5
6387 #define C4TSEL0                 CCPTMRS0bits.C4TSEL0            // bit 6
6388 #define C4TSEL1                 CCPTMRS0bits.C4TSEL1            // bit 7
6389 
6390 #define C5TSEL0                 CCPTMRS1bits.C5TSEL0            // bit 0
6391 #define C5TSEL1                 CCPTMRS1bits.C5TSEL1            // bit 1
6392 
6393 #define C1SYNC                  CM1CON0bits.C1SYNC              // bit 0
6394 #define C1HYS                   CM1CON0bits.C1HYS               // bit 1
6395 #define C1SP                    CM1CON0bits.C1SP                // bit 2
6396 #define C1POL                   CM1CON0bits.C1POL               // bit 4
6397 #define C1OE                    CM1CON0bits.C1OE                // bit 5
6398 #define C1OUT                   CM1CON0bits.C1OUT               // bit 6
6399 #define C1ON                    CM1CON0bits.C1ON                // bit 7
6400 
6401 #define C1NCH0                  CM1CON1bits.C1NCH0              // bit 0
6402 #define C1NCH1                  CM1CON1bits.C1NCH1              // bit 1
6403 #define C1PCH0                  CM1CON1bits.C1PCH0              // bit 4
6404 #define C1PCH1                  CM1CON1bits.C1PCH1              // bit 5
6405 #define C1INTN                  CM1CON1bits.C1INTN              // bit 6
6406 #define C1INTP                  CM1CON1bits.C1INTP              // bit 7
6407 
6408 #define C2SYNC                  CM2CON0bits.C2SYNC              // bit 0
6409 #define C2HYS                   CM2CON0bits.C2HYS               // bit 1
6410 #define C2SP                    CM2CON0bits.C2SP                // bit 2
6411 #define C2POL                   CM2CON0bits.C2POL               // bit 4
6412 #define C2OE                    CM2CON0bits.C2OE                // bit 5
6413 #define C2OUT                   CM2CON0bits.C2OUT               // bit 6
6414 #define C2ON                    CM2CON0bits.C2ON                // bit 7
6415 
6416 #define C2NCH0                  CM2CON1bits.C2NCH0              // bit 0
6417 #define C2NCH1                  CM2CON1bits.C2NCH1              // bit 1
6418 #define C2PCH0                  CM2CON1bits.C2PCH0              // bit 4
6419 #define C2PCH1                  CM2CON1bits.C2PCH1              // bit 5
6420 #define C2INTN                  CM2CON1bits.C2INTN              // bit 6
6421 #define C2INTP                  CM2CON1bits.C2INTP              // bit 7
6422 
6423 #define C3SYNC                  CM3CON0bits.C3SYNC              // bit 0
6424 #define C3HYS                   CM3CON0bits.C3HYS               // bit 1
6425 #define C3SP                    CM3CON0bits.C3SP                // bit 2
6426 #define C3POL                   CM3CON0bits.C3POL               // bit 4
6427 #define C3OE                    CM3CON0bits.C3OE                // bit 5
6428 #define C3OUT                   CM3CON0bits.C3OUT               // bit 6
6429 #define C3ON                    CM3CON0bits.C3ON                // bit 7
6430 
6431 #define C3NCH0                  CM3CON1bits.C3NCH0              // bit 0
6432 #define C3NCH1                  CM3CON1bits.C3NCH1              // bit 1
6433 #define C3PCH0                  CM3CON1bits.C3PCH0              // bit 4
6434 #define C3PCH1                  CM3CON1bits.C3PCH1              // bit 5
6435 #define C3INTN                  CM3CON1bits.C3INTN              // bit 6
6436 #define C3INTP                  CM3CON1bits.C3INTP              // bit 7
6437 
6438 #define MC1OUT                  CMOUTbits.MC1OUT                // bit 0
6439 #define MC2OUT                  CMOUTbits.MC2OUT                // bit 1
6440 #define MC3OUT                  CMOUTbits.MC3OUT                // bit 2
6441 
6442 #define T0XCS                   CPSCON0bits.T0XCS               // bit 0
6443 #define CPSOUT                  CPSCON0bits.CPSOUT              // bit 1
6444 #define CPSRNG0                 CPSCON0bits.CPSRNG0             // bit 2
6445 #define CPSRNG1                 CPSCON0bits.CPSRNG1             // bit 3
6446 #define CPSRM                   CPSCON0bits.CPSRM               // bit 6
6447 #define CPSON                   CPSCON0bits.CPSON               // bit 7
6448 
6449 #define CPSCH0                  CPSCON1bits.CPSCH0              // bit 0
6450 #define CPSCH1                  CPSCON1bits.CPSCH1              // bit 1
6451 #define CPSCH2                  CPSCON1bits.CPSCH2              // bit 2
6452 #define CPSCH3                  CPSCON1bits.CPSCH3              // bit 3
6453 #define CPSCH4                  CPSCON1bits.CPSCH4              // bit 4
6454 
6455 #define DACNSS                  DACCON0bits.DACNSS              // bit 0
6456 #define DACPSS0                 DACCON0bits.DACPSS0             // bit 2
6457 #define DACPSS1                 DACCON0bits.DACPSS1             // bit 3
6458 #define DACOE                   DACCON0bits.DACOE               // bit 5
6459 #define DACLPS                  DACCON0bits.DACLPS              // bit 6
6460 #define DACEN                   DACCON0bits.DACEN               // bit 7
6461 
6462 #define DACR0                   DACCON1bits.DACR0               // bit 0
6463 #define DACR1                   DACCON1bits.DACR1               // bit 1
6464 #define DACR2                   DACCON1bits.DACR2               // bit 2
6465 #define DACR3                   DACCON1bits.DACR3               // bit 3
6466 #define DACR4                   DACCON1bits.DACR4               // bit 4
6467 
6468 #define RD                      EECON1bits.RD                   // bit 0
6469 #define WR                      EECON1bits.WR                   // bit 1
6470 #define WREN                    EECON1bits.WREN                 // bit 2
6471 #define WRERR                   EECON1bits.WRERR                // bit 3
6472 #define FREE                    EECON1bits.FREE                 // bit 4
6473 #define LWLO                    EECON1bits.LWLO                 // bit 5
6474 #define CFGS                    EECON1bits.CFGS                 // bit 6
6475 #define EEPGD                   EECON1bits.EEPGD                // bit 7
6476 
6477 #define ADFVR0                  FVRCONbits.ADFVR0               // bit 0
6478 #define ADFVR1                  FVRCONbits.ADFVR1               // bit 1
6479 #define CDAFVR0                 FVRCONbits.CDAFVR0              // bit 2
6480 #define CDAFVR1                 FVRCONbits.CDAFVR1              // bit 3
6481 #define TSRNG                   FVRCONbits.TSRNG                // bit 4
6482 #define TSEN                    FVRCONbits.TSEN                 // bit 5
6483 #define FVRRDY                  FVRCONbits.FVRRDY               // bit 6
6484 #define FVREN                   FVRCONbits.FVREN                // bit 7
6485 
6486 #define IOCIF                   INTCONbits.IOCIF                // bit 0
6487 #define INTF                    INTCONbits.INTF                 // bit 1
6488 #define TMR0IF                  INTCONbits.TMR0IF               // bit 2, shadows bit in INTCONbits
6489 #define T0IF                    INTCONbits.T0IF                 // bit 2, shadows bit in INTCONbits
6490 #define IOCIE                   INTCONbits.IOCIE                // bit 3
6491 #define INTE                    INTCONbits.INTE                 // bit 4
6492 #define TMR0IE                  INTCONbits.TMR0IE               // bit 5, shadows bit in INTCONbits
6493 #define T0IE                    INTCONbits.T0IE                 // bit 5, shadows bit in INTCONbits
6494 #define PEIE                    INTCONbits.PEIE                 // bit 6
6495 #define GIE                     INTCONbits.GIE                  // bit 7
6496 
6497 #define IOCBF0                  IOCBFbits.IOCBF0                // bit 0
6498 #define IOCBF1                  IOCBFbits.IOCBF1                // bit 1
6499 #define IOCBF2                  IOCBFbits.IOCBF2                // bit 2
6500 #define IOCBF3                  IOCBFbits.IOCBF3                // bit 3
6501 #define IOCBF4                  IOCBFbits.IOCBF4                // bit 4
6502 #define IOCBF5                  IOCBFbits.IOCBF5                // bit 5
6503 #define IOCBF6                  IOCBFbits.IOCBF6                // bit 6
6504 #define IOCBF7                  IOCBFbits.IOCBF7                // bit 7
6505 
6506 #define IOCBN0                  IOCBNbits.IOCBN0                // bit 0
6507 #define IOCBN1                  IOCBNbits.IOCBN1                // bit 1
6508 #define IOCBN2                  IOCBNbits.IOCBN2                // bit 2
6509 #define IOCBN3                  IOCBNbits.IOCBN3                // bit 3
6510 #define IOCBN4                  IOCBNbits.IOCBN4                // bit 4
6511 #define IOCBN5                  IOCBNbits.IOCBN5                // bit 5
6512 #define IOCBN6                  IOCBNbits.IOCBN6                // bit 6
6513 #define IOCBN7                  IOCBNbits.IOCBN7                // bit 7
6514 
6515 #define IOCBP0                  IOCBPbits.IOCBP0                // bit 0
6516 #define IOCBP1                  IOCBPbits.IOCBP1                // bit 1
6517 #define IOCBP2                  IOCBPbits.IOCBP2                // bit 2
6518 #define IOCBP3                  IOCBPbits.IOCBP3                // bit 3
6519 #define IOCBP4                  IOCBPbits.IOCBP4                // bit 4
6520 #define IOCBP5                  IOCBPbits.IOCBP5                // bit 5
6521 #define IOCBP6                  IOCBPbits.IOCBP6                // bit 6
6522 #define IOCBP7                  IOCBPbits.IOCBP7                // bit 7
6523 
6524 #define LATA0                   LATAbits.LATA0                  // bit 0
6525 #define LATA1                   LATAbits.LATA1                  // bit 1
6526 #define LATA2                   LATAbits.LATA2                  // bit 2
6527 #define LATA3                   LATAbits.LATA3                  // bit 3
6528 #define LATA4                   LATAbits.LATA4                  // bit 4
6529 #define LATA5                   LATAbits.LATA5                  // bit 5
6530 #define LATA6                   LATAbits.LATA6                  // bit 6
6531 #define LATA7                   LATAbits.LATA7                  // bit 7
6532 
6533 #define LATB0                   LATBbits.LATB0                  // bit 0
6534 #define LATB1                   LATBbits.LATB1                  // bit 1
6535 #define LATB2                   LATBbits.LATB2                  // bit 2
6536 #define LATB3                   LATBbits.LATB3                  // bit 3
6537 #define LATB4                   LATBbits.LATB4                  // bit 4
6538 #define LATB5                   LATBbits.LATB5                  // bit 5
6539 #define LATB6                   LATBbits.LATB6                  // bit 6
6540 #define LATB7                   LATBbits.LATB7                  // bit 7
6541 
6542 #define LATC0                   LATCbits.LATC0                  // bit 0
6543 #define LATC1                   LATCbits.LATC1                  // bit 1
6544 #define LATC2                   LATCbits.LATC2                  // bit 2
6545 #define LATC3                   LATCbits.LATC3                  // bit 3
6546 #define LATC4                   LATCbits.LATC4                  // bit 4
6547 #define LATC5                   LATCbits.LATC5                  // bit 5
6548 #define LATC6                   LATCbits.LATC6                  // bit 6
6549 #define LATC7                   LATCbits.LATC7                  // bit 7
6550 
6551 #define LATD0                   LATDbits.LATD0                  // bit 0
6552 #define LATD1                   LATDbits.LATD1                  // bit 1
6553 #define LATD2                   LATDbits.LATD2                  // bit 2
6554 #define LATD3                   LATDbits.LATD3                  // bit 3
6555 #define LATD4                   LATDbits.LATD4                  // bit 4
6556 #define LATD5                   LATDbits.LATD5                  // bit 5
6557 #define LATD6                   LATDbits.LATD6                  // bit 6
6558 #define LATD7                   LATDbits.LATD7                  // bit 7
6559 
6560 #define LATE0                   LATEbits.LATE0                  // bit 0
6561 #define LATE1                   LATEbits.LATE1                  // bit 1
6562 #define LATE2                   LATEbits.LATE2                  // bit 2
6563 #define LATE3                   LATEbits.LATE3                  // bit 3
6564 #define LATE4                   LATEbits.LATE4                  // bit 4
6565 #define LATE5                   LATEbits.LATE5                  // bit 5
6566 #define LATE6                   LATEbits.LATE6                  // bit 6
6567 #define LATE7                   LATEbits.LATE7                  // bit 7
6568 
6569 #define LATF0                   LATFbits.LATF0                  // bit 0
6570 #define LATF1                   LATFbits.LATF1                  // bit 1
6571 #define LATF2                   LATFbits.LATF2                  // bit 2
6572 #define LATF3                   LATFbits.LATF3                  // bit 3
6573 #define LATF4                   LATFbits.LATF4                  // bit 4
6574 #define LATF5                   LATFbits.LATF5                  // bit 5
6575 #define LATF6                   LATFbits.LATF6                  // bit 6
6576 #define LATF7                   LATFbits.LATF7                  // bit 7
6577 
6578 #define LATG0                   LATGbits.LATG0                  // bit 0
6579 #define LATG1                   LATGbits.LATG1                  // bit 1
6580 #define LATG2                   LATGbits.LATG2                  // bit 2
6581 #define LATG3                   LATGbits.LATG3                  // bit 3
6582 #define LATG4                   LATGbits.LATG4                  // bit 4
6583 #define LATG5                   LATGbits.LATG5                  // bit 5
6584 
6585 #define LMUX0                   LCDCONbits.LMUX0                // bit 0
6586 #define LMUX1                   LCDCONbits.LMUX1                // bit 1
6587 #define CS0                     LCDCONbits.CS0                  // bit 2
6588 #define CS1                     LCDCONbits.CS1                  // bit 3
6589 #define WERR                    LCDCONbits.WERR                 // bit 5
6590 #define SLPEN                   LCDCONbits.SLPEN                // bit 6
6591 #define LCDEN                   LCDCONbits.LCDEN                // bit 7
6592 
6593 #define LCDCST0                 LCDCSTbits.LCDCST0              // bit 0
6594 #define LCDCST1                 LCDCSTbits.LCDCST1              // bit 1
6595 #define LCDCST2                 LCDCSTbits.LCDCST2              // bit 2
6596 
6597 #define SEG0COM0                LCDDATA0bits.SEG0COM0           // bit 0
6598 #define SEG1COM0                LCDDATA0bits.SEG1COM0           // bit 1
6599 #define SEG2COM0                LCDDATA0bits.SEG2COM0           // bit 2
6600 #define SEG3COM0                LCDDATA0bits.SEG3COM0           // bit 3
6601 #define SEG4COM0                LCDDATA0bits.SEG4COM0           // bit 4
6602 #define SEG5COM0                LCDDATA0bits.SEG5COM0           // bit 5
6603 #define SEG6COM0                LCDDATA0bits.SEG6COM0           // bit 6
6604 #define SEG7COM0                LCDDATA0bits.SEG7COM0           // bit 7
6605 
6606 #define SEG8COM0                LCDDATA1bits.SEG8COM0           // bit 0
6607 #define SEG9COM0                LCDDATA1bits.SEG9COM0           // bit 1
6608 #define SEG10COM0               LCDDATA1bits.SEG10COM0          // bit 2
6609 #define SEG11COM0               LCDDATA1bits.SEG11COM0          // bit 3
6610 #define SEG12COM0               LCDDATA1bits.SEG12COM0          // bit 4
6611 #define SEG13COM0               LCDDATA1bits.SEG13COM0          // bit 5
6612 #define SEG14COM0               LCDDATA1bits.SEG14COM0          // bit 6
6613 #define SEG15COM0               LCDDATA1bits.SEG15COM0          // bit 7
6614 
6615 #define SEG16COM0               LCDDATA2bits.SEG16COM0          // bit 0
6616 #define SEG17COM0               LCDDATA2bits.SEG17COM0          // bit 1
6617 #define SEG18COM0               LCDDATA2bits.SEG18COM0          // bit 2
6618 #define SEG19COM0               LCDDATA2bits.SEG19COM0          // bit 3
6619 #define SEG20COM0               LCDDATA2bits.SEG20COM0          // bit 4
6620 #define SEG21COM0               LCDDATA2bits.SEG21COM0          // bit 5
6621 #define SEG22COM0               LCDDATA2bits.SEG22COM0          // bit 6
6622 #define SEG23COM0               LCDDATA2bits.SEG23COM0          // bit 7
6623 
6624 #define SEG0COM1                LCDDATA3bits.SEG0COM1           // bit 0
6625 #define SEG1COM1                LCDDATA3bits.SEG1COM1           // bit 1
6626 #define SEG2COM1                LCDDATA3bits.SEG2COM1           // bit 2
6627 #define SEG3COM1                LCDDATA3bits.SEG3COM1           // bit 3
6628 #define SEG4COM1                LCDDATA3bits.SEG4COM1           // bit 4
6629 #define SEG5COM1                LCDDATA3bits.SEG5COM1           // bit 5
6630 #define SEG6COM1                LCDDATA3bits.SEG6COM1           // bit 6
6631 #define SEG7COM1                LCDDATA3bits.SEG7COM1           // bit 7
6632 
6633 #define SEG8COM1                LCDDATA4bits.SEG8COM1           // bit 0
6634 #define SEG9COM1                LCDDATA4bits.SEG9COM1           // bit 1
6635 #define SEG10COM1               LCDDATA4bits.SEG10COM1          // bit 2
6636 #define SEG11COM1               LCDDATA4bits.SEG11COM1          // bit 3
6637 #define SEG12COM1               LCDDATA4bits.SEG12COM1          // bit 4
6638 #define SEG13COM1               LCDDATA4bits.SEG13COM1          // bit 5
6639 #define SEG14COM1               LCDDATA4bits.SEG14COM1          // bit 6
6640 #define SEG15COM1               LCDDATA4bits.SEG15COM1          // bit 7
6641 
6642 #define SEG16COM1               LCDDATA5bits.SEG16COM1          // bit 0
6643 #define SEG17COM1               LCDDATA5bits.SEG17COM1          // bit 1
6644 #define SEG18COM1               LCDDATA5bits.SEG18COM1          // bit 2
6645 #define SEG19COM1               LCDDATA5bits.SEG19COM1          // bit 3
6646 #define SEG20COM1               LCDDATA5bits.SEG20COM1          // bit 4
6647 #define SEG21COM1               LCDDATA5bits.SEG21COM1          // bit 5
6648 #define SEG22COM1               LCDDATA5bits.SEG22COM1          // bit 6
6649 #define SEG23COM1               LCDDATA5bits.SEG23COM1          // bit 7
6650 
6651 #define SEG0COM2                LCDDATA6bits.SEG0COM2           // bit 0
6652 #define SEG1COM2                LCDDATA6bits.SEG1COM2           // bit 1
6653 #define SEG2COM2                LCDDATA6bits.SEG2COM2           // bit 2
6654 #define SEG3COM2                LCDDATA6bits.SEG3COM2           // bit 3
6655 #define SEG4COM2                LCDDATA6bits.SEG4COM2           // bit 4
6656 #define SEG5COM2                LCDDATA6bits.SEG5COM2           // bit 5
6657 #define SEG6COM2                LCDDATA6bits.SEG6COM2           // bit 6
6658 #define SEG7COM2                LCDDATA6bits.SEG7COM2           // bit 7
6659 
6660 #define SEG8COM2                LCDDATA7bits.SEG8COM2           // bit 0
6661 #define SEG9COM2                LCDDATA7bits.SEG9COM2           // bit 1
6662 #define SEG10COM2               LCDDATA7bits.SEG10COM2          // bit 2
6663 #define SEG11COM2               LCDDATA7bits.SEG11COM2          // bit 3
6664 #define SEG12COM2               LCDDATA7bits.SEG12COM2          // bit 4
6665 #define SEG13COM2               LCDDATA7bits.SEG13COM2          // bit 5
6666 #define SEG14COM2               LCDDATA7bits.SEG14COM2          // bit 6
6667 #define SEG15COM2               LCDDATA7bits.SEG15COM2          // bit 7
6668 
6669 #define SEG16COM2               LCDDATA8bits.SEG16COM2          // bit 0
6670 #define SEG17COM2               LCDDATA8bits.SEG17COM2          // bit 1
6671 #define SEG18COM2               LCDDATA8bits.SEG18COM2          // bit 2
6672 #define SEG19COM2               LCDDATA8bits.SEG19COM2          // bit 3
6673 #define SEG20COM2               LCDDATA8bits.SEG20COM2          // bit 4
6674 #define SEG21COM2               LCDDATA8bits.SEG21COM2          // bit 5
6675 #define SEG22COM2               LCDDATA8bits.SEG22COM2          // bit 6
6676 #define SEG23COM2               LCDDATA8bits.SEG23COM2          // bit 7
6677 
6678 #define SEG0COM3                LCDDATA9bits.SEG0COM3           // bit 0
6679 #define SEG1COM3                LCDDATA9bits.SEG1COM3           // bit 1
6680 #define SEG2COM3                LCDDATA9bits.SEG2COM3           // bit 2
6681 #define SEG3COM3                LCDDATA9bits.SEG3COM3           // bit 3
6682 #define SEG4COM3                LCDDATA9bits.SEG4COM3           // bit 4
6683 #define SEG5COM3                LCDDATA9bits.SEG5COM3           // bit 5
6684 #define SEG6COM3                LCDDATA9bits.SEG6COM3           // bit 6
6685 #define SEG7COM3                LCDDATA9bits.SEG7COM3           // bit 7
6686 
6687 #define SEG8COM3                LCDDATA10bits.SEG8COM3          // bit 0
6688 #define SEG9COM3                LCDDATA10bits.SEG9COM3          // bit 1
6689 #define SEG10COM3               LCDDATA10bits.SEG10COM3         // bit 2
6690 #define SEG11COM3               LCDDATA10bits.SEG11COM3         // bit 3
6691 #define SEG12COM3               LCDDATA10bits.SEG12COM3         // bit 4
6692 #define SEG13COM3               LCDDATA10bits.SEG13COM3         // bit 5
6693 #define SEG14COM3               LCDDATA10bits.SEG14COM3         // bit 6
6694 #define SEG15COM3               LCDDATA10bits.SEG15COM3         // bit 7
6695 
6696 #define SEG16COM3               LCDDATA11bits.SEG16COM3         // bit 0
6697 #define SEG17COM3               LCDDATA11bits.SEG17COM3         // bit 1
6698 #define SEG18COM3               LCDDATA11bits.SEG18COM3         // bit 2
6699 #define SEG19COM3               LCDDATA11bits.SEG19COM3         // bit 3
6700 #define SEG20COM3               LCDDATA11bits.SEG20COM3         // bit 4
6701 #define SEG21COM3               LCDDATA11bits.SEG21COM3         // bit 5
6702 #define SEG22COM3               LCDDATA11bits.SEG22COM3         // bit 6
6703 #define SEG23COM3               LCDDATA11bits.SEG23COM3         // bit 7
6704 
6705 #define SEG24COM0               LCDDATA12bits.SEG24COM0         // bit 0
6706 #define SEG25COM0               LCDDATA12bits.SEG25COM0         // bit 1
6707 #define SEG26COM0               LCDDATA12bits.SEG26COM0         // bit 2
6708 #define SEG27COM0               LCDDATA12bits.SEG27COM0         // bit 3
6709 #define SEG28COM0               LCDDATA12bits.SEG28COM0         // bit 4
6710 #define SEG29COM0               LCDDATA12bits.SEG29COM0         // bit 5
6711 #define SEG30COM0               LCDDATA12bits.SEG30COM0         // bit 6
6712 #define SEG31COM0               LCDDATA12bits.SEG31COM0         // bit 7
6713 
6714 #define SEG32COM0               LCDDATA13bits.SEG32COM0         // bit 0
6715 #define SEG33COM0               LCDDATA13bits.SEG33COM0         // bit 1
6716 #define SEG34COM0               LCDDATA13bits.SEG34COM0         // bit 2
6717 #define SEG35COM0               LCDDATA13bits.SEG35COM0         // bit 3
6718 #define SEG36COM0               LCDDATA13bits.SEG36COM0         // bit 4
6719 #define SEG37COM0               LCDDATA13bits.SEG37COM0         // bit 5
6720 #define SEG38COM0               LCDDATA13bits.SEG38COM0         // bit 6
6721 #define SEG39COM0               LCDDATA13bits.SEG39COM0         // bit 7
6722 
6723 #define SEG40COM0               LCDDATA14bits.SEG40COM0         // bit 0
6724 #define SEG41COM0               LCDDATA14bits.SEG41COM0         // bit 1
6725 #define SEG42COM0               LCDDATA14bits.SEG42COM0         // bit 2
6726 #define SEG43COM0               LCDDATA14bits.SEG43COM0         // bit 3
6727 #define SEG44COM0               LCDDATA14bits.SEG44COM0         // bit 4
6728 #define SEG45COM0               LCDDATA14bits.SEG45COM0         // bit 5
6729 
6730 #define SEG24COM1               LCDDATA15bits.SEG24COM1         // bit 0
6731 #define SEG25COM1               LCDDATA15bits.SEG25COM1         // bit 1
6732 #define SEG26COM1               LCDDATA15bits.SEG26COM1         // bit 2
6733 #define SEG27COM1               LCDDATA15bits.SEG27COM1         // bit 3
6734 #define SEG28COM1               LCDDATA15bits.SEG28COM1         // bit 4
6735 #define SEG29COM1               LCDDATA15bits.SEG29COM1         // bit 5
6736 #define SEG30COM1               LCDDATA15bits.SEG30COM1         // bit 6
6737 #define SEG31COM1               LCDDATA15bits.SEG31COM1         // bit 7
6738 
6739 #define SEG32COM1               LCDDATA16bits.SEG32COM1         // bit 0
6740 #define SEG33COM1               LCDDATA16bits.SEG33COM1         // bit 1
6741 #define SEG34COM1               LCDDATA16bits.SEG34COM1         // bit 2
6742 #define SEG35COM1               LCDDATA16bits.SEG35COM1         // bit 3
6743 #define SEG36COM1               LCDDATA16bits.SEG36COM1         // bit 4
6744 #define SEG37COM1               LCDDATA16bits.SEG37COM1         // bit 5
6745 #define SEG38COM1               LCDDATA16bits.SEG38COM1         // bit 6
6746 #define SEG39COM1               LCDDATA16bits.SEG39COM1         // bit 7
6747 
6748 #define SEG40COM1               LCDDATA17bits.SEG40COM1         // bit 0
6749 #define SEG41COM1               LCDDATA17bits.SEG41COM1         // bit 1
6750 #define SEG42COM1               LCDDATA17bits.SEG42COM1         // bit 2
6751 #define SEG43COM1               LCDDATA17bits.SEG43COM1         // bit 3
6752 #define SEG44COM1               LCDDATA17bits.SEG44COM1         // bit 4
6753 #define SEG45COM1               LCDDATA17bits.SEG45COM1         // bit 5
6754 
6755 #define SEG24COM2               LCDDATA18bits.SEG24COM2         // bit 0
6756 #define SEG25COM2               LCDDATA18bits.SEG25COM2         // bit 1
6757 #define SEG26COM2               LCDDATA18bits.SEG26COM2         // bit 2
6758 #define SEG27COM2               LCDDATA18bits.SEG27COM2         // bit 3
6759 #define SEG28COM2               LCDDATA18bits.SEG28COM2         // bit 4
6760 #define SEG29COM2               LCDDATA18bits.SEG29COM2         // bit 5
6761 #define SEG30COM2               LCDDATA18bits.SEG30COM2         // bit 6
6762 #define SEG31COM2               LCDDATA18bits.SEG31COM2         // bit 7
6763 
6764 #define SEG32COM2               LCDDATA19bits.SEG32COM2         // bit 0
6765 #define SEG33COM2               LCDDATA19bits.SEG33COM2         // bit 1
6766 #define SEG34COM2               LCDDATA19bits.SEG34COM2         // bit 2
6767 #define SEG35COM2               LCDDATA19bits.SEG35COM2         // bit 3
6768 #define SEG36COM2               LCDDATA19bits.SEG36COM2         // bit 4
6769 #define SEG37COM2               LCDDATA19bits.SEG37COM2         // bit 5
6770 #define SEG38COM2               LCDDATA19bits.SEG38COM2         // bit 6
6771 #define SEG39COM2               LCDDATA19bits.SEG39COM2         // bit 7
6772 
6773 #define SEG40COM2               LCDDATA20bits.SEG40COM2         // bit 0
6774 #define SEG41COM2               LCDDATA20bits.SEG41COM2         // bit 1
6775 #define SEG42COM2               LCDDATA20bits.SEG42COM2         // bit 2
6776 #define SEG43COM2               LCDDATA20bits.SEG43COM2         // bit 3
6777 #define SEG44COM2               LCDDATA20bits.SEG44COM2         // bit 4
6778 #define SEG45COM2               LCDDATA20bits.SEG45COM2         // bit 5
6779 
6780 #define SEG24COM3               LCDDATA21bits.SEG24COM3         // bit 0
6781 #define SEG25COM3               LCDDATA21bits.SEG25COM3         // bit 1
6782 #define SEG26COM3               LCDDATA21bits.SEG26COM3         // bit 2
6783 #define SEG27COM3               LCDDATA21bits.SEG27COM3         // bit 3
6784 #define SEG28COM3               LCDDATA21bits.SEG28COM3         // bit 4
6785 #define SEG29COM3               LCDDATA21bits.SEG29COM3         // bit 5
6786 #define SEG30COM3               LCDDATA21bits.SEG30COM3         // bit 6
6787 #define SEG31COM3               LCDDATA21bits.SEG31COM3         // bit 7
6788 
6789 #define SEG32COM3               LCDDATA22bits.SEG32COM3         // bit 0
6790 #define SEG33COM3               LCDDATA22bits.SEG33COM3         // bit 1
6791 #define SEG34COM3               LCDDATA22bits.SEG34COM3         // bit 2
6792 #define SEG35COM3               LCDDATA22bits.SEG35COM3         // bit 3
6793 #define SEG36COM3               LCDDATA22bits.SEG36COM3         // bit 4
6794 #define SEG37COM3               LCDDATA22bits.SEG37COM3         // bit 5
6795 #define SEG38COM3               LCDDATA22bits.SEG38COM3         // bit 6
6796 #define SEG39COM3               LCDDATA22bits.SEG39COM3         // bit 7
6797 
6798 #define SEG40COM3               LCDDATA23bits.SEG40COM3         // bit 0
6799 #define SEG41COM3               LCDDATA23bits.SEG41COM3         // bit 1
6800 #define SEG42COM3               LCDDATA23bits.SEG42COM3         // bit 2
6801 #define SEG43COM3               LCDDATA23bits.SEG43COM3         // bit 3
6802 #define SEG44COM3               LCDDATA23bits.SEG44COM3         // bit 4
6803 #define SEG45COM3               LCDDATA23bits.SEG45COM3         // bit 5
6804 
6805 #define LP0                     LCDPSbits.LP0                   // bit 0
6806 #define LP1                     LCDPSbits.LP1                   // bit 1
6807 #define LP2                     LCDPSbits.LP2                   // bit 2
6808 #define LP3                     LCDPSbits.LP3                   // bit 3
6809 #define WA                      LCDPSbits.WA                    // bit 4
6810 #define LCDA                    LCDPSbits.LCDA                  // bit 5
6811 #define BIASMD                  LCDPSbits.BIASMD                // bit 6
6812 #define WFT                     LCDPSbits.WFT                   // bit 7
6813 
6814 #define VLCD1PE                 LCDREFbits.VLCD1PE              // bit 1
6815 #define VLCD2PE                 LCDREFbits.VLCD2PE              // bit 2
6816 #define VLCD3PE                 LCDREFbits.VLCD3PE              // bit 3
6817 #define LCDIRI                  LCDREFbits.LCDIRI               // bit 5
6818 #define LCDIRS                  LCDREFbits.LCDIRS               // bit 6
6819 #define LCDIRE                  LCDREFbits.LCDIRE               // bit 7
6820 
6821 #define LRLAT0                  LCDRLbits.LRLAT0                // bit 0
6822 #define LRLAT1                  LCDRLbits.LRLAT1                // bit 1
6823 #define LRLAT2                  LCDRLbits.LRLAT2                // bit 2
6824 #define LRLBP0                  LCDRLbits.LRLBP0                // bit 4
6825 #define LRLBP1                  LCDRLbits.LRLBP1                // bit 5
6826 #define LRLAP0                  LCDRLbits.LRLAP0                // bit 6
6827 #define LRLAP1                  LCDRLbits.LRLAP1                // bit 7
6828 
6829 #define SE0                     LCDSE0bits.SE0                  // bit 0
6830 #define SE1                     LCDSE0bits.SE1                  // bit 1
6831 #define SE2                     LCDSE0bits.SE2                  // bit 2
6832 #define SE3                     LCDSE0bits.SE3                  // bit 3
6833 #define SE4                     LCDSE0bits.SE4                  // bit 4
6834 #define SE5                     LCDSE0bits.SE5                  // bit 5
6835 #define SE6                     LCDSE0bits.SE6                  // bit 6
6836 #define SE7                     LCDSE0bits.SE7                  // bit 7
6837 
6838 #define SE8                     LCDSE1bits.SE8                  // bit 0
6839 #define SE9                     LCDSE1bits.SE9                  // bit 1
6840 #define SE10                    LCDSE1bits.SE10                 // bit 2
6841 #define SE11                    LCDSE1bits.SE11                 // bit 3
6842 #define SE12                    LCDSE1bits.SE12                 // bit 4
6843 #define SE13                    LCDSE1bits.SE13                 // bit 5
6844 #define SE14                    LCDSE1bits.SE14                 // bit 6
6845 #define SE15                    LCDSE1bits.SE15                 // bit 7
6846 
6847 #define SE16                    LCDSE2bits.SE16                 // bit 0
6848 #define SE17                    LCDSE2bits.SE17                 // bit 1
6849 #define SE18                    LCDSE2bits.SE18                 // bit 2
6850 #define SE19                    LCDSE2bits.SE19                 // bit 3
6851 #define SE20                    LCDSE2bits.SE20                 // bit 4
6852 #define SE21                    LCDSE2bits.SE21                 // bit 5
6853 #define SE22                    LCDSE2bits.SE22                 // bit 6
6854 #define SE23                    LCDSE2bits.SE23                 // bit 7
6855 
6856 #define SE24                    LCDSE3bits.SE24                 // bit 0
6857 #define SE25                    LCDSE3bits.SE25                 // bit 1
6858 #define SE26                    LCDSE3bits.SE26                 // bit 2
6859 #define SE27                    LCDSE3bits.SE27                 // bit 3
6860 #define SE28                    LCDSE3bits.SE28                 // bit 4
6861 #define SE29                    LCDSE3bits.SE29                 // bit 5
6862 #define SE30                    LCDSE3bits.SE30                 // bit 6
6863 #define SE31                    LCDSE3bits.SE31                 // bit 7
6864 
6865 #define SE32                    LCDSE4bits.SE32                 // bit 0
6866 #define SE33                    LCDSE4bits.SE33                 // bit 1
6867 #define SE34                    LCDSE4bits.SE34                 // bit 2
6868 #define SE35                    LCDSE4bits.SE35                 // bit 3
6869 #define SE36                    LCDSE4bits.SE36                 // bit 4
6870 #define SE37                    LCDSE4bits.SE37                 // bit 5
6871 #define SE38                    LCDSE4bits.SE38                 // bit 6
6872 #define SE39                    LCDSE4bits.SE39                 // bit 7
6873 
6874 #define SE40                    LCDSE5bits.SE40                 // bit 0
6875 #define SE41                    LCDSE5bits.SE41                 // bit 1
6876 #define SE42                    LCDSE5bits.SE42                 // bit 2
6877 #define SE43                    LCDSE5bits.SE43                 // bit 3
6878 #define SE44                    LCDSE5bits.SE44                 // bit 4
6879 #define SE45                    LCDSE5bits.SE45                 // bit 5
6880 
6881 #define PS0                     OPTION_REGbits.PS0              // bit 0
6882 #define PS1                     OPTION_REGbits.PS1              // bit 1
6883 #define PS2                     OPTION_REGbits.PS2              // bit 2
6884 #define PSA                     OPTION_REGbits.PSA              // bit 3
6885 #define T0SE                    OPTION_REGbits.T0SE             // bit 4, shadows bit in OPTION_REGbits
6886 #define TMR0SE                  OPTION_REGbits.TMR0SE           // bit 4, shadows bit in OPTION_REGbits
6887 #define T0CS                    OPTION_REGbits.T0CS             // bit 5, shadows bit in OPTION_REGbits
6888 #define TMR0CS                  OPTION_REGbits.TMR0CS           // bit 5, shadows bit in OPTION_REGbits
6889 #define INTEDG                  OPTION_REGbits.INTEDG           // bit 6
6890 #define NOT_WPUEN               OPTION_REGbits.NOT_WPUEN        // bit 7
6891 
6892 #define SCS0                    OSCCONbits.SCS0                 // bit 0
6893 #define SCS1                    OSCCONbits.SCS1                 // bit 1
6894 #define IRCF0                   OSCCONbits.IRCF0                // bit 3
6895 #define IRCF1                   OSCCONbits.IRCF1                // bit 4
6896 #define IRCF2                   OSCCONbits.IRCF2                // bit 5
6897 #define IRCF3                   OSCCONbits.IRCF3                // bit 6
6898 #define SPLLEN                  OSCCONbits.SPLLEN               // bit 7
6899 
6900 #define HFIOFS                  OSCSTATbits.HFIOFS              // bit 0
6901 #define LFIOFR                  OSCSTATbits.LFIOFR              // bit 1
6902 #define MFIOFR                  OSCSTATbits.MFIOFR              // bit 2
6903 #define HFIOFL                  OSCSTATbits.HFIOFL              // bit 3
6904 #define HFIOFR                  OSCSTATbits.HFIOFR              // bit 4
6905 #define OSTS                    OSCSTATbits.OSTS                // bit 5
6906 #define PLLR                    OSCSTATbits.PLLR                // bit 6
6907 #define T1OSCR                  OSCSTATbits.T1OSCR              // bit 7
6908 
6909 #define TUN0                    OSCTUNEbits.TUN0                // bit 0
6910 #define TUN1                    OSCTUNEbits.TUN1                // bit 1
6911 #define TUN2                    OSCTUNEbits.TUN2                // bit 2
6912 #define TUN3                    OSCTUNEbits.TUN3                // bit 3
6913 #define TUN4                    OSCTUNEbits.TUN4                // bit 4
6914 #define TUN5                    OSCTUNEbits.TUN5                // bit 5
6915 
6916 #define NOT_BOR                 PCONbits.NOT_BOR                // bit 0
6917 #define NOT_POR                 PCONbits.NOT_POR                // bit 1
6918 #define NOT_RI                  PCONbits.NOT_RI                 // bit 2
6919 #define NOT_RMCLR               PCONbits.NOT_RMCLR              // bit 3
6920 #define STKUNF                  PCONbits.STKUNF                 // bit 6
6921 #define STKOVF                  PCONbits.STKOVF                 // bit 7
6922 
6923 #define TMR1IE                  PIE1bits.TMR1IE                 // bit 0
6924 #define TMR2IE                  PIE1bits.TMR2IE                 // bit 1
6925 #define CCP1IE                  PIE1bits.CCP1IE                 // bit 2
6926 #define SSP1IE                  PIE1bits.SSP1IE                 // bit 3, shadows bit in PIE1bits
6927 #define SSPIE                   PIE1bits.SSPIE                  // bit 3, shadows bit in PIE1bits
6928 #define TX1IE                   PIE1bits.TX1IE                  // bit 4, shadows bit in PIE1bits
6929 #define TXIE                    PIE1bits.TXIE                   // bit 4, shadows bit in PIE1bits
6930 #define RC1IE                   PIE1bits.RC1IE                  // bit 5, shadows bit in PIE1bits
6931 #define RCIE                    PIE1bits.RCIE                   // bit 5, shadows bit in PIE1bits
6932 #define ADIE                    PIE1bits.ADIE                   // bit 6
6933 #define TMR1GIE                 PIE1bits.TMR1GIE                // bit 7
6934 
6935 #define CCP2IE                  PIE2bits.CCP2IE                 // bit 0
6936 #define C3IE                    PIE2bits.C3IE                   // bit 1
6937 #define LCDIE                   PIE2bits.LCDIE                  // bit 2
6938 #define BCLIE                   PIE2bits.BCLIE                  // bit 3
6939 #define EEIE                    PIE2bits.EEIE                   // bit 4
6940 #define C1IE                    PIE2bits.C1IE                   // bit 5
6941 #define C2IE                    PIE2bits.C2IE                   // bit 6
6942 #define OSFIE                   PIE2bits.OSFIE                  // bit 7
6943 
6944 #define TMR4IE                  PIE3bits.TMR4IE                 // bit 1
6945 #define TMR6IE                  PIE3bits.TMR6IE                 // bit 3
6946 #define CCP3IE                  PIE3bits.CCP3IE                 // bit 4
6947 #define CCP4IE                  PIE3bits.CCP4IE                 // bit 5
6948 #define CCP5IE                  PIE3bits.CCP5IE                 // bit 6
6949 
6950 #define SSP2IE                  PIE4bits.SSP2IE                 // bit 0
6951 #define BCL2IE                  PIE4bits.BCL2IE                 // bit 1
6952 #define TX2IE                   PIE4bits.TX2IE                  // bit 4
6953 #define RC2IE                   PIE4bits.RC2IE                  // bit 5
6954 
6955 #define TMR1IF                  PIR1bits.TMR1IF                 // bit 0
6956 #define TMR2IF                  PIR1bits.TMR2IF                 // bit 1
6957 #define CCP1IF                  PIR1bits.CCP1IF                 // bit 2
6958 #define SSP1IF                  PIR1bits.SSP1IF                 // bit 3, shadows bit in PIR1bits
6959 #define SSPIF                   PIR1bits.SSPIF                  // bit 3, shadows bit in PIR1bits
6960 #define TX1IF                   PIR1bits.TX1IF                  // bit 4, shadows bit in PIR1bits
6961 #define TXIF                    PIR1bits.TXIF                   // bit 4, shadows bit in PIR1bits
6962 #define RC1IF                   PIR1bits.RC1IF                  // bit 5, shadows bit in PIR1bits
6963 #define RCIF                    PIR1bits.RCIF                   // bit 5, shadows bit in PIR1bits
6964 #define ADIF                    PIR1bits.ADIF                   // bit 6
6965 #define TMR1GIF                 PIR1bits.TMR1GIF                // bit 7
6966 
6967 #define CCP2IF                  PIR2bits.CCP2IF                 // bit 0
6968 #define C3IF                    PIR2bits.C3IF                   // bit 1
6969 #define LCDIF                   PIR2bits.LCDIF                  // bit 2
6970 #define BCLIF                   PIR2bits.BCLIF                  // bit 3
6971 #define EEIF                    PIR2bits.EEIF                   // bit 4
6972 #define C1IF                    PIR2bits.C1IF                   // bit 5
6973 #define C2IF                    PIR2bits.C2IF                   // bit 6
6974 #define OSFIF                   PIR2bits.OSFIF                  // bit 7
6975 
6976 #define TMR4IF                  PIR3bits.TMR4IF                 // bit 1
6977 #define TMR6IF                  PIR3bits.TMR6IF                 // bit 3
6978 #define CCP3IF                  PIR3bits.CCP3IF                 // bit 4
6979 #define CCP4IF                  PIR3bits.CCP4IF                 // bit 5
6980 #define CCP5IF                  PIR3bits.CCP5IF                 // bit 6
6981 
6982 #define SSP2IF                  PIR4bits.SSP2IF                 // bit 0
6983 #define BCL2IF                  PIR4bits.BCL2IF                 // bit 1
6984 #define TX2IF                   PIR4bits.TX2IF                  // bit 4
6985 #define RC2IF                   PIR4bits.RC2IF                  // bit 5
6986 
6987 #define RA0                     PORTAbits.RA0                   // bit 0, shadows bit in PORTAbits
6988 #define AN0                     PORTAbits.AN0                   // bit 0, shadows bit in PORTAbits
6989 #define CPS0                    PORTAbits.CPS0                  // bit 0, shadows bit in PORTAbits
6990 #define SEG33                   PORTAbits.SEG33                 // bit 0, shadows bit in PORTAbits
6991 #define RA1                     PORTAbits.RA1                   // bit 1, shadows bit in PORTAbits
6992 #define AN1                     PORTAbits.AN1                   // bit 1, shadows bit in PORTAbits
6993 #define CPS1                    PORTAbits.CPS1                  // bit 1, shadows bit in PORTAbits
6994 #define SEG18                   PORTAbits.SEG18                 // bit 1, shadows bit in PORTAbits
6995 #define RA2                     PORTAbits.RA2                   // bit 2, shadows bit in PORTAbits
6996 #define AN2                     PORTAbits.AN2                   // bit 2, shadows bit in PORTAbits
6997 #define CPS2                    PORTAbits.CPS2                  // bit 2, shadows bit in PORTAbits
6998 #define SEG34                   PORTAbits.SEG34                 // bit 2, shadows bit in PORTAbits
6999 #define VREFM                   PORTAbits.VREFM                 // bit 2, shadows bit in PORTAbits
7000 #define RA3                     PORTAbits.RA3                   // bit 3, shadows bit in PORTAbits
7001 #define AN3                     PORTAbits.AN3                   // bit 3, shadows bit in PORTAbits
7002 #define CPS3                    PORTAbits.CPS3                  // bit 3, shadows bit in PORTAbits
7003 #define SEG35                   PORTAbits.SEG35                 // bit 3, shadows bit in PORTAbits
7004 #define VREFP                   PORTAbits.VREFP                 // bit 3, shadows bit in PORTAbits
7005 #define RA4                     PORTAbits.RA4                   // bit 4, shadows bit in PORTAbits
7006 #define SEG14                   PORTAbits.SEG14                 // bit 4, shadows bit in PORTAbits
7007 #define T0CKI                   PORTAbits.T0CKI                 // bit 4, shadows bit in PORTAbits
7008 #define RA5                     PORTAbits.RA5                   // bit 5, shadows bit in PORTAbits
7009 #define AN4                     PORTAbits.AN4                   // bit 5, shadows bit in PORTAbits
7010 #define CPS4                    PORTAbits.CPS4                  // bit 5, shadows bit in PORTAbits
7011 #define SEG15                   PORTAbits.SEG15                 // bit 5, shadows bit in PORTAbits
7012 #define RA6                     PORTAbits.RA6                   // bit 6, shadows bit in PORTAbits
7013 #define SEG36                   PORTAbits.SEG36                 // bit 6, shadows bit in PORTAbits
7014 #define OSC2                    PORTAbits.OSC2                  // bit 6, shadows bit in PORTAbits
7015 #define CLKOUT                  PORTAbits.CLKOUT                // bit 6, shadows bit in PORTAbits
7016 #define RA7                     PORTAbits.RA7                   // bit 7, shadows bit in PORTAbits
7017 #define SEG37                   PORTAbits.SEG37                 // bit 7, shadows bit in PORTAbits
7018 #define OSC1                    PORTAbits.OSC1                  // bit 7, shadows bit in PORTAbits
7019 #define CLKIN                   PORTAbits.CLKIN                 // bit 7, shadows bit in PORTAbits
7020 
7021 #define RB0                     PORTBbits.RB0                   // bit 0, shadows bit in PORTBbits
7022 #define SEG30                   PORTBbits.SEG30                 // bit 0, shadows bit in PORTBbits
7023 #define SRI                     PORTBbits.SRI                   // bit 0, shadows bit in PORTBbits
7024 #define FLT0                    PORTBbits.FLT0                  // bit 0, shadows bit in PORTBbits
7025 #define RB1                     PORTBbits.RB1                   // bit 1, shadows bit in PORTBbits
7026 #define SEG8                    PORTBbits.SEG8                  // bit 1, shadows bit in PORTBbits
7027 #define RB2                     PORTBbits.RB2                   // bit 2, shadows bit in PORTBbits
7028 #define SEG9                    PORTBbits.SEG9                  // bit 2, shadows bit in PORTBbits
7029 #define RB3                     PORTBbits.RB3                   // bit 3, shadows bit in PORTBbits
7030 #define SEG10                   PORTBbits.SEG10                 // bit 3, shadows bit in PORTBbits
7031 #define RB4                     PORTBbits.RB4                   // bit 4, shadows bit in PORTBbits
7032 #define SEG11                   PORTBbits.SEG11                 // bit 4, shadows bit in PORTBbits
7033 #define RB5                     PORTBbits.RB5                   // bit 5, shadows bit in PORTBbits
7034 #define SEG29                   PORTBbits.SEG29                 // bit 5, shadows bit in PORTBbits
7035 #define T1G                     PORTBbits.T1G                   // bit 5, shadows bit in PORTBbits
7036 #define RB6                     PORTBbits.RB6                   // bit 6, shadows bit in PORTBbits
7037 #define SEG38                   PORTBbits.SEG38                 // bit 6, shadows bit in PORTBbits
7038 #define RB7                     PORTBbits.RB7                   // bit 7, shadows bit in PORTBbits
7039 #define SEG39                   PORTBbits.SEG39                 // bit 7, shadows bit in PORTBbits
7040 
7041 #define RC0                     PORTCbits.RC0                   // bit 0, shadows bit in PORTCbits
7042 #define SEG40                   PORTCbits.SEG40                 // bit 0, shadows bit in PORTCbits
7043 #define T1OSO                   PORTCbits.T1OSO                 // bit 0, shadows bit in PORTCbits
7044 #define T1CKI                   PORTCbits.T1CKI                 // bit 0, shadows bit in PORTCbits
7045 #define RC1                     PORTCbits.RC1                   // bit 1, shadows bit in PORTCbits
7046 #define SEG32                   PORTCbits.SEG32                 // bit 1, shadows bit in PORTCbits
7047 #define T1OSI                   PORTCbits.T1OSI                 // bit 1, shadows bit in PORTCbits
7048 #define CCP2                    PORTCbits.CCP2                  // bit 1, shadows bit in PORTCbits
7049 #define P2A                     PORTCbits.P2A                   // bit 1, shadows bit in PORTCbits
7050 #define RC2                     PORTCbits.RC2                   // bit 2, shadows bit in PORTCbits
7051 #define SEG13                   PORTCbits.SEG13                 // bit 2, shadows bit in PORTCbits
7052 #define CCP1                    PORTCbits.CCP1                  // bit 2, shadows bit in PORTCbits
7053 #define P1A                     PORTCbits.P1A                   // bit 2, shadows bit in PORTCbits
7054 #define RC3                     PORTCbits.RC3                   // bit 3, shadows bit in PORTCbits
7055 #define SEG17                   PORTCbits.SEG17                 // bit 3, shadows bit in PORTCbits
7056 #define SCK1                    PORTCbits.SCK1                  // bit 3, shadows bit in PORTCbits
7057 #define SCL1                    PORTCbits.SCL1                  // bit 3, shadows bit in PORTCbits
7058 #define RC4                     PORTCbits.RC4                   // bit 4, shadows bit in PORTCbits
7059 #define SEG16                   PORTCbits.SEG16                 // bit 4, shadows bit in PORTCbits
7060 #define SDI1                    PORTCbits.SDI1                  // bit 4, shadows bit in PORTCbits
7061 #define SDA1                    PORTCbits.SDA1                  // bit 4, shadows bit in PORTCbits
7062 #define RC5                     PORTCbits.RC5                   // bit 5, shadows bit in PORTCbits
7063 #define SEG12                   PORTCbits.SEG12                 // bit 5, shadows bit in PORTCbits
7064 #define SDO1                    PORTCbits.SDO1                  // bit 5, shadows bit in PORTCbits
7065 #define RC6                     PORTCbits.RC6                   // bit 6, shadows bit in PORTCbits
7066 #define SEG27                   PORTCbits.SEG27                 // bit 6, shadows bit in PORTCbits
7067 #define TX1                     PORTCbits.TX1                   // bit 6, shadows bit in PORTCbits
7068 #define CK1                     PORTCbits.CK1                   // bit 6, shadows bit in PORTCbits
7069 #define RC7                     PORTCbits.RC7                   // bit 7, shadows bit in PORTCbits
7070 #define SEG28                   PORTCbits.SEG28                 // bit 7, shadows bit in PORTCbits
7071 #define RX1                     PORTCbits.RX1                   // bit 7, shadows bit in PORTCbits
7072 #define DT1                     PORTCbits.DT1                   // bit 7, shadows bit in PORTCbits
7073 
7074 #define RD0                     PORTDbits.RD0                   // bit 0, shadows bit in PORTDbits
7075 #define SEG0                    PORTDbits.SEG0                  // bit 0, shadows bit in PORTDbits
7076 #define P2D                     PORTDbits.P2D                   // bit 0, shadows bit in PORTDbits
7077 #define RD1                     PORTDbits.RD1                   // bit 1, shadows bit in PORTDbits
7078 #define SEG1                    PORTDbits.SEG1                  // bit 1, shadows bit in PORTDbits
7079 #define P2C                     PORTDbits.P2C                   // bit 1, shadows bit in PORTDbits
7080 #define RD2                     PORTDbits.RD2                   // bit 2, shadows bit in PORTDbits
7081 #define SEG2                    PORTDbits.SEG2                  // bit 2, shadows bit in PORTDbits
7082 #define P2B                     PORTDbits.P2B                   // bit 2, shadows bit in PORTDbits
7083 #define RD3                     PORTDbits.RD3                   // bit 3, shadows bit in PORTDbits
7084 #define SEG3                    PORTDbits.SEG3                  // bit 3, shadows bit in PORTDbits
7085 #define P3C                     PORTDbits.P3C                   // bit 3, shadows bit in PORTDbits
7086 #define RD4                     PORTDbits.RD4                   // bit 4, shadows bit in PORTDbits
7087 #define SEG4                    PORTDbits.SEG4                  // bit 4, shadows bit in PORTDbits
7088 #define P3B                     PORTDbits.P3B                   // bit 4, shadows bit in PORTDbits
7089 #define SDO2                    PORTDbits.SDO2                  // bit 4, shadows bit in PORTDbits
7090 #define RD5                     PORTDbits.RD5                   // bit 5, shadows bit in PORTDbits
7091 #define SEG5                    PORTDbits.SEG5                  // bit 5, shadows bit in PORTDbits
7092 #define P1C                     PORTDbits.P1C                   // bit 5, shadows bit in PORTDbits
7093 #define SDI2                    PORTDbits.SDI2                  // bit 5, shadows bit in PORTDbits
7094 #define SDA2                    PORTDbits.SDA2                  // bit 5, shadows bit in PORTDbits
7095 #define RD6                     PORTDbits.RD6                   // bit 6, shadows bit in PORTDbits
7096 #define SEG6                    PORTDbits.SEG6                  // bit 6, shadows bit in PORTDbits
7097 #define P1B                     PORTDbits.P1B                   // bit 6, shadows bit in PORTDbits
7098 #define SCK2                    PORTDbits.SCK2                  // bit 6, shadows bit in PORTDbits
7099 #define SCL2                    PORTDbits.SCL2                  // bit 6, shadows bit in PORTDbits
7100 #define RD7                     PORTDbits.RD7                   // bit 7, shadows bit in PORTDbits
7101 #define SEG7                    PORTDbits.SEG7                  // bit 7, shadows bit in PORTDbits
7102 #define NOT_SS2                 PORTDbits.NOT_SS2               // bit 7, shadows bit in PORTDbits
7103 
7104 #define STR1A                   PSTR1CONbits.STR1A              // bit 0
7105 #define STR1B                   PSTR1CONbits.STR1B              // bit 1
7106 #define STR1C                   PSTR1CONbits.STR1C              // bit 2
7107 #define STR1D                   PSTR1CONbits.STR1D              // bit 3
7108 #define STR1SYNC                PSTR1CONbits.STR1SYNC           // bit 4
7109 
7110 #define STR2A                   PSTR2CONbits.STR2A              // bit 0
7111 #define STR2B                   PSTR2CONbits.STR2B              // bit 1
7112 #define STR2C                   PSTR2CONbits.STR2C              // bit 2
7113 #define STR2D                   PSTR2CONbits.STR2D              // bit 3
7114 #define STR2SYNC                PSTR2CONbits.STR2SYNC           // bit 4
7115 
7116 #define STR3A                   PSTR3CONbits.STR3A              // bit 0
7117 #define STR3B                   PSTR3CONbits.STR3B              // bit 1
7118 #define STR3C                   PSTR3CONbits.STR3C              // bit 2
7119 #define STR3D                   PSTR3CONbits.STR3D              // bit 3
7120 #define STR3SYNC                PSTR3CONbits.STR3SYNC           // bit 4
7121 
7122 #define P1DC0                   PWM1CONbits.P1DC0               // bit 0
7123 #define P1DC1                   PWM1CONbits.P1DC1               // bit 1
7124 #define P1DC2                   PWM1CONbits.P1DC2               // bit 2
7125 #define P1DC3                   PWM1CONbits.P1DC3               // bit 3
7126 #define P1DC4                   PWM1CONbits.P1DC4               // bit 4
7127 #define P1DC5                   PWM1CONbits.P1DC5               // bit 5
7128 #define P1DC6                   PWM1CONbits.P1DC6               // bit 6
7129 #define P1RSEN                  PWM1CONbits.P1RSEN              // bit 7
7130 
7131 #define P2DC0                   PWM2CONbits.P2DC0               // bit 0
7132 #define P2DC1                   PWM2CONbits.P2DC1               // bit 1
7133 #define P2DC2                   PWM2CONbits.P2DC2               // bit 2
7134 #define P2DC3                   PWM2CONbits.P2DC3               // bit 3
7135 #define P2DC4                   PWM2CONbits.P2DC4               // bit 4
7136 #define P2DC5                   PWM2CONbits.P2DC5               // bit 5
7137 #define P2DC6                   PWM2CONbits.P2DC6               // bit 6
7138 #define P2RSEN                  PWM2CONbits.P2RSEN              // bit 7
7139 
7140 #define P3DC0                   PWM3CONbits.P3DC0               // bit 0
7141 #define P3DC1                   PWM3CONbits.P3DC1               // bit 1
7142 #define P3DC2                   PWM3CONbits.P3DC2               // bit 2
7143 #define P3DC3                   PWM3CONbits.P3DC3               // bit 3
7144 #define P3DC4                   PWM3CONbits.P3DC4               // bit 4
7145 #define P3DC5                   PWM3CONbits.P3DC5               // bit 5
7146 #define P3DC6                   PWM3CONbits.P3DC6               // bit 6
7147 #define P3RSEN                  PWM3CONbits.P3RSEN              // bit 7
7148 
7149 #define RX9D                    RC1STAbits.RX9D                 // bit 0
7150 #define OERR                    RC1STAbits.OERR                 // bit 1
7151 #define FERR                    RC1STAbits.FERR                 // bit 2
7152 #define ADDEN                   RC1STAbits.ADDEN                // bit 3
7153 #define CREN                    RC1STAbits.CREN                 // bit 4
7154 #define SREN                    RC1STAbits.SREN                 // bit 5
7155 #define RX9                     RC1STAbits.RX9                  // bit 6
7156 #define SPEN                    RC1STAbits.SPEN                 // bit 7
7157 
7158 #define SRPR                    SRCON0bits.SRPR                 // bit 0
7159 #define SRPS                    SRCON0bits.SRPS                 // bit 1
7160 #define SRNQEN                  SRCON0bits.SRNQEN               // bit 2
7161 #define SRQEN                   SRCON0bits.SRQEN                // bit 3
7162 #define SRCLK0                  SRCON0bits.SRCLK0               // bit 4
7163 #define SRCLK1                  SRCON0bits.SRCLK1               // bit 5
7164 #define SRCLK2                  SRCON0bits.SRCLK2               // bit 6
7165 #define SRLEN                   SRCON0bits.SRLEN                // bit 7
7166 
7167 #define SRRC1E                  SRCON1bits.SRRC1E               // bit 0
7168 #define SRRC2E                  SRCON1bits.SRRC2E               // bit 1
7169 #define SRRCKE                  SRCON1bits.SRRCKE               // bit 2
7170 #define SRRPE                   SRCON1bits.SRRPE                // bit 3
7171 #define SRSC1E                  SRCON1bits.SRSC1E               // bit 4
7172 #define SRSC2E                  SRCON1bits.SRSC2E               // bit 5
7173 #define SRSCKE                  SRCON1bits.SRSCKE               // bit 6
7174 #define SRSPE                   SRCON1bits.SRSPE                // bit 7
7175 
7176 #define SSPM0                   SSP1CON1bits.SSPM0              // bit 0
7177 #define SSPM1                   SSP1CON1bits.SSPM1              // bit 1
7178 #define SSPM2                   SSP1CON1bits.SSPM2              // bit 2
7179 #define SSPM3                   SSP1CON1bits.SSPM3              // bit 3
7180 #define CKP                     SSP1CON1bits.CKP                // bit 4
7181 #define SSPEN                   SSP1CON1bits.SSPEN              // bit 5
7182 #define SSPOV                   SSP1CON1bits.SSPOV              // bit 6
7183 #define WCOL                    SSP1CON1bits.WCOL               // bit 7
7184 
7185 #define SEN                     SSP1CON2bits.SEN                // bit 0
7186 #define RSEN                    SSP1CON2bits.RSEN               // bit 1
7187 #define PEN                     SSP1CON2bits.PEN                // bit 2
7188 #define RCEN                    SSP1CON2bits.RCEN               // bit 3
7189 #define ACKEN                   SSP1CON2bits.ACKEN              // bit 4
7190 #define ACKDT                   SSP1CON2bits.ACKDT              // bit 5
7191 #define ACKSTAT                 SSP1CON2bits.ACKSTAT            // bit 6
7192 #define GCEN                    SSP1CON2bits.GCEN               // bit 7
7193 
7194 #define DHEN                    SSP1CON3bits.DHEN               // bit 0
7195 #define AHEN                    SSP1CON3bits.AHEN               // bit 1
7196 #define SBCDE                   SSP1CON3bits.SBCDE              // bit 2
7197 #define SDAHT                   SSP1CON3bits.SDAHT              // bit 3
7198 #define BOEN                    SSP1CON3bits.BOEN               // bit 4
7199 #define SCIE                    SSP1CON3bits.SCIE               // bit 5
7200 #define PCIE                    SSP1CON3bits.PCIE               // bit 6
7201 #define ACKTIM                  SSP1CON3bits.ACKTIM             // bit 7
7202 
7203 #define BF                      SSP1STATbits.BF                 // bit 0
7204 #define UA                      SSP1STATbits.UA                 // bit 1
7205 #define R_NOT_W                 SSP1STATbits.R_NOT_W            // bit 2
7206 #define S                       SSP1STATbits.S                  // bit 3
7207 #define P                       SSP1STATbits.P                  // bit 4
7208 #define D_NOT_A                 SSP1STATbits.D_NOT_A            // bit 5
7209 #define CKE                     SSP1STATbits.CKE                // bit 6
7210 #define SMP                     SSP1STATbits.SMP                // bit 7
7211 
7212 #define C                       STATUSbits.C                    // bit 0
7213 #define DC                      STATUSbits.DC                   // bit 1
7214 #define Z                       STATUSbits.Z                    // bit 2
7215 #define NOT_PD                  STATUSbits.NOT_PD               // bit 3
7216 #define NOT_TO                  STATUSbits.NOT_TO               // bit 4
7217 
7218 #define C_SHAD                  STATUS_SHADbits.C_SHAD          // bit 0
7219 #define DC_SHAD                 STATUS_SHADbits.DC_SHAD         // bit 1
7220 #define Z_SHAD                  STATUS_SHADbits.Z_SHAD          // bit 2
7221 
7222 #define TMR1ON                  T1CONbits.TMR1ON                // bit 0
7223 #define NOT_T1SYNC              T1CONbits.NOT_T1SYNC            // bit 2
7224 #define T1OSCEN                 T1CONbits.T1OSCEN               // bit 3
7225 #define T1CKPS0                 T1CONbits.T1CKPS0               // bit 4
7226 #define T1CKPS1                 T1CONbits.T1CKPS1               // bit 5
7227 #define TMR1CS0                 T1CONbits.TMR1CS0               // bit 6
7228 #define TMR1CS1                 T1CONbits.TMR1CS1               // bit 7
7229 
7230 #define T1GSS0                  T1GCONbits.T1GSS0               // bit 0
7231 #define T1GSS1                  T1GCONbits.T1GSS1               // bit 1
7232 #define T1GVAL                  T1GCONbits.T1GVAL               // bit 2
7233 #define T1GGO_NOT_DONE          T1GCONbits.T1GGO_NOT_DONE       // bit 3, shadows bit in T1GCONbits
7234 #define T1GGO                   T1GCONbits.T1GGO                // bit 3, shadows bit in T1GCONbits
7235 #define T1GSPM                  T1GCONbits.T1GSPM               // bit 4
7236 #define T1GTM                   T1GCONbits.T1GTM                // bit 5
7237 #define T1GPOL                  T1GCONbits.T1GPOL               // bit 6
7238 #define TMR1GE                  T1GCONbits.TMR1GE               // bit 7
7239 
7240 #define T2CKPS0                 T2CONbits.T2CKPS0               // bit 0
7241 #define T2CKPS1                 T2CONbits.T2CKPS1               // bit 1
7242 #define TMR2ON                  T2CONbits.TMR2ON                // bit 2
7243 #define T2OUTPS0                T2CONbits.T2OUTPS0              // bit 3
7244 #define T2OUTPS1                T2CONbits.T2OUTPS1              // bit 4
7245 #define T2OUTPS2                T2CONbits.T2OUTPS2              // bit 5
7246 #define T2OUTPS3                T2CONbits.T2OUTPS3              // bit 6
7247 
7248 #define T4CKPS0                 T4CONbits.T4CKPS0               // bit 0
7249 #define T4CKPS1                 T4CONbits.T4CKPS1               // bit 1
7250 #define TMR4ON                  T4CONbits.TMR4ON                // bit 2
7251 #define T4OUTPS0                T4CONbits.T4OUTPS0              // bit 3
7252 #define T4OUTPS1                T4CONbits.T4OUTPS1              // bit 4
7253 #define T4OUTPS2                T4CONbits.T4OUTPS2              // bit 5
7254 #define T4OUTPS3                T4CONbits.T4OUTPS3              // bit 6
7255 
7256 #define T6CKPS0                 T6CONbits.T6CKPS0               // bit 0
7257 #define T6CKPS1                 T6CONbits.T6CKPS1               // bit 1
7258 #define TMR6ON                  T6CONbits.TMR6ON                // bit 2
7259 #define T6OUTPS0                T6CONbits.T6OUTPS0              // bit 3
7260 #define T6OUTPS1                T6CONbits.T6OUTPS1              // bit 4
7261 #define T6OUTPS2                T6CONbits.T6OUTPS2              // bit 5
7262 #define T6OUTPS3                T6CONbits.T6OUTPS3              // bit 6
7263 
7264 #define TRISA0                  TRISAbits.TRISA0                // bit 0
7265 #define TRISA1                  TRISAbits.TRISA1                // bit 1
7266 #define TRISA2                  TRISAbits.TRISA2                // bit 2
7267 #define TRISA3                  TRISAbits.TRISA3                // bit 3
7268 #define TRISA4                  TRISAbits.TRISA4                // bit 4
7269 #define TRISA5                  TRISAbits.TRISA5                // bit 5
7270 #define TRISA6                  TRISAbits.TRISA6                // bit 6
7271 #define TRISA7                  TRISAbits.TRISA7                // bit 7
7272 
7273 #define TRISB0                  TRISBbits.TRISB0                // bit 0
7274 #define TRISB1                  TRISBbits.TRISB1                // bit 1
7275 #define TRISB2                  TRISBbits.TRISB2                // bit 2
7276 #define TRISB3                  TRISBbits.TRISB3                // bit 3
7277 #define TRISB4                  TRISBbits.TRISB4                // bit 4
7278 #define TRISB5                  TRISBbits.TRISB5                // bit 5
7279 #define TRISB6                  TRISBbits.TRISB6                // bit 6
7280 #define TRISB7                  TRISBbits.TRISB7                // bit 7
7281 
7282 #define TRISC0                  TRISCbits.TRISC0                // bit 0
7283 #define TRISC1                  TRISCbits.TRISC1                // bit 1
7284 #define TRISC2                  TRISCbits.TRISC2                // bit 2
7285 #define TRISC3                  TRISCbits.TRISC3                // bit 3
7286 #define TRISC4                  TRISCbits.TRISC4                // bit 4
7287 #define TRISC5                  TRISCbits.TRISC5                // bit 5
7288 #define TRISC6                  TRISCbits.TRISC6                // bit 6
7289 #define TRISC7                  TRISCbits.TRISC7                // bit 7
7290 
7291 #define TRISD0                  TRISDbits.TRISD0                // bit 0
7292 #define TRISD1                  TRISDbits.TRISD1                // bit 1
7293 #define TRISD2                  TRISDbits.TRISD2                // bit 2
7294 #define TRISD3                  TRISDbits.TRISD3                // bit 3
7295 #define TRISD4                  TRISDbits.TRISD4                // bit 4
7296 #define TRISD5                  TRISDbits.TRISD5                // bit 5
7297 #define TRISD6                  TRISDbits.TRISD6                // bit 6
7298 #define TRISD7                  TRISDbits.TRISD7                // bit 7
7299 
7300 #define TRISE0                  TRISEbits.TRISE0                // bit 0
7301 #define TRISE1                  TRISEbits.TRISE1                // bit 1
7302 #define TRISE2                  TRISEbits.TRISE2                // bit 2
7303 #define TRISE3                  TRISEbits.TRISE3                // bit 3
7304 #define TRISE4                  TRISEbits.TRISE4                // bit 4
7305 #define TRISE5                  TRISEbits.TRISE5                // bit 5
7306 #define TRISE6                  TRISEbits.TRISE6                // bit 6
7307 #define TRISE7                  TRISEbits.TRISE7                // bit 7
7308 
7309 #define TRISF0                  TRISFbits.TRISF0                // bit 0
7310 #define TRISF1                  TRISFbits.TRISF1                // bit 1
7311 #define TRISF2                  TRISFbits.TRISF2                // bit 2
7312 #define TRISF3                  TRISFbits.TRISF3                // bit 3
7313 #define TRISF4                  TRISFbits.TRISF4                // bit 4
7314 #define TRISF5                  TRISFbits.TRISF5                // bit 5
7315 #define TRISF6                  TRISFbits.TRISF6                // bit 6
7316 #define TRISF7                  TRISFbits.TRISF7                // bit 7
7317 
7318 #define TRISG0                  TRISGbits.TRISG0                // bit 0
7319 #define TRISG1                  TRISGbits.TRISG1                // bit 1
7320 #define TRISG2                  TRISGbits.TRISG2                // bit 2
7321 #define TRISG3                  TRISGbits.TRISG3                // bit 3
7322 #define TRISG4                  TRISGbits.TRISG4                // bit 4
7323 #define TRISG5                  TRISGbits.TRISG5                // bit 5
7324 
7325 #define TX9D                    TX1STAbits.TX9D                 // bit 0
7326 #define TRMT                    TX1STAbits.TRMT                 // bit 1
7327 #define BRGH                    TX1STAbits.BRGH                 // bit 2
7328 #define SENDB                   TX1STAbits.SENDB                // bit 3
7329 #define SYNC                    TX1STAbits.SYNC                 // bit 4
7330 #define TXEN                    TX1STAbits.TXEN                 // bit 5
7331 #define TX9                     TX1STAbits.TX9                  // bit 6
7332 #define CSRC                    TX1STAbits.CSRC                 // bit 7
7333 
7334 #define SWDTEN                  WDTCONbits.SWDTEN               // bit 0
7335 #define WDTPS0                  WDTCONbits.WDTPS0               // bit 1
7336 #define WDTPS1                  WDTCONbits.WDTPS1               // bit 2
7337 #define WDTPS2                  WDTCONbits.WDTPS2               // bit 3
7338 #define WDTPS3                  WDTCONbits.WDTPS3               // bit 4
7339 #define WDTPS4                  WDTCONbits.WDTPS4               // bit 5
7340 
7341 #define WPUB0                   WPUBbits.WPUB0                  // bit 0
7342 #define WPUB1                   WPUBbits.WPUB1                  // bit 1
7343 #define WPUB2                   WPUBbits.WPUB2                  // bit 2
7344 #define WPUB3                   WPUBbits.WPUB3                  // bit 3
7345 #define WPUB4                   WPUBbits.WPUB4                  // bit 4
7346 #define WPUB5                   WPUBbits.WPUB5                  // bit 5
7347 #define WPUB6                   WPUBbits.WPUB6                  // bit 6
7348 #define WPUB7                   WPUBbits.WPUB7                  // bit 7
7349 
7350 #define WPUG5                   WPUGbits.WPUG5                  // bit 5
7351 
7352 #endif // #ifndef NO_BIT_DEFINES
7353 
7354 #endif // #ifndef __PIC16F1947_H__
7355