1 /*
2  * This declarations of the PIC16F917 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:01 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 __PIC16F917_H__
26 #define __PIC16F917_H__
27 
28 //==============================================================================
29 //
30 //	Register Addresses
31 //
32 //==============================================================================
33 
34 #ifndef NO_ADDR_DEFINES
35 
36 #define INDF_ADDR               0x0000
37 #define TMR0_ADDR               0x0001
38 #define PCL_ADDR                0x0002
39 #define STATUS_ADDR             0x0003
40 #define FSR_ADDR                0x0004
41 #define PORTA_ADDR              0x0005
42 #define PORTB_ADDR              0x0006
43 #define PORTC_ADDR              0x0007
44 #define PORTD_ADDR              0x0008
45 #define PORTE_ADDR              0x0009
46 #define PCLATH_ADDR             0x000A
47 #define INTCON_ADDR             0x000B
48 #define PIR1_ADDR               0x000C
49 #define PIR2_ADDR               0x000D
50 #define TMR1_ADDR               0x000E
51 #define TMR1L_ADDR              0x000E
52 #define TMR1H_ADDR              0x000F
53 #define T1CON_ADDR              0x0010
54 #define TMR2_ADDR               0x0011
55 #define T2CON_ADDR              0x0012
56 #define SSPBUF_ADDR             0x0013
57 #define SSPCON_ADDR             0x0014
58 #define CCPR1_ADDR              0x0015
59 #define CCPR1L_ADDR             0x0015
60 #define CCPR1H_ADDR             0x0016
61 #define CCP1CON_ADDR            0x0017
62 #define RCSTA_ADDR              0x0018
63 #define TXREG_ADDR              0x0019
64 #define RCREG_ADDR              0x001A
65 #define CCPR2_ADDR              0x001B
66 #define CCPR2L_ADDR             0x001B
67 #define CCPR2H_ADDR             0x001C
68 #define CCP2CON_ADDR            0x001D
69 #define ADRESH_ADDR             0x001E
70 #define ADCON0_ADDR             0x001F
71 #define OPTION_REG_ADDR         0x0081
72 #define TRISA_ADDR              0x0085
73 #define TRISB_ADDR              0x0086
74 #define TRISC_ADDR              0x0087
75 #define TRISD_ADDR              0x0088
76 #define TRISE_ADDR              0x0089
77 #define PIE1_ADDR               0x008C
78 #define PIE2_ADDR               0x008D
79 #define PCON_ADDR               0x008E
80 #define OSCCON_ADDR             0x008F
81 #define OSCTUNE_ADDR            0x0090
82 #define ANSEL_ADDR              0x0091
83 #define PR2_ADDR                0x0092
84 #define SSPADD_ADDR             0x0093
85 #define SSPSTAT_ADDR            0x0094
86 #define WPU_ADDR                0x0095
87 #define WPUB_ADDR               0x0095
88 #define IOC_ADDR                0x0096
89 #define IOCB_ADDR               0x0096
90 #define CMCON1_ADDR             0x0097
91 #define TXSTA_ADDR              0x0098
92 #define SPBRG_ADDR              0x0099
93 #define CMCON0_ADDR             0x009C
94 #define VRCON_ADDR              0x009D
95 #define ADRESL_ADDR             0x009E
96 #define ADCON1_ADDR             0x009F
97 #define WDTCON_ADDR             0x0105
98 #define LCDCON_ADDR             0x0107
99 #define LCDPS_ADDR              0x0108
100 #define LVDCON_ADDR             0x0109
101 #define EEDATA_ADDR             0x010C
102 #define EEDATL_ADDR             0x010C
103 #define EEADR_ADDR              0x010D
104 #define EEADRL_ADDR             0x010D
105 #define EEDATH_ADDR             0x010E
106 #define EEADRH_ADDR             0x010F
107 #define LCDDATA0_ADDR           0x0110
108 #define LCDDATA1_ADDR           0x0111
109 #define LCDDATA2_ADDR           0x0112
110 #define LCDDATA3_ADDR           0x0113
111 #define LCDDATA4_ADDR           0x0114
112 #define LCDDATA5_ADDR           0x0115
113 #define LCDDATA6_ADDR           0x0116
114 #define LCDDATA7_ADDR           0x0117
115 #define LCDDATA8_ADDR           0x0118
116 #define LCDDATA9_ADDR           0x0119
117 #define LCDDATA10_ADDR          0x011A
118 #define LCDDATA11_ADDR          0x011B
119 #define LCDSE0_ADDR             0x011C
120 #define LCDSE1_ADDR             0x011D
121 #define LCDSE2_ADDR             0x011E
122 #define EECON1_ADDR             0x018C
123 #define EECON2_ADDR             0x018D
124 
125 #endif // #ifndef NO_ADDR_DEFINES
126 
127 //==============================================================================
128 //
129 //	Register Definitions
130 //
131 //==============================================================================
132 
133 extern __at(0x0000) __sfr INDF;
134 extern __at(0x0001) __sfr TMR0;
135 extern __at(0x0002) __sfr PCL;
136 
137 //==============================================================================
138 //        STATUS Bits
139 
140 extern __at(0x0003) __sfr STATUS;
141 
142 typedef union
143   {
144   struct
145     {
146     unsigned C                  : 1;
147     unsigned DC                 : 1;
148     unsigned Z                  : 1;
149     unsigned NOT_PD             : 1;
150     unsigned NOT_TO             : 1;
151     unsigned RP0                : 1;
152     unsigned RP1                : 1;
153     unsigned IRP                : 1;
154     };
155 
156   struct
157     {
158     unsigned                    : 5;
159     unsigned RP                 : 2;
160     unsigned                    : 1;
161     };
162   } __STATUSbits_t;
163 
164 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
165 
166 #define _C                      0x01
167 #define _DC                     0x02
168 #define _Z                      0x04
169 #define _NOT_PD                 0x08
170 #define _NOT_TO                 0x10
171 #define _RP0                    0x20
172 #define _RP1                    0x40
173 #define _IRP                    0x80
174 
175 //==============================================================================
176 
177 extern __at(0x0004) __sfr FSR;
178 
179 //==============================================================================
180 //        PORTA Bits
181 
182 extern __at(0x0005) __sfr PORTA;
183 
184 typedef struct
185   {
186   unsigned RA0                  : 1;
187   unsigned RA1                  : 1;
188   unsigned RA2                  : 1;
189   unsigned RA3                  : 1;
190   unsigned RA4                  : 1;
191   unsigned RA5                  : 1;
192   unsigned RA6                  : 1;
193   unsigned RA7                  : 1;
194   } __PORTAbits_t;
195 
196 extern __at(0x0005) volatile __PORTAbits_t PORTAbits;
197 
198 #define _RA0                    0x01
199 #define _RA1                    0x02
200 #define _RA2                    0x04
201 #define _RA3                    0x08
202 #define _RA4                    0x10
203 #define _RA5                    0x20
204 #define _RA6                    0x40
205 #define _RA7                    0x80
206 
207 //==============================================================================
208 
209 
210 //==============================================================================
211 //        PORTB Bits
212 
213 extern __at(0x0006) __sfr PORTB;
214 
215 typedef struct
216   {
217   unsigned RB0                  : 1;
218   unsigned RB1                  : 1;
219   unsigned RB2                  : 1;
220   unsigned RB3                  : 1;
221   unsigned RB4                  : 1;
222   unsigned RB5                  : 1;
223   unsigned RB6                  : 1;
224   unsigned RB7                  : 1;
225   } __PORTBbits_t;
226 
227 extern __at(0x0006) volatile __PORTBbits_t PORTBbits;
228 
229 #define _RB0                    0x01
230 #define _RB1                    0x02
231 #define _RB2                    0x04
232 #define _RB3                    0x08
233 #define _RB4                    0x10
234 #define _RB5                    0x20
235 #define _RB6                    0x40
236 #define _RB7                    0x80
237 
238 //==============================================================================
239 
240 
241 //==============================================================================
242 //        PORTC Bits
243 
244 extern __at(0x0007) __sfr PORTC;
245 
246 typedef struct
247   {
248   unsigned RC0                  : 1;
249   unsigned RC1                  : 1;
250   unsigned RC2                  : 1;
251   unsigned RC3                  : 1;
252   unsigned RC4                  : 1;
253   unsigned RC5                  : 1;
254   unsigned RC6                  : 1;
255   unsigned RC7                  : 1;
256   } __PORTCbits_t;
257 
258 extern __at(0x0007) volatile __PORTCbits_t PORTCbits;
259 
260 #define _RC0                    0x01
261 #define _RC1                    0x02
262 #define _RC2                    0x04
263 #define _RC3                    0x08
264 #define _RC4                    0x10
265 #define _RC5                    0x20
266 #define _RC6                    0x40
267 #define _RC7                    0x80
268 
269 //==============================================================================
270 
271 
272 //==============================================================================
273 //        PORTD Bits
274 
275 extern __at(0x0008) __sfr PORTD;
276 
277 typedef struct
278   {
279   unsigned RD0                  : 1;
280   unsigned RD1                  : 1;
281   unsigned RD2                  : 1;
282   unsigned RD3                  : 1;
283   unsigned RD4                  : 1;
284   unsigned RD5                  : 1;
285   unsigned RD6                  : 1;
286   unsigned RD7                  : 1;
287   } __PORTDbits_t;
288 
289 extern __at(0x0008) volatile __PORTDbits_t PORTDbits;
290 
291 #define _RD0                    0x01
292 #define _RD1                    0x02
293 #define _RD2                    0x04
294 #define _RD3                    0x08
295 #define _RD4                    0x10
296 #define _RD5                    0x20
297 #define _RD6                    0x40
298 #define _RD7                    0x80
299 
300 //==============================================================================
301 
302 
303 //==============================================================================
304 //        PORTE Bits
305 
306 extern __at(0x0009) __sfr PORTE;
307 
308 typedef union
309   {
310   struct
311     {
312     unsigned RE0                : 1;
313     unsigned RE1                : 1;
314     unsigned RE2                : 1;
315     unsigned RE3                : 1;
316     unsigned                    : 1;
317     unsigned                    : 1;
318     unsigned                    : 1;
319     unsigned                    : 1;
320     };
321 
322   struct
323     {
324     unsigned RE                 : 4;
325     unsigned                    : 4;
326     };
327   } __PORTEbits_t;
328 
329 extern __at(0x0009) volatile __PORTEbits_t PORTEbits;
330 
331 #define _RE0                    0x01
332 #define _RE1                    0x02
333 #define _RE2                    0x04
334 #define _RE3                    0x08
335 
336 //==============================================================================
337 
338 extern __at(0x000A) __sfr PCLATH;
339 
340 //==============================================================================
341 //        INTCON Bits
342 
343 extern __at(0x000B) __sfr INTCON;
344 
345 typedef union
346   {
347   struct
348     {
349     unsigned RBIF               : 1;
350     unsigned INTF               : 1;
351     unsigned TMR0IF             : 1;
352     unsigned RBIE               : 1;
353     unsigned INTE               : 1;
354     unsigned TMR0IE             : 1;
355     unsigned PEIE               : 1;
356     unsigned GIE                : 1;
357     };
358 
359   struct
360     {
361     unsigned                    : 1;
362     unsigned                    : 1;
363     unsigned T0IF               : 1;
364     unsigned                    : 1;
365     unsigned                    : 1;
366     unsigned T0IE               : 1;
367     unsigned                    : 1;
368     unsigned                    : 1;
369     };
370   } __INTCONbits_t;
371 
372 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
373 
374 #define _RBIF                   0x01
375 #define _INTF                   0x02
376 #define _TMR0IF                 0x04
377 #define _T0IF                   0x04
378 #define _RBIE                   0x08
379 #define _INTE                   0x10
380 #define _TMR0IE                 0x20
381 #define _T0IE                   0x20
382 #define _PEIE                   0x40
383 #define _GIE                    0x80
384 
385 //==============================================================================
386 
387 
388 //==============================================================================
389 //        PIR1 Bits
390 
391 extern __at(0x000C) __sfr PIR1;
392 
393 typedef struct
394   {
395   unsigned TMR1IF               : 1;
396   unsigned TMR2IF               : 1;
397   unsigned CCP1IF               : 1;
398   unsigned SSPIF                : 1;
399   unsigned TXIF                 : 1;
400   unsigned RCIF                 : 1;
401   unsigned ADIF                 : 1;
402   unsigned EEIF                 : 1;
403   } __PIR1bits_t;
404 
405 extern __at(0x000C) volatile __PIR1bits_t PIR1bits;
406 
407 #define _TMR1IF                 0x01
408 #define _TMR2IF                 0x02
409 #define _CCP1IF                 0x04
410 #define _SSPIF                  0x08
411 #define _TXIF                   0x10
412 #define _RCIF                   0x20
413 #define _ADIF                   0x40
414 #define _EEIF                   0x80
415 
416 //==============================================================================
417 
418 
419 //==============================================================================
420 //        PIR2 Bits
421 
422 extern __at(0x000D) __sfr PIR2;
423 
424 typedef struct
425   {
426   unsigned CCP2IF               : 1;
427   unsigned                      : 1;
428   unsigned LVDIF                : 1;
429   unsigned                      : 1;
430   unsigned LCDIF                : 1;
431   unsigned C1IF                 : 1;
432   unsigned C2IF                 : 1;
433   unsigned OSFIF                : 1;
434   } __PIR2bits_t;
435 
436 extern __at(0x000D) volatile __PIR2bits_t PIR2bits;
437 
438 #define _CCP2IF                 0x01
439 #define _LVDIF                  0x04
440 #define _LCDIF                  0x10
441 #define _C1IF                   0x20
442 #define _C2IF                   0x40
443 #define _OSFIF                  0x80
444 
445 //==============================================================================
446 
447 extern __at(0x000E) __sfr TMR1;
448 extern __at(0x000E) __sfr TMR1L;
449 extern __at(0x000F) __sfr TMR1H;
450 
451 //==============================================================================
452 //        T1CON Bits
453 
454 extern __at(0x0010) __sfr T1CON;
455 
456 typedef union
457   {
458   struct
459     {
460     unsigned TMR1ON             : 1;
461     unsigned TMR1CS             : 1;
462     unsigned NOT_T1SYNC         : 1;
463     unsigned T1OSCEN            : 1;
464     unsigned T1CKPS0            : 1;
465     unsigned T1CKPS1            : 1;
466     unsigned TMR1GE             : 1;
467     unsigned T1GINV             : 1;
468     };
469 
470   struct
471     {
472     unsigned                    : 1;
473     unsigned                    : 1;
474     unsigned T1SYNC             : 1;
475     unsigned                    : 1;
476     unsigned                    : 1;
477     unsigned                    : 1;
478     unsigned T1GE               : 1;
479     unsigned                    : 1;
480     };
481 
482   struct
483     {
484     unsigned                    : 1;
485     unsigned                    : 1;
486     unsigned T1INSYNC           : 1;
487     unsigned                    : 1;
488     unsigned                    : 1;
489     unsigned                    : 1;
490     unsigned                    : 1;
491     unsigned                    : 1;
492     };
493 
494   struct
495     {
496     unsigned                    : 4;
497     unsigned T1CKPS             : 2;
498     unsigned                    : 2;
499     };
500   } __T1CONbits_t;
501 
502 extern __at(0x0010) volatile __T1CONbits_t T1CONbits;
503 
504 #define _TMR1ON                 0x01
505 #define _TMR1CS                 0x02
506 #define _NOT_T1SYNC             0x04
507 #define _T1SYNC                 0x04
508 #define _T1INSYNC               0x04
509 #define _T1OSCEN                0x08
510 #define _T1CKPS0                0x10
511 #define _T1CKPS1                0x20
512 #define _TMR1GE                 0x40
513 #define _T1GE                   0x40
514 #define _T1GINV                 0x80
515 
516 //==============================================================================
517 
518 extern __at(0x0011) __sfr TMR2;
519 
520 //==============================================================================
521 //        T2CON Bits
522 
523 extern __at(0x0012) __sfr T2CON;
524 
525 typedef union
526   {
527   struct
528     {
529     unsigned T2CKPS0            : 1;
530     unsigned T2CKPS1            : 1;
531     unsigned TMR2ON             : 1;
532     unsigned TOUTPS0            : 1;
533     unsigned TOUTPS1            : 1;
534     unsigned TOUTPS2            : 1;
535     unsigned TOUTPS3            : 1;
536     unsigned                    : 1;
537     };
538 
539   struct
540     {
541     unsigned T2CKPS             : 2;
542     unsigned                    : 6;
543     };
544 
545   struct
546     {
547     unsigned                    : 3;
548     unsigned TOUTPS             : 4;
549     unsigned                    : 1;
550     };
551   } __T2CONbits_t;
552 
553 extern __at(0x0012) volatile __T2CONbits_t T2CONbits;
554 
555 #define _T2CKPS0                0x01
556 #define _T2CKPS1                0x02
557 #define _TMR2ON                 0x04
558 #define _TOUTPS0                0x08
559 #define _TOUTPS1                0x10
560 #define _TOUTPS2                0x20
561 #define _TOUTPS3                0x40
562 
563 //==============================================================================
564 
565 extern __at(0x0013) __sfr SSPBUF;
566 
567 //==============================================================================
568 //        SSPCON Bits
569 
570 extern __at(0x0014) __sfr SSPCON;
571 
572 typedef union
573   {
574   struct
575     {
576     unsigned SSPM0              : 1;
577     unsigned SSPM1              : 1;
578     unsigned SSPM2              : 1;
579     unsigned SSPM3              : 1;
580     unsigned CKP                : 1;
581     unsigned SSPEN              : 1;
582     unsigned SSPOV              : 1;
583     unsigned WCOL               : 1;
584     };
585 
586   struct
587     {
588     unsigned SSPM               : 4;
589     unsigned                    : 4;
590     };
591   } __SSPCONbits_t;
592 
593 extern __at(0x0014) volatile __SSPCONbits_t SSPCONbits;
594 
595 #define _SSPM0                  0x01
596 #define _SSPM1                  0x02
597 #define _SSPM2                  0x04
598 #define _SSPM3                  0x08
599 #define _CKP                    0x10
600 #define _SSPEN                  0x20
601 #define _SSPOV                  0x40
602 #define _WCOL                   0x80
603 
604 //==============================================================================
605 
606 extern __at(0x0015) __sfr CCPR1;
607 extern __at(0x0015) __sfr CCPR1L;
608 extern __at(0x0016) __sfr CCPR1H;
609 
610 //==============================================================================
611 //        CCP1CON Bits
612 
613 extern __at(0x0017) __sfr CCP1CON;
614 
615 typedef union
616   {
617   struct
618     {
619     unsigned CCP1M0             : 1;
620     unsigned CCP1M1             : 1;
621     unsigned CCP1M2             : 1;
622     unsigned CCP1M3             : 1;
623     unsigned CCP1Y              : 1;
624     unsigned CCP1X              : 1;
625     unsigned                    : 1;
626     unsigned                    : 1;
627     };
628 
629   struct
630     {
631     unsigned CCP1M              : 4;
632     unsigned                    : 4;
633     };
634   } __CCP1CONbits_t;
635 
636 extern __at(0x0017) volatile __CCP1CONbits_t CCP1CONbits;
637 
638 #define _CCP1M0                 0x01
639 #define _CCP1M1                 0x02
640 #define _CCP1M2                 0x04
641 #define _CCP1M3                 0x08
642 #define _CCP1Y                  0x10
643 #define _CCP1X                  0x20
644 
645 //==============================================================================
646 
647 
648 //==============================================================================
649 //        RCSTA Bits
650 
651 extern __at(0x0018) __sfr RCSTA;
652 
653 typedef union
654   {
655   struct
656     {
657     unsigned RX9D               : 1;
658     unsigned OERR               : 1;
659     unsigned FERR               : 1;
660     unsigned ADDEN              : 1;
661     unsigned CREN               : 1;
662     unsigned SREN               : 1;
663     unsigned RX9                : 1;
664     unsigned SPEN               : 1;
665     };
666 
667   struct
668     {
669     unsigned RCD8               : 1;
670     unsigned                    : 1;
671     unsigned                    : 1;
672     unsigned                    : 1;
673     unsigned                    : 1;
674     unsigned                    : 1;
675     unsigned RC9                : 1;
676     unsigned                    : 1;
677     };
678 
679   struct
680     {
681     unsigned                    : 1;
682     unsigned                    : 1;
683     unsigned                    : 1;
684     unsigned                    : 1;
685     unsigned                    : 1;
686     unsigned                    : 1;
687     unsigned NOT_RC8            : 1;
688     unsigned                    : 1;
689     };
690 
691   struct
692     {
693     unsigned                    : 1;
694     unsigned                    : 1;
695     unsigned                    : 1;
696     unsigned                    : 1;
697     unsigned                    : 1;
698     unsigned                    : 1;
699     unsigned RC8_9              : 1;
700     unsigned                    : 1;
701     };
702   } __RCSTAbits_t;
703 
704 extern __at(0x0018) volatile __RCSTAbits_t RCSTAbits;
705 
706 #define _RX9D                   0x01
707 #define _RCD8                   0x01
708 #define _OERR                   0x02
709 #define _FERR                   0x04
710 #define _ADDEN                  0x08
711 #define _CREN                   0x10
712 #define _SREN                   0x20
713 #define _RX9                    0x40
714 #define _RC9                    0x40
715 #define _NOT_RC8                0x40
716 #define _RC8_9                  0x40
717 #define _SPEN                   0x80
718 
719 //==============================================================================
720 
721 extern __at(0x0019) __sfr TXREG;
722 extern __at(0x001A) __sfr RCREG;
723 extern __at(0x001B) __sfr CCPR2;
724 extern __at(0x001B) __sfr CCPR2L;
725 extern __at(0x001C) __sfr CCPR2H;
726 
727 //==============================================================================
728 //        CCP2CON Bits
729 
730 extern __at(0x001D) __sfr CCP2CON;
731 
732 typedef union
733   {
734   struct
735     {
736     unsigned CCP2M0             : 1;
737     unsigned CCP2M1             : 1;
738     unsigned CCP2M2             : 1;
739     unsigned CCP2M3             : 1;
740     unsigned CCP2Y              : 1;
741     unsigned CCP2X              : 1;
742     unsigned                    : 1;
743     unsigned                    : 1;
744     };
745 
746   struct
747     {
748     unsigned CCP2M              : 4;
749     unsigned                    : 4;
750     };
751   } __CCP2CONbits_t;
752 
753 extern __at(0x001D) volatile __CCP2CONbits_t CCP2CONbits;
754 
755 #define _CCP2M0                 0x01
756 #define _CCP2M1                 0x02
757 #define _CCP2M2                 0x04
758 #define _CCP2M3                 0x08
759 #define _CCP2Y                  0x10
760 #define _CCP2X                  0x20
761 
762 //==============================================================================
763 
764 extern __at(0x001E) __sfr ADRESH;
765 
766 //==============================================================================
767 //        ADCON0 Bits
768 
769 extern __at(0x001F) __sfr ADCON0;
770 
771 typedef union
772   {
773   struct
774     {
775     unsigned ADON               : 1;
776     unsigned GO_NOT_DONE        : 1;
777     unsigned CHS0               : 1;
778     unsigned CHS1               : 1;
779     unsigned CHS2               : 1;
780     unsigned VCFG0              : 1;
781     unsigned VCFG1              : 1;
782     unsigned ADFM               : 1;
783     };
784 
785   struct
786     {
787     unsigned                    : 1;
788     unsigned NOT_DONE           : 1;
789     unsigned                    : 1;
790     unsigned                    : 1;
791     unsigned                    : 1;
792     unsigned                    : 1;
793     unsigned                    : 1;
794     unsigned                    : 1;
795     };
796 
797   struct
798     {
799     unsigned                    : 1;
800     unsigned GO_DONE            : 1;
801     unsigned                    : 1;
802     unsigned                    : 1;
803     unsigned                    : 1;
804     unsigned                    : 1;
805     unsigned                    : 1;
806     unsigned                    : 1;
807     };
808 
809   struct
810     {
811     unsigned                    : 1;
812     unsigned GO                 : 1;
813     unsigned                    : 1;
814     unsigned                    : 1;
815     unsigned                    : 1;
816     unsigned                    : 1;
817     unsigned                    : 1;
818     unsigned                    : 1;
819     };
820 
821   struct
822     {
823     unsigned                    : 2;
824     unsigned CHS                : 3;
825     unsigned                    : 3;
826     };
827 
828   struct
829     {
830     unsigned                    : 5;
831     unsigned VCFG               : 2;
832     unsigned                    : 1;
833     };
834   } __ADCON0bits_t;
835 
836 extern __at(0x001F) volatile __ADCON0bits_t ADCON0bits;
837 
838 #define _ADON                   0x01
839 #define _GO_NOT_DONE            0x02
840 #define _NOT_DONE               0x02
841 #define _GO_DONE                0x02
842 #define _GO                     0x02
843 #define _CHS0                   0x04
844 #define _CHS1                   0x08
845 #define _CHS2                   0x10
846 #define _VCFG0                  0x20
847 #define _VCFG1                  0x40
848 #define _ADFM                   0x80
849 
850 //==============================================================================
851 
852 
853 //==============================================================================
854 //        OPTION_REG Bits
855 
856 extern __at(0x0081) __sfr OPTION_REG;
857 
858 typedef union
859   {
860   struct
861     {
862     unsigned PS0                : 1;
863     unsigned PS1                : 1;
864     unsigned PS2                : 1;
865     unsigned PSA                : 1;
866     unsigned T0SE               : 1;
867     unsigned T0CS               : 1;
868     unsigned INTEDG             : 1;
869     unsigned NOT_RBPU           : 1;
870     };
871 
872   struct
873     {
874     unsigned PS                 : 3;
875     unsigned                    : 5;
876     };
877   } __OPTION_REGbits_t;
878 
879 extern __at(0x0081) volatile __OPTION_REGbits_t OPTION_REGbits;
880 
881 #define _PS0                    0x01
882 #define _PS1                    0x02
883 #define _PS2                    0x04
884 #define _PSA                    0x08
885 #define _T0SE                   0x10
886 #define _T0CS                   0x20
887 #define _INTEDG                 0x40
888 #define _NOT_RBPU               0x80
889 
890 //==============================================================================
891 
892 
893 //==============================================================================
894 //        TRISA Bits
895 
896 extern __at(0x0085) __sfr TRISA;
897 
898 typedef struct
899   {
900   unsigned TRISA0               : 1;
901   unsigned TRISA1               : 1;
902   unsigned TRISA2               : 1;
903   unsigned TRISA3               : 1;
904   unsigned TRISA4               : 1;
905   unsigned TRISA5               : 1;
906   unsigned TRISA6               : 1;
907   unsigned TRISA7               : 1;
908   } __TRISAbits_t;
909 
910 extern __at(0x0085) volatile __TRISAbits_t TRISAbits;
911 
912 #define _TRISA0                 0x01
913 #define _TRISA1                 0x02
914 #define _TRISA2                 0x04
915 #define _TRISA3                 0x08
916 #define _TRISA4                 0x10
917 #define _TRISA5                 0x20
918 #define _TRISA6                 0x40
919 #define _TRISA7                 0x80
920 
921 //==============================================================================
922 
923 
924 //==============================================================================
925 //        TRISB Bits
926 
927 extern __at(0x0086) __sfr TRISB;
928 
929 typedef struct
930   {
931   unsigned TRISB0               : 1;
932   unsigned TRISB1               : 1;
933   unsigned TRISB2               : 1;
934   unsigned TRISB3               : 1;
935   unsigned TRISB4               : 1;
936   unsigned TRISB5               : 1;
937   unsigned TRISB6               : 1;
938   unsigned TRISB7               : 1;
939   } __TRISBbits_t;
940 
941 extern __at(0x0086) volatile __TRISBbits_t TRISBbits;
942 
943 #define _TRISB0                 0x01
944 #define _TRISB1                 0x02
945 #define _TRISB2                 0x04
946 #define _TRISB3                 0x08
947 #define _TRISB4                 0x10
948 #define _TRISB5                 0x20
949 #define _TRISB6                 0x40
950 #define _TRISB7                 0x80
951 
952 //==============================================================================
953 
954 
955 //==============================================================================
956 //        TRISC Bits
957 
958 extern __at(0x0087) __sfr TRISC;
959 
960 typedef struct
961   {
962   unsigned TRISC0               : 1;
963   unsigned TRISC1               : 1;
964   unsigned TRISC2               : 1;
965   unsigned TRISC3               : 1;
966   unsigned TRISC4               : 1;
967   unsigned TRISC5               : 1;
968   unsigned TRISC6               : 1;
969   unsigned TRISC7               : 1;
970   } __TRISCbits_t;
971 
972 extern __at(0x0087) volatile __TRISCbits_t TRISCbits;
973 
974 #define _TRISC0                 0x01
975 #define _TRISC1                 0x02
976 #define _TRISC2                 0x04
977 #define _TRISC3                 0x08
978 #define _TRISC4                 0x10
979 #define _TRISC5                 0x20
980 #define _TRISC6                 0x40
981 #define _TRISC7                 0x80
982 
983 //==============================================================================
984 
985 
986 //==============================================================================
987 //        TRISD Bits
988 
989 extern __at(0x0088) __sfr TRISD;
990 
991 typedef struct
992   {
993   unsigned TRISD0               : 1;
994   unsigned TRISD1               : 1;
995   unsigned TRISD2               : 1;
996   unsigned TRISD3               : 1;
997   unsigned TRISD4               : 1;
998   unsigned TRISD5               : 1;
999   unsigned TRISD6               : 1;
1000   unsigned TRISD7               : 1;
1001   } __TRISDbits_t;
1002 
1003 extern __at(0x0088) volatile __TRISDbits_t TRISDbits;
1004 
1005 #define _TRISD0                 0x01
1006 #define _TRISD1                 0x02
1007 #define _TRISD2                 0x04
1008 #define _TRISD3                 0x08
1009 #define _TRISD4                 0x10
1010 #define _TRISD5                 0x20
1011 #define _TRISD6                 0x40
1012 #define _TRISD7                 0x80
1013 
1014 //==============================================================================
1015 
1016 
1017 //==============================================================================
1018 //        TRISE Bits
1019 
1020 extern __at(0x0089) __sfr TRISE;
1021 
1022 typedef union
1023   {
1024   struct
1025     {
1026     unsigned TRISE0             : 1;
1027     unsigned TRISE1             : 1;
1028     unsigned TRISE2             : 1;
1029     unsigned TRISE3             : 1;
1030     unsigned                    : 1;
1031     unsigned                    : 1;
1032     unsigned                    : 1;
1033     unsigned                    : 1;
1034     };
1035 
1036   struct
1037     {
1038     unsigned TRISE              : 4;
1039     unsigned                    : 4;
1040     };
1041   } __TRISEbits_t;
1042 
1043 extern __at(0x0089) volatile __TRISEbits_t TRISEbits;
1044 
1045 #define _TRISE0                 0x01
1046 #define _TRISE1                 0x02
1047 #define _TRISE2                 0x04
1048 #define _TRISE3                 0x08
1049 
1050 //==============================================================================
1051 
1052 
1053 //==============================================================================
1054 //        PIE1 Bits
1055 
1056 extern __at(0x008C) __sfr PIE1;
1057 
1058 typedef struct
1059   {
1060   unsigned TMR1IE               : 1;
1061   unsigned TMR2IE               : 1;
1062   unsigned CCP1IE               : 1;
1063   unsigned SSPIE                : 1;
1064   unsigned TXIE                 : 1;
1065   unsigned RCIE                 : 1;
1066   unsigned ADIE                 : 1;
1067   unsigned EEIE                 : 1;
1068   } __PIE1bits_t;
1069 
1070 extern __at(0x008C) volatile __PIE1bits_t PIE1bits;
1071 
1072 #define _TMR1IE                 0x01
1073 #define _TMR2IE                 0x02
1074 #define _CCP1IE                 0x04
1075 #define _SSPIE                  0x08
1076 #define _TXIE                   0x10
1077 #define _RCIE                   0x20
1078 #define _ADIE                   0x40
1079 #define _EEIE                   0x80
1080 
1081 //==============================================================================
1082 
1083 
1084 //==============================================================================
1085 //        PIE2 Bits
1086 
1087 extern __at(0x008D) __sfr PIE2;
1088 
1089 typedef struct
1090   {
1091   unsigned CCP2IE               : 1;
1092   unsigned                      : 1;
1093   unsigned LVDIE                : 1;
1094   unsigned                      : 1;
1095   unsigned LCDIE                : 1;
1096   unsigned C1IE                 : 1;
1097   unsigned C2IE                 : 1;
1098   unsigned OSFIE                : 1;
1099   } __PIE2bits_t;
1100 
1101 extern __at(0x008D) volatile __PIE2bits_t PIE2bits;
1102 
1103 #define _CCP2IE                 0x01
1104 #define _LVDIE                  0x04
1105 #define _LCDIE                  0x10
1106 #define _C1IE                   0x20
1107 #define _C2IE                   0x40
1108 #define _OSFIE                  0x80
1109 
1110 //==============================================================================
1111 
1112 
1113 //==============================================================================
1114 //        PCON Bits
1115 
1116 extern __at(0x008E) __sfr PCON;
1117 
1118 typedef union
1119   {
1120   struct
1121     {
1122     unsigned NOT_BOR            : 1;
1123     unsigned NOT_POR            : 1;
1124     unsigned                    : 1;
1125     unsigned                    : 1;
1126     unsigned SBOREN             : 1;
1127     unsigned                    : 1;
1128     unsigned                    : 1;
1129     unsigned                    : 1;
1130     };
1131 
1132   struct
1133     {
1134     unsigned NOT_BO             : 1;
1135     unsigned                    : 1;
1136     unsigned                    : 1;
1137     unsigned                    : 1;
1138     unsigned                    : 1;
1139     unsigned                    : 1;
1140     unsigned                    : 1;
1141     unsigned                    : 1;
1142     };
1143   } __PCONbits_t;
1144 
1145 extern __at(0x008E) volatile __PCONbits_t PCONbits;
1146 
1147 #define _NOT_BOR                0x01
1148 #define _NOT_BO                 0x01
1149 #define _NOT_POR                0x02
1150 #define _SBOREN                 0x10
1151 
1152 //==============================================================================
1153 
1154 
1155 //==============================================================================
1156 //        OSCCON Bits
1157 
1158 extern __at(0x008F) __sfr OSCCON;
1159 
1160 typedef union
1161   {
1162   struct
1163     {
1164     unsigned SCS                : 1;
1165     unsigned LTS                : 1;
1166     unsigned HTS                : 1;
1167     unsigned OSTS               : 1;
1168     unsigned IRCF0              : 1;
1169     unsigned IRCF1              : 1;
1170     unsigned IRCF2              : 1;
1171     unsigned                    : 1;
1172     };
1173 
1174   struct
1175     {
1176     unsigned                    : 4;
1177     unsigned IRCF               : 3;
1178     unsigned                    : 1;
1179     };
1180   } __OSCCONbits_t;
1181 
1182 extern __at(0x008F) volatile __OSCCONbits_t OSCCONbits;
1183 
1184 #define _SCS                    0x01
1185 #define _LTS                    0x02
1186 #define _HTS                    0x04
1187 #define _OSTS                   0x08
1188 #define _IRCF0                  0x10
1189 #define _IRCF1                  0x20
1190 #define _IRCF2                  0x40
1191 
1192 //==============================================================================
1193 
1194 
1195 //==============================================================================
1196 //        OSCTUNE Bits
1197 
1198 extern __at(0x0090) __sfr OSCTUNE;
1199 
1200 typedef union
1201   {
1202   struct
1203     {
1204     unsigned TUN0               : 1;
1205     unsigned TUN1               : 1;
1206     unsigned TUN2               : 1;
1207     unsigned TUN3               : 1;
1208     unsigned TUN4               : 1;
1209     unsigned                    : 1;
1210     unsigned                    : 1;
1211     unsigned                    : 1;
1212     };
1213 
1214   struct
1215     {
1216     unsigned TUN                : 5;
1217     unsigned                    : 3;
1218     };
1219   } __OSCTUNEbits_t;
1220 
1221 extern __at(0x0090) volatile __OSCTUNEbits_t OSCTUNEbits;
1222 
1223 #define _TUN0                   0x01
1224 #define _TUN1                   0x02
1225 #define _TUN2                   0x04
1226 #define _TUN3                   0x08
1227 #define _TUN4                   0x10
1228 
1229 //==============================================================================
1230 
1231 
1232 //==============================================================================
1233 //        ANSEL Bits
1234 
1235 extern __at(0x0091) __sfr ANSEL;
1236 
1237 typedef union
1238   {
1239   struct
1240     {
1241     unsigned ANS0               : 1;
1242     unsigned ANS1               : 1;
1243     unsigned ANS2               : 1;
1244     unsigned ANS3               : 1;
1245     unsigned ANS4               : 1;
1246     unsigned ANS5               : 1;
1247     unsigned ANS6               : 1;
1248     unsigned ANS7               : 1;
1249     };
1250 
1251   struct
1252     {
1253     unsigned AN0                : 1;
1254     unsigned AN1                : 1;
1255     unsigned AN2                : 1;
1256     unsigned AN3                : 1;
1257     unsigned AN4                : 1;
1258     unsigned AN5                : 1;
1259     unsigned AN6                : 1;
1260     unsigned AN7                : 1;
1261     };
1262   } __ANSELbits_t;
1263 
1264 extern __at(0x0091) volatile __ANSELbits_t ANSELbits;
1265 
1266 #define _ANS0                   0x01
1267 #define _AN0                    0x01
1268 #define _ANS1                   0x02
1269 #define _AN1                    0x02
1270 #define _ANS2                   0x04
1271 #define _AN2                    0x04
1272 #define _ANS3                   0x08
1273 #define _AN3                    0x08
1274 #define _ANS4                   0x10
1275 #define _AN4                    0x10
1276 #define _ANS5                   0x20
1277 #define _AN5                    0x20
1278 #define _ANS6                   0x40
1279 #define _AN6                    0x40
1280 #define _ANS7                   0x80
1281 #define _AN7                    0x80
1282 
1283 //==============================================================================
1284 
1285 extern __at(0x0092) __sfr PR2;
1286 extern __at(0x0093) __sfr SSPADD;
1287 
1288 //==============================================================================
1289 //        SSPSTAT Bits
1290 
1291 extern __at(0x0094) __sfr SSPSTAT;
1292 
1293 typedef union
1294   {
1295   struct
1296     {
1297     unsigned BF                 : 1;
1298     unsigned UA                 : 1;
1299     unsigned R_NOT_W            : 1;
1300     unsigned S                  : 1;
1301     unsigned P                  : 1;
1302     unsigned D_NOT_A            : 1;
1303     unsigned CKE                : 1;
1304     unsigned SMP                : 1;
1305     };
1306 
1307   struct
1308     {
1309     unsigned                    : 1;
1310     unsigned                    : 1;
1311     unsigned R                  : 1;
1312     unsigned I2C_START          : 1;
1313     unsigned I2C_STOP           : 1;
1314     unsigned D                  : 1;
1315     unsigned                    : 1;
1316     unsigned                    : 1;
1317     };
1318 
1319   struct
1320     {
1321     unsigned                    : 1;
1322     unsigned                    : 1;
1323     unsigned I2C_READ           : 1;
1324     unsigned                    : 1;
1325     unsigned                    : 1;
1326     unsigned I2C_DATA           : 1;
1327     unsigned                    : 1;
1328     unsigned                    : 1;
1329     };
1330 
1331   struct
1332     {
1333     unsigned                    : 1;
1334     unsigned                    : 1;
1335     unsigned NOT_W              : 1;
1336     unsigned                    : 1;
1337     unsigned                    : 1;
1338     unsigned NOT_A              : 1;
1339     unsigned                    : 1;
1340     unsigned                    : 1;
1341     };
1342 
1343   struct
1344     {
1345     unsigned                    : 1;
1346     unsigned                    : 1;
1347     unsigned NOT_WRITE          : 1;
1348     unsigned                    : 1;
1349     unsigned                    : 1;
1350     unsigned NOT_ADDRESS        : 1;
1351     unsigned                    : 1;
1352     unsigned                    : 1;
1353     };
1354 
1355   struct
1356     {
1357     unsigned                    : 1;
1358     unsigned                    : 1;
1359     unsigned R_W                : 1;
1360     unsigned                    : 1;
1361     unsigned                    : 1;
1362     unsigned D_A                : 1;
1363     unsigned                    : 1;
1364     unsigned                    : 1;
1365     };
1366 
1367   struct
1368     {
1369     unsigned                    : 1;
1370     unsigned                    : 1;
1371     unsigned READ_WRITE         : 1;
1372     unsigned                    : 1;
1373     unsigned                    : 1;
1374     unsigned DATA_ADDRESS       : 1;
1375     unsigned                    : 1;
1376     unsigned                    : 1;
1377     };
1378   } __SSPSTATbits_t;
1379 
1380 extern __at(0x0094) volatile __SSPSTATbits_t SSPSTATbits;
1381 
1382 #define _BF                     0x01
1383 #define _UA                     0x02
1384 #define _R_NOT_W                0x04
1385 #define _R                      0x04
1386 #define _I2C_READ               0x04
1387 #define _NOT_W                  0x04
1388 #define _NOT_WRITE              0x04
1389 #define _R_W                    0x04
1390 #define _READ_WRITE             0x04
1391 #define _S                      0x08
1392 #define _I2C_START              0x08
1393 #define _P                      0x10
1394 #define _I2C_STOP               0x10
1395 #define _D_NOT_A                0x20
1396 #define _D                      0x20
1397 #define _I2C_DATA               0x20
1398 #define _NOT_A                  0x20
1399 #define _NOT_ADDRESS            0x20
1400 #define _D_A                    0x20
1401 #define _DATA_ADDRESS           0x20
1402 #define _CKE                    0x40
1403 #define _SMP                    0x80
1404 
1405 //==============================================================================
1406 
1407 
1408 //==============================================================================
1409 //        WPU Bits
1410 
1411 extern __at(0x0095) __sfr WPU;
1412 
1413 typedef union
1414   {
1415   struct
1416     {
1417     unsigned WPUB0              : 1;
1418     unsigned WPUB1              : 1;
1419     unsigned WPUB2              : 1;
1420     unsigned WPUB3              : 1;
1421     unsigned WPUB4              : 1;
1422     unsigned WPUB5              : 1;
1423     unsigned WPUB6              : 1;
1424     unsigned WPUB7              : 1;
1425     };
1426 
1427   struct
1428     {
1429     unsigned WPU0               : 1;
1430     unsigned WPU1               : 1;
1431     unsigned WPU2               : 1;
1432     unsigned WPU3               : 1;
1433     unsigned WPU4               : 1;
1434     unsigned WPU5               : 1;
1435     unsigned WPU6               : 1;
1436     unsigned WPU7               : 1;
1437     };
1438   } __WPUbits_t;
1439 
1440 extern __at(0x0095) volatile __WPUbits_t WPUbits;
1441 
1442 #define _WPUB0                  0x01
1443 #define _WPU0                   0x01
1444 #define _WPUB1                  0x02
1445 #define _WPU1                   0x02
1446 #define _WPUB2                  0x04
1447 #define _WPU2                   0x04
1448 #define _WPUB3                  0x08
1449 #define _WPU3                   0x08
1450 #define _WPUB4                  0x10
1451 #define _WPU4                   0x10
1452 #define _WPUB5                  0x20
1453 #define _WPU5                   0x20
1454 #define _WPUB6                  0x40
1455 #define _WPU6                   0x40
1456 #define _WPUB7                  0x80
1457 #define _WPU7                   0x80
1458 
1459 //==============================================================================
1460 
1461 
1462 //==============================================================================
1463 //        WPUB Bits
1464 
1465 extern __at(0x0095) __sfr WPUB;
1466 
1467 typedef union
1468   {
1469   struct
1470     {
1471     unsigned WPUB0              : 1;
1472     unsigned WPUB1              : 1;
1473     unsigned WPUB2              : 1;
1474     unsigned WPUB3              : 1;
1475     unsigned WPUB4              : 1;
1476     unsigned WPUB5              : 1;
1477     unsigned WPUB6              : 1;
1478     unsigned WPUB7              : 1;
1479     };
1480 
1481   struct
1482     {
1483     unsigned WPU0               : 1;
1484     unsigned WPU1               : 1;
1485     unsigned WPU2               : 1;
1486     unsigned WPU3               : 1;
1487     unsigned WPU4               : 1;
1488     unsigned WPU5               : 1;
1489     unsigned WPU6               : 1;
1490     unsigned WPU7               : 1;
1491     };
1492   } __WPUBbits_t;
1493 
1494 extern __at(0x0095) volatile __WPUBbits_t WPUBbits;
1495 
1496 #define _WPUB_WPUB0             0x01
1497 #define _WPUB_WPU0              0x01
1498 #define _WPUB_WPUB1             0x02
1499 #define _WPUB_WPU1              0x02
1500 #define _WPUB_WPUB2             0x04
1501 #define _WPUB_WPU2              0x04
1502 #define _WPUB_WPUB3             0x08
1503 #define _WPUB_WPU3              0x08
1504 #define _WPUB_WPUB4             0x10
1505 #define _WPUB_WPU4              0x10
1506 #define _WPUB_WPUB5             0x20
1507 #define _WPUB_WPU5              0x20
1508 #define _WPUB_WPUB6             0x40
1509 #define _WPUB_WPU6              0x40
1510 #define _WPUB_WPUB7             0x80
1511 #define _WPUB_WPU7              0x80
1512 
1513 //==============================================================================
1514 
1515 
1516 //==============================================================================
1517 //        IOC Bits
1518 
1519 extern __at(0x0096) __sfr IOC;
1520 
1521 typedef union
1522   {
1523   struct
1524     {
1525     unsigned                    : 1;
1526     unsigned                    : 1;
1527     unsigned                    : 1;
1528     unsigned                    : 1;
1529     unsigned IOCB4              : 1;
1530     unsigned IOCB5              : 1;
1531     unsigned IOCB6              : 1;
1532     unsigned IOCB7              : 1;
1533     };
1534 
1535   struct
1536     {
1537     unsigned                    : 1;
1538     unsigned                    : 1;
1539     unsigned                    : 1;
1540     unsigned                    : 1;
1541     unsigned IOC4               : 1;
1542     unsigned IOC5               : 1;
1543     unsigned IOC6               : 1;
1544     unsigned IOC7               : 1;
1545     };
1546   } __IOCbits_t;
1547 
1548 extern __at(0x0096) volatile __IOCbits_t IOCbits;
1549 
1550 #define _IOCB4                  0x10
1551 #define _IOC4                   0x10
1552 #define _IOCB5                  0x20
1553 #define _IOC5                   0x20
1554 #define _IOCB6                  0x40
1555 #define _IOC6                   0x40
1556 #define _IOCB7                  0x80
1557 #define _IOC7                   0x80
1558 
1559 //==============================================================================
1560 
1561 
1562 //==============================================================================
1563 //        IOCB Bits
1564 
1565 extern __at(0x0096) __sfr IOCB;
1566 
1567 typedef union
1568   {
1569   struct
1570     {
1571     unsigned                    : 1;
1572     unsigned                    : 1;
1573     unsigned                    : 1;
1574     unsigned                    : 1;
1575     unsigned IOCB4              : 1;
1576     unsigned IOCB5              : 1;
1577     unsigned IOCB6              : 1;
1578     unsigned IOCB7              : 1;
1579     };
1580 
1581   struct
1582     {
1583     unsigned                    : 1;
1584     unsigned                    : 1;
1585     unsigned                    : 1;
1586     unsigned                    : 1;
1587     unsigned IOC4               : 1;
1588     unsigned IOC5               : 1;
1589     unsigned IOC6               : 1;
1590     unsigned IOC7               : 1;
1591     };
1592   } __IOCBbits_t;
1593 
1594 extern __at(0x0096) volatile __IOCBbits_t IOCBbits;
1595 
1596 #define _IOCB_IOCB4             0x10
1597 #define _IOCB_IOC4              0x10
1598 #define _IOCB_IOCB5             0x20
1599 #define _IOCB_IOC5              0x20
1600 #define _IOCB_IOCB6             0x40
1601 #define _IOCB_IOC6              0x40
1602 #define _IOCB_IOCB7             0x80
1603 #define _IOCB_IOC7              0x80
1604 
1605 //==============================================================================
1606 
1607 
1608 //==============================================================================
1609 //        CMCON1 Bits
1610 
1611 extern __at(0x0097) __sfr CMCON1;
1612 
1613 typedef struct
1614   {
1615   unsigned C2SYNC               : 1;
1616   unsigned T1GSS                : 1;
1617   unsigned                      : 1;
1618   unsigned                      : 1;
1619   unsigned                      : 1;
1620   unsigned                      : 1;
1621   unsigned                      : 1;
1622   unsigned                      : 1;
1623   } __CMCON1bits_t;
1624 
1625 extern __at(0x0097) volatile __CMCON1bits_t CMCON1bits;
1626 
1627 #define _C2SYNC                 0x01
1628 #define _T1GSS                  0x02
1629 
1630 //==============================================================================
1631 
1632 
1633 //==============================================================================
1634 //        TXSTA Bits
1635 
1636 extern __at(0x0098) __sfr TXSTA;
1637 
1638 typedef union
1639   {
1640   struct
1641     {
1642     unsigned TX9D               : 1;
1643     unsigned TRMT               : 1;
1644     unsigned BRGH               : 1;
1645     unsigned                    : 1;
1646     unsigned SYNC               : 1;
1647     unsigned TXEN               : 1;
1648     unsigned TX9                : 1;
1649     unsigned CSRC               : 1;
1650     };
1651 
1652   struct
1653     {
1654     unsigned TXD8               : 1;
1655     unsigned                    : 1;
1656     unsigned                    : 1;
1657     unsigned                    : 1;
1658     unsigned                    : 1;
1659     unsigned                    : 1;
1660     unsigned NOT_TX8            : 1;
1661     unsigned                    : 1;
1662     };
1663 
1664   struct
1665     {
1666     unsigned                    : 1;
1667     unsigned                    : 1;
1668     unsigned                    : 1;
1669     unsigned                    : 1;
1670     unsigned                    : 1;
1671     unsigned                    : 1;
1672     unsigned TX8_9              : 1;
1673     unsigned                    : 1;
1674     };
1675   } __TXSTAbits_t;
1676 
1677 extern __at(0x0098) volatile __TXSTAbits_t TXSTAbits;
1678 
1679 #define _TX9D                   0x01
1680 #define _TXD8                   0x01
1681 #define _TRMT                   0x02
1682 #define _BRGH                   0x04
1683 #define _SYNC                   0x10
1684 #define _TXEN                   0x20
1685 #define _TX9                    0x40
1686 #define _NOT_TX8                0x40
1687 #define _TX8_9                  0x40
1688 #define _CSRC                   0x80
1689 
1690 //==============================================================================
1691 
1692 extern __at(0x0099) __sfr SPBRG;
1693 
1694 //==============================================================================
1695 //        CMCON0 Bits
1696 
1697 extern __at(0x009C) __sfr CMCON0;
1698 
1699 typedef union
1700   {
1701   struct
1702     {
1703     unsigned CM0                : 1;
1704     unsigned CM1                : 1;
1705     unsigned CM2                : 1;
1706     unsigned CIS                : 1;
1707     unsigned C1INV              : 1;
1708     unsigned C2INV              : 1;
1709     unsigned C1OUT              : 1;
1710     unsigned C2OUT              : 1;
1711     };
1712 
1713   struct
1714     {
1715     unsigned CM                 : 3;
1716     unsigned                    : 5;
1717     };
1718   } __CMCON0bits_t;
1719 
1720 extern __at(0x009C) volatile __CMCON0bits_t CMCON0bits;
1721 
1722 #define _CM0                    0x01
1723 #define _CM1                    0x02
1724 #define _CM2                    0x04
1725 #define _CIS                    0x08
1726 #define _C1INV                  0x10
1727 #define _C2INV                  0x20
1728 #define _C1OUT                  0x40
1729 #define _C2OUT                  0x80
1730 
1731 //==============================================================================
1732 
1733 
1734 //==============================================================================
1735 //        VRCON Bits
1736 
1737 extern __at(0x009D) __sfr VRCON;
1738 
1739 typedef union
1740   {
1741   struct
1742     {
1743     unsigned VR0                : 1;
1744     unsigned VR1                : 1;
1745     unsigned VR2                : 1;
1746     unsigned VR3                : 1;
1747     unsigned                    : 1;
1748     unsigned VRR                : 1;
1749     unsigned                    : 1;
1750     unsigned VREN               : 1;
1751     };
1752 
1753   struct
1754     {
1755     unsigned VR                 : 4;
1756     unsigned                    : 4;
1757     };
1758   } __VRCONbits_t;
1759 
1760 extern __at(0x009D) volatile __VRCONbits_t VRCONbits;
1761 
1762 #define _VR0                    0x01
1763 #define _VR1                    0x02
1764 #define _VR2                    0x04
1765 #define _VR3                    0x08
1766 #define _VRR                    0x20
1767 #define _VREN                   0x80
1768 
1769 //==============================================================================
1770 
1771 extern __at(0x009E) __sfr ADRESL;
1772 
1773 //==============================================================================
1774 //        ADCON1 Bits
1775 
1776 extern __at(0x009F) __sfr ADCON1;
1777 
1778 typedef union
1779   {
1780   struct
1781     {
1782     unsigned                    : 1;
1783     unsigned                    : 1;
1784     unsigned                    : 1;
1785     unsigned                    : 1;
1786     unsigned ADCS0              : 1;
1787     unsigned ADCS1              : 1;
1788     unsigned ADCS2              : 1;
1789     unsigned                    : 1;
1790     };
1791 
1792   struct
1793     {
1794     unsigned                    : 4;
1795     unsigned ADCS               : 3;
1796     unsigned                    : 1;
1797     };
1798   } __ADCON1bits_t;
1799 
1800 extern __at(0x009F) volatile __ADCON1bits_t ADCON1bits;
1801 
1802 #define _ADCS0                  0x10
1803 #define _ADCS1                  0x20
1804 #define _ADCS2                  0x40
1805 
1806 //==============================================================================
1807 
1808 
1809 //==============================================================================
1810 //        WDTCON Bits
1811 
1812 extern __at(0x0105) __sfr WDTCON;
1813 
1814 typedef union
1815   {
1816   struct
1817     {
1818     unsigned SWDTEN             : 1;
1819     unsigned WDTPS0             : 1;
1820     unsigned WDTPS1             : 1;
1821     unsigned WDTPS2             : 1;
1822     unsigned WDTPS3             : 1;
1823     unsigned                    : 1;
1824     unsigned                    : 1;
1825     unsigned                    : 1;
1826     };
1827 
1828   struct
1829     {
1830     unsigned SWDTE              : 1;
1831     unsigned                    : 1;
1832     unsigned                    : 1;
1833     unsigned                    : 1;
1834     unsigned                    : 1;
1835     unsigned                    : 1;
1836     unsigned                    : 1;
1837     unsigned                    : 1;
1838     };
1839 
1840   struct
1841     {
1842     unsigned                    : 1;
1843     unsigned WDTPS              : 4;
1844     unsigned                    : 3;
1845     };
1846   } __WDTCONbits_t;
1847 
1848 extern __at(0x0105) volatile __WDTCONbits_t WDTCONbits;
1849 
1850 #define _SWDTEN                 0x01
1851 #define _SWDTE                  0x01
1852 #define _WDTPS0                 0x02
1853 #define _WDTPS1                 0x04
1854 #define _WDTPS2                 0x08
1855 #define _WDTPS3                 0x10
1856 
1857 //==============================================================================
1858 
1859 
1860 //==============================================================================
1861 //        LCDCON Bits
1862 
1863 extern __at(0x0107) __sfr LCDCON;
1864 
1865 typedef union
1866   {
1867   struct
1868     {
1869     unsigned LMUX0              : 1;
1870     unsigned LMUX1              : 1;
1871     unsigned CS0                : 1;
1872     unsigned CS1                : 1;
1873     unsigned VLCDEN             : 1;
1874     unsigned WERR               : 1;
1875     unsigned SLPEN              : 1;
1876     unsigned LCDEN              : 1;
1877     };
1878 
1879   struct
1880     {
1881     unsigned LMUX               : 2;
1882     unsigned                    : 6;
1883     };
1884 
1885   struct
1886     {
1887     unsigned                    : 2;
1888     unsigned CS                 : 2;
1889     unsigned                    : 4;
1890     };
1891   } __LCDCONbits_t;
1892 
1893 extern __at(0x0107) volatile __LCDCONbits_t LCDCONbits;
1894 
1895 #define _LMUX0                  0x01
1896 #define _LMUX1                  0x02
1897 #define _CS0                    0x04
1898 #define _CS1                    0x08
1899 #define _VLCDEN                 0x10
1900 #define _WERR                   0x20
1901 #define _SLPEN                  0x40
1902 #define _LCDEN                  0x80
1903 
1904 //==============================================================================
1905 
1906 
1907 //==============================================================================
1908 //        LCDPS Bits
1909 
1910 extern __at(0x0108) __sfr LCDPS;
1911 
1912 typedef union
1913   {
1914   struct
1915     {
1916     unsigned LP0                : 1;
1917     unsigned LP1                : 1;
1918     unsigned LP2                : 1;
1919     unsigned LP3                : 1;
1920     unsigned WA                 : 1;
1921     unsigned LCDA               : 1;
1922     unsigned BIASMD             : 1;
1923     unsigned WFT                : 1;
1924     };
1925 
1926   struct
1927     {
1928     unsigned LP                 : 4;
1929     unsigned                    : 4;
1930     };
1931   } __LCDPSbits_t;
1932 
1933 extern __at(0x0108) volatile __LCDPSbits_t LCDPSbits;
1934 
1935 #define _LP0                    0x01
1936 #define _LP1                    0x02
1937 #define _LP2                    0x04
1938 #define _LP3                    0x08
1939 #define _WA                     0x10
1940 #define _LCDA                   0x20
1941 #define _BIASMD                 0x40
1942 #define _WFT                    0x80
1943 
1944 //==============================================================================
1945 
1946 
1947 //==============================================================================
1948 //        LVDCON Bits
1949 
1950 extern __at(0x0109) __sfr LVDCON;
1951 
1952 typedef union
1953   {
1954   struct
1955     {
1956     unsigned LVDL0              : 1;
1957     unsigned LVDL1              : 1;
1958     unsigned LVDL2              : 1;
1959     unsigned                    : 1;
1960     unsigned LVDEN              : 1;
1961     unsigned IRVST              : 1;
1962     unsigned                    : 1;
1963     unsigned                    : 1;
1964     };
1965 
1966   struct
1967     {
1968     unsigned LVDL               : 3;
1969     unsigned                    : 5;
1970     };
1971   } __LVDCONbits_t;
1972 
1973 extern __at(0x0109) volatile __LVDCONbits_t LVDCONbits;
1974 
1975 #define _LVDL0                  0x01
1976 #define _LVDL1                  0x02
1977 #define _LVDL2                  0x04
1978 #define _LVDEN                  0x10
1979 #define _IRVST                  0x20
1980 
1981 //==============================================================================
1982 
1983 
1984 //==============================================================================
1985 //        EEDATA Bits
1986 
1987 extern __at(0x010C) __sfr EEDATA;
1988 
1989 typedef struct
1990   {
1991   unsigned EEDATL0              : 1;
1992   unsigned EEDATL1              : 1;
1993   unsigned EEDATL2              : 1;
1994   unsigned EEDATL3              : 1;
1995   unsigned EEDATL4              : 1;
1996   unsigned EEDATL5              : 1;
1997   unsigned EEDATL6              : 1;
1998   unsigned EEDATL7              : 1;
1999   } __EEDATAbits_t;
2000 
2001 extern __at(0x010C) volatile __EEDATAbits_t EEDATAbits;
2002 
2003 #define _EEDATL0                0x01
2004 #define _EEDATL1                0x02
2005 #define _EEDATL2                0x04
2006 #define _EEDATL3                0x08
2007 #define _EEDATL4                0x10
2008 #define _EEDATL5                0x20
2009 #define _EEDATL6                0x40
2010 #define _EEDATL7                0x80
2011 
2012 //==============================================================================
2013 
2014 
2015 //==============================================================================
2016 //        EEDATL Bits
2017 
2018 extern __at(0x010C) __sfr EEDATL;
2019 
2020 typedef struct
2021   {
2022   unsigned EEDATL0              : 1;
2023   unsigned EEDATL1              : 1;
2024   unsigned EEDATL2              : 1;
2025   unsigned EEDATL3              : 1;
2026   unsigned EEDATL4              : 1;
2027   unsigned EEDATL5              : 1;
2028   unsigned EEDATL6              : 1;
2029   unsigned EEDATL7              : 1;
2030   } __EEDATLbits_t;
2031 
2032 extern __at(0x010C) volatile __EEDATLbits_t EEDATLbits;
2033 
2034 #define _EEDATL_EEDATL0         0x01
2035 #define _EEDATL_EEDATL1         0x02
2036 #define _EEDATL_EEDATL2         0x04
2037 #define _EEDATL_EEDATL3         0x08
2038 #define _EEDATL_EEDATL4         0x10
2039 #define _EEDATL_EEDATL5         0x20
2040 #define _EEDATL_EEDATL6         0x40
2041 #define _EEDATL_EEDATL7         0x80
2042 
2043 //==============================================================================
2044 
2045 
2046 //==============================================================================
2047 //        EEADR Bits
2048 
2049 extern __at(0x010D) __sfr EEADR;
2050 
2051 typedef struct
2052   {
2053   unsigned EEADRL0              : 1;
2054   unsigned EEADRL1              : 1;
2055   unsigned EEADRL2              : 1;
2056   unsigned EEADRL3              : 1;
2057   unsigned EEADRL4              : 1;
2058   unsigned EEADRL5              : 1;
2059   unsigned EEADRL6              : 1;
2060   unsigned EEADRL7              : 1;
2061   } __EEADRbits_t;
2062 
2063 extern __at(0x010D) volatile __EEADRbits_t EEADRbits;
2064 
2065 #define _EEADRL0                0x01
2066 #define _EEADRL1                0x02
2067 #define _EEADRL2                0x04
2068 #define _EEADRL3                0x08
2069 #define _EEADRL4                0x10
2070 #define _EEADRL5                0x20
2071 #define _EEADRL6                0x40
2072 #define _EEADRL7                0x80
2073 
2074 //==============================================================================
2075 
2076 
2077 //==============================================================================
2078 //        EEADRL Bits
2079 
2080 extern __at(0x010D) __sfr EEADRL;
2081 
2082 typedef struct
2083   {
2084   unsigned EEADRL0              : 1;
2085   unsigned EEADRL1              : 1;
2086   unsigned EEADRL2              : 1;
2087   unsigned EEADRL3              : 1;
2088   unsigned EEADRL4              : 1;
2089   unsigned EEADRL5              : 1;
2090   unsigned EEADRL6              : 1;
2091   unsigned EEADRL7              : 1;
2092   } __EEADRLbits_t;
2093 
2094 extern __at(0x010D) volatile __EEADRLbits_t EEADRLbits;
2095 
2096 #define _EEADRL_EEADRL0         0x01
2097 #define _EEADRL_EEADRL1         0x02
2098 #define _EEADRL_EEADRL2         0x04
2099 #define _EEADRL_EEADRL3         0x08
2100 #define _EEADRL_EEADRL4         0x10
2101 #define _EEADRL_EEADRL5         0x20
2102 #define _EEADRL_EEADRL6         0x40
2103 #define _EEADRL_EEADRL7         0x80
2104 
2105 //==============================================================================
2106 
2107 
2108 //==============================================================================
2109 //        EEDATH Bits
2110 
2111 extern __at(0x010E) __sfr EEDATH;
2112 
2113 typedef union
2114   {
2115   struct
2116     {
2117     unsigned EEDATH0            : 1;
2118     unsigned EEDATH1            : 1;
2119     unsigned EEDATH2            : 1;
2120     unsigned EEDATH3            : 1;
2121     unsigned EEDATH4            : 1;
2122     unsigned EEDATH5            : 1;
2123     unsigned                    : 1;
2124     unsigned                    : 1;
2125     };
2126 
2127   struct
2128     {
2129     unsigned EEDATH             : 6;
2130     unsigned                    : 2;
2131     };
2132   } __EEDATHbits_t;
2133 
2134 extern __at(0x010E) volatile __EEDATHbits_t EEDATHbits;
2135 
2136 #define _EEDATH0                0x01
2137 #define _EEDATH1                0x02
2138 #define _EEDATH2                0x04
2139 #define _EEDATH3                0x08
2140 #define _EEDATH4                0x10
2141 #define _EEDATH5                0x20
2142 
2143 //==============================================================================
2144 
2145 
2146 //==============================================================================
2147 //        EEADRH Bits
2148 
2149 extern __at(0x010F) __sfr EEADRH;
2150 
2151 typedef union
2152   {
2153   struct
2154     {
2155     unsigned EEADRH0            : 1;
2156     unsigned EEADRH1            : 1;
2157     unsigned EEADRH2            : 1;
2158     unsigned EEADRH3            : 1;
2159     unsigned EEADRH4            : 1;
2160     unsigned                    : 1;
2161     unsigned                    : 1;
2162     unsigned                    : 1;
2163     };
2164 
2165   struct
2166     {
2167     unsigned EEADRH             : 5;
2168     unsigned                    : 3;
2169     };
2170   } __EEADRHbits_t;
2171 
2172 extern __at(0x010F) volatile __EEADRHbits_t EEADRHbits;
2173 
2174 #define _EEADRH0                0x01
2175 #define _EEADRH1                0x02
2176 #define _EEADRH2                0x04
2177 #define _EEADRH3                0x08
2178 #define _EEADRH4                0x10
2179 
2180 //==============================================================================
2181 
2182 
2183 //==============================================================================
2184 //        LCDDATA0 Bits
2185 
2186 extern __at(0x0110) __sfr LCDDATA0;
2187 
2188 typedef union
2189   {
2190   struct
2191     {
2192     unsigned SEG0               : 1;
2193     unsigned SEG1               : 1;
2194     unsigned SEG2               : 1;
2195     unsigned SEG3               : 1;
2196     unsigned SEG4               : 1;
2197     unsigned SEG5               : 1;
2198     unsigned SEG6               : 1;
2199     unsigned SEG7               : 1;
2200     };
2201 
2202   struct
2203     {
2204     unsigned SEG0COM0           : 1;
2205     unsigned SEG1COM0           : 1;
2206     unsigned SEG2COM0           : 1;
2207     unsigned SEG3COM0           : 1;
2208     unsigned SEG4COM0           : 1;
2209     unsigned SEG5COM0           : 1;
2210     unsigned SEG6COM0           : 1;
2211     unsigned SEG7COM0           : 1;
2212     };
2213 
2214   struct
2215     {
2216     unsigned S0C0               : 1;
2217     unsigned S1C0               : 1;
2218     unsigned S2C0               : 1;
2219     unsigned S3C0               : 1;
2220     unsigned S4C0               : 1;
2221     unsigned S5C0               : 1;
2222     unsigned S6C0               : 1;
2223     unsigned S7C0               : 1;
2224     };
2225   } __LCDDATA0bits_t;
2226 
2227 extern __at(0x0110) volatile __LCDDATA0bits_t LCDDATA0bits;
2228 
2229 #define _SEG0                   0x01
2230 #define _SEG0COM0               0x01
2231 #define _S0C0                   0x01
2232 #define _SEG1                   0x02
2233 #define _SEG1COM0               0x02
2234 #define _S1C0                   0x02
2235 #define _SEG2                   0x04
2236 #define _SEG2COM0               0x04
2237 #define _S2C0                   0x04
2238 #define _SEG3                   0x08
2239 #define _SEG3COM0               0x08
2240 #define _S3C0                   0x08
2241 #define _SEG4                   0x10
2242 #define _SEG4COM0               0x10
2243 #define _S4C0                   0x10
2244 #define _SEG5                   0x20
2245 #define _SEG5COM0               0x20
2246 #define _S5C0                   0x20
2247 #define _SEG6                   0x40
2248 #define _SEG6COM0               0x40
2249 #define _S6C0                   0x40
2250 #define _SEG7                   0x80
2251 #define _SEG7COM0               0x80
2252 #define _S7C0                   0x80
2253 
2254 //==============================================================================
2255 
2256 
2257 //==============================================================================
2258 //        LCDDATA1 Bits
2259 
2260 extern __at(0x0111) __sfr LCDDATA1;
2261 
2262 typedef union
2263   {
2264   struct
2265     {
2266     unsigned SEG8               : 1;
2267     unsigned SEG9               : 1;
2268     unsigned SEG10              : 1;
2269     unsigned SEG11              : 1;
2270     unsigned SEG12              : 1;
2271     unsigned SEG13              : 1;
2272     unsigned SEG14              : 1;
2273     unsigned SEG15              : 1;
2274     };
2275 
2276   struct
2277     {
2278     unsigned SEG8COM0           : 1;
2279     unsigned SEG9COM0           : 1;
2280     unsigned SEG10COM0          : 1;
2281     unsigned SEG11COM0          : 1;
2282     unsigned SEG12COM0          : 1;
2283     unsigned SEG13COM0          : 1;
2284     unsigned SEG14COM0          : 1;
2285     unsigned SEG15COM0          : 1;
2286     };
2287 
2288   struct
2289     {
2290     unsigned S8C0               : 1;
2291     unsigned S9C0               : 1;
2292     unsigned S10C0              : 1;
2293     unsigned S11C0              : 1;
2294     unsigned S12C0              : 1;
2295     unsigned S13C0              : 1;
2296     unsigned S14C0              : 1;
2297     unsigned S15C0              : 1;
2298     };
2299   } __LCDDATA1bits_t;
2300 
2301 extern __at(0x0111) volatile __LCDDATA1bits_t LCDDATA1bits;
2302 
2303 #define _SEG8                   0x01
2304 #define _SEG8COM0               0x01
2305 #define _S8C0                   0x01
2306 #define _SEG9                   0x02
2307 #define _SEG9COM0               0x02
2308 #define _S9C0                   0x02
2309 #define _SEG10                  0x04
2310 #define _SEG10COM0              0x04
2311 #define _S10C0                  0x04
2312 #define _SEG11                  0x08
2313 #define _SEG11COM0              0x08
2314 #define _S11C0                  0x08
2315 #define _SEG12                  0x10
2316 #define _SEG12COM0              0x10
2317 #define _S12C0                  0x10
2318 #define _SEG13                  0x20
2319 #define _SEG13COM0              0x20
2320 #define _S13C0                  0x20
2321 #define _SEG14                  0x40
2322 #define _SEG14COM0              0x40
2323 #define _S14C0                  0x40
2324 #define _SEG15                  0x80
2325 #define _SEG15COM0              0x80
2326 #define _S15C0                  0x80
2327 
2328 //==============================================================================
2329 
2330 
2331 //==============================================================================
2332 //        LCDDATA2 Bits
2333 
2334 extern __at(0x0112) __sfr LCDDATA2;
2335 
2336 typedef union
2337   {
2338   struct
2339     {
2340     unsigned SEG16              : 1;
2341     unsigned SEG17              : 1;
2342     unsigned SEG18              : 1;
2343     unsigned SEG19              : 1;
2344     unsigned SEG20              : 1;
2345     unsigned SEG21              : 1;
2346     unsigned SEG22              : 1;
2347     unsigned SEG23              : 1;
2348     };
2349 
2350   struct
2351     {
2352     unsigned SEG16COM0          : 1;
2353     unsigned SEG17COM0          : 1;
2354     unsigned SEG18COM0          : 1;
2355     unsigned SEG19COM0          : 1;
2356     unsigned SEG20COM0          : 1;
2357     unsigned SEG21COM0          : 1;
2358     unsigned SEG22COM0          : 1;
2359     unsigned SEG23COM0          : 1;
2360     };
2361 
2362   struct
2363     {
2364     unsigned S16C0              : 1;
2365     unsigned S17C0              : 1;
2366     unsigned S18C0              : 1;
2367     unsigned S19C0              : 1;
2368     unsigned S20C0              : 1;
2369     unsigned S21C0              : 1;
2370     unsigned S22C0              : 1;
2371     unsigned S23C0              : 1;
2372     };
2373   } __LCDDATA2bits_t;
2374 
2375 extern __at(0x0112) volatile __LCDDATA2bits_t LCDDATA2bits;
2376 
2377 #define _SEG16                  0x01
2378 #define _SEG16COM0              0x01
2379 #define _S16C0                  0x01
2380 #define _SEG17                  0x02
2381 #define _SEG17COM0              0x02
2382 #define _S17C0                  0x02
2383 #define _SEG18                  0x04
2384 #define _SEG18COM0              0x04
2385 #define _S18C0                  0x04
2386 #define _SEG19                  0x08
2387 #define _SEG19COM0              0x08
2388 #define _S19C0                  0x08
2389 #define _SEG20                  0x10
2390 #define _SEG20COM0              0x10
2391 #define _S20C0                  0x10
2392 #define _SEG21                  0x20
2393 #define _SEG21COM0              0x20
2394 #define _S21C0                  0x20
2395 #define _SEG22                  0x40
2396 #define _SEG22COM0              0x40
2397 #define _S22C0                  0x40
2398 #define _SEG23                  0x80
2399 #define _SEG23COM0              0x80
2400 #define _S23C0                  0x80
2401 
2402 //==============================================================================
2403 
2404 
2405 //==============================================================================
2406 //        LCDDATA3 Bits
2407 
2408 extern __at(0x0113) __sfr LCDDATA3;
2409 
2410 typedef union
2411   {
2412   struct
2413     {
2414     unsigned SEG0               : 1;
2415     unsigned SEG1               : 1;
2416     unsigned SEG2               : 1;
2417     unsigned SEG3               : 1;
2418     unsigned SEG4               : 1;
2419     unsigned SEG5               : 1;
2420     unsigned SEG6               : 1;
2421     unsigned SEG7               : 1;
2422     };
2423 
2424   struct
2425     {
2426     unsigned SEG0COM1           : 1;
2427     unsigned SEG1COM1           : 1;
2428     unsigned SEG2COM1           : 1;
2429     unsigned SEG3COM1           : 1;
2430     unsigned SEG4COM1           : 1;
2431     unsigned SEG5COM1           : 1;
2432     unsigned SEG6COM1           : 1;
2433     unsigned SEG7COM1           : 1;
2434     };
2435 
2436   struct
2437     {
2438     unsigned S0C1               : 1;
2439     unsigned S1C1               : 1;
2440     unsigned S2C1               : 1;
2441     unsigned S3C1               : 1;
2442     unsigned S4C1               : 1;
2443     unsigned S5C1               : 1;
2444     unsigned S6C1               : 1;
2445     unsigned S7C1               : 1;
2446     };
2447   } __LCDDATA3bits_t;
2448 
2449 extern __at(0x0113) volatile __LCDDATA3bits_t LCDDATA3bits;
2450 
2451 #define _LCDDATA3_SEG0          0x01
2452 #define _LCDDATA3_SEG0COM1      0x01
2453 #define _LCDDATA3_S0C1          0x01
2454 #define _LCDDATA3_SEG1          0x02
2455 #define _LCDDATA3_SEG1COM1      0x02
2456 #define _LCDDATA3_S1C1          0x02
2457 #define _LCDDATA3_SEG2          0x04
2458 #define _LCDDATA3_SEG2COM1      0x04
2459 #define _LCDDATA3_S2C1          0x04
2460 #define _LCDDATA3_SEG3          0x08
2461 #define _LCDDATA3_SEG3COM1      0x08
2462 #define _LCDDATA3_S3C1          0x08
2463 #define _LCDDATA3_SEG4          0x10
2464 #define _LCDDATA3_SEG4COM1      0x10
2465 #define _LCDDATA3_S4C1          0x10
2466 #define _LCDDATA3_SEG5          0x20
2467 #define _LCDDATA3_SEG5COM1      0x20
2468 #define _LCDDATA3_S5C1          0x20
2469 #define _LCDDATA3_SEG6          0x40
2470 #define _LCDDATA3_SEG6COM1      0x40
2471 #define _LCDDATA3_S6C1          0x40
2472 #define _LCDDATA3_SEG7          0x80
2473 #define _LCDDATA3_SEG7COM1      0x80
2474 #define _LCDDATA3_S7C1          0x80
2475 
2476 //==============================================================================
2477 
2478 
2479 //==============================================================================
2480 //        LCDDATA4 Bits
2481 
2482 extern __at(0x0114) __sfr LCDDATA4;
2483 
2484 typedef union
2485   {
2486   struct
2487     {
2488     unsigned SEG8               : 1;
2489     unsigned SEG9               : 1;
2490     unsigned SEG10              : 1;
2491     unsigned SEG11              : 1;
2492     unsigned SEG12              : 1;
2493     unsigned SEG13              : 1;
2494     unsigned SEG14              : 1;
2495     unsigned SEG15              : 1;
2496     };
2497 
2498   struct
2499     {
2500     unsigned SEG8COM1           : 1;
2501     unsigned SEG9COM1           : 1;
2502     unsigned SEG10COM1          : 1;
2503     unsigned SEG11COM1          : 1;
2504     unsigned SEG12COM1          : 1;
2505     unsigned SEG13COM1          : 1;
2506     unsigned SEG14COM1          : 1;
2507     unsigned SEG15COM1          : 1;
2508     };
2509 
2510   struct
2511     {
2512     unsigned S8C1               : 1;
2513     unsigned S9C1               : 1;
2514     unsigned S10C1              : 1;
2515     unsigned S11C1              : 1;
2516     unsigned S12C1              : 1;
2517     unsigned S13C1              : 1;
2518     unsigned S14C1              : 1;
2519     unsigned S15C1              : 1;
2520     };
2521   } __LCDDATA4bits_t;
2522 
2523 extern __at(0x0114) volatile __LCDDATA4bits_t LCDDATA4bits;
2524 
2525 #define _LCDDATA4_SEG8          0x01
2526 #define _LCDDATA4_SEG8COM1      0x01
2527 #define _LCDDATA4_S8C1          0x01
2528 #define _LCDDATA4_SEG9          0x02
2529 #define _LCDDATA4_SEG9COM1      0x02
2530 #define _LCDDATA4_S9C1          0x02
2531 #define _LCDDATA4_SEG10         0x04
2532 #define _LCDDATA4_SEG10COM1     0x04
2533 #define _LCDDATA4_S10C1         0x04
2534 #define _LCDDATA4_SEG11         0x08
2535 #define _LCDDATA4_SEG11COM1     0x08
2536 #define _LCDDATA4_S11C1         0x08
2537 #define _LCDDATA4_SEG12         0x10
2538 #define _LCDDATA4_SEG12COM1     0x10
2539 #define _LCDDATA4_S12C1         0x10
2540 #define _LCDDATA4_SEG13         0x20
2541 #define _LCDDATA4_SEG13COM1     0x20
2542 #define _LCDDATA4_S13C1         0x20
2543 #define _LCDDATA4_SEG14         0x40
2544 #define _LCDDATA4_SEG14COM1     0x40
2545 #define _LCDDATA4_S14C1         0x40
2546 #define _LCDDATA4_SEG15         0x80
2547 #define _LCDDATA4_SEG15COM1     0x80
2548 #define _LCDDATA4_S15C1         0x80
2549 
2550 //==============================================================================
2551 
2552 
2553 //==============================================================================
2554 //        LCDDATA5 Bits
2555 
2556 extern __at(0x0115) __sfr LCDDATA5;
2557 
2558 typedef union
2559   {
2560   struct
2561     {
2562     unsigned SEG16              : 1;
2563     unsigned SEG17              : 1;
2564     unsigned SEG18              : 1;
2565     unsigned SEG19              : 1;
2566     unsigned SEG20              : 1;
2567     unsigned SEG21              : 1;
2568     unsigned SEG22              : 1;
2569     unsigned SEG23              : 1;
2570     };
2571 
2572   struct
2573     {
2574     unsigned SEG16COM1          : 1;
2575     unsigned SEG17COM1          : 1;
2576     unsigned SEG18COM1          : 1;
2577     unsigned SEG19COM1          : 1;
2578     unsigned SEG20COM1          : 1;
2579     unsigned SEG21COM1          : 1;
2580     unsigned SEG22COM1          : 1;
2581     unsigned SEG23COM1          : 1;
2582     };
2583 
2584   struct
2585     {
2586     unsigned S16C1              : 1;
2587     unsigned S17C1              : 1;
2588     unsigned S18C1              : 1;
2589     unsigned S19C1              : 1;
2590     unsigned S20C1              : 1;
2591     unsigned S21C1              : 1;
2592     unsigned S22C1              : 1;
2593     unsigned S23C1              : 1;
2594     };
2595   } __LCDDATA5bits_t;
2596 
2597 extern __at(0x0115) volatile __LCDDATA5bits_t LCDDATA5bits;
2598 
2599 #define _LCDDATA5_SEG16         0x01
2600 #define _LCDDATA5_SEG16COM1     0x01
2601 #define _LCDDATA5_S16C1         0x01
2602 #define _LCDDATA5_SEG17         0x02
2603 #define _LCDDATA5_SEG17COM1     0x02
2604 #define _LCDDATA5_S17C1         0x02
2605 #define _LCDDATA5_SEG18         0x04
2606 #define _LCDDATA5_SEG18COM1     0x04
2607 #define _LCDDATA5_S18C1         0x04
2608 #define _LCDDATA5_SEG19         0x08
2609 #define _LCDDATA5_SEG19COM1     0x08
2610 #define _LCDDATA5_S19C1         0x08
2611 #define _LCDDATA5_SEG20         0x10
2612 #define _LCDDATA5_SEG20COM1     0x10
2613 #define _LCDDATA5_S20C1         0x10
2614 #define _LCDDATA5_SEG21         0x20
2615 #define _LCDDATA5_SEG21COM1     0x20
2616 #define _LCDDATA5_S21C1         0x20
2617 #define _LCDDATA5_SEG22         0x40
2618 #define _LCDDATA5_SEG22COM1     0x40
2619 #define _LCDDATA5_S22C1         0x40
2620 #define _LCDDATA5_SEG23         0x80
2621 #define _LCDDATA5_SEG23COM1     0x80
2622 #define _LCDDATA5_S23C1         0x80
2623 
2624 //==============================================================================
2625 
2626 
2627 //==============================================================================
2628 //        LCDDATA6 Bits
2629 
2630 extern __at(0x0116) __sfr LCDDATA6;
2631 
2632 typedef union
2633   {
2634   struct
2635     {
2636     unsigned SEG0               : 1;
2637     unsigned SEG1               : 1;
2638     unsigned SEG2               : 1;
2639     unsigned SEG3               : 1;
2640     unsigned SEG4               : 1;
2641     unsigned SEG5               : 1;
2642     unsigned SEG6               : 1;
2643     unsigned SEG7               : 1;
2644     };
2645 
2646   struct
2647     {
2648     unsigned SEG0COM2           : 1;
2649     unsigned SEG1COM2           : 1;
2650     unsigned SEG2COM2           : 1;
2651     unsigned SEG3COM2           : 1;
2652     unsigned SEG4COM2           : 1;
2653     unsigned SEG5COM2           : 1;
2654     unsigned SEG6COM2           : 1;
2655     unsigned SEG7COM2           : 1;
2656     };
2657 
2658   struct
2659     {
2660     unsigned S0C2               : 1;
2661     unsigned S1C2               : 1;
2662     unsigned S2C2               : 1;
2663     unsigned S3C2               : 1;
2664     unsigned S4C2               : 1;
2665     unsigned S5C2               : 1;
2666     unsigned S6C2               : 1;
2667     unsigned S7C2               : 1;
2668     };
2669   } __LCDDATA6bits_t;
2670 
2671 extern __at(0x0116) volatile __LCDDATA6bits_t LCDDATA6bits;
2672 
2673 #define _LCDDATA6_SEG0          0x01
2674 #define _LCDDATA6_SEG0COM2      0x01
2675 #define _LCDDATA6_S0C2          0x01
2676 #define _LCDDATA6_SEG1          0x02
2677 #define _LCDDATA6_SEG1COM2      0x02
2678 #define _LCDDATA6_S1C2          0x02
2679 #define _LCDDATA6_SEG2          0x04
2680 #define _LCDDATA6_SEG2COM2      0x04
2681 #define _LCDDATA6_S2C2          0x04
2682 #define _LCDDATA6_SEG3          0x08
2683 #define _LCDDATA6_SEG3COM2      0x08
2684 #define _LCDDATA6_S3C2          0x08
2685 #define _LCDDATA6_SEG4          0x10
2686 #define _LCDDATA6_SEG4COM2      0x10
2687 #define _LCDDATA6_S4C2          0x10
2688 #define _LCDDATA6_SEG5          0x20
2689 #define _LCDDATA6_SEG5COM2      0x20
2690 #define _LCDDATA6_S5C2          0x20
2691 #define _LCDDATA6_SEG6          0x40
2692 #define _LCDDATA6_SEG6COM2      0x40
2693 #define _LCDDATA6_S6C2          0x40
2694 #define _LCDDATA6_SEG7          0x80
2695 #define _LCDDATA6_SEG7COM2      0x80
2696 #define _LCDDATA6_S7C2          0x80
2697 
2698 //==============================================================================
2699 
2700 
2701 //==============================================================================
2702 //        LCDDATA7 Bits
2703 
2704 extern __at(0x0117) __sfr LCDDATA7;
2705 
2706 typedef union
2707   {
2708   struct
2709     {
2710     unsigned SEG8               : 1;
2711     unsigned SEG9               : 1;
2712     unsigned SEG10              : 1;
2713     unsigned SEG11              : 1;
2714     unsigned SEG12              : 1;
2715     unsigned SEG13              : 1;
2716     unsigned SEG14              : 1;
2717     unsigned SEG15              : 1;
2718     };
2719 
2720   struct
2721     {
2722     unsigned SEG8COM2           : 1;
2723     unsigned SEG9COM2           : 1;
2724     unsigned SEG10COM2          : 1;
2725     unsigned SEG11COM2          : 1;
2726     unsigned SEG12COM2          : 1;
2727     unsigned SEG13COM2          : 1;
2728     unsigned SEG14COM2          : 1;
2729     unsigned SEG15COM2          : 1;
2730     };
2731 
2732   struct
2733     {
2734     unsigned S8C2               : 1;
2735     unsigned S9C2               : 1;
2736     unsigned S10C2              : 1;
2737     unsigned S11C2              : 1;
2738     unsigned S12C2              : 1;
2739     unsigned S13C2              : 1;
2740     unsigned S14C2              : 1;
2741     unsigned S15C2              : 1;
2742     };
2743   } __LCDDATA7bits_t;
2744 
2745 extern __at(0x0117) volatile __LCDDATA7bits_t LCDDATA7bits;
2746 
2747 #define _LCDDATA7_SEG8          0x01
2748 #define _LCDDATA7_SEG8COM2      0x01
2749 #define _LCDDATA7_S8C2          0x01
2750 #define _LCDDATA7_SEG9          0x02
2751 #define _LCDDATA7_SEG9COM2      0x02
2752 #define _LCDDATA7_S9C2          0x02
2753 #define _LCDDATA7_SEG10         0x04
2754 #define _LCDDATA7_SEG10COM2     0x04
2755 #define _LCDDATA7_S10C2         0x04
2756 #define _LCDDATA7_SEG11         0x08
2757 #define _LCDDATA7_SEG11COM2     0x08
2758 #define _LCDDATA7_S11C2         0x08
2759 #define _LCDDATA7_SEG12         0x10
2760 #define _LCDDATA7_SEG12COM2     0x10
2761 #define _LCDDATA7_S12C2         0x10
2762 #define _LCDDATA7_SEG13         0x20
2763 #define _LCDDATA7_SEG13COM2     0x20
2764 #define _LCDDATA7_S13C2         0x20
2765 #define _LCDDATA7_SEG14         0x40
2766 #define _LCDDATA7_SEG14COM2     0x40
2767 #define _LCDDATA7_S14C2         0x40
2768 #define _LCDDATA7_SEG15         0x80
2769 #define _LCDDATA7_SEG15COM2     0x80
2770 #define _LCDDATA7_S15C2         0x80
2771 
2772 //==============================================================================
2773 
2774 
2775 //==============================================================================
2776 //        LCDDATA8 Bits
2777 
2778 extern __at(0x0118) __sfr LCDDATA8;
2779 
2780 typedef union
2781   {
2782   struct
2783     {
2784     unsigned SEG16              : 1;
2785     unsigned SEG17              : 1;
2786     unsigned SEG18              : 1;
2787     unsigned SEG19              : 1;
2788     unsigned SEG20              : 1;
2789     unsigned SEG21              : 1;
2790     unsigned SEG22              : 1;
2791     unsigned SEG23              : 1;
2792     };
2793 
2794   struct
2795     {
2796     unsigned SEG16COM2          : 1;
2797     unsigned SEG17COM2          : 1;
2798     unsigned SEG18COM2          : 1;
2799     unsigned SEG19COM2          : 1;
2800     unsigned SEG20COM2          : 1;
2801     unsigned SEG21COM2          : 1;
2802     unsigned SEG22COM2          : 1;
2803     unsigned SEG23COM2          : 1;
2804     };
2805 
2806   struct
2807     {
2808     unsigned S16C2              : 1;
2809     unsigned S17C2              : 1;
2810     unsigned S18C2              : 1;
2811     unsigned S19C2              : 1;
2812     unsigned S20C2              : 1;
2813     unsigned S21C2              : 1;
2814     unsigned S22C2              : 1;
2815     unsigned S23C2              : 1;
2816     };
2817   } __LCDDATA8bits_t;
2818 
2819 extern __at(0x0118) volatile __LCDDATA8bits_t LCDDATA8bits;
2820 
2821 #define _LCDDATA8_SEG16         0x01
2822 #define _LCDDATA8_SEG16COM2     0x01
2823 #define _LCDDATA8_S16C2         0x01
2824 #define _LCDDATA8_SEG17         0x02
2825 #define _LCDDATA8_SEG17COM2     0x02
2826 #define _LCDDATA8_S17C2         0x02
2827 #define _LCDDATA8_SEG18         0x04
2828 #define _LCDDATA8_SEG18COM2     0x04
2829 #define _LCDDATA8_S18C2         0x04
2830 #define _LCDDATA8_SEG19         0x08
2831 #define _LCDDATA8_SEG19COM2     0x08
2832 #define _LCDDATA8_S19C2         0x08
2833 #define _LCDDATA8_SEG20         0x10
2834 #define _LCDDATA8_SEG20COM2     0x10
2835 #define _LCDDATA8_S20C2         0x10
2836 #define _LCDDATA8_SEG21         0x20
2837 #define _LCDDATA8_SEG21COM2     0x20
2838 #define _LCDDATA8_S21C2         0x20
2839 #define _LCDDATA8_SEG22         0x40
2840 #define _LCDDATA8_SEG22COM2     0x40
2841 #define _LCDDATA8_S22C2         0x40
2842 #define _LCDDATA8_SEG23         0x80
2843 #define _LCDDATA8_SEG23COM2     0x80
2844 #define _LCDDATA8_S23C2         0x80
2845 
2846 //==============================================================================
2847 
2848 
2849 //==============================================================================
2850 //        LCDDATA9 Bits
2851 
2852 extern __at(0x0119) __sfr LCDDATA9;
2853 
2854 typedef union
2855   {
2856   struct
2857     {
2858     unsigned SEG0               : 1;
2859     unsigned SEG1               : 1;
2860     unsigned SEG2               : 1;
2861     unsigned SEG3               : 1;
2862     unsigned SEG4               : 1;
2863     unsigned SEG5               : 1;
2864     unsigned SEG6               : 1;
2865     unsigned SEG7               : 1;
2866     };
2867 
2868   struct
2869     {
2870     unsigned SEG0COM3           : 1;
2871     unsigned SEG1COM3           : 1;
2872     unsigned SEG2COM3           : 1;
2873     unsigned SEG3COM3           : 1;
2874     unsigned SEG4COM3           : 1;
2875     unsigned SEG5COM3           : 1;
2876     unsigned SEG6COM3           : 1;
2877     unsigned SEG7COM3           : 1;
2878     };
2879 
2880   struct
2881     {
2882     unsigned S0C3               : 1;
2883     unsigned S1C3               : 1;
2884     unsigned S2C3               : 1;
2885     unsigned S3C3               : 1;
2886     unsigned S4C3               : 1;
2887     unsigned S5C3               : 1;
2888     unsigned S6C3               : 1;
2889     unsigned S7C3               : 1;
2890     };
2891   } __LCDDATA9bits_t;
2892 
2893 extern __at(0x0119) volatile __LCDDATA9bits_t LCDDATA9bits;
2894 
2895 #define _LCDDATA9_SEG0          0x01
2896 #define _LCDDATA9_SEG0COM3      0x01
2897 #define _LCDDATA9_S0C3          0x01
2898 #define _LCDDATA9_SEG1          0x02
2899 #define _LCDDATA9_SEG1COM3      0x02
2900 #define _LCDDATA9_S1C3          0x02
2901 #define _LCDDATA9_SEG2          0x04
2902 #define _LCDDATA9_SEG2COM3      0x04
2903 #define _LCDDATA9_S2C3          0x04
2904 #define _LCDDATA9_SEG3          0x08
2905 #define _LCDDATA9_SEG3COM3      0x08
2906 #define _LCDDATA9_S3C3          0x08
2907 #define _LCDDATA9_SEG4          0x10
2908 #define _LCDDATA9_SEG4COM3      0x10
2909 #define _LCDDATA9_S4C3          0x10
2910 #define _LCDDATA9_SEG5          0x20
2911 #define _LCDDATA9_SEG5COM3      0x20
2912 #define _LCDDATA9_S5C3          0x20
2913 #define _LCDDATA9_SEG6          0x40
2914 #define _LCDDATA9_SEG6COM3      0x40
2915 #define _LCDDATA9_S6C3          0x40
2916 #define _LCDDATA9_SEG7          0x80
2917 #define _LCDDATA9_SEG7COM3      0x80
2918 #define _LCDDATA9_S7C3          0x80
2919 
2920 //==============================================================================
2921 
2922 
2923 //==============================================================================
2924 //        LCDDATA10 Bits
2925 
2926 extern __at(0x011A) __sfr LCDDATA10;
2927 
2928 typedef union
2929   {
2930   struct
2931     {
2932     unsigned SEG8               : 1;
2933     unsigned SEG9               : 1;
2934     unsigned SEG10              : 1;
2935     unsigned SEG11              : 1;
2936     unsigned SEG12              : 1;
2937     unsigned SEG13              : 1;
2938     unsigned SEG14              : 1;
2939     unsigned SEG15              : 1;
2940     };
2941 
2942   struct
2943     {
2944     unsigned SEG8COM3           : 1;
2945     unsigned SEG9COM3           : 1;
2946     unsigned SEG10COM3          : 1;
2947     unsigned SEG11COM3          : 1;
2948     unsigned SEG12COM3          : 1;
2949     unsigned SEG13COM3          : 1;
2950     unsigned SEG14COM3          : 1;
2951     unsigned SEG15COM3          : 1;
2952     };
2953 
2954   struct
2955     {
2956     unsigned S8C3               : 1;
2957     unsigned S9C3               : 1;
2958     unsigned S10C3              : 1;
2959     unsigned S11C3              : 1;
2960     unsigned S12C3              : 1;
2961     unsigned S13C3              : 1;
2962     unsigned S14C3              : 1;
2963     unsigned S15C3              : 1;
2964     };
2965   } __LCDDATA10bits_t;
2966 
2967 extern __at(0x011A) volatile __LCDDATA10bits_t LCDDATA10bits;
2968 
2969 #define _LCDDATA10_SEG8         0x01
2970 #define _LCDDATA10_SEG8COM3     0x01
2971 #define _LCDDATA10_S8C3         0x01
2972 #define _LCDDATA10_SEG9         0x02
2973 #define _LCDDATA10_SEG9COM3     0x02
2974 #define _LCDDATA10_S9C3         0x02
2975 #define _LCDDATA10_SEG10        0x04
2976 #define _LCDDATA10_SEG10COM3    0x04
2977 #define _LCDDATA10_S10C3        0x04
2978 #define _LCDDATA10_SEG11        0x08
2979 #define _LCDDATA10_SEG11COM3    0x08
2980 #define _LCDDATA10_S11C3        0x08
2981 #define _LCDDATA10_SEG12        0x10
2982 #define _LCDDATA10_SEG12COM3    0x10
2983 #define _LCDDATA10_S12C3        0x10
2984 #define _LCDDATA10_SEG13        0x20
2985 #define _LCDDATA10_SEG13COM3    0x20
2986 #define _LCDDATA10_S13C3        0x20
2987 #define _LCDDATA10_SEG14        0x40
2988 #define _LCDDATA10_SEG14COM3    0x40
2989 #define _LCDDATA10_S14C3        0x40
2990 #define _LCDDATA10_SEG15        0x80
2991 #define _LCDDATA10_SEG15COM3    0x80
2992 #define _LCDDATA10_S15C3        0x80
2993 
2994 //==============================================================================
2995 
2996 
2997 //==============================================================================
2998 //        LCDDATA11 Bits
2999 
3000 extern __at(0x011B) __sfr LCDDATA11;
3001 
3002 typedef union
3003   {
3004   struct
3005     {
3006     unsigned SEG16              : 1;
3007     unsigned SEG17              : 1;
3008     unsigned SEG18              : 1;
3009     unsigned SEG19              : 1;
3010     unsigned SEG20              : 1;
3011     unsigned SEG21              : 1;
3012     unsigned SEG22              : 1;
3013     unsigned SEG23              : 1;
3014     };
3015 
3016   struct
3017     {
3018     unsigned SEG16COM3          : 1;
3019     unsigned SEG17COM3          : 1;
3020     unsigned SEG18COM3          : 1;
3021     unsigned SEG19COM3          : 1;
3022     unsigned SEG20COM3          : 1;
3023     unsigned SEG21COM3          : 1;
3024     unsigned SEG22COM3          : 1;
3025     unsigned SEG23COM3          : 1;
3026     };
3027 
3028   struct
3029     {
3030     unsigned S16C3              : 1;
3031     unsigned S17C3              : 1;
3032     unsigned S18C3              : 1;
3033     unsigned S19C3              : 1;
3034     unsigned S20C3              : 1;
3035     unsigned S21C3              : 1;
3036     unsigned S22C3              : 1;
3037     unsigned S23C3              : 1;
3038     };
3039   } __LCDDATA11bits_t;
3040 
3041 extern __at(0x011B) volatile __LCDDATA11bits_t LCDDATA11bits;
3042 
3043 #define _LCDDATA11_SEG16        0x01
3044 #define _LCDDATA11_SEG16COM3    0x01
3045 #define _LCDDATA11_S16C3        0x01
3046 #define _LCDDATA11_SEG17        0x02
3047 #define _LCDDATA11_SEG17COM3    0x02
3048 #define _LCDDATA11_S17C3        0x02
3049 #define _LCDDATA11_SEG18        0x04
3050 #define _LCDDATA11_SEG18COM3    0x04
3051 #define _LCDDATA11_S18C3        0x04
3052 #define _LCDDATA11_SEG19        0x08
3053 #define _LCDDATA11_SEG19COM3    0x08
3054 #define _LCDDATA11_S19C3        0x08
3055 #define _LCDDATA11_SEG20        0x10
3056 #define _LCDDATA11_SEG20COM3    0x10
3057 #define _LCDDATA11_S20C3        0x10
3058 #define _LCDDATA11_SEG21        0x20
3059 #define _LCDDATA11_SEG21COM3    0x20
3060 #define _LCDDATA11_S21C3        0x20
3061 #define _LCDDATA11_SEG22        0x40
3062 #define _LCDDATA11_SEG22COM3    0x40
3063 #define _LCDDATA11_S22C3        0x40
3064 #define _LCDDATA11_SEG23        0x80
3065 #define _LCDDATA11_SEG23COM3    0x80
3066 #define _LCDDATA11_S23C3        0x80
3067 
3068 //==============================================================================
3069 
3070 
3071 //==============================================================================
3072 //        LCDSE0 Bits
3073 
3074 extern __at(0x011C) __sfr LCDSE0;
3075 
3076 typedef union
3077   {
3078   struct
3079     {
3080     unsigned SEG0               : 1;
3081     unsigned SEG1               : 1;
3082     unsigned SEG2               : 1;
3083     unsigned SEG3               : 1;
3084     unsigned SEG4               : 1;
3085     unsigned SEG5               : 1;
3086     unsigned SEG6               : 1;
3087     unsigned SEG7               : 1;
3088     };
3089 
3090   struct
3091     {
3092     unsigned SE0                : 1;
3093     unsigned SE1                : 1;
3094     unsigned SE2                : 1;
3095     unsigned SE3                : 1;
3096     unsigned SE4                : 1;
3097     unsigned SE5                : 1;
3098     unsigned SE6                : 1;
3099     unsigned SE7                : 1;
3100     };
3101 
3102   struct
3103     {
3104     unsigned SEGEN0             : 1;
3105     unsigned SEGEN1             : 1;
3106     unsigned SEGEN2             : 1;
3107     unsigned SEGEN3             : 1;
3108     unsigned SEGEN4             : 1;
3109     unsigned SEGEN5             : 1;
3110     unsigned SEGEN6             : 1;
3111     unsigned SEGEN7             : 1;
3112     };
3113   } __LCDSE0bits_t;
3114 
3115 extern __at(0x011C) volatile __LCDSE0bits_t LCDSE0bits;
3116 
3117 #define _LCDSE0_SEG0            0x01
3118 #define _LCDSE0_SE0             0x01
3119 #define _LCDSE0_SEGEN0          0x01
3120 #define _LCDSE0_SEG1            0x02
3121 #define _LCDSE0_SE1             0x02
3122 #define _LCDSE0_SEGEN1          0x02
3123 #define _LCDSE0_SEG2            0x04
3124 #define _LCDSE0_SE2             0x04
3125 #define _LCDSE0_SEGEN2          0x04
3126 #define _LCDSE0_SEG3            0x08
3127 #define _LCDSE0_SE3             0x08
3128 #define _LCDSE0_SEGEN3          0x08
3129 #define _LCDSE0_SEG4            0x10
3130 #define _LCDSE0_SE4             0x10
3131 #define _LCDSE0_SEGEN4          0x10
3132 #define _LCDSE0_SEG5            0x20
3133 #define _LCDSE0_SE5             0x20
3134 #define _LCDSE0_SEGEN5          0x20
3135 #define _LCDSE0_SEG6            0x40
3136 #define _LCDSE0_SE6             0x40
3137 #define _LCDSE0_SEGEN6          0x40
3138 #define _LCDSE0_SEG7            0x80
3139 #define _LCDSE0_SE7             0x80
3140 #define _LCDSE0_SEGEN7          0x80
3141 
3142 //==============================================================================
3143 
3144 
3145 //==============================================================================
3146 //        LCDSE1 Bits
3147 
3148 extern __at(0x011D) __sfr LCDSE1;
3149 
3150 typedef union
3151   {
3152   struct
3153     {
3154     unsigned SEG8               : 1;
3155     unsigned SEG9               : 1;
3156     unsigned SEG10              : 1;
3157     unsigned SEG11              : 1;
3158     unsigned SEG12              : 1;
3159     unsigned SEG13              : 1;
3160     unsigned SEG14              : 1;
3161     unsigned SEG15              : 1;
3162     };
3163 
3164   struct
3165     {
3166     unsigned SE8                : 1;
3167     unsigned SE9                : 1;
3168     unsigned SE10               : 1;
3169     unsigned SE11               : 1;
3170     unsigned SE12               : 1;
3171     unsigned SE13               : 1;
3172     unsigned SE14               : 1;
3173     unsigned SE15               : 1;
3174     };
3175 
3176   struct
3177     {
3178     unsigned SEGEN8             : 1;
3179     unsigned SEGEN9             : 1;
3180     unsigned SEGEN10            : 1;
3181     unsigned SEGEN11            : 1;
3182     unsigned SEGEN12            : 1;
3183     unsigned SEGEN13            : 1;
3184     unsigned SEGEN14            : 1;
3185     unsigned SEGEN15            : 1;
3186     };
3187   } __LCDSE1bits_t;
3188 
3189 extern __at(0x011D) volatile __LCDSE1bits_t LCDSE1bits;
3190 
3191 #define _LCDSE1_SEG8            0x01
3192 #define _LCDSE1_SE8             0x01
3193 #define _LCDSE1_SEGEN8          0x01
3194 #define _LCDSE1_SEG9            0x02
3195 #define _LCDSE1_SE9             0x02
3196 #define _LCDSE1_SEGEN9          0x02
3197 #define _LCDSE1_SEG10           0x04
3198 #define _LCDSE1_SE10            0x04
3199 #define _LCDSE1_SEGEN10         0x04
3200 #define _LCDSE1_SEG11           0x08
3201 #define _LCDSE1_SE11            0x08
3202 #define _LCDSE1_SEGEN11         0x08
3203 #define _LCDSE1_SEG12           0x10
3204 #define _LCDSE1_SE12            0x10
3205 #define _LCDSE1_SEGEN12         0x10
3206 #define _LCDSE1_SEG13           0x20
3207 #define _LCDSE1_SE13            0x20
3208 #define _LCDSE1_SEGEN13         0x20
3209 #define _LCDSE1_SEG14           0x40
3210 #define _LCDSE1_SE14            0x40
3211 #define _LCDSE1_SEGEN14         0x40
3212 #define _LCDSE1_SEG15           0x80
3213 #define _LCDSE1_SE15            0x80
3214 #define _LCDSE1_SEGEN15         0x80
3215 
3216 //==============================================================================
3217 
3218 
3219 //==============================================================================
3220 //        LCDSE2 Bits
3221 
3222 extern __at(0x011E) __sfr LCDSE2;
3223 
3224 typedef union
3225   {
3226   struct
3227     {
3228     unsigned SEG16              : 1;
3229     unsigned SEG17              : 1;
3230     unsigned SEG18              : 1;
3231     unsigned SEG19              : 1;
3232     unsigned SEG20              : 1;
3233     unsigned SEG21              : 1;
3234     unsigned SEG22              : 1;
3235     unsigned SEG23              : 1;
3236     };
3237 
3238   struct
3239     {
3240     unsigned SE16               : 1;
3241     unsigned SE17               : 1;
3242     unsigned SE18               : 1;
3243     unsigned SE19               : 1;
3244     unsigned SE20               : 1;
3245     unsigned SE21               : 1;
3246     unsigned SE22               : 1;
3247     unsigned SE23               : 1;
3248     };
3249 
3250   struct
3251     {
3252     unsigned SEGEN16            : 1;
3253     unsigned SEGEN17            : 1;
3254     unsigned SEGEN18            : 1;
3255     unsigned SEGEN19            : 1;
3256     unsigned SEGEN20            : 1;
3257     unsigned SEGEN21            : 1;
3258     unsigned SEGEN22            : 1;
3259     unsigned SEGEN23            : 1;
3260     };
3261   } __LCDSE2bits_t;
3262 
3263 extern __at(0x011E) volatile __LCDSE2bits_t LCDSE2bits;
3264 
3265 #define _LCDSE2_SEG16           0x01
3266 #define _LCDSE2_SE16            0x01
3267 #define _LCDSE2_SEGEN16         0x01
3268 #define _LCDSE2_SEG17           0x02
3269 #define _LCDSE2_SE17            0x02
3270 #define _LCDSE2_SEGEN17         0x02
3271 #define _LCDSE2_SEG18           0x04
3272 #define _LCDSE2_SE18            0x04
3273 #define _LCDSE2_SEGEN18         0x04
3274 #define _LCDSE2_SEG19           0x08
3275 #define _LCDSE2_SE19            0x08
3276 #define _LCDSE2_SEGEN19         0x08
3277 #define _LCDSE2_SEG20           0x10
3278 #define _LCDSE2_SE20            0x10
3279 #define _LCDSE2_SEGEN20         0x10
3280 #define _LCDSE2_SEG21           0x20
3281 #define _LCDSE2_SE21            0x20
3282 #define _LCDSE2_SEGEN21         0x20
3283 #define _LCDSE2_SEG22           0x40
3284 #define _LCDSE2_SE22            0x40
3285 #define _LCDSE2_SEGEN22         0x40
3286 #define _LCDSE2_SEG23           0x80
3287 #define _LCDSE2_SE23            0x80
3288 #define _LCDSE2_SEGEN23         0x80
3289 
3290 //==============================================================================
3291 
3292 
3293 //==============================================================================
3294 //        EECON1 Bits
3295 
3296 extern __at(0x018C) __sfr EECON1;
3297 
3298 typedef union
3299   {
3300   struct
3301     {
3302     unsigned RD                 : 1;
3303     unsigned WR                 : 1;
3304     unsigned WREN               : 1;
3305     unsigned WRERR              : 1;
3306     unsigned                    : 1;
3307     unsigned                    : 1;
3308     unsigned                    : 1;
3309     unsigned EEPGD              : 1;
3310     };
3311 
3312   struct
3313     {
3314     unsigned EERD               : 1;
3315     unsigned EEWR               : 1;
3316     unsigned                    : 1;
3317     unsigned                    : 1;
3318     unsigned                    : 1;
3319     unsigned                    : 1;
3320     unsigned                    : 1;
3321     unsigned                    : 1;
3322     };
3323   } __EECON1bits_t;
3324 
3325 extern __at(0x018C) volatile __EECON1bits_t EECON1bits;
3326 
3327 #define _RD                     0x01
3328 #define _EERD                   0x01
3329 #define _WR                     0x02
3330 #define _EEWR                   0x02
3331 #define _WREN                   0x04
3332 #define _WRERR                  0x08
3333 #define _EEPGD                  0x80
3334 
3335 //==============================================================================
3336 
3337 extern __at(0x018D) __sfr EECON2;
3338 
3339 //==============================================================================
3340 //
3341 //        Configuration Bits
3342 //
3343 //==============================================================================
3344 
3345 #define _CONFIG                 0x2007
3346 
3347 //----------------------------- CONFIG Options -------------------------------
3348 
3349 #define _FOSC_LP                0x3FF8  // LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT/T1OSO and RA7/OSC1/CLKIN/T1OSI.
3350 #define _LP_OSC                 0x3FF8  // LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT/T1OSO and RA7/OSC1/CLKIN/T1OSI.
3351 #define _FOSC_XT                0x3FF9  // XT oscillator: Crystal/resonator on RA6/OSC2/CLKOUT/T1OSO and RA7/OSC1/CLKIN/T1OSI.
3352 #define _XT_OSC                 0x3FF9  // XT oscillator: Crystal/resonator on RA6/OSC2/CLKOUT/T1OSO and RA7/OSC1/CLKIN/T1OSI.
3353 #define _FOSC_HS                0x3FFA  // HS oscillator: High-speed crystal/resonator on RA6/OSC2/CLKOUT/T1OSO and RA7/OSC1/CLKIN/T1OSI.
3354 #define _HS_OSC                 0x3FFA  // HS oscillator: High-speed crystal/resonator on RA6/OSC2/CLKOUT/T1OSO and RA7/OSC1/CLKIN/T1OSI.
3355 #define _FOSC_EC                0x3FFB  // EC: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, CLKIN on RA7/OSC1/CLKIN/T1OSI.
3356 #define _EC_OSC                 0x3FFB  // EC: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, CLKIN on RA7/OSC1/CLKIN/T1OSI.
3357 #define _FOSC_INTOSCIO          0x3FFC  // INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, I/O function on RA7/OSC1/CLKIN/T1OSI.
3358 #define _INTRC_OSC_NOCLKOUT     0x3FFC  // INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, I/O function on RA7/OSC1/CLKIN/T1OSI.
3359 #define _INTOSCIO               0x3FFC  // INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, I/O function on RA7/OSC1/CLKIN/T1OSI.
3360 #define _FOSC_INTOSCCLK         0x3FFD  // INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT/T1OSO pin, I/O function on RA7/OSC1/CLKIN/T1OSI.
3361 #define _INTRC_OSC_CLKOUT       0x3FFD  // INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT/T1OSO pin, I/O function on RA7/OSC1/CLKIN/T1OSI.
3362 #define _INTOSC                 0x3FFD  // INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT/T1OSO pin, I/O function on RA7/OSC1/CLKIN/T1OSI.
3363 #define _FOSC_EXTRCIO           0x3FFE  // RCIO oscillator: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, RC on RA7/OSC1/CLKIN/T1OSI.
3364 #define _EXTRC_OSC_NOCLKOUT     0x3FFE  // RCIO oscillator: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, RC on RA7/OSC1/CLKIN/T1OSI.
3365 #define _EXTRCIO                0x3FFE  // RCIO oscillator: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, RC on RA7/OSC1/CLKIN/T1OSI.
3366 #define _FOSC_EXTRCCLK          0x3FFF  // RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT/T1OSO pin, RC on RA7/OSC1/CLKIN/T1OSI.
3367 #define _EXTRC_OSC_CLKOUT       0x3FFF  // RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT/T1OSO pin, RC on RA7/OSC1/CLKIN/T1OSI.
3368 #define _EXTRC                  0x3FFF  // RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT/T1OSO pin, RC on RA7/OSC1/CLKIN/T1OSI.
3369 #define _WDTE_OFF               0x3FF7  // WDT disabled and can be enabled by SWDTEN bit of the WDTCON register.
3370 #define _WDT_OFF                0x3FF7  // WDT disabled and can be enabled by SWDTEN bit of the WDTCON register.
3371 #define _WDTE_ON                0x3FFF  // WDT enabled.
3372 #define _WDT_ON                 0x3FFF  // WDT enabled.
3373 #define _PWRTE_ON               0x3FEF  // PWRT enabled.
3374 #define _PWRTE_OFF              0x3FFF  // PWRT disabled.
3375 #define _MCLRE_OFF              0x3FDF  // RE3/MCLR pin function is digital input, MCLR internally tied to VDD.
3376 #define _MCLRE_ON               0x3FFF  // RE3/MCLR pin function is MCLR.
3377 #define _CP_ON                  0x3FBF  // Program memory code protection is enabled.
3378 #define _CP_OFF                 0x3FFF  // Program memory code protection is disabled.
3379 #define _CPD_ON                 0x3F7F  // Data memory code protection is enabled.
3380 #define _CPD_OFF                0x3FFF  // Data memory code protection is disabled.
3381 #define _BOREN_OFF              0x3CFF  // BOR disabled.
3382 #define _BOD_OFF                0x3CFF  // BOR disabled.
3383 #define _BOREN_SBODEN           0x3DFF  // BOR controlled by SBOREN bit of the PCON register.
3384 #define _BOD_SBODEN             0x3DFF  // BOR controlled by SBOREN bit of the PCON register.
3385 #define _BOREN_NSLEEP           0x3EFF  // BOR enabled during operation and disabled in Sleep.
3386 #define _BOD_NSLEEP             0x3EFF  // BOR enabled during operation and disabled in Sleep.
3387 #define _BOREN_ON               0x3FFF  // BOR enabled.
3388 #define _BOD_ON                 0x3FFF  // BOR enabled.
3389 #define _IESO_OFF               0x3BFF  // Internal/External Switchover mode is disabled.
3390 #define _IESO_ON                0x3FFF  // Internal/External Switchover mode is enabled.
3391 #define _FCMEN_OFF              0x37FF  // Fail-Safe Clock Monitor is disabled.
3392 #define _FCMEN_ON               0x3FFF  // Fail-Safe Clock Monitor is enabled.
3393 #define _DEBUG_ON               0x2FFF  // In-Circuit Debugger enabled, RB6/ICSPCLK and RB7/ICSPDAT are dedicated to the debugger.
3394 #define _DEBUG_OFF              0x3FFF  // In-Circuit Debugger disabled, RB6/ISCPCLK and RB7/ICSPDAT are general purpose I/O pins.
3395 
3396 //==============================================================================
3397 
3398 #define _DEVID1                 0x2006
3399 
3400 #define _IDLOC0                 0x2000
3401 #define _IDLOC1                 0x2001
3402 #define _IDLOC2                 0x2002
3403 #define _IDLOC3                 0x2003
3404 
3405 //==============================================================================
3406 
3407 #ifndef NO_BIT_DEFINES
3408 
3409 #define ADON                    ADCON0bits.ADON                 // bit 0
3410 #define GO_NOT_DONE             ADCON0bits.GO_NOT_DONE          // bit 1, shadows bit in ADCON0bits
3411 #define NOT_DONE                ADCON0bits.NOT_DONE             // bit 1, shadows bit in ADCON0bits
3412 #define GO_DONE                 ADCON0bits.GO_DONE              // bit 1, shadows bit in ADCON0bits
3413 #define GO                      ADCON0bits.GO                   // bit 1, shadows bit in ADCON0bits
3414 #define CHS0                    ADCON0bits.CHS0                 // bit 2
3415 #define CHS1                    ADCON0bits.CHS1                 // bit 3
3416 #define CHS2                    ADCON0bits.CHS2                 // bit 4
3417 #define VCFG0                   ADCON0bits.VCFG0                // bit 5
3418 #define VCFG1                   ADCON0bits.VCFG1                // bit 6
3419 #define ADFM                    ADCON0bits.ADFM                 // bit 7
3420 
3421 #define ADCS0                   ADCON1bits.ADCS0                // bit 4
3422 #define ADCS1                   ADCON1bits.ADCS1                // bit 5
3423 #define ADCS2                   ADCON1bits.ADCS2                // bit 6
3424 
3425 #define ANS0                    ANSELbits.ANS0                  // bit 0, shadows bit in ANSELbits
3426 #define AN0                     ANSELbits.AN0                   // bit 0, shadows bit in ANSELbits
3427 #define ANS1                    ANSELbits.ANS1                  // bit 1, shadows bit in ANSELbits
3428 #define AN1                     ANSELbits.AN1                   // bit 1, shadows bit in ANSELbits
3429 #define ANS2                    ANSELbits.ANS2                  // bit 2, shadows bit in ANSELbits
3430 #define AN2                     ANSELbits.AN2                   // bit 2, shadows bit in ANSELbits
3431 #define ANS3                    ANSELbits.ANS3                  // bit 3, shadows bit in ANSELbits
3432 #define AN3                     ANSELbits.AN3                   // bit 3, shadows bit in ANSELbits
3433 #define ANS4                    ANSELbits.ANS4                  // bit 4, shadows bit in ANSELbits
3434 #define AN4                     ANSELbits.AN4                   // bit 4, shadows bit in ANSELbits
3435 #define ANS5                    ANSELbits.ANS5                  // bit 5, shadows bit in ANSELbits
3436 #define AN5                     ANSELbits.AN5                   // bit 5, shadows bit in ANSELbits
3437 #define ANS6                    ANSELbits.ANS6                  // bit 6, shadows bit in ANSELbits
3438 #define AN6                     ANSELbits.AN6                   // bit 6, shadows bit in ANSELbits
3439 #define ANS7                    ANSELbits.ANS7                  // bit 7, shadows bit in ANSELbits
3440 #define AN7                     ANSELbits.AN7                   // bit 7, shadows bit in ANSELbits
3441 
3442 #define CCP1M0                  CCP1CONbits.CCP1M0              // bit 0
3443 #define CCP1M1                  CCP1CONbits.CCP1M1              // bit 1
3444 #define CCP1M2                  CCP1CONbits.CCP1M2              // bit 2
3445 #define CCP1M3                  CCP1CONbits.CCP1M3              // bit 3
3446 #define CCP1Y                   CCP1CONbits.CCP1Y               // bit 4
3447 #define CCP1X                   CCP1CONbits.CCP1X               // bit 5
3448 
3449 #define CCP2M0                  CCP2CONbits.CCP2M0              // bit 0
3450 #define CCP2M1                  CCP2CONbits.CCP2M1              // bit 1
3451 #define CCP2M2                  CCP2CONbits.CCP2M2              // bit 2
3452 #define CCP2M3                  CCP2CONbits.CCP2M3              // bit 3
3453 #define CCP2Y                   CCP2CONbits.CCP2Y               // bit 4
3454 #define CCP2X                   CCP2CONbits.CCP2X               // bit 5
3455 
3456 #define CM0                     CMCON0bits.CM0                  // bit 0
3457 #define CM1                     CMCON0bits.CM1                  // bit 1
3458 #define CM2                     CMCON0bits.CM2                  // bit 2
3459 #define CIS                     CMCON0bits.CIS                  // bit 3
3460 #define C1INV                   CMCON0bits.C1INV                // bit 4
3461 #define C2INV                   CMCON0bits.C2INV                // bit 5
3462 #define C1OUT                   CMCON0bits.C1OUT                // bit 6
3463 #define C2OUT                   CMCON0bits.C2OUT                // bit 7
3464 
3465 #define C2SYNC                  CMCON1bits.C2SYNC               // bit 0
3466 #define T1GSS                   CMCON1bits.T1GSS                // bit 1
3467 
3468 #define EEADRL0                 EEADRbits.EEADRL0               // bit 0
3469 #define EEADRL1                 EEADRbits.EEADRL1               // bit 1
3470 #define EEADRL2                 EEADRbits.EEADRL2               // bit 2
3471 #define EEADRL3                 EEADRbits.EEADRL3               // bit 3
3472 #define EEADRL4                 EEADRbits.EEADRL4               // bit 4
3473 #define EEADRL5                 EEADRbits.EEADRL5               // bit 5
3474 #define EEADRL6                 EEADRbits.EEADRL6               // bit 6
3475 #define EEADRL7                 EEADRbits.EEADRL7               // bit 7
3476 
3477 #define EEADRH0                 EEADRHbits.EEADRH0              // bit 0
3478 #define EEADRH1                 EEADRHbits.EEADRH1              // bit 1
3479 #define EEADRH2                 EEADRHbits.EEADRH2              // bit 2
3480 #define EEADRH3                 EEADRHbits.EEADRH3              // bit 3
3481 #define EEADRH4                 EEADRHbits.EEADRH4              // bit 4
3482 
3483 #define RD                      EECON1bits.RD                   // bit 0, shadows bit in EECON1bits
3484 #define EERD                    EECON1bits.EERD                 // bit 0, shadows bit in EECON1bits
3485 #define WR                      EECON1bits.WR                   // bit 1, shadows bit in EECON1bits
3486 #define EEWR                    EECON1bits.EEWR                 // bit 1, shadows bit in EECON1bits
3487 #define WREN                    EECON1bits.WREN                 // bit 2
3488 #define WRERR                   EECON1bits.WRERR                // bit 3
3489 #define EEPGD                   EECON1bits.EEPGD                // bit 7
3490 
3491 #define EEDATL0                 EEDATAbits.EEDATL0              // bit 0
3492 #define EEDATL1                 EEDATAbits.EEDATL1              // bit 1
3493 #define EEDATL2                 EEDATAbits.EEDATL2              // bit 2
3494 #define EEDATL3                 EEDATAbits.EEDATL3              // bit 3
3495 #define EEDATL4                 EEDATAbits.EEDATL4              // bit 4
3496 #define EEDATL5                 EEDATAbits.EEDATL5              // bit 5
3497 #define EEDATL6                 EEDATAbits.EEDATL6              // bit 6
3498 #define EEDATL7                 EEDATAbits.EEDATL7              // bit 7
3499 
3500 #define EEDATH0                 EEDATHbits.EEDATH0              // bit 0
3501 #define EEDATH1                 EEDATHbits.EEDATH1              // bit 1
3502 #define EEDATH2                 EEDATHbits.EEDATH2              // bit 2
3503 #define EEDATH3                 EEDATHbits.EEDATH3              // bit 3
3504 #define EEDATH4                 EEDATHbits.EEDATH4              // bit 4
3505 #define EEDATH5                 EEDATHbits.EEDATH5              // bit 5
3506 
3507 #define RBIF                    INTCONbits.RBIF                 // bit 0
3508 #define INTF                    INTCONbits.INTF                 // bit 1
3509 #define TMR0IF                  INTCONbits.TMR0IF               // bit 2, shadows bit in INTCONbits
3510 #define T0IF                    INTCONbits.T0IF                 // bit 2, shadows bit in INTCONbits
3511 #define RBIE                    INTCONbits.RBIE                 // bit 3
3512 #define INTE                    INTCONbits.INTE                 // bit 4
3513 #define TMR0IE                  INTCONbits.TMR0IE               // bit 5, shadows bit in INTCONbits
3514 #define T0IE                    INTCONbits.T0IE                 // bit 5, shadows bit in INTCONbits
3515 #define PEIE                    INTCONbits.PEIE                 // bit 6
3516 #define GIE                     INTCONbits.GIE                  // bit 7
3517 
3518 #define IOCB4                   IOCbits.IOCB4                   // bit 4, shadows bit in IOCbits
3519 #define IOC4                    IOCbits.IOC4                    // bit 4, shadows bit in IOCbits
3520 #define IOCB5                   IOCbits.IOCB5                   // bit 5, shadows bit in IOCbits
3521 #define IOC5                    IOCbits.IOC5                    // bit 5, shadows bit in IOCbits
3522 #define IOCB6                   IOCbits.IOCB6                   // bit 6, shadows bit in IOCbits
3523 #define IOC6                    IOCbits.IOC6                    // bit 6, shadows bit in IOCbits
3524 #define IOCB7                   IOCbits.IOCB7                   // bit 7, shadows bit in IOCbits
3525 #define IOC7                    IOCbits.IOC7                    // bit 7, shadows bit in IOCbits
3526 
3527 #define LMUX0                   LCDCONbits.LMUX0                // bit 0
3528 #define LMUX1                   LCDCONbits.LMUX1                // bit 1
3529 #define CS0                     LCDCONbits.CS0                  // bit 2
3530 #define CS1                     LCDCONbits.CS1                  // bit 3
3531 #define VLCDEN                  LCDCONbits.VLCDEN               // bit 4
3532 #define WERR                    LCDCONbits.WERR                 // bit 5
3533 #define SLPEN                   LCDCONbits.SLPEN                // bit 6
3534 #define LCDEN                   LCDCONbits.LCDEN                // bit 7
3535 
3536 #define SEG0                    LCDDATA0bits.SEG0               // bit 0, shadows bit in LCDDATA0bits
3537 #define SEG0COM0                LCDDATA0bits.SEG0COM0           // bit 0, shadows bit in LCDDATA0bits
3538 #define S0C0                    LCDDATA0bits.S0C0               // bit 0, shadows bit in LCDDATA0bits
3539 #define SEG1                    LCDDATA0bits.SEG1               // bit 1, shadows bit in LCDDATA0bits
3540 #define SEG1COM0                LCDDATA0bits.SEG1COM0           // bit 1, shadows bit in LCDDATA0bits
3541 #define S1C0                    LCDDATA0bits.S1C0               // bit 1, shadows bit in LCDDATA0bits
3542 #define SEG2                    LCDDATA0bits.SEG2               // bit 2, shadows bit in LCDDATA0bits
3543 #define SEG2COM0                LCDDATA0bits.SEG2COM0           // bit 2, shadows bit in LCDDATA0bits
3544 #define S2C0                    LCDDATA0bits.S2C0               // bit 2, shadows bit in LCDDATA0bits
3545 #define SEG3                    LCDDATA0bits.SEG3               // bit 3, shadows bit in LCDDATA0bits
3546 #define SEG3COM0                LCDDATA0bits.SEG3COM0           // bit 3, shadows bit in LCDDATA0bits
3547 #define S3C0                    LCDDATA0bits.S3C0               // bit 3, shadows bit in LCDDATA0bits
3548 #define SEG4                    LCDDATA0bits.SEG4               // bit 4, shadows bit in LCDDATA0bits
3549 #define SEG4COM0                LCDDATA0bits.SEG4COM0           // bit 4, shadows bit in LCDDATA0bits
3550 #define S4C0                    LCDDATA0bits.S4C0               // bit 4, shadows bit in LCDDATA0bits
3551 #define SEG5                    LCDDATA0bits.SEG5               // bit 5, shadows bit in LCDDATA0bits
3552 #define SEG5COM0                LCDDATA0bits.SEG5COM0           // bit 5, shadows bit in LCDDATA0bits
3553 #define S5C0                    LCDDATA0bits.S5C0               // bit 5, shadows bit in LCDDATA0bits
3554 #define SEG6                    LCDDATA0bits.SEG6               // bit 6, shadows bit in LCDDATA0bits
3555 #define SEG6COM0                LCDDATA0bits.SEG6COM0           // bit 6, shadows bit in LCDDATA0bits
3556 #define S6C0                    LCDDATA0bits.S6C0               // bit 6, shadows bit in LCDDATA0bits
3557 #define SEG7                    LCDDATA0bits.SEG7               // bit 7, shadows bit in LCDDATA0bits
3558 #define SEG7COM0                LCDDATA0bits.SEG7COM0           // bit 7, shadows bit in LCDDATA0bits
3559 #define S7C0                    LCDDATA0bits.S7C0               // bit 7, shadows bit in LCDDATA0bits
3560 
3561 #define SEG8                    LCDDATA1bits.SEG8               // bit 0, shadows bit in LCDDATA1bits
3562 #define SEG8COM0                LCDDATA1bits.SEG8COM0           // bit 0, shadows bit in LCDDATA1bits
3563 #define S8C0                    LCDDATA1bits.S8C0               // bit 0, shadows bit in LCDDATA1bits
3564 #define SEG9                    LCDDATA1bits.SEG9               // bit 1, shadows bit in LCDDATA1bits
3565 #define SEG9COM0                LCDDATA1bits.SEG9COM0           // bit 1, shadows bit in LCDDATA1bits
3566 #define S9C0                    LCDDATA1bits.S9C0               // bit 1, shadows bit in LCDDATA1bits
3567 #define SEG10                   LCDDATA1bits.SEG10              // bit 2, shadows bit in LCDDATA1bits
3568 #define SEG10COM0               LCDDATA1bits.SEG10COM0          // bit 2, shadows bit in LCDDATA1bits
3569 #define S10C0                   LCDDATA1bits.S10C0              // bit 2, shadows bit in LCDDATA1bits
3570 #define SEG11                   LCDDATA1bits.SEG11              // bit 3, shadows bit in LCDDATA1bits
3571 #define SEG11COM0               LCDDATA1bits.SEG11COM0          // bit 3, shadows bit in LCDDATA1bits
3572 #define S11C0                   LCDDATA1bits.S11C0              // bit 3, shadows bit in LCDDATA1bits
3573 #define SEG12                   LCDDATA1bits.SEG12              // bit 4, shadows bit in LCDDATA1bits
3574 #define SEG12COM0               LCDDATA1bits.SEG12COM0          // bit 4, shadows bit in LCDDATA1bits
3575 #define S12C0                   LCDDATA1bits.S12C0              // bit 4, shadows bit in LCDDATA1bits
3576 #define SEG13                   LCDDATA1bits.SEG13              // bit 5, shadows bit in LCDDATA1bits
3577 #define SEG13COM0               LCDDATA1bits.SEG13COM0          // bit 5, shadows bit in LCDDATA1bits
3578 #define S13C0                   LCDDATA1bits.S13C0              // bit 5, shadows bit in LCDDATA1bits
3579 #define SEG14                   LCDDATA1bits.SEG14              // bit 6, shadows bit in LCDDATA1bits
3580 #define SEG14COM0               LCDDATA1bits.SEG14COM0          // bit 6, shadows bit in LCDDATA1bits
3581 #define S14C0                   LCDDATA1bits.S14C0              // bit 6, shadows bit in LCDDATA1bits
3582 #define SEG15                   LCDDATA1bits.SEG15              // bit 7, shadows bit in LCDDATA1bits
3583 #define SEG15COM0               LCDDATA1bits.SEG15COM0          // bit 7, shadows bit in LCDDATA1bits
3584 #define S15C0                   LCDDATA1bits.S15C0              // bit 7, shadows bit in LCDDATA1bits
3585 
3586 #define SEG16                   LCDDATA2bits.SEG16              // bit 0, shadows bit in LCDDATA2bits
3587 #define SEG16COM0               LCDDATA2bits.SEG16COM0          // bit 0, shadows bit in LCDDATA2bits
3588 #define S16C0                   LCDDATA2bits.S16C0              // bit 0, shadows bit in LCDDATA2bits
3589 #define SEG17                   LCDDATA2bits.SEG17              // bit 1, shadows bit in LCDDATA2bits
3590 #define SEG17COM0               LCDDATA2bits.SEG17COM0          // bit 1, shadows bit in LCDDATA2bits
3591 #define S17C0                   LCDDATA2bits.S17C0              // bit 1, shadows bit in LCDDATA2bits
3592 #define SEG18                   LCDDATA2bits.SEG18              // bit 2, shadows bit in LCDDATA2bits
3593 #define SEG18COM0               LCDDATA2bits.SEG18COM0          // bit 2, shadows bit in LCDDATA2bits
3594 #define S18C0                   LCDDATA2bits.S18C0              // bit 2, shadows bit in LCDDATA2bits
3595 #define SEG19                   LCDDATA2bits.SEG19              // bit 3, shadows bit in LCDDATA2bits
3596 #define SEG19COM0               LCDDATA2bits.SEG19COM0          // bit 3, shadows bit in LCDDATA2bits
3597 #define S19C0                   LCDDATA2bits.S19C0              // bit 3, shadows bit in LCDDATA2bits
3598 #define SEG20                   LCDDATA2bits.SEG20              // bit 4, shadows bit in LCDDATA2bits
3599 #define SEG20COM0               LCDDATA2bits.SEG20COM0          // bit 4, shadows bit in LCDDATA2bits
3600 #define S20C0                   LCDDATA2bits.S20C0              // bit 4, shadows bit in LCDDATA2bits
3601 #define SEG21                   LCDDATA2bits.SEG21              // bit 5, shadows bit in LCDDATA2bits
3602 #define SEG21COM0               LCDDATA2bits.SEG21COM0          // bit 5, shadows bit in LCDDATA2bits
3603 #define S21C0                   LCDDATA2bits.S21C0              // bit 5, shadows bit in LCDDATA2bits
3604 #define SEG22                   LCDDATA2bits.SEG22              // bit 6, shadows bit in LCDDATA2bits
3605 #define SEG22COM0               LCDDATA2bits.SEG22COM0          // bit 6, shadows bit in LCDDATA2bits
3606 #define S22C0                   LCDDATA2bits.S22C0              // bit 6, shadows bit in LCDDATA2bits
3607 #define SEG23                   LCDDATA2bits.SEG23              // bit 7, shadows bit in LCDDATA2bits
3608 #define SEG23COM0               LCDDATA2bits.SEG23COM0          // bit 7, shadows bit in LCDDATA2bits
3609 #define S23C0                   LCDDATA2bits.S23C0              // bit 7, shadows bit in LCDDATA2bits
3610 
3611 #define LP0                     LCDPSbits.LP0                   // bit 0
3612 #define LP1                     LCDPSbits.LP1                   // bit 1
3613 #define LP2                     LCDPSbits.LP2                   // bit 2
3614 #define LP3                     LCDPSbits.LP3                   // bit 3
3615 #define WA                      LCDPSbits.WA                    // bit 4
3616 #define LCDA                    LCDPSbits.LCDA                  // bit 5
3617 #define BIASMD                  LCDPSbits.BIASMD                // bit 6
3618 #define WFT                     LCDPSbits.WFT                   // bit 7
3619 
3620 #define LVDL0                   LVDCONbits.LVDL0                // bit 0
3621 #define LVDL1                   LVDCONbits.LVDL1                // bit 1
3622 #define LVDL2                   LVDCONbits.LVDL2                // bit 2
3623 #define LVDEN                   LVDCONbits.LVDEN                // bit 4
3624 #define IRVST                   LVDCONbits.IRVST                // bit 5
3625 
3626 #define PS0                     OPTION_REGbits.PS0              // bit 0
3627 #define PS1                     OPTION_REGbits.PS1              // bit 1
3628 #define PS2                     OPTION_REGbits.PS2              // bit 2
3629 #define PSA                     OPTION_REGbits.PSA              // bit 3
3630 #define T0SE                    OPTION_REGbits.T0SE             // bit 4
3631 #define T0CS                    OPTION_REGbits.T0CS             // bit 5
3632 #define INTEDG                  OPTION_REGbits.INTEDG           // bit 6
3633 #define NOT_RBPU                OPTION_REGbits.NOT_RBPU         // bit 7
3634 
3635 #define SCS                     OSCCONbits.SCS                  // bit 0
3636 #define LTS                     OSCCONbits.LTS                  // bit 1
3637 #define HTS                     OSCCONbits.HTS                  // bit 2
3638 #define OSTS                    OSCCONbits.OSTS                 // bit 3
3639 #define IRCF0                   OSCCONbits.IRCF0                // bit 4
3640 #define IRCF1                   OSCCONbits.IRCF1                // bit 5
3641 #define IRCF2                   OSCCONbits.IRCF2                // bit 6
3642 
3643 #define TUN0                    OSCTUNEbits.TUN0                // bit 0
3644 #define TUN1                    OSCTUNEbits.TUN1                // bit 1
3645 #define TUN2                    OSCTUNEbits.TUN2                // bit 2
3646 #define TUN3                    OSCTUNEbits.TUN3                // bit 3
3647 #define TUN4                    OSCTUNEbits.TUN4                // bit 4
3648 
3649 #define NOT_BOR                 PCONbits.NOT_BOR                // bit 0, shadows bit in PCONbits
3650 #define NOT_BO                  PCONbits.NOT_BO                 // bit 0, shadows bit in PCONbits
3651 #define NOT_POR                 PCONbits.NOT_POR                // bit 1
3652 #define SBOREN                  PCONbits.SBOREN                 // bit 4
3653 
3654 #define TMR1IE                  PIE1bits.TMR1IE                 // bit 0
3655 #define TMR2IE                  PIE1bits.TMR2IE                 // bit 1
3656 #define CCP1IE                  PIE1bits.CCP1IE                 // bit 2
3657 #define SSPIE                   PIE1bits.SSPIE                  // bit 3
3658 #define TXIE                    PIE1bits.TXIE                   // bit 4
3659 #define RCIE                    PIE1bits.RCIE                   // bit 5
3660 #define ADIE                    PIE1bits.ADIE                   // bit 6
3661 #define EEIE                    PIE1bits.EEIE                   // bit 7
3662 
3663 #define CCP2IE                  PIE2bits.CCP2IE                 // bit 0
3664 #define LVDIE                   PIE2bits.LVDIE                  // bit 2
3665 #define LCDIE                   PIE2bits.LCDIE                  // bit 4
3666 #define C1IE                    PIE2bits.C1IE                   // bit 5
3667 #define C2IE                    PIE2bits.C2IE                   // bit 6
3668 #define OSFIE                   PIE2bits.OSFIE                  // bit 7
3669 
3670 #define TMR1IF                  PIR1bits.TMR1IF                 // bit 0
3671 #define TMR2IF                  PIR1bits.TMR2IF                 // bit 1
3672 #define CCP1IF                  PIR1bits.CCP1IF                 // bit 2
3673 #define SSPIF                   PIR1bits.SSPIF                  // bit 3
3674 #define TXIF                    PIR1bits.TXIF                   // bit 4
3675 #define RCIF                    PIR1bits.RCIF                   // bit 5
3676 #define ADIF                    PIR1bits.ADIF                   // bit 6
3677 #define EEIF                    PIR1bits.EEIF                   // bit 7
3678 
3679 #define CCP2IF                  PIR2bits.CCP2IF                 // bit 0
3680 #define LVDIF                   PIR2bits.LVDIF                  // bit 2
3681 #define LCDIF                   PIR2bits.LCDIF                  // bit 4
3682 #define C1IF                    PIR2bits.C1IF                   // bit 5
3683 #define C2IF                    PIR2bits.C2IF                   // bit 6
3684 #define OSFIF                   PIR2bits.OSFIF                  // bit 7
3685 
3686 #define RA0                     PORTAbits.RA0                   // bit 0
3687 #define RA1                     PORTAbits.RA1                   // bit 1
3688 #define RA2                     PORTAbits.RA2                   // bit 2
3689 #define RA3                     PORTAbits.RA3                   // bit 3
3690 #define RA4                     PORTAbits.RA4                   // bit 4
3691 #define RA5                     PORTAbits.RA5                   // bit 5
3692 #define RA6                     PORTAbits.RA6                   // bit 6
3693 #define RA7                     PORTAbits.RA7                   // bit 7
3694 
3695 #define RB0                     PORTBbits.RB0                   // bit 0
3696 #define RB1                     PORTBbits.RB1                   // bit 1
3697 #define RB2                     PORTBbits.RB2                   // bit 2
3698 #define RB3                     PORTBbits.RB3                   // bit 3
3699 #define RB4                     PORTBbits.RB4                   // bit 4
3700 #define RB5                     PORTBbits.RB5                   // bit 5
3701 #define RB6                     PORTBbits.RB6                   // bit 6
3702 #define RB7                     PORTBbits.RB7                   // bit 7
3703 
3704 #define RC0                     PORTCbits.RC0                   // bit 0
3705 #define RC1                     PORTCbits.RC1                   // bit 1
3706 #define RC2                     PORTCbits.RC2                   // bit 2
3707 #define RC3                     PORTCbits.RC3                   // bit 3
3708 #define RC4                     PORTCbits.RC4                   // bit 4
3709 #define RC5                     PORTCbits.RC5                   // bit 5
3710 #define RC6                     PORTCbits.RC6                   // bit 6
3711 #define RC7                     PORTCbits.RC7                   // bit 7
3712 
3713 #define RD0                     PORTDbits.RD0                   // bit 0
3714 #define RD1                     PORTDbits.RD1                   // bit 1
3715 #define RD2                     PORTDbits.RD2                   // bit 2
3716 #define RD3                     PORTDbits.RD3                   // bit 3
3717 #define RD4                     PORTDbits.RD4                   // bit 4
3718 #define RD5                     PORTDbits.RD5                   // bit 5
3719 #define RD6                     PORTDbits.RD6                   // bit 6
3720 #define RD7                     PORTDbits.RD7                   // bit 7
3721 
3722 #define RE0                     PORTEbits.RE0                   // bit 0
3723 #define RE1                     PORTEbits.RE1                   // bit 1
3724 #define RE2                     PORTEbits.RE2                   // bit 2
3725 #define RE3                     PORTEbits.RE3                   // bit 3
3726 
3727 #define RX9D                    RCSTAbits.RX9D                  // bit 0, shadows bit in RCSTAbits
3728 #define RCD8                    RCSTAbits.RCD8                  // bit 0, shadows bit in RCSTAbits
3729 #define OERR                    RCSTAbits.OERR                  // bit 1
3730 #define FERR                    RCSTAbits.FERR                  // bit 2
3731 #define ADDEN                   RCSTAbits.ADDEN                 // bit 3
3732 #define CREN                    RCSTAbits.CREN                  // bit 4
3733 #define SREN                    RCSTAbits.SREN                  // bit 5
3734 #define RX9                     RCSTAbits.RX9                   // bit 6, shadows bit in RCSTAbits
3735 #define RC9                     RCSTAbits.RC9                   // bit 6, shadows bit in RCSTAbits
3736 #define NOT_RC8                 RCSTAbits.NOT_RC8               // bit 6, shadows bit in RCSTAbits
3737 #define RC8_9                   RCSTAbits.RC8_9                 // bit 6, shadows bit in RCSTAbits
3738 #define SPEN                    RCSTAbits.SPEN                  // bit 7
3739 
3740 #define SSPM0                   SSPCONbits.SSPM0                // bit 0
3741 #define SSPM1                   SSPCONbits.SSPM1                // bit 1
3742 #define SSPM2                   SSPCONbits.SSPM2                // bit 2
3743 #define SSPM3                   SSPCONbits.SSPM3                // bit 3
3744 #define CKP                     SSPCONbits.CKP                  // bit 4
3745 #define SSPEN                   SSPCONbits.SSPEN                // bit 5
3746 #define SSPOV                   SSPCONbits.SSPOV                // bit 6
3747 #define WCOL                    SSPCONbits.WCOL                 // bit 7
3748 
3749 #define BF                      SSPSTATbits.BF                  // bit 0
3750 #define UA                      SSPSTATbits.UA                  // bit 1
3751 #define R_NOT_W                 SSPSTATbits.R_NOT_W             // bit 2, shadows bit in SSPSTATbits
3752 #define R                       SSPSTATbits.R                   // bit 2, shadows bit in SSPSTATbits
3753 #define I2C_READ                SSPSTATbits.I2C_READ            // bit 2, shadows bit in SSPSTATbits
3754 #define NOT_W                   SSPSTATbits.NOT_W               // bit 2, shadows bit in SSPSTATbits
3755 #define NOT_WRITE               SSPSTATbits.NOT_WRITE           // bit 2, shadows bit in SSPSTATbits
3756 #define R_W                     SSPSTATbits.R_W                 // bit 2, shadows bit in SSPSTATbits
3757 #define READ_WRITE              SSPSTATbits.READ_WRITE          // bit 2, shadows bit in SSPSTATbits
3758 #define S                       SSPSTATbits.S                   // bit 3, shadows bit in SSPSTATbits
3759 #define I2C_START               SSPSTATbits.I2C_START           // bit 3, shadows bit in SSPSTATbits
3760 #define P                       SSPSTATbits.P                   // bit 4, shadows bit in SSPSTATbits
3761 #define I2C_STOP                SSPSTATbits.I2C_STOP            // bit 4, shadows bit in SSPSTATbits
3762 #define D_NOT_A                 SSPSTATbits.D_NOT_A             // bit 5, shadows bit in SSPSTATbits
3763 #define D                       SSPSTATbits.D                   // bit 5, shadows bit in SSPSTATbits
3764 #define I2C_DATA                SSPSTATbits.I2C_DATA            // bit 5, shadows bit in SSPSTATbits
3765 #define NOT_A                   SSPSTATbits.NOT_A               // bit 5, shadows bit in SSPSTATbits
3766 #define NOT_ADDRESS             SSPSTATbits.NOT_ADDRESS         // bit 5, shadows bit in SSPSTATbits
3767 #define D_A                     SSPSTATbits.D_A                 // bit 5, shadows bit in SSPSTATbits
3768 #define DATA_ADDRESS            SSPSTATbits.DATA_ADDRESS        // bit 5, shadows bit in SSPSTATbits
3769 #define CKE                     SSPSTATbits.CKE                 // bit 6
3770 #define SMP                     SSPSTATbits.SMP                 // bit 7
3771 
3772 #define C                       STATUSbits.C                    // bit 0
3773 #define DC                      STATUSbits.DC                   // bit 1
3774 #define Z                       STATUSbits.Z                    // bit 2
3775 #define NOT_PD                  STATUSbits.NOT_PD               // bit 3
3776 #define NOT_TO                  STATUSbits.NOT_TO               // bit 4
3777 #define RP0                     STATUSbits.RP0                  // bit 5
3778 #define RP1                     STATUSbits.RP1                  // bit 6
3779 #define IRP                     STATUSbits.IRP                  // bit 7
3780 
3781 #define TMR1ON                  T1CONbits.TMR1ON                // bit 0
3782 #define TMR1CS                  T1CONbits.TMR1CS                // bit 1
3783 #define NOT_T1SYNC              T1CONbits.NOT_T1SYNC            // bit 2, shadows bit in T1CONbits
3784 #define T1SYNC                  T1CONbits.T1SYNC                // bit 2, shadows bit in T1CONbits
3785 #define T1INSYNC                T1CONbits.T1INSYNC              // bit 2, shadows bit in T1CONbits
3786 #define T1OSCEN                 T1CONbits.T1OSCEN               // bit 3
3787 #define T1CKPS0                 T1CONbits.T1CKPS0               // bit 4
3788 #define T1CKPS1                 T1CONbits.T1CKPS1               // bit 5
3789 #define TMR1GE                  T1CONbits.TMR1GE                // bit 6, shadows bit in T1CONbits
3790 #define T1GE                    T1CONbits.T1GE                  // bit 6, shadows bit in T1CONbits
3791 #define T1GINV                  T1CONbits.T1GINV                // bit 7
3792 
3793 #define T2CKPS0                 T2CONbits.T2CKPS0               // bit 0
3794 #define T2CKPS1                 T2CONbits.T2CKPS1               // bit 1
3795 #define TMR2ON                  T2CONbits.TMR2ON                // bit 2
3796 #define TOUTPS0                 T2CONbits.TOUTPS0               // bit 3
3797 #define TOUTPS1                 T2CONbits.TOUTPS1               // bit 4
3798 #define TOUTPS2                 T2CONbits.TOUTPS2               // bit 5
3799 #define TOUTPS3                 T2CONbits.TOUTPS3               // bit 6
3800 
3801 #define TRISA0                  TRISAbits.TRISA0                // bit 0
3802 #define TRISA1                  TRISAbits.TRISA1                // bit 1
3803 #define TRISA2                  TRISAbits.TRISA2                // bit 2
3804 #define TRISA3                  TRISAbits.TRISA3                // bit 3
3805 #define TRISA4                  TRISAbits.TRISA4                // bit 4
3806 #define TRISA5                  TRISAbits.TRISA5                // bit 5
3807 #define TRISA6                  TRISAbits.TRISA6                // bit 6
3808 #define TRISA7                  TRISAbits.TRISA7                // bit 7
3809 
3810 #define TRISB0                  TRISBbits.TRISB0                // bit 0
3811 #define TRISB1                  TRISBbits.TRISB1                // bit 1
3812 #define TRISB2                  TRISBbits.TRISB2                // bit 2
3813 #define TRISB3                  TRISBbits.TRISB3                // bit 3
3814 #define TRISB4                  TRISBbits.TRISB4                // bit 4
3815 #define TRISB5                  TRISBbits.TRISB5                // bit 5
3816 #define TRISB6                  TRISBbits.TRISB6                // bit 6
3817 #define TRISB7                  TRISBbits.TRISB7                // bit 7
3818 
3819 #define TRISC0                  TRISCbits.TRISC0                // bit 0
3820 #define TRISC1                  TRISCbits.TRISC1                // bit 1
3821 #define TRISC2                  TRISCbits.TRISC2                // bit 2
3822 #define TRISC3                  TRISCbits.TRISC3                // bit 3
3823 #define TRISC4                  TRISCbits.TRISC4                // bit 4
3824 #define TRISC5                  TRISCbits.TRISC5                // bit 5
3825 #define TRISC6                  TRISCbits.TRISC6                // bit 6
3826 #define TRISC7                  TRISCbits.TRISC7                // bit 7
3827 
3828 #define TRISD0                  TRISDbits.TRISD0                // bit 0
3829 #define TRISD1                  TRISDbits.TRISD1                // bit 1
3830 #define TRISD2                  TRISDbits.TRISD2                // bit 2
3831 #define TRISD3                  TRISDbits.TRISD3                // bit 3
3832 #define TRISD4                  TRISDbits.TRISD4                // bit 4
3833 #define TRISD5                  TRISDbits.TRISD5                // bit 5
3834 #define TRISD6                  TRISDbits.TRISD6                // bit 6
3835 #define TRISD7                  TRISDbits.TRISD7                // bit 7
3836 
3837 #define TRISE0                  TRISEbits.TRISE0                // bit 0
3838 #define TRISE1                  TRISEbits.TRISE1                // bit 1
3839 #define TRISE2                  TRISEbits.TRISE2                // bit 2
3840 #define TRISE3                  TRISEbits.TRISE3                // bit 3
3841 
3842 #define TX9D                    TXSTAbits.TX9D                  // bit 0, shadows bit in TXSTAbits
3843 #define TXD8                    TXSTAbits.TXD8                  // bit 0, shadows bit in TXSTAbits
3844 #define TRMT                    TXSTAbits.TRMT                  // bit 1
3845 #define BRGH                    TXSTAbits.BRGH                  // bit 2
3846 #define SYNC                    TXSTAbits.SYNC                  // bit 4
3847 #define TXEN                    TXSTAbits.TXEN                  // bit 5
3848 #define TX9                     TXSTAbits.TX9                   // bit 6, shadows bit in TXSTAbits
3849 #define NOT_TX8                 TXSTAbits.NOT_TX8               // bit 6, shadows bit in TXSTAbits
3850 #define TX8_9                   TXSTAbits.TX8_9                 // bit 6, shadows bit in TXSTAbits
3851 #define CSRC                    TXSTAbits.CSRC                  // bit 7
3852 
3853 #define VR0                     VRCONbits.VR0                   // bit 0
3854 #define VR1                     VRCONbits.VR1                   // bit 1
3855 #define VR2                     VRCONbits.VR2                   // bit 2
3856 #define VR3                     VRCONbits.VR3                   // bit 3
3857 #define VRR                     VRCONbits.VRR                   // bit 5
3858 #define VREN                    VRCONbits.VREN                  // bit 7
3859 
3860 #define SWDTEN                  WDTCONbits.SWDTEN               // bit 0, shadows bit in WDTCONbits
3861 #define SWDTE                   WDTCONbits.SWDTE                // bit 0, shadows bit in WDTCONbits
3862 #define WDTPS0                  WDTCONbits.WDTPS0               // bit 1
3863 #define WDTPS1                  WDTCONbits.WDTPS1               // bit 2
3864 #define WDTPS2                  WDTCONbits.WDTPS2               // bit 3
3865 #define WDTPS3                  WDTCONbits.WDTPS3               // bit 4
3866 
3867 #define WPUB0                   WPUbits.WPUB0                   // bit 0, shadows bit in WPUbits
3868 #define WPU0                    WPUbits.WPU0                    // bit 0, shadows bit in WPUbits
3869 #define WPUB1                   WPUbits.WPUB1                   // bit 1, shadows bit in WPUbits
3870 #define WPU1                    WPUbits.WPU1                    // bit 1, shadows bit in WPUbits
3871 #define WPUB2                   WPUbits.WPUB2                   // bit 2, shadows bit in WPUbits
3872 #define WPU2                    WPUbits.WPU2                    // bit 2, shadows bit in WPUbits
3873 #define WPUB3                   WPUbits.WPUB3                   // bit 3, shadows bit in WPUbits
3874 #define WPU3                    WPUbits.WPU3                    // bit 3, shadows bit in WPUbits
3875 #define WPUB4                   WPUbits.WPUB4                   // bit 4, shadows bit in WPUbits
3876 #define WPU4                    WPUbits.WPU4                    // bit 4, shadows bit in WPUbits
3877 #define WPUB5                   WPUbits.WPUB5                   // bit 5, shadows bit in WPUbits
3878 #define WPU5                    WPUbits.WPU5                    // bit 5, shadows bit in WPUbits
3879 #define WPUB6                   WPUbits.WPUB6                   // bit 6, shadows bit in WPUbits
3880 #define WPU6                    WPUbits.WPU6                    // bit 6, shadows bit in WPUbits
3881 #define WPUB7                   WPUbits.WPUB7                   // bit 7, shadows bit in WPUbits
3882 #define WPU7                    WPUbits.WPU7                    // bit 7, shadows bit in WPUbits
3883 
3884 #endif // #ifndef NO_BIT_DEFINES
3885 
3886 #endif // #ifndef __PIC16F917_H__
3887