1 /*
2  * This declarations of the PIC18F67K90 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:35 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 __PIC18F67K90_H__
26 #define __PIC18F67K90_H__
27 
28 //==============================================================================
29 
30 //==============================================================================
31 //
32 //	Register Definitions
33 //
34 //==============================================================================
35 
36 
37 //==============================================================================
38 //        LCDCON Bits
39 
40 extern __at(0x0EF4) __sfr LCDCON;
41 
42 typedef union
43   {
44   struct
45     {
46     unsigned LMUX0              : 1;
47     unsigned LMUX1              : 1;
48     unsigned CS0                : 1;
49     unsigned CS1                : 1;
50     unsigned                    : 1;
51     unsigned WERR               : 1;
52     unsigned SLPEN              : 1;
53     unsigned LCDEN              : 1;
54     };
55 
56   struct
57     {
58     unsigned LMUX               : 2;
59     unsigned                    : 6;
60     };
61 
62   struct
63     {
64     unsigned                    : 2;
65     unsigned CS                 : 2;
66     unsigned                    : 4;
67     };
68   } __LCDCONbits_t;
69 
70 extern __at(0x0EF4) volatile __LCDCONbits_t LCDCONbits;
71 
72 #define _LMUX0                  0x01
73 #define _LMUX1                  0x02
74 #define _CS0                    0x04
75 #define _CS1                    0x08
76 #define _WERR                   0x20
77 #define _SLPEN                  0x40
78 #define _LCDEN                  0x80
79 
80 //==============================================================================
81 
82 
83 //==============================================================================
84 //        LCDPS Bits
85 
86 extern __at(0x0EF5) __sfr LCDPS;
87 
88 typedef union
89   {
90   struct
91     {
92     unsigned LP0                : 1;
93     unsigned LP1                : 1;
94     unsigned LP2                : 1;
95     unsigned LP3                : 1;
96     unsigned WA                 : 1;
97     unsigned LCDA               : 1;
98     unsigned BIASMD             : 1;
99     unsigned WFT                : 1;
100     };
101 
102   struct
103     {
104     unsigned LP                 : 4;
105     unsigned                    : 4;
106     };
107   } __LCDPSbits_t;
108 
109 extern __at(0x0EF5) volatile __LCDPSbits_t LCDPSbits;
110 
111 #define _LP0                    0x01
112 #define _LP1                    0x02
113 #define _LP2                    0x04
114 #define _LP3                    0x08
115 #define _WA                     0x10
116 #define _LCDA                   0x20
117 #define _BIASMD                 0x40
118 #define _WFT                    0x80
119 
120 //==============================================================================
121 
122 
123 //==============================================================================
124 //        LCDSE0 Bits
125 
126 extern __at(0x0EF6) __sfr LCDSE0;
127 
128 typedef struct
129   {
130   unsigned SE00                 : 1;
131   unsigned SE01                 : 1;
132   unsigned SE02                 : 1;
133   unsigned SE03                 : 1;
134   unsigned SE04                 : 1;
135   unsigned SE05                 : 1;
136   unsigned SE06                 : 1;
137   unsigned SE07                 : 1;
138   } __LCDSE0bits_t;
139 
140 extern __at(0x0EF6) volatile __LCDSE0bits_t LCDSE0bits;
141 
142 #define _SE00                   0x01
143 #define _SE01                   0x02
144 #define _SE02                   0x04
145 #define _SE03                   0x08
146 #define _SE04                   0x10
147 #define _SE05                   0x20
148 #define _SE06                   0x40
149 #define _SE07                   0x80
150 
151 //==============================================================================
152 
153 
154 //==============================================================================
155 //        LCDSE1 Bits
156 
157 extern __at(0x0EF7) __sfr LCDSE1;
158 
159 typedef struct
160   {
161   unsigned SE08                 : 1;
162   unsigned SE09                 : 1;
163   unsigned SE10                 : 1;
164   unsigned SE11                 : 1;
165   unsigned SE12                 : 1;
166   unsigned SE13                 : 1;
167   unsigned SE14                 : 1;
168   unsigned SE15                 : 1;
169   } __LCDSE1bits_t;
170 
171 extern __at(0x0EF7) volatile __LCDSE1bits_t LCDSE1bits;
172 
173 #define _SE08                   0x01
174 #define _SE09                   0x02
175 #define _SE10                   0x04
176 #define _SE11                   0x08
177 #define _SE12                   0x10
178 #define _SE13                   0x20
179 #define _SE14                   0x40
180 #define _SE15                   0x80
181 
182 //==============================================================================
183 
184 
185 //==============================================================================
186 //        LCDSE2 Bits
187 
188 extern __at(0x0EF8) __sfr LCDSE2;
189 
190 typedef struct
191   {
192   unsigned SE16                 : 1;
193   unsigned SE17                 : 1;
194   unsigned SE18                 : 1;
195   unsigned SE19                 : 1;
196   unsigned SE20                 : 1;
197   unsigned SE21                 : 1;
198   unsigned SE22                 : 1;
199   unsigned SE23                 : 1;
200   } __LCDSE2bits_t;
201 
202 extern __at(0x0EF8) volatile __LCDSE2bits_t LCDSE2bits;
203 
204 #define _SE16                   0x01
205 #define _SE17                   0x02
206 #define _SE18                   0x04
207 #define _SE19                   0x08
208 #define _SE20                   0x10
209 #define _SE21                   0x20
210 #define _SE22                   0x40
211 #define _SE23                   0x80
212 
213 //==============================================================================
214 
215 
216 //==============================================================================
217 //        LCDSE3 Bits
218 
219 extern __at(0x0EF9) __sfr LCDSE3;
220 
221 typedef struct
222   {
223   unsigned SE24                 : 1;
224   unsigned SE25                 : 1;
225   unsigned SE26                 : 1;
226   unsigned SE27                 : 1;
227   unsigned SE28                 : 1;
228   unsigned SE29                 : 1;
229   unsigned SE30                 : 1;
230   unsigned SE31                 : 1;
231   } __LCDSE3bits_t;
232 
233 extern __at(0x0EF9) volatile __LCDSE3bits_t LCDSE3bits;
234 
235 #define _SE24                   0x01
236 #define _SE25                   0x02
237 #define _SE26                   0x04
238 #define _SE27                   0x08
239 #define _SE28                   0x10
240 #define _SE29                   0x20
241 #define _SE30                   0x40
242 #define _SE31                   0x80
243 
244 //==============================================================================
245 
246 
247 //==============================================================================
248 //        LCDSE4 Bits
249 
250 extern __at(0x0EFA) __sfr LCDSE4;
251 
252 typedef struct
253   {
254   unsigned SE32                 : 1;
255   unsigned                      : 1;
256   unsigned                      : 1;
257   unsigned                      : 1;
258   unsigned                      : 1;
259   unsigned                      : 1;
260   unsigned                      : 1;
261   unsigned                      : 1;
262   } __LCDSE4bits_t;
263 
264 extern __at(0x0EFA) volatile __LCDSE4bits_t LCDSE4bits;
265 
266 #define _SE32                   0x01
267 
268 //==============================================================================
269 
270 
271 //==============================================================================
272 //        LCDRL Bits
273 
274 extern __at(0x0EFC) __sfr LCDRL;
275 
276 typedef union
277   {
278   struct
279     {
280     unsigned LRLAT0             : 1;
281     unsigned LRLAT1             : 1;
282     unsigned LRLAT2             : 1;
283     unsigned LCDIRI             : 1;
284     unsigned LRLBP0             : 1;
285     unsigned LRLBP1             : 1;
286     unsigned LRLAP0             : 1;
287     unsigned LRLAP1             : 1;
288     };
289 
290   struct
291     {
292     unsigned LRLAT              : 3;
293     unsigned                    : 5;
294     };
295 
296   struct
297     {
298     unsigned                    : 4;
299     unsigned LRLBP              : 2;
300     unsigned                    : 2;
301     };
302 
303   struct
304     {
305     unsigned                    : 6;
306     unsigned LRLAP              : 2;
307     };
308   } __LCDRLbits_t;
309 
310 extern __at(0x0EFC) volatile __LCDRLbits_t LCDRLbits;
311 
312 #define _LRLAT0                 0x01
313 #define _LRLAT1                 0x02
314 #define _LRLAT2                 0x04
315 #define _LCDIRI                 0x08
316 #define _LRLBP0                 0x10
317 #define _LRLBP1                 0x20
318 #define _LRLAP0                 0x40
319 #define _LRLAP1                 0x80
320 
321 //==============================================================================
322 
323 
324 //==============================================================================
325 //        LCDREF Bits
326 
327 extern __at(0x0EFD) __sfr LCDREF;
328 
329 typedef union
330   {
331   struct
332     {
333     unsigned VLCD1PE            : 1;
334     unsigned VLCD2PE            : 1;
335     unsigned VLCD3PE            : 1;
336     unsigned LCDCST0            : 1;
337     unsigned LCDCST1            : 1;
338     unsigned LCDCST2            : 1;
339     unsigned LCDIRS             : 1;
340     unsigned LCDIRE             : 1;
341     };
342 
343   struct
344     {
345     unsigned                    : 3;
346     unsigned LCDCST             : 3;
347     unsigned                    : 2;
348     };
349   } __LCDREFbits_t;
350 
351 extern __at(0x0EFD) volatile __LCDREFbits_t LCDREFbits;
352 
353 #define _VLCD1PE                0x01
354 #define _VLCD2PE                0x02
355 #define _VLCD3PE                0x04
356 #define _LCDCST0                0x08
357 #define _LCDCST1                0x10
358 #define _LCDCST2                0x20
359 #define _LCDIRS                 0x40
360 #define _LCDIRE                 0x80
361 
362 //==============================================================================
363 
364 
365 //==============================================================================
366 //        SSP2CON2 Bits
367 
368 extern __at(0x0EFE) __sfr SSP2CON2;
369 
370 typedef union
371   {
372   struct
373     {
374     unsigned SEN                : 1;
375     unsigned RSEN               : 1;
376     unsigned PEN                : 1;
377     unsigned RCEN               : 1;
378     unsigned ACKEN              : 1;
379     unsigned ACKDT              : 1;
380     unsigned ACKSTAT            : 1;
381     unsigned GCEN               : 1;
382     };
383 
384   struct
385     {
386     unsigned                    : 1;
387     unsigned ADMSK1             : 1;
388     unsigned ADMSK2             : 1;
389     unsigned ADMSK3             : 1;
390     unsigned ADMSK4             : 1;
391     unsigned ADMSK5             : 1;
392     unsigned                    : 1;
393     unsigned                    : 1;
394     };
395   } __SSP2CON2bits_t;
396 
397 extern __at(0x0EFE) volatile __SSP2CON2bits_t SSP2CON2bits;
398 
399 #define _SSP2CON2_SEN           0x01
400 #define _SSP2CON2_RSEN          0x02
401 #define _SSP2CON2_ADMSK1        0x02
402 #define _SSP2CON2_PEN           0x04
403 #define _SSP2CON2_ADMSK2        0x04
404 #define _SSP2CON2_RCEN          0x08
405 #define _SSP2CON2_ADMSK3        0x08
406 #define _SSP2CON2_ACKEN         0x10
407 #define _SSP2CON2_ADMSK4        0x10
408 #define _SSP2CON2_ACKDT         0x20
409 #define _SSP2CON2_ADMSK5        0x20
410 #define _SSP2CON2_ACKSTAT       0x40
411 #define _SSP2CON2_GCEN          0x80
412 
413 //==============================================================================
414 
415 
416 //==============================================================================
417 //        SSP2CON1 Bits
418 
419 extern __at(0x0EFF) __sfr SSP2CON1;
420 
421 typedef union
422   {
423   struct
424     {
425     unsigned SSPM0              : 1;
426     unsigned SSPM1              : 1;
427     unsigned SSPM2              : 1;
428     unsigned SSPM3              : 1;
429     unsigned CKP                : 1;
430     unsigned SSPEN              : 1;
431     unsigned SSPOV              : 1;
432     unsigned WCOL               : 1;
433     };
434 
435   struct
436     {
437     unsigned SSPM               : 4;
438     unsigned                    : 4;
439     };
440   } __SSP2CON1bits_t;
441 
442 extern __at(0x0EFF) volatile __SSP2CON1bits_t SSP2CON1bits;
443 
444 #define _SSP2CON1_SSPM0         0x01
445 #define _SSP2CON1_SSPM1         0x02
446 #define _SSP2CON1_SSPM2         0x04
447 #define _SSP2CON1_SSPM3         0x08
448 #define _SSP2CON1_CKP           0x10
449 #define _SSP2CON1_SSPEN         0x20
450 #define _SSP2CON1_SSPOV         0x40
451 #define _SSP2CON1_WCOL          0x80
452 
453 //==============================================================================
454 
455 
456 //==============================================================================
457 //        SSP2STAT Bits
458 
459 extern __at(0x0F00) __sfr SSP2STAT;
460 
461 typedef union
462   {
463   struct
464     {
465     unsigned BF                 : 1;
466     unsigned UA                 : 1;
467     unsigned R_NOT_W            : 1;
468     unsigned S                  : 1;
469     unsigned P                  : 1;
470     unsigned D_NOT_A            : 1;
471     unsigned CKE                : 1;
472     unsigned SMP                : 1;
473     };
474 
475   struct
476     {
477     unsigned                    : 1;
478     unsigned                    : 1;
479     unsigned R                  : 1;
480     unsigned I2C_START          : 1;
481     unsigned I2C_STOP           : 1;
482     unsigned D                  : 1;
483     unsigned                    : 1;
484     unsigned                    : 1;
485     };
486 
487   struct
488     {
489     unsigned                    : 1;
490     unsigned                    : 1;
491     unsigned R_W                : 1;
492     unsigned                    : 1;
493     unsigned                    : 1;
494     unsigned D_A                : 1;
495     unsigned                    : 1;
496     unsigned                    : 1;
497     };
498 
499   struct
500     {
501     unsigned                    : 1;
502     unsigned                    : 1;
503     unsigned NOT_W              : 1;
504     unsigned                    : 1;
505     unsigned                    : 1;
506     unsigned NOT_A              : 1;
507     unsigned                    : 1;
508     unsigned                    : 1;
509     };
510 
511   struct
512     {
513     unsigned                    : 1;
514     unsigned                    : 1;
515     unsigned NOT_WRITE          : 1;
516     unsigned                    : 1;
517     unsigned                    : 1;
518     unsigned NOT_ADDRESS        : 1;
519     unsigned                    : 1;
520     unsigned                    : 1;
521     };
522 
523   struct
524     {
525     unsigned                    : 1;
526     unsigned                    : 1;
527     unsigned READ_WRITE         : 1;
528     unsigned                    : 1;
529     unsigned                    : 1;
530     unsigned DATA_ADDRESS       : 1;
531     unsigned                    : 1;
532     unsigned                    : 1;
533     };
534 
535   struct
536     {
537     unsigned                    : 1;
538     unsigned                    : 1;
539     unsigned I2C_READ           : 1;
540     unsigned                    : 1;
541     unsigned                    : 1;
542     unsigned I2C_DAT            : 1;
543     unsigned                    : 1;
544     unsigned                    : 1;
545     };
546   } __SSP2STATbits_t;
547 
548 extern __at(0x0F00) volatile __SSP2STATbits_t SSP2STATbits;
549 
550 #define _SSP2STAT_BF            0x01
551 #define _SSP2STAT_UA            0x02
552 #define _SSP2STAT_R_NOT_W       0x04
553 #define _SSP2STAT_R             0x04
554 #define _SSP2STAT_R_W           0x04
555 #define _SSP2STAT_NOT_W         0x04
556 #define _SSP2STAT_NOT_WRITE     0x04
557 #define _SSP2STAT_READ_WRITE    0x04
558 #define _SSP2STAT_I2C_READ      0x04
559 #define _SSP2STAT_S             0x08
560 #define _SSP2STAT_I2C_START     0x08
561 #define _SSP2STAT_P             0x10
562 #define _SSP2STAT_I2C_STOP      0x10
563 #define _SSP2STAT_D_NOT_A       0x20
564 #define _SSP2STAT_D             0x20
565 #define _SSP2STAT_D_A           0x20
566 #define _SSP2STAT_NOT_A         0x20
567 #define _SSP2STAT_NOT_ADDRESS   0x20
568 #define _SSP2STAT_DATA_ADDRESS  0x20
569 #define _SSP2STAT_I2C_DAT       0x20
570 #define _SSP2STAT_CKE           0x40
571 #define _SSP2STAT_SMP           0x80
572 
573 //==============================================================================
574 
575 
576 //==============================================================================
577 //        SSP2ADD Bits
578 
579 extern __at(0x0F01) __sfr SSP2ADD;
580 
581 typedef struct
582   {
583   unsigned MSK0                 : 1;
584   unsigned MSK1                 : 1;
585   unsigned MSK2                 : 1;
586   unsigned MSK3                 : 1;
587   unsigned MSK4                 : 1;
588   unsigned MSK5                 : 1;
589   unsigned MSK6                 : 1;
590   unsigned MSK7                 : 1;
591   } __SSP2ADDbits_t;
592 
593 extern __at(0x0F01) volatile __SSP2ADDbits_t SSP2ADDbits;
594 
595 #define _SSP2ADD_MSK0           0x01
596 #define _SSP2ADD_MSK1           0x02
597 #define _SSP2ADD_MSK2           0x04
598 #define _SSP2ADD_MSK3           0x08
599 #define _SSP2ADD_MSK4           0x10
600 #define _SSP2ADD_MSK5           0x20
601 #define _SSP2ADD_MSK6           0x40
602 #define _SSP2ADD_MSK7           0x80
603 
604 //==============================================================================
605 
606 extern __at(0x0F02) __sfr SSP2BUF;
607 
608 //==============================================================================
609 //        T4CON Bits
610 
611 extern __at(0x0F03) __sfr T4CON;
612 
613 typedef union
614   {
615   struct
616     {
617     unsigned T4CKPS0            : 1;
618     unsigned T4CKPS1            : 1;
619     unsigned TMR4ON             : 1;
620     unsigned T4OUTPS0           : 1;
621     unsigned T4OUTPS1           : 1;
622     unsigned T4OUTPS2           : 1;
623     unsigned T4OUTPS3           : 1;
624     unsigned                    : 1;
625     };
626 
627   struct
628     {
629     unsigned T4CKPS             : 2;
630     unsigned                    : 6;
631     };
632 
633   struct
634     {
635     unsigned                    : 3;
636     unsigned T4OUTPS            : 4;
637     unsigned                    : 1;
638     };
639   } __T4CONbits_t;
640 
641 extern __at(0x0F03) volatile __T4CONbits_t T4CONbits;
642 
643 #define _T4CKPS0                0x01
644 #define _T4CKPS1                0x02
645 #define _TMR4ON                 0x04
646 #define _T4OUTPS0               0x08
647 #define _T4OUTPS1               0x10
648 #define _T4OUTPS2               0x20
649 #define _T4OUTPS3               0x40
650 
651 //==============================================================================
652 
653 extern __at(0x0F04) __sfr PR4;
654 extern __at(0x0F05) __sfr TMR4;
655 
656 //==============================================================================
657 //        CCP7CON Bits
658 
659 extern __at(0x0F06) __sfr CCP7CON;
660 
661 typedef union
662   {
663   struct
664     {
665     unsigned CCP7M0             : 1;
666     unsigned CCP7M1             : 1;
667     unsigned CCP7M2             : 1;
668     unsigned CCP7M3             : 1;
669     unsigned DC7B0              : 1;
670     unsigned DC7B1              : 1;
671     unsigned                    : 1;
672     unsigned                    : 1;
673     };
674 
675   struct
676     {
677     unsigned                    : 1;
678     unsigned                    : 1;
679     unsigned                    : 1;
680     unsigned                    : 1;
681     unsigned CCP7Y              : 1;
682     unsigned CCP7X              : 1;
683     unsigned                    : 1;
684     unsigned                    : 1;
685     };
686 
687   struct
688     {
689     unsigned CCP7M              : 4;
690     unsigned                    : 4;
691     };
692 
693   struct
694     {
695     unsigned                    : 4;
696     unsigned DC7B               : 2;
697     unsigned                    : 2;
698     };
699   } __CCP7CONbits_t;
700 
701 extern __at(0x0F06) volatile __CCP7CONbits_t CCP7CONbits;
702 
703 #define _CCP7M0                 0x01
704 #define _CCP7M1                 0x02
705 #define _CCP7M2                 0x04
706 #define _CCP7M3                 0x08
707 #define _DC7B0                  0x10
708 #define _CCP7Y                  0x10
709 #define _DC7B1                  0x20
710 #define _CCP7X                  0x20
711 
712 //==============================================================================
713 
714 extern __at(0x0F07) __sfr CCPR7;
715 extern __at(0x0F07) __sfr CCPR7L;
716 extern __at(0x0F08) __sfr CCPR7H;
717 
718 //==============================================================================
719 //        CCP6CON Bits
720 
721 extern __at(0x0F09) __sfr CCP6CON;
722 
723 typedef union
724   {
725   struct
726     {
727     unsigned CCP6M0             : 1;
728     unsigned CCP6M1             : 1;
729     unsigned CCP6M2             : 1;
730     unsigned CCP6M3             : 1;
731     unsigned DC6B0              : 1;
732     unsigned DC6B1              : 1;
733     unsigned                    : 1;
734     unsigned                    : 1;
735     };
736 
737   struct
738     {
739     unsigned                    : 1;
740     unsigned                    : 1;
741     unsigned                    : 1;
742     unsigned                    : 1;
743     unsigned CCP6Y              : 1;
744     unsigned CCP6X              : 1;
745     unsigned                    : 1;
746     unsigned                    : 1;
747     };
748 
749   struct
750     {
751     unsigned CCP6M              : 4;
752     unsigned                    : 4;
753     };
754 
755   struct
756     {
757     unsigned                    : 4;
758     unsigned DC6B               : 2;
759     unsigned                    : 2;
760     };
761   } __CCP6CONbits_t;
762 
763 extern __at(0x0F09) volatile __CCP6CONbits_t CCP6CONbits;
764 
765 #define _CCP6M0                 0x01
766 #define _CCP6M1                 0x02
767 #define _CCP6M2                 0x04
768 #define _CCP6M3                 0x08
769 #define _DC6B0                  0x10
770 #define _CCP6Y                  0x10
771 #define _DC6B1                  0x20
772 #define _CCP6X                  0x20
773 
774 //==============================================================================
775 
776 extern __at(0x0F0A) __sfr CCPR6;
777 extern __at(0x0F0A) __sfr CCPR6L;
778 extern __at(0x0F0B) __sfr CCPR6H;
779 
780 //==============================================================================
781 //        CCP5CON Bits
782 
783 extern __at(0x0F0C) __sfr CCP5CON;
784 
785 typedef union
786   {
787   struct
788     {
789     unsigned CCP5M0             : 1;
790     unsigned CCP5M1             : 1;
791     unsigned CCP5M2             : 1;
792     unsigned CCP5M3             : 1;
793     unsigned DC5B0              : 1;
794     unsigned DC5B1              : 1;
795     unsigned                    : 1;
796     unsigned                    : 1;
797     };
798 
799   struct
800     {
801     unsigned                    : 1;
802     unsigned                    : 1;
803     unsigned                    : 1;
804     unsigned                    : 1;
805     unsigned CCP5Y              : 1;
806     unsigned CCP5X              : 1;
807     unsigned                    : 1;
808     unsigned                    : 1;
809     };
810 
811   struct
812     {
813     unsigned CCP5M              : 4;
814     unsigned                    : 4;
815     };
816 
817   struct
818     {
819     unsigned                    : 4;
820     unsigned DC5B               : 2;
821     unsigned                    : 2;
822     };
823   } __CCP5CONbits_t;
824 
825 extern __at(0x0F0C) volatile __CCP5CONbits_t CCP5CONbits;
826 
827 #define _CCP5M0                 0x01
828 #define _CCP5M1                 0x02
829 #define _CCP5M2                 0x04
830 #define _CCP5M3                 0x08
831 #define _DC5B0                  0x10
832 #define _CCP5Y                  0x10
833 #define _DC5B1                  0x20
834 #define _CCP5X                  0x20
835 
836 //==============================================================================
837 
838 extern __at(0x0F0D) __sfr CCPR5;
839 extern __at(0x0F0D) __sfr CCPR5L;
840 extern __at(0x0F0E) __sfr CCPR5H;
841 
842 //==============================================================================
843 //        CCP4CON Bits
844 
845 extern __at(0x0F0F) __sfr CCP4CON;
846 
847 typedef union
848   {
849   struct
850     {
851     unsigned CCP4M0             : 1;
852     unsigned CCP4M1             : 1;
853     unsigned CCP4M2             : 1;
854     unsigned CCP4M3             : 1;
855     unsigned DC4B0              : 1;
856     unsigned DC4B1              : 1;
857     unsigned                    : 1;
858     unsigned                    : 1;
859     };
860 
861   struct
862     {
863     unsigned                    : 1;
864     unsigned                    : 1;
865     unsigned                    : 1;
866     unsigned                    : 1;
867     unsigned CCP4Y              : 1;
868     unsigned CCP4X              : 1;
869     unsigned                    : 1;
870     unsigned                    : 1;
871     };
872 
873   struct
874     {
875     unsigned CCP4M              : 4;
876     unsigned                    : 4;
877     };
878 
879   struct
880     {
881     unsigned                    : 4;
882     unsigned DC4B               : 2;
883     unsigned                    : 2;
884     };
885   } __CCP4CONbits_t;
886 
887 extern __at(0x0F0F) volatile __CCP4CONbits_t CCP4CONbits;
888 
889 #define _CCP4M0                 0x01
890 #define _CCP4M1                 0x02
891 #define _CCP4M2                 0x04
892 #define _CCP4M3                 0x08
893 #define _DC4B0                  0x10
894 #define _CCP4Y                  0x10
895 #define _DC4B1                  0x20
896 #define _CCP4X                  0x20
897 
898 //==============================================================================
899 
900 extern __at(0x0F10) __sfr CCPR4;
901 extern __at(0x0F10) __sfr CCPR4L;
902 extern __at(0x0F11) __sfr CCPR4H;
903 
904 //==============================================================================
905 //        T5GCON Bits
906 
907 extern __at(0x0F12) __sfr T5GCON;
908 
909 typedef union
910   {
911   struct
912     {
913     unsigned T5GSS0             : 1;
914     unsigned T5GSS1             : 1;
915     unsigned T5GVAL             : 1;
916     unsigned T5GGO_NOT_T5DONE   : 1;
917     unsigned T5GSPM             : 1;
918     unsigned T5GTM              : 1;
919     unsigned T5GPOL             : 1;
920     unsigned TMR5GE             : 1;
921     };
922 
923   struct
924     {
925     unsigned                    : 1;
926     unsigned                    : 1;
927     unsigned                    : 1;
928     unsigned T5GGO              : 1;
929     unsigned                    : 1;
930     unsigned                    : 1;
931     unsigned                    : 1;
932     unsigned                    : 1;
933     };
934 
935   struct
936     {
937     unsigned                    : 1;
938     unsigned                    : 1;
939     unsigned                    : 1;
940     unsigned NOT_T5DONE         : 1;
941     unsigned                    : 1;
942     unsigned                    : 1;
943     unsigned                    : 1;
944     unsigned                    : 1;
945     };
946 
947   struct
948     {
949     unsigned T5GSS              : 2;
950     unsigned                    : 6;
951     };
952   } __T5GCONbits_t;
953 
954 extern __at(0x0F12) volatile __T5GCONbits_t T5GCONbits;
955 
956 #define _T5GSS0                 0x01
957 #define _T5GSS1                 0x02
958 #define _T5GVAL                 0x04
959 #define _T5GGO_NOT_T5DONE       0x08
960 #define _T5GGO                  0x08
961 #define _NOT_T5DONE             0x08
962 #define _T5GSPM                 0x10
963 #define _T5GTM                  0x20
964 #define _T5GPOL                 0x40
965 #define _TMR5GE                 0x80
966 
967 //==============================================================================
968 
969 
970 //==============================================================================
971 //        T5CON Bits
972 
973 extern __at(0x0F13) __sfr T5CON;
974 
975 typedef union
976   {
977   struct
978     {
979     unsigned TMR5ON             : 1;
980     unsigned RD16               : 1;
981     unsigned NOT_T5SYNC         : 1;
982     unsigned SOSCEN             : 1;
983     unsigned T5CKPS0            : 1;
984     unsigned T5CKPS1            : 1;
985     unsigned TMR5CS0            : 1;
986     unsigned TMR5CS1            : 1;
987     };
988 
989   struct
990     {
991     unsigned                    : 4;
992     unsigned T5CKPS             : 2;
993     unsigned                    : 2;
994     };
995 
996   struct
997     {
998     unsigned                    : 6;
999     unsigned TMR5CS             : 2;
1000     };
1001   } __T5CONbits_t;
1002 
1003 extern __at(0x0F13) volatile __T5CONbits_t T5CONbits;
1004 
1005 #define _T5CON_TMR5ON           0x01
1006 #define _T5CON_RD16             0x02
1007 #define _T5CON_NOT_T5SYNC       0x04
1008 #define _T5CON_SOSCEN           0x08
1009 #define _T5CON_T5CKPS0          0x10
1010 #define _T5CON_T5CKPS1          0x20
1011 #define _T5CON_TMR5CS0          0x40
1012 #define _T5CON_TMR5CS1          0x80
1013 
1014 //==============================================================================
1015 
1016 extern __at(0x0F14) __sfr TMR5;
1017 extern __at(0x0F14) __sfr TMR5L;
1018 extern __at(0x0F15) __sfr TMR5H;
1019 
1020 //==============================================================================
1021 //        PMD3 Bits
1022 
1023 extern __at(0x0F16) __sfr PMD3;
1024 
1025 typedef struct
1026   {
1027   unsigned TMR12MD              : 1;
1028   unsigned CCP4MD               : 1;
1029   unsigned CCP5MD               : 1;
1030   unsigned CCP6MD               : 1;
1031   unsigned CCP7MD               : 1;
1032   unsigned CCP8MD               : 1;
1033   unsigned CCP9MD               : 1;
1034   unsigned CCP10MD              : 1;
1035   } __PMD3bits_t;
1036 
1037 extern __at(0x0F16) volatile __PMD3bits_t PMD3bits;
1038 
1039 #define _TMR12MD                0x01
1040 #define _CCP4MD                 0x02
1041 #define _CCP5MD                 0x04
1042 #define _CCP6MD                 0x08
1043 #define _CCP7MD                 0x10
1044 #define _CCP8MD                 0x20
1045 #define _CCP9MD                 0x40
1046 #define _CCP10MD                0x80
1047 
1048 //==============================================================================
1049 
1050 
1051 //==============================================================================
1052 //        PMD2 Bits
1053 
1054 extern __at(0x0F17) __sfr PMD2;
1055 
1056 typedef struct
1057   {
1058   unsigned CMP1MD               : 1;
1059   unsigned CMP2MD               : 1;
1060   unsigned CMP3MD               : 1;
1061   unsigned TMR5MD               : 1;
1062   unsigned TMR6MD               : 1;
1063   unsigned TMR7MD               : 1;
1064   unsigned TMR8MD               : 1;
1065   unsigned TMR10MD              : 1;
1066   } __PMD2bits_t;
1067 
1068 extern __at(0x0F17) volatile __PMD2bits_t PMD2bits;
1069 
1070 #define _CMP1MD                 0x01
1071 #define _CMP2MD                 0x02
1072 #define _CMP3MD                 0x04
1073 #define _TMR5MD                 0x08
1074 #define _TMR6MD                 0x10
1075 #define _TMR7MD                 0x20
1076 #define _TMR8MD                 0x40
1077 #define _TMR10MD                0x80
1078 
1079 //==============================================================================
1080 
1081 
1082 //==============================================================================
1083 //        PMD1 Bits
1084 
1085 extern __at(0x0F18) __sfr PMD1;
1086 
1087 typedef struct
1088   {
1089   unsigned                      : 1;
1090   unsigned TMR1MD               : 1;
1091   unsigned TMR2MD               : 1;
1092   unsigned TMR3MD               : 1;
1093   unsigned TMR4MD               : 1;
1094   unsigned RTCCMD               : 1;
1095   unsigned CTMUMD               : 1;
1096   unsigned                      : 1;
1097   } __PMD1bits_t;
1098 
1099 extern __at(0x0F18) volatile __PMD1bits_t PMD1bits;
1100 
1101 #define _TMR1MD                 0x02
1102 #define _TMR2MD                 0x04
1103 #define _TMR3MD                 0x08
1104 #define _TMR4MD                 0x10
1105 #define _RTCCMD                 0x20
1106 #define _CTMUMD                 0x40
1107 
1108 //==============================================================================
1109 
1110 
1111 //==============================================================================
1112 //        PMD0 Bits
1113 
1114 extern __at(0x0F19) __sfr PMD0;
1115 
1116 typedef struct
1117   {
1118   unsigned ADCMD                : 1;
1119   unsigned SSP1MD               : 1;
1120   unsigned SSP2MD               : 1;
1121   unsigned UART1MD              : 1;
1122   unsigned UART2MD              : 1;
1123   unsigned CCP1MD               : 1;
1124   unsigned CCP2MD               : 1;
1125   unsigned CCP3MD               : 1;
1126   } __PMD0bits_t;
1127 
1128 extern __at(0x0F19) volatile __PMD0bits_t PMD0bits;
1129 
1130 #define _ADCMD                  0x01
1131 #define _SSP1MD                 0x02
1132 #define _SSP2MD                 0x04
1133 #define _UART1MD                0x08
1134 #define _UART2MD                0x10
1135 #define _CCP1MD                 0x20
1136 #define _CCP2MD                 0x40
1137 #define _CCP3MD                 0x80
1138 
1139 //==============================================================================
1140 
1141 
1142 //==============================================================================
1143 //        PSTR3CON Bits
1144 
1145 extern __at(0x0F1A) __sfr PSTR3CON;
1146 
1147 typedef union
1148   {
1149   struct
1150     {
1151     unsigned STRA               : 1;
1152     unsigned STRB               : 1;
1153     unsigned STRC               : 1;
1154     unsigned STRD               : 1;
1155     unsigned STRSYNC            : 1;
1156     unsigned                    : 1;
1157     unsigned CMPL0              : 1;
1158     unsigned CMPL1              : 1;
1159     };
1160 
1161   struct
1162     {
1163     unsigned                    : 6;
1164     unsigned CMPL               : 2;
1165     };
1166   } __PSTR3CONbits_t;
1167 
1168 extern __at(0x0F1A) volatile __PSTR3CONbits_t PSTR3CONbits;
1169 
1170 #define _PSTR3CON_STRA          0x01
1171 #define _PSTR3CON_STRB          0x02
1172 #define _PSTR3CON_STRC          0x04
1173 #define _PSTR3CON_STRD          0x08
1174 #define _PSTR3CON_STRSYNC       0x10
1175 #define _PSTR3CON_CMPL0         0x40
1176 #define _PSTR3CON_CMPL1         0x80
1177 
1178 //==============================================================================
1179 
1180 
1181 //==============================================================================
1182 //        PSTR2CON Bits
1183 
1184 extern __at(0x0F1B) __sfr PSTR2CON;
1185 
1186 typedef union
1187   {
1188   struct
1189     {
1190     unsigned STRA               : 1;
1191     unsigned STRB               : 1;
1192     unsigned STRC               : 1;
1193     unsigned STRD               : 1;
1194     unsigned STRSYNC            : 1;
1195     unsigned                    : 1;
1196     unsigned CMPL0              : 1;
1197     unsigned CMPL1              : 1;
1198     };
1199 
1200   struct
1201     {
1202     unsigned                    : 6;
1203     unsigned CMPL               : 2;
1204     };
1205   } __PSTR2CONbits_t;
1206 
1207 extern __at(0x0F1B) volatile __PSTR2CONbits_t PSTR2CONbits;
1208 
1209 #define _PSTR2CON_STRA          0x01
1210 #define _PSTR2CON_STRB          0x02
1211 #define _PSTR2CON_STRC          0x04
1212 #define _PSTR2CON_STRD          0x08
1213 #define _PSTR2CON_STRSYNC       0x10
1214 #define _PSTR2CON_CMPL0         0x40
1215 #define _PSTR2CON_CMPL1         0x80
1216 
1217 //==============================================================================
1218 
1219 extern __at(0x0F1C) __sfr TXREG2;
1220 extern __at(0x0F1D) __sfr RCREG2;
1221 extern __at(0x0F1E) __sfr SPBRG2;
1222 extern __at(0x0F1F) __sfr SPBRGH2;
1223 
1224 //==============================================================================
1225 //        BAUDCON2 Bits
1226 
1227 extern __at(0x0F20) __sfr BAUDCON2;
1228 
1229 typedef struct
1230   {
1231   unsigned ABDEN                : 1;
1232   unsigned WUE                  : 1;
1233   unsigned                      : 1;
1234   unsigned BRG16                : 1;
1235   unsigned TXCKP                : 1;
1236   unsigned RXDTP                : 1;
1237   unsigned RCIDL                : 1;
1238   unsigned ABDOVF               : 1;
1239   } __BAUDCON2bits_t;
1240 
1241 extern __at(0x0F20) volatile __BAUDCON2bits_t BAUDCON2bits;
1242 
1243 #define _BAUDCON2_ABDEN         0x01
1244 #define _BAUDCON2_WUE           0x02
1245 #define _BAUDCON2_BRG16         0x08
1246 #define _BAUDCON2_TXCKP         0x10
1247 #define _BAUDCON2_RXDTP         0x20
1248 #define _BAUDCON2_RCIDL         0x40
1249 #define _BAUDCON2_ABDOVF        0x80
1250 
1251 //==============================================================================
1252 
1253 
1254 //==============================================================================
1255 //        TXSTA2 Bits
1256 
1257 extern __at(0x0F21) __sfr TXSTA2;
1258 
1259 typedef union
1260   {
1261   struct
1262     {
1263     unsigned TX9D               : 1;
1264     unsigned TRMT               : 1;
1265     unsigned BRGH               : 1;
1266     unsigned SENDB              : 1;
1267     unsigned SYNC               : 1;
1268     unsigned TXEN               : 1;
1269     unsigned TX9                : 1;
1270     unsigned CSRC               : 1;
1271     };
1272 
1273   struct
1274     {
1275     unsigned TX9D2              : 1;
1276     unsigned TRMT2              : 1;
1277     unsigned BRGH2              : 1;
1278     unsigned SENDB2             : 1;
1279     unsigned SYNC2              : 1;
1280     unsigned TXEN2              : 1;
1281     unsigned TX92               : 1;
1282     unsigned CSRC2              : 1;
1283     };
1284   } __TXSTA2bits_t;
1285 
1286 extern __at(0x0F21) volatile __TXSTA2bits_t TXSTA2bits;
1287 
1288 #define _TXSTA2_TX9D            0x01
1289 #define _TXSTA2_TX9D2           0x01
1290 #define _TXSTA2_TRMT            0x02
1291 #define _TXSTA2_TRMT2           0x02
1292 #define _TXSTA2_BRGH            0x04
1293 #define _TXSTA2_BRGH2           0x04
1294 #define _TXSTA2_SENDB           0x08
1295 #define _TXSTA2_SENDB2          0x08
1296 #define _TXSTA2_SYNC            0x10
1297 #define _TXSTA2_SYNC2           0x10
1298 #define _TXSTA2_TXEN            0x20
1299 #define _TXSTA2_TXEN2           0x20
1300 #define _TXSTA2_TX9             0x40
1301 #define _TXSTA2_TX92            0x40
1302 #define _TXSTA2_CSRC            0x80
1303 #define _TXSTA2_CSRC2           0x80
1304 
1305 //==============================================================================
1306 
1307 
1308 //==============================================================================
1309 //        RCSTA2 Bits
1310 
1311 extern __at(0x0F22) __sfr RCSTA2;
1312 
1313 typedef union
1314   {
1315   struct
1316     {
1317     unsigned RX9D               : 1;
1318     unsigned OERR               : 1;
1319     unsigned FERR               : 1;
1320     unsigned ADDEN              : 1;
1321     unsigned CREN               : 1;
1322     unsigned SREN               : 1;
1323     unsigned RX9                : 1;
1324     unsigned SPEN               : 1;
1325     };
1326 
1327   struct
1328     {
1329     unsigned RX9D2              : 1;
1330     unsigned OERR2              : 1;
1331     unsigned FERR2              : 1;
1332     unsigned ADDEN2             : 1;
1333     unsigned CREN2              : 1;
1334     unsigned SREN2              : 1;
1335     unsigned RX92               : 1;
1336     unsigned SPEN2              : 1;
1337     };
1338   } __RCSTA2bits_t;
1339 
1340 extern __at(0x0F22) volatile __RCSTA2bits_t RCSTA2bits;
1341 
1342 #define _RCSTA2_RX9D            0x01
1343 #define _RCSTA2_RX9D2           0x01
1344 #define _RCSTA2_OERR            0x02
1345 #define _RCSTA2_OERR2           0x02
1346 #define _RCSTA2_FERR            0x04
1347 #define _RCSTA2_FERR2           0x04
1348 #define _RCSTA2_ADDEN           0x08
1349 #define _RCSTA2_ADDEN2          0x08
1350 #define _RCSTA2_CREN            0x10
1351 #define _RCSTA2_CREN2           0x10
1352 #define _RCSTA2_SREN            0x20
1353 #define _RCSTA2_SREN2           0x20
1354 #define _RCSTA2_RX9             0x40
1355 #define _RCSTA2_RX92            0x40
1356 #define _RCSTA2_SPEN            0x80
1357 #define _RCSTA2_SPEN2           0x80
1358 
1359 //==============================================================================
1360 
1361 
1362 //==============================================================================
1363 //        ANCON2 Bits
1364 
1365 extern __at(0x0F23) __sfr ANCON2;
1366 
1367 typedef struct
1368   {
1369   unsigned ANSEL16              : 1;
1370   unsigned ANSEL17              : 1;
1371   unsigned ANSEL18              : 1;
1372   unsigned ANSEL19              : 1;
1373   unsigned                      : 1;
1374   unsigned                      : 1;
1375   unsigned                      : 1;
1376   unsigned                      : 1;
1377   } __ANCON2bits_t;
1378 
1379 extern __at(0x0F23) volatile __ANCON2bits_t ANCON2bits;
1380 
1381 #define _ANSEL16                0x01
1382 #define _ANSEL17                0x02
1383 #define _ANSEL18                0x04
1384 #define _ANSEL19                0x08
1385 
1386 //==============================================================================
1387 
1388 
1389 //==============================================================================
1390 //        ANCON1 Bits
1391 
1392 extern __at(0x0F24) __sfr ANCON1;
1393 
1394 typedef struct
1395   {
1396   unsigned ANSEL8               : 1;
1397   unsigned ANSEL9               : 1;
1398   unsigned ANSEL10              : 1;
1399   unsigned ANSEL11              : 1;
1400   unsigned                      : 1;
1401   unsigned                      : 1;
1402   unsigned                      : 1;
1403   unsigned                      : 1;
1404   } __ANCON1bits_t;
1405 
1406 extern __at(0x0F24) volatile __ANCON1bits_t ANCON1bits;
1407 
1408 #define _ANSEL8                 0x01
1409 #define _ANSEL9                 0x02
1410 #define _ANSEL10                0x04
1411 #define _ANSEL11                0x08
1412 
1413 //==============================================================================
1414 
1415 
1416 //==============================================================================
1417 //        ANCON0 Bits
1418 
1419 extern __at(0x0F25) __sfr ANCON0;
1420 
1421 typedef struct
1422   {
1423   unsigned ANSEL0               : 1;
1424   unsigned ANSEL1               : 1;
1425   unsigned ANSEL2               : 1;
1426   unsigned ANSEL3               : 1;
1427   unsigned ANSEL4               : 1;
1428   unsigned ANSEL5               : 1;
1429   unsigned ANSEL6               : 1;
1430   unsigned ANSEL7               : 1;
1431   } __ANCON0bits_t;
1432 
1433 extern __at(0x0F25) volatile __ANCON0bits_t ANCON0bits;
1434 
1435 #define _ANSEL0                 0x01
1436 #define _ANSEL1                 0x02
1437 #define _ANSEL2                 0x04
1438 #define _ANSEL3                 0x08
1439 #define _ANSEL4                 0x10
1440 #define _ANSEL5                 0x20
1441 #define _ANSEL6                 0x40
1442 #define _ANSEL7                 0x80
1443 
1444 //==============================================================================
1445 
1446 
1447 //==============================================================================
1448 //        ODCON3 Bits
1449 
1450 extern __at(0x0F27) __sfr ODCON3;
1451 
1452 typedef struct
1453   {
1454   unsigned CTMUDS               : 1;
1455   unsigned                      : 1;
1456   unsigned                      : 1;
1457   unsigned                      : 1;
1458   unsigned                      : 1;
1459   unsigned                      : 1;
1460   unsigned U1OD                 : 1;
1461   unsigned U2OD                 : 1;
1462   } __ODCON3bits_t;
1463 
1464 extern __at(0x0F27) volatile __ODCON3bits_t ODCON3bits;
1465 
1466 #define _CTMUDS                 0x01
1467 #define _U1OD                   0x40
1468 #define _U2OD                   0x80
1469 
1470 //==============================================================================
1471 
1472 
1473 //==============================================================================
1474 //        ODCON2 Bits
1475 
1476 extern __at(0x0F28) __sfr ODCON2;
1477 
1478 typedef struct
1479   {
1480   unsigned CCP3OD               : 1;
1481   unsigned CCP4OD               : 1;
1482   unsigned CCP5OD               : 1;
1483   unsigned CCP6OD               : 1;
1484   unsigned CCP7OD               : 1;
1485   unsigned CCP8OD               : 1;
1486   unsigned CCP9OD               : 1;
1487   unsigned CCP10OD              : 1;
1488   } __ODCON2bits_t;
1489 
1490 extern __at(0x0F28) volatile __ODCON2bits_t ODCON2bits;
1491 
1492 #define _CCP3OD                 0x01
1493 #define _CCP4OD                 0x02
1494 #define _CCP5OD                 0x04
1495 #define _CCP6OD                 0x08
1496 #define _CCP7OD                 0x10
1497 #define _CCP8OD                 0x20
1498 #define _CCP9OD                 0x40
1499 #define _CCP10OD                0x80
1500 
1501 //==============================================================================
1502 
1503 
1504 //==============================================================================
1505 //        ODCON1 Bits
1506 
1507 extern __at(0x0F29) __sfr ODCON1;
1508 
1509 typedef struct
1510   {
1511   unsigned SPI2OD               : 1;
1512   unsigned                      : 1;
1513   unsigned                      : 1;
1514   unsigned                      : 1;
1515   unsigned                      : 1;
1516   unsigned CCP1OD               : 1;
1517   unsigned CCP2OD               : 1;
1518   unsigned SPI1OD               : 1;
1519   } __ODCON1bits_t;
1520 
1521 extern __at(0x0F29) volatile __ODCON1bits_t ODCON1bits;
1522 
1523 #define _SPI2OD                 0x01
1524 #define _CCP1OD                 0x20
1525 #define _CCP2OD                 0x40
1526 #define _SPI1OD                 0x80
1527 
1528 //==============================================================================
1529 
1530 
1531 //==============================================================================
1532 //        REFOCON Bits
1533 
1534 extern __at(0x0F2A) __sfr REFOCON;
1535 
1536 typedef union
1537   {
1538   struct
1539     {
1540     unsigned RODIV0             : 1;
1541     unsigned RODIV1             : 1;
1542     unsigned RODIV2             : 1;
1543     unsigned RODIV3             : 1;
1544     unsigned ROSEL              : 1;
1545     unsigned ROSSLP             : 1;
1546     unsigned                    : 1;
1547     unsigned ROON               : 1;
1548     };
1549 
1550   struct
1551     {
1552     unsigned RODIV              : 4;
1553     unsigned                    : 4;
1554     };
1555   } __REFOCONbits_t;
1556 
1557 extern __at(0x0F2A) volatile __REFOCONbits_t REFOCONbits;
1558 
1559 #define _RODIV0                 0x01
1560 #define _RODIV1                 0x02
1561 #define _RODIV2                 0x04
1562 #define _RODIV3                 0x08
1563 #define _ROSEL                  0x10
1564 #define _ROSSLP                 0x20
1565 #define _ROON                   0x80
1566 
1567 //==============================================================================
1568 
1569 
1570 //==============================================================================
1571 //        CCPTMRS2 Bits
1572 
1573 extern __at(0x0F2B) __sfr CCPTMRS2;
1574 
1575 typedef union
1576   {
1577   struct
1578     {
1579     unsigned C8TSEL0            : 1;
1580     unsigned C8TSEL1            : 1;
1581     unsigned C9TSEL0            : 1;
1582     unsigned                    : 1;
1583     unsigned C10TSEL0           : 1;
1584     unsigned                    : 1;
1585     unsigned                    : 1;
1586     unsigned                    : 1;
1587     };
1588 
1589   struct
1590     {
1591     unsigned C8TSEL             : 2;
1592     unsigned                    : 6;
1593     };
1594   } __CCPTMRS2bits_t;
1595 
1596 extern __at(0x0F2B) volatile __CCPTMRS2bits_t CCPTMRS2bits;
1597 
1598 #define _C8TSEL0                0x01
1599 #define _C8TSEL1                0x02
1600 #define _C9TSEL0                0x04
1601 #define _C10TSEL0               0x10
1602 
1603 //==============================================================================
1604 
1605 
1606 //==============================================================================
1607 //        CCPTMRS1 Bits
1608 
1609 extern __at(0x0F2C) __sfr CCPTMRS1;
1610 
1611 typedef union
1612   {
1613   struct
1614     {
1615     unsigned C4TSEL0            : 1;
1616     unsigned C4TSEL1            : 1;
1617     unsigned C5TSEL0            : 1;
1618     unsigned                    : 1;
1619     unsigned C6TSEL0            : 1;
1620     unsigned                    : 1;
1621     unsigned C7TSEL0            : 1;
1622     unsigned C7TSEL1            : 1;
1623     };
1624 
1625   struct
1626     {
1627     unsigned C4TSEL             : 2;
1628     unsigned                    : 6;
1629     };
1630 
1631   struct
1632     {
1633     unsigned                    : 6;
1634     unsigned C7TSEL             : 2;
1635     };
1636   } __CCPTMRS1bits_t;
1637 
1638 extern __at(0x0F2C) volatile __CCPTMRS1bits_t CCPTMRS1bits;
1639 
1640 #define _C4TSEL0                0x01
1641 #define _C4TSEL1                0x02
1642 #define _C5TSEL0                0x04
1643 #define _C6TSEL0                0x10
1644 #define _C7TSEL0                0x40
1645 #define _C7TSEL1                0x80
1646 
1647 //==============================================================================
1648 
1649 
1650 //==============================================================================
1651 //        CCPTMRS0 Bits
1652 
1653 extern __at(0x0F2D) __sfr CCPTMRS0;
1654 
1655 typedef union
1656   {
1657   struct
1658     {
1659     unsigned C1TSEL0            : 1;
1660     unsigned C1TSEL1            : 1;
1661     unsigned C1TSEL2            : 1;
1662     unsigned C2TSEL0            : 1;
1663     unsigned C2TSEL1            : 1;
1664     unsigned C2TSEL2            : 1;
1665     unsigned C3TSEL0            : 1;
1666     unsigned C3TSEL1            : 1;
1667     };
1668 
1669   struct
1670     {
1671     unsigned C1TSEL             : 3;
1672     unsigned                    : 5;
1673     };
1674 
1675   struct
1676     {
1677     unsigned                    : 3;
1678     unsigned C2TSEL             : 3;
1679     unsigned                    : 2;
1680     };
1681 
1682   struct
1683     {
1684     unsigned                    : 6;
1685     unsigned C3TSEL             : 2;
1686     };
1687   } __CCPTMRS0bits_t;
1688 
1689 extern __at(0x0F2D) volatile __CCPTMRS0bits_t CCPTMRS0bits;
1690 
1691 #define _C1TSEL0                0x01
1692 #define _C1TSEL1                0x02
1693 #define _C1TSEL2                0x04
1694 #define _C2TSEL0                0x08
1695 #define _C2TSEL1                0x10
1696 #define _C2TSEL2                0x20
1697 #define _C3TSEL0                0x40
1698 #define _C3TSEL1                0x80
1699 
1700 //==============================================================================
1701 
1702 
1703 //==============================================================================
1704 //        CM3CON Bits
1705 
1706 extern __at(0x0F2E) __sfr CM3CON;
1707 
1708 typedef union
1709   {
1710   struct
1711     {
1712     unsigned CCH0               : 1;
1713     unsigned CCH1               : 1;
1714     unsigned CREF               : 1;
1715     unsigned EVPOL0             : 1;
1716     unsigned EVPOL1             : 1;
1717     unsigned CPOL               : 1;
1718     unsigned COE                : 1;
1719     unsigned CON                : 1;
1720     };
1721 
1722   struct
1723     {
1724     unsigned CCH                : 2;
1725     unsigned                    : 6;
1726     };
1727 
1728   struct
1729     {
1730     unsigned                    : 3;
1731     unsigned EVPOL              : 2;
1732     unsigned                    : 3;
1733     };
1734   } __CM3CONbits_t;
1735 
1736 extern __at(0x0F2E) volatile __CM3CONbits_t CM3CONbits;
1737 
1738 #define _CM3CON_CCH0            0x01
1739 #define _CM3CON_CCH1            0x02
1740 #define _CM3CON_CREF            0x04
1741 #define _CM3CON_EVPOL0          0x08
1742 #define _CM3CON_EVPOL1          0x10
1743 #define _CM3CON_CPOL            0x20
1744 #define _CM3CON_COE             0x40
1745 #define _CM3CON_CON             0x80
1746 
1747 //==============================================================================
1748 
1749 
1750 //==============================================================================
1751 //        CM3CON1 Bits
1752 
1753 extern __at(0x0F2E) __sfr CM3CON1;
1754 
1755 typedef union
1756   {
1757   struct
1758     {
1759     unsigned CCH0               : 1;
1760     unsigned CCH1               : 1;
1761     unsigned CREF               : 1;
1762     unsigned EVPOL0             : 1;
1763     unsigned EVPOL1             : 1;
1764     unsigned CPOL               : 1;
1765     unsigned COE                : 1;
1766     unsigned CON                : 1;
1767     };
1768 
1769   struct
1770     {
1771     unsigned CCH                : 2;
1772     unsigned                    : 6;
1773     };
1774 
1775   struct
1776     {
1777     unsigned                    : 3;
1778     unsigned EVPOL              : 2;
1779     unsigned                    : 3;
1780     };
1781   } __CM3CON1bits_t;
1782 
1783 extern __at(0x0F2E) volatile __CM3CON1bits_t CM3CON1bits;
1784 
1785 #define _CM3CON1_CCH0           0x01
1786 #define _CM3CON1_CCH1           0x02
1787 #define _CM3CON1_CREF           0x04
1788 #define _CM3CON1_EVPOL0         0x08
1789 #define _CM3CON1_EVPOL1         0x10
1790 #define _CM3CON1_CPOL           0x20
1791 #define _CM3CON1_COE            0x40
1792 #define _CM3CON1_CON            0x80
1793 
1794 //==============================================================================
1795 
1796 
1797 //==============================================================================
1798 //        CM2CON Bits
1799 
1800 extern __at(0x0F2F) __sfr CM2CON;
1801 
1802 typedef union
1803   {
1804   struct
1805     {
1806     unsigned CCH0               : 1;
1807     unsigned CCH1               : 1;
1808     unsigned CREF               : 1;
1809     unsigned EVPOL0             : 1;
1810     unsigned EVPOL1             : 1;
1811     unsigned CPOL               : 1;
1812     unsigned COE                : 1;
1813     unsigned CON                : 1;
1814     };
1815 
1816   struct
1817     {
1818     unsigned CCH                : 2;
1819     unsigned                    : 6;
1820     };
1821 
1822   struct
1823     {
1824     unsigned                    : 3;
1825     unsigned EVPOL              : 2;
1826     unsigned                    : 3;
1827     };
1828   } __CM2CONbits_t;
1829 
1830 extern __at(0x0F2F) volatile __CM2CONbits_t CM2CONbits;
1831 
1832 #define _CM2CON_CCH0            0x01
1833 #define _CM2CON_CCH1            0x02
1834 #define _CM2CON_CREF            0x04
1835 #define _CM2CON_EVPOL0          0x08
1836 #define _CM2CON_EVPOL1          0x10
1837 #define _CM2CON_CPOL            0x20
1838 #define _CM2CON_COE             0x40
1839 #define _CM2CON_CON             0x80
1840 
1841 //==============================================================================
1842 
1843 
1844 //==============================================================================
1845 //        CM2CON1 Bits
1846 
1847 extern __at(0x0F2F) __sfr CM2CON1;
1848 
1849 typedef union
1850   {
1851   struct
1852     {
1853     unsigned CCH0               : 1;
1854     unsigned CCH1               : 1;
1855     unsigned CREF               : 1;
1856     unsigned EVPOL0             : 1;
1857     unsigned EVPOL1             : 1;
1858     unsigned CPOL               : 1;
1859     unsigned COE                : 1;
1860     unsigned CON                : 1;
1861     };
1862 
1863   struct
1864     {
1865     unsigned CCH                : 2;
1866     unsigned                    : 6;
1867     };
1868 
1869   struct
1870     {
1871     unsigned                    : 3;
1872     unsigned EVPOL              : 2;
1873     unsigned                    : 3;
1874     };
1875   } __CM2CON1bits_t;
1876 
1877 extern __at(0x0F2F) volatile __CM2CON1bits_t CM2CON1bits;
1878 
1879 #define _CM2CON1_CCH0           0x01
1880 #define _CM2CON1_CCH1           0x02
1881 #define _CM2CON1_CREF           0x04
1882 #define _CM2CON1_EVPOL0         0x08
1883 #define _CM2CON1_EVPOL1         0x10
1884 #define _CM2CON1_CPOL           0x20
1885 #define _CM2CON1_COE            0x40
1886 #define _CM2CON1_CON            0x80
1887 
1888 //==============================================================================
1889 
1890 
1891 //==============================================================================
1892 //        T12CON Bits
1893 
1894 extern __at(0x0F30) __sfr T12CON;
1895 
1896 typedef union
1897   {
1898   struct
1899     {
1900     unsigned T12CKPS0           : 1;
1901     unsigned T12CKPS1           : 1;
1902     unsigned TMR12ON            : 1;
1903     unsigned T12OUTPS0          : 1;
1904     unsigned T12OUTPS1          : 1;
1905     unsigned T12OUTPS2          : 1;
1906     unsigned T12OUTPS3          : 1;
1907     unsigned                    : 1;
1908     };
1909 
1910   struct
1911     {
1912     unsigned T12CKPS            : 2;
1913     unsigned                    : 6;
1914     };
1915 
1916   struct
1917     {
1918     unsigned                    : 3;
1919     unsigned T12OUTPS           : 4;
1920     unsigned                    : 1;
1921     };
1922   } __T12CONbits_t;
1923 
1924 extern __at(0x0F30) volatile __T12CONbits_t T12CONbits;
1925 
1926 #define _T12CKPS0               0x01
1927 #define _T12CKPS1               0x02
1928 #define _TMR12ON                0x04
1929 #define _T12OUTPS0              0x08
1930 #define _T12OUTPS1              0x10
1931 #define _T12OUTPS2              0x20
1932 #define _T12OUTPS3              0x40
1933 
1934 //==============================================================================
1935 
1936 extern __at(0x0F31) __sfr PR12;
1937 extern __at(0x0F32) __sfr TMR12;
1938 
1939 //==============================================================================
1940 //        T10CON Bits
1941 
1942 extern __at(0x0F33) __sfr T10CON;
1943 
1944 typedef union
1945   {
1946   struct
1947     {
1948     unsigned T10CKPS0           : 1;
1949     unsigned T10CKPS1           : 1;
1950     unsigned TMR10ON            : 1;
1951     unsigned T10OUTPS0          : 1;
1952     unsigned T10OUTPS1          : 1;
1953     unsigned T10OUTPS2          : 1;
1954     unsigned T10OUTPS3          : 1;
1955     unsigned                    : 1;
1956     };
1957 
1958   struct
1959     {
1960     unsigned T10CKPS            : 2;
1961     unsigned                    : 6;
1962     };
1963 
1964   struct
1965     {
1966     unsigned                    : 3;
1967     unsigned T10OUTPS           : 4;
1968     unsigned                    : 1;
1969     };
1970   } __T10CONbits_t;
1971 
1972 extern __at(0x0F33) volatile __T10CONbits_t T10CONbits;
1973 
1974 #define _T10CKPS0               0x01
1975 #define _T10CKPS1               0x02
1976 #define _TMR10ON                0x04
1977 #define _T10OUTPS0              0x08
1978 #define _T10OUTPS1              0x10
1979 #define _T10OUTPS2              0x20
1980 #define _T10OUTPS3              0x40
1981 
1982 //==============================================================================
1983 
1984 extern __at(0x0F34) __sfr PR10;
1985 extern __at(0x0F35) __sfr TMR10;
1986 
1987 //==============================================================================
1988 //        T8CON Bits
1989 
1990 extern __at(0x0F36) __sfr T8CON;
1991 
1992 typedef union
1993   {
1994   struct
1995     {
1996     unsigned T8CKPS0            : 1;
1997     unsigned T8CKPS1            : 1;
1998     unsigned TMR8ON             : 1;
1999     unsigned T8OUTPS0           : 1;
2000     unsigned T8OUTPS1           : 1;
2001     unsigned T8OUTPS2           : 1;
2002     unsigned T8OUTPS3           : 1;
2003     unsigned                    : 1;
2004     };
2005 
2006   struct
2007     {
2008     unsigned T8CKPS             : 2;
2009     unsigned                    : 6;
2010     };
2011 
2012   struct
2013     {
2014     unsigned                    : 3;
2015     unsigned T8OUTPS            : 4;
2016     unsigned                    : 1;
2017     };
2018   } __T8CONbits_t;
2019 
2020 extern __at(0x0F36) volatile __T8CONbits_t T8CONbits;
2021 
2022 #define _T8CKPS0                0x01
2023 #define _T8CKPS1                0x02
2024 #define _TMR8ON                 0x04
2025 #define _T8OUTPS0               0x08
2026 #define _T8OUTPS1               0x10
2027 #define _T8OUTPS2               0x20
2028 #define _T8OUTPS3               0x40
2029 
2030 //==============================================================================
2031 
2032 extern __at(0x0F37) __sfr PR8;
2033 extern __at(0x0F38) __sfr TMR8;
2034 
2035 //==============================================================================
2036 //        T6CON Bits
2037 
2038 extern __at(0x0F39) __sfr T6CON;
2039 
2040 typedef union
2041   {
2042   struct
2043     {
2044     unsigned T6CKPS0            : 1;
2045     unsigned T6CKPS1            : 1;
2046     unsigned TMR6ON             : 1;
2047     unsigned T6OUTPS0           : 1;
2048     unsigned T6OUTPS1           : 1;
2049     unsigned T6OUTPS2           : 1;
2050     unsigned T6OUTPS3           : 1;
2051     unsigned                    : 1;
2052     };
2053 
2054   struct
2055     {
2056     unsigned T6CKPS             : 2;
2057     unsigned                    : 6;
2058     };
2059 
2060   struct
2061     {
2062     unsigned                    : 3;
2063     unsigned T6OUTPS            : 4;
2064     unsigned                    : 1;
2065     };
2066   } __T6CONbits_t;
2067 
2068 extern __at(0x0F39) volatile __T6CONbits_t T6CONbits;
2069 
2070 #define _T6CKPS0                0x01
2071 #define _T6CKPS1                0x02
2072 #define _TMR6ON                 0x04
2073 #define _T6OUTPS0               0x08
2074 #define _T6OUTPS1               0x10
2075 #define _T6OUTPS2               0x20
2076 #define _T6OUTPS3               0x40
2077 
2078 //==============================================================================
2079 
2080 extern __at(0x0F3A) __sfr PR6;
2081 extern __at(0x0F3B) __sfr TMR6;
2082 
2083 //==============================================================================
2084 //        T7GCON Bits
2085 
2086 extern __at(0x0F3C) __sfr T7GCON;
2087 
2088 typedef union
2089   {
2090   struct
2091     {
2092     unsigned T7GSS0             : 1;
2093     unsigned T7GSS1             : 1;
2094     unsigned T7GVAL             : 1;
2095     unsigned T7GGO_NOT_T7DONE   : 1;
2096     unsigned T7GSPM             : 1;
2097     unsigned T7GTM              : 1;
2098     unsigned T7GPOL             : 1;
2099     unsigned TMR7GE             : 1;
2100     };
2101 
2102   struct
2103     {
2104     unsigned                    : 1;
2105     unsigned                    : 1;
2106     unsigned                    : 1;
2107     unsigned T7GGO              : 1;
2108     unsigned                    : 1;
2109     unsigned                    : 1;
2110     unsigned                    : 1;
2111     unsigned                    : 1;
2112     };
2113 
2114   struct
2115     {
2116     unsigned                    : 1;
2117     unsigned                    : 1;
2118     unsigned                    : 1;
2119     unsigned NOT_T7DONE         : 1;
2120     unsigned                    : 1;
2121     unsigned                    : 1;
2122     unsigned                    : 1;
2123     unsigned                    : 1;
2124     };
2125 
2126   struct
2127     {
2128     unsigned T7GSS              : 2;
2129     unsigned                    : 6;
2130     };
2131   } __T7GCONbits_t;
2132 
2133 extern __at(0x0F3C) volatile __T7GCONbits_t T7GCONbits;
2134 
2135 #define _T7GSS0                 0x01
2136 #define _T7GSS1                 0x02
2137 #define _T7GVAL                 0x04
2138 #define _T7GGO_NOT_T7DONE       0x08
2139 #define _T7GGO                  0x08
2140 #define _NOT_T7DONE             0x08
2141 #define _T7GSPM                 0x10
2142 #define _T7GTM                  0x20
2143 #define _T7GPOL                 0x40
2144 #define _TMR7GE                 0x80
2145 
2146 //==============================================================================
2147 
2148 
2149 //==============================================================================
2150 //        T7CON Bits
2151 
2152 extern __at(0x0F3D) __sfr T7CON;
2153 
2154 typedef union
2155   {
2156   struct
2157     {
2158     unsigned TMR7ON             : 1;
2159     unsigned RD16               : 1;
2160     unsigned NOT_T7SYNC         : 1;
2161     unsigned SOSCEN             : 1;
2162     unsigned T7CKPS0            : 1;
2163     unsigned T7CKPS1            : 1;
2164     unsigned TMR7CS0            : 1;
2165     unsigned TMR7CS1            : 1;
2166     };
2167 
2168   struct
2169     {
2170     unsigned                    : 4;
2171     unsigned T7CKPS             : 2;
2172     unsigned                    : 2;
2173     };
2174 
2175   struct
2176     {
2177     unsigned                    : 6;
2178     unsigned TMR7CS             : 2;
2179     };
2180   } __T7CONbits_t;
2181 
2182 extern __at(0x0F3D) volatile __T7CONbits_t T7CONbits;
2183 
2184 #define _T7CON_TMR7ON           0x01
2185 #define _T7CON_RD16             0x02
2186 #define _T7CON_NOT_T7SYNC       0x04
2187 #define _T7CON_SOSCEN           0x08
2188 #define _T7CON_T7CKPS0          0x10
2189 #define _T7CON_T7CKPS1          0x20
2190 #define _T7CON_TMR7CS0          0x40
2191 #define _T7CON_TMR7CS1          0x80
2192 
2193 //==============================================================================
2194 
2195 extern __at(0x0F3E) __sfr TMR7;
2196 extern __at(0x0F3E) __sfr TMR7L;
2197 extern __at(0x0F3F) __sfr TMR7H;
2198 
2199 //==============================================================================
2200 //        CCP10CON Bits
2201 
2202 extern __at(0x0F40) __sfr CCP10CON;
2203 
2204 typedef union
2205   {
2206   struct
2207     {
2208     unsigned CCP10M0            : 1;
2209     unsigned CCP10M1            : 1;
2210     unsigned CCP10M2            : 1;
2211     unsigned CCP10M3            : 1;
2212     unsigned DC10B0             : 1;
2213     unsigned DC10B1             : 1;
2214     unsigned                    : 1;
2215     unsigned                    : 1;
2216     };
2217 
2218   struct
2219     {
2220     unsigned                    : 1;
2221     unsigned                    : 1;
2222     unsigned                    : 1;
2223     unsigned                    : 1;
2224     unsigned CCP10Y             : 1;
2225     unsigned CCP10X             : 1;
2226     unsigned                    : 1;
2227     unsigned                    : 1;
2228     };
2229 
2230   struct
2231     {
2232     unsigned CCP10M             : 4;
2233     unsigned                    : 4;
2234     };
2235 
2236   struct
2237     {
2238     unsigned                    : 4;
2239     unsigned DC10B              : 2;
2240     unsigned                    : 2;
2241     };
2242   } __CCP10CONbits_t;
2243 
2244 extern __at(0x0F40) volatile __CCP10CONbits_t CCP10CONbits;
2245 
2246 #define _CCP10M0                0x01
2247 #define _CCP10M1                0x02
2248 #define _CCP10M2                0x04
2249 #define _CCP10M3                0x08
2250 #define _DC10B0                 0x10
2251 #define _CCP10Y                 0x10
2252 #define _DC10B1                 0x20
2253 #define _CCP10X                 0x20
2254 
2255 //==============================================================================
2256 
2257 extern __at(0x0F41) __sfr CCPR10;
2258 extern __at(0x0F41) __sfr CCPR10L;
2259 extern __at(0x0F42) __sfr CCPR10H;
2260 
2261 //==============================================================================
2262 //        CCP9CON Bits
2263 
2264 extern __at(0x0F43) __sfr CCP9CON;
2265 
2266 typedef union
2267   {
2268   struct
2269     {
2270     unsigned CCP9M0             : 1;
2271     unsigned CCP9M1             : 1;
2272     unsigned CCP9M2             : 1;
2273     unsigned CCP9M3             : 1;
2274     unsigned DC9B0              : 1;
2275     unsigned DC9B1              : 1;
2276     unsigned                    : 1;
2277     unsigned                    : 1;
2278     };
2279 
2280   struct
2281     {
2282     unsigned                    : 1;
2283     unsigned                    : 1;
2284     unsigned                    : 1;
2285     unsigned                    : 1;
2286     unsigned CCP9Y              : 1;
2287     unsigned CCP9X              : 1;
2288     unsigned                    : 1;
2289     unsigned                    : 1;
2290     };
2291 
2292   struct
2293     {
2294     unsigned CCP9M              : 4;
2295     unsigned                    : 4;
2296     };
2297 
2298   struct
2299     {
2300     unsigned                    : 4;
2301     unsigned DC9B               : 2;
2302     unsigned                    : 2;
2303     };
2304   } __CCP9CONbits_t;
2305 
2306 extern __at(0x0F43) volatile __CCP9CONbits_t CCP9CONbits;
2307 
2308 #define _CCP9M0                 0x01
2309 #define _CCP9M1                 0x02
2310 #define _CCP9M2                 0x04
2311 #define _CCP9M3                 0x08
2312 #define _DC9B0                  0x10
2313 #define _CCP9Y                  0x10
2314 #define _DC9B1                  0x20
2315 #define _CCP9X                  0x20
2316 
2317 //==============================================================================
2318 
2319 extern __at(0x0F44) __sfr CCPR9;
2320 extern __at(0x0F44) __sfr CCPR9L;
2321 extern __at(0x0F45) __sfr CCPR9H;
2322 
2323 //==============================================================================
2324 //        CCP8CON Bits
2325 
2326 extern __at(0x0F46) __sfr CCP8CON;
2327 
2328 typedef union
2329   {
2330   struct
2331     {
2332     unsigned CCP8M0             : 1;
2333     unsigned CCP8M1             : 1;
2334     unsigned CCP8M2             : 1;
2335     unsigned CCP8M3             : 1;
2336     unsigned DC8B0              : 1;
2337     unsigned DC8B1              : 1;
2338     unsigned                    : 1;
2339     unsigned                    : 1;
2340     };
2341 
2342   struct
2343     {
2344     unsigned                    : 1;
2345     unsigned                    : 1;
2346     unsigned                    : 1;
2347     unsigned                    : 1;
2348     unsigned CCP8Y              : 1;
2349     unsigned CCP8X              : 1;
2350     unsigned                    : 1;
2351     unsigned                    : 1;
2352     };
2353 
2354   struct
2355     {
2356     unsigned CCP8M              : 4;
2357     unsigned                    : 4;
2358     };
2359 
2360   struct
2361     {
2362     unsigned                    : 4;
2363     unsigned DC8B               : 2;
2364     unsigned                    : 2;
2365     };
2366   } __CCP8CONbits_t;
2367 
2368 extern __at(0x0F46) volatile __CCP8CONbits_t CCP8CONbits;
2369 
2370 #define _CCP8M0                 0x01
2371 #define _CCP8M1                 0x02
2372 #define _CCP8M2                 0x04
2373 #define _CCP8M3                 0x08
2374 #define _DC8B0                  0x10
2375 #define _CCP8Y                  0x10
2376 #define _DC8B1                  0x20
2377 #define _CCP8X                  0x20
2378 
2379 //==============================================================================
2380 
2381 extern __at(0x0F47) __sfr CCPR8;
2382 extern __at(0x0F47) __sfr CCPR8L;
2383 extern __at(0x0F48) __sfr CCPR8H;
2384 
2385 //==============================================================================
2386 //        CCP3CON Bits
2387 
2388 extern __at(0x0F49) __sfr CCP3CON;
2389 
2390 typedef union
2391   {
2392   struct
2393     {
2394     unsigned CCP3M0             : 1;
2395     unsigned CCP3M1             : 1;
2396     unsigned CCP3M2             : 1;
2397     unsigned CCP3M3             : 1;
2398     unsigned DC3B0              : 1;
2399     unsigned DC3B1              : 1;
2400     unsigned P3M0               : 1;
2401     unsigned P3M1               : 1;
2402     };
2403 
2404   struct
2405     {
2406     unsigned                    : 1;
2407     unsigned                    : 1;
2408     unsigned                    : 1;
2409     unsigned                    : 1;
2410     unsigned CCP3Y              : 1;
2411     unsigned CCP3X              : 1;
2412     unsigned                    : 1;
2413     unsigned                    : 1;
2414     };
2415 
2416   struct
2417     {
2418     unsigned CCP3M              : 4;
2419     unsigned                    : 4;
2420     };
2421 
2422   struct
2423     {
2424     unsigned                    : 4;
2425     unsigned DC3B               : 2;
2426     unsigned                    : 2;
2427     };
2428 
2429   struct
2430     {
2431     unsigned                    : 6;
2432     unsigned P3M                : 2;
2433     };
2434   } __CCP3CONbits_t;
2435 
2436 extern __at(0x0F49) volatile __CCP3CONbits_t CCP3CONbits;
2437 
2438 #define _CCP3M0                 0x01
2439 #define _CCP3M1                 0x02
2440 #define _CCP3M2                 0x04
2441 #define _CCP3M3                 0x08
2442 #define _DC3B0                  0x10
2443 #define _CCP3Y                  0x10
2444 #define _DC3B1                  0x20
2445 #define _CCP3X                  0x20
2446 #define _P3M0                   0x40
2447 #define _P3M1                   0x80
2448 
2449 //==============================================================================
2450 
2451 extern __at(0x0F4A) __sfr CCPR3;
2452 extern __at(0x0F4A) __sfr CCPR3L;
2453 extern __at(0x0F4B) __sfr CCPR3H;
2454 
2455 //==============================================================================
2456 //        ECCP3DEL Bits
2457 
2458 extern __at(0x0F4C) __sfr ECCP3DEL;
2459 
2460 typedef union
2461   {
2462   struct
2463     {
2464     unsigned P3DC0              : 1;
2465     unsigned P3DC1              : 1;
2466     unsigned P3DC2              : 1;
2467     unsigned P3DC3              : 1;
2468     unsigned P3DC4              : 1;
2469     unsigned P3DC5              : 1;
2470     unsigned P3DC6              : 1;
2471     unsigned P3RSEN             : 1;
2472     };
2473 
2474   struct
2475     {
2476     unsigned P3DC               : 7;
2477     unsigned                    : 1;
2478     };
2479   } __ECCP3DELbits_t;
2480 
2481 extern __at(0x0F4C) volatile __ECCP3DELbits_t ECCP3DELbits;
2482 
2483 #define _P3DC0                  0x01
2484 #define _P3DC1                  0x02
2485 #define _P3DC2                  0x04
2486 #define _P3DC3                  0x08
2487 #define _P3DC4                  0x10
2488 #define _P3DC5                  0x20
2489 #define _P3DC6                  0x40
2490 #define _P3RSEN                 0x80
2491 
2492 //==============================================================================
2493 
2494 
2495 //==============================================================================
2496 //        PWM3CON Bits
2497 
2498 extern __at(0x0F4C) __sfr PWM3CON;
2499 
2500 typedef union
2501   {
2502   struct
2503     {
2504     unsigned P3DC0              : 1;
2505     unsigned P3DC1              : 1;
2506     unsigned P3DC2              : 1;
2507     unsigned P3DC3              : 1;
2508     unsigned P3DC4              : 1;
2509     unsigned P3DC5              : 1;
2510     unsigned P3DC6              : 1;
2511     unsigned P3RSEN             : 1;
2512     };
2513 
2514   struct
2515     {
2516     unsigned P3DC               : 7;
2517     unsigned                    : 1;
2518     };
2519   } __PWM3CONbits_t;
2520 
2521 extern __at(0x0F4C) volatile __PWM3CONbits_t PWM3CONbits;
2522 
2523 #define _PWM3CON_P3DC0          0x01
2524 #define _PWM3CON_P3DC1          0x02
2525 #define _PWM3CON_P3DC2          0x04
2526 #define _PWM3CON_P3DC3          0x08
2527 #define _PWM3CON_P3DC4          0x10
2528 #define _PWM3CON_P3DC5          0x20
2529 #define _PWM3CON_P3DC6          0x40
2530 #define _PWM3CON_P3RSEN         0x80
2531 
2532 //==============================================================================
2533 
2534 
2535 //==============================================================================
2536 //        ECCP3AS Bits
2537 
2538 extern __at(0x0F4D) __sfr ECCP3AS;
2539 
2540 typedef union
2541   {
2542   struct
2543     {
2544     unsigned PSS3BD0            : 1;
2545     unsigned PSS3BD1            : 1;
2546     unsigned PSS3AC0            : 1;
2547     unsigned PSS3AC1            : 1;
2548     unsigned ECCP3AS0           : 1;
2549     unsigned ECCP3AS1           : 1;
2550     unsigned ECCP3AS2           : 1;
2551     unsigned ECCP3ASE           : 1;
2552     };
2553 
2554   struct
2555     {
2556     unsigned PSS3BD             : 2;
2557     unsigned                    : 6;
2558     };
2559 
2560   struct
2561     {
2562     unsigned                    : 2;
2563     unsigned PSS3AC             : 2;
2564     unsigned                    : 4;
2565     };
2566 
2567   struct
2568     {
2569     unsigned                    : 4;
2570     unsigned ECCP3AS            : 3;
2571     unsigned                    : 1;
2572     };
2573   } __ECCP3ASbits_t;
2574 
2575 extern __at(0x0F4D) volatile __ECCP3ASbits_t ECCP3ASbits;
2576 
2577 #define _PSS3BD0                0x01
2578 #define _PSS3BD1                0x02
2579 #define _PSS3AC0                0x04
2580 #define _PSS3AC1                0x08
2581 #define _ECCP3AS0               0x10
2582 #define _ECCP3AS1               0x20
2583 #define _ECCP3AS2               0x40
2584 #define _ECCP3ASE               0x80
2585 
2586 //==============================================================================
2587 
2588 
2589 //==============================================================================
2590 //        CCP2CON Bits
2591 
2592 extern __at(0x0F4E) __sfr CCP2CON;
2593 
2594 typedef union
2595   {
2596   struct
2597     {
2598     unsigned CCP2M0             : 1;
2599     unsigned CCP2M1             : 1;
2600     unsigned CCP2M2             : 1;
2601     unsigned CCP2M3             : 1;
2602     unsigned DC2B0              : 1;
2603     unsigned DC2B1              : 1;
2604     unsigned P2M0               : 1;
2605     unsigned P2M1               : 1;
2606     };
2607 
2608   struct
2609     {
2610     unsigned                    : 1;
2611     unsigned                    : 1;
2612     unsigned                    : 1;
2613     unsigned                    : 1;
2614     unsigned CCP2Y              : 1;
2615     unsigned CCP2X              : 1;
2616     unsigned                    : 1;
2617     unsigned                    : 1;
2618     };
2619 
2620   struct
2621     {
2622     unsigned CCP2M              : 4;
2623     unsigned                    : 4;
2624     };
2625 
2626   struct
2627     {
2628     unsigned                    : 4;
2629     unsigned DC2B               : 2;
2630     unsigned                    : 2;
2631     };
2632 
2633   struct
2634     {
2635     unsigned                    : 6;
2636     unsigned P2M                : 2;
2637     };
2638   } __CCP2CONbits_t;
2639 
2640 extern __at(0x0F4E) volatile __CCP2CONbits_t CCP2CONbits;
2641 
2642 #define _CCP2M0                 0x01
2643 #define _CCP2M1                 0x02
2644 #define _CCP2M2                 0x04
2645 #define _CCP2M3                 0x08
2646 #define _DC2B0                  0x10
2647 #define _CCP2Y                  0x10
2648 #define _DC2B1                  0x20
2649 #define _CCP2X                  0x20
2650 #define _P2M0                   0x40
2651 #define _P2M1                   0x80
2652 
2653 //==============================================================================
2654 
2655 
2656 //==============================================================================
2657 //        ECCP2CON Bits
2658 
2659 extern __at(0x0F4E) __sfr ECCP2CON;
2660 
2661 typedef union
2662   {
2663   struct
2664     {
2665     unsigned CCP2M0             : 1;
2666     unsigned CCP2M1             : 1;
2667     unsigned CCP2M2             : 1;
2668     unsigned CCP2M3             : 1;
2669     unsigned DC2B0              : 1;
2670     unsigned DC2B1              : 1;
2671     unsigned P2M0               : 1;
2672     unsigned P2M1               : 1;
2673     };
2674 
2675   struct
2676     {
2677     unsigned                    : 1;
2678     unsigned                    : 1;
2679     unsigned                    : 1;
2680     unsigned                    : 1;
2681     unsigned CCP2Y              : 1;
2682     unsigned CCP2X              : 1;
2683     unsigned                    : 1;
2684     unsigned                    : 1;
2685     };
2686 
2687   struct
2688     {
2689     unsigned CCP2M              : 4;
2690     unsigned                    : 4;
2691     };
2692 
2693   struct
2694     {
2695     unsigned                    : 4;
2696     unsigned DC2B               : 2;
2697     unsigned                    : 2;
2698     };
2699 
2700   struct
2701     {
2702     unsigned                    : 6;
2703     unsigned P2M                : 2;
2704     };
2705   } __ECCP2CONbits_t;
2706 
2707 extern __at(0x0F4E) volatile __ECCP2CONbits_t ECCP2CONbits;
2708 
2709 #define _ECCP2CON_CCP2M0        0x01
2710 #define _ECCP2CON_CCP2M1        0x02
2711 #define _ECCP2CON_CCP2M2        0x04
2712 #define _ECCP2CON_CCP2M3        0x08
2713 #define _ECCP2CON_DC2B0         0x10
2714 #define _ECCP2CON_CCP2Y         0x10
2715 #define _ECCP2CON_DC2B1         0x20
2716 #define _ECCP2CON_CCP2X         0x20
2717 #define _ECCP2CON_P2M0          0x40
2718 #define _ECCP2CON_P2M1          0x80
2719 
2720 //==============================================================================
2721 
2722 extern __at(0x0F4F) __sfr CCPR2;
2723 extern __at(0x0F4F) __sfr CCPR2L;
2724 extern __at(0x0F50) __sfr CCPR2H;
2725 
2726 //==============================================================================
2727 //        ECCP2DEL Bits
2728 
2729 extern __at(0x0F51) __sfr ECCP2DEL;
2730 
2731 typedef union
2732   {
2733   struct
2734     {
2735     unsigned P2DC0              : 1;
2736     unsigned P2DC1              : 1;
2737     unsigned P2DC2              : 1;
2738     unsigned P2DC3              : 1;
2739     unsigned P2DC4              : 1;
2740     unsigned P2DC5              : 1;
2741     unsigned P2DC6              : 1;
2742     unsigned P2RSEN             : 1;
2743     };
2744 
2745   struct
2746     {
2747     unsigned P2DC               : 7;
2748     unsigned                    : 1;
2749     };
2750   } __ECCP2DELbits_t;
2751 
2752 extern __at(0x0F51) volatile __ECCP2DELbits_t ECCP2DELbits;
2753 
2754 #define _P2DC0                  0x01
2755 #define _P2DC1                  0x02
2756 #define _P2DC2                  0x04
2757 #define _P2DC3                  0x08
2758 #define _P2DC4                  0x10
2759 #define _P2DC5                  0x20
2760 #define _P2DC6                  0x40
2761 #define _P2RSEN                 0x80
2762 
2763 //==============================================================================
2764 
2765 
2766 //==============================================================================
2767 //        PWM2CON Bits
2768 
2769 extern __at(0x0F51) __sfr PWM2CON;
2770 
2771 typedef union
2772   {
2773   struct
2774     {
2775     unsigned P2DC0              : 1;
2776     unsigned P2DC1              : 1;
2777     unsigned P2DC2              : 1;
2778     unsigned P2DC3              : 1;
2779     unsigned P2DC4              : 1;
2780     unsigned P2DC5              : 1;
2781     unsigned P2DC6              : 1;
2782     unsigned P2RSEN             : 1;
2783     };
2784 
2785   struct
2786     {
2787     unsigned P2DC               : 7;
2788     unsigned                    : 1;
2789     };
2790   } __PWM2CONbits_t;
2791 
2792 extern __at(0x0F51) volatile __PWM2CONbits_t PWM2CONbits;
2793 
2794 #define _PWM2CON_P2DC0          0x01
2795 #define _PWM2CON_P2DC1          0x02
2796 #define _PWM2CON_P2DC2          0x04
2797 #define _PWM2CON_P2DC3          0x08
2798 #define _PWM2CON_P2DC4          0x10
2799 #define _PWM2CON_P2DC5          0x20
2800 #define _PWM2CON_P2DC6          0x40
2801 #define _PWM2CON_P2RSEN         0x80
2802 
2803 //==============================================================================
2804 
2805 
2806 //==============================================================================
2807 //        ECCP2AS Bits
2808 
2809 extern __at(0x0F52) __sfr ECCP2AS;
2810 
2811 typedef union
2812   {
2813   struct
2814     {
2815     unsigned PSS2BD0            : 1;
2816     unsigned PSS2BD1            : 1;
2817     unsigned PSS2AC0            : 1;
2818     unsigned PSS2AC1            : 1;
2819     unsigned ECCP2AS0           : 1;
2820     unsigned ECCP2AS1           : 1;
2821     unsigned ECCP2AS2           : 1;
2822     unsigned ECCP2ASE           : 1;
2823     };
2824 
2825   struct
2826     {
2827     unsigned PSS2BD             : 2;
2828     unsigned                    : 6;
2829     };
2830 
2831   struct
2832     {
2833     unsigned                    : 2;
2834     unsigned PSS2AC             : 2;
2835     unsigned                    : 4;
2836     };
2837 
2838   struct
2839     {
2840     unsigned                    : 4;
2841     unsigned ECCP2AS            : 3;
2842     unsigned                    : 1;
2843     };
2844   } __ECCP2ASbits_t;
2845 
2846 extern __at(0x0F52) volatile __ECCP2ASbits_t ECCP2ASbits;
2847 
2848 #define _PSS2BD0                0x01
2849 #define _PSS2BD1                0x02
2850 #define _PSS2AC0                0x04
2851 #define _PSS2AC1                0x08
2852 #define _ECCP2AS0               0x10
2853 #define _ECCP2AS1               0x20
2854 #define _ECCP2AS2               0x40
2855 #define _ECCP2ASE               0x80
2856 
2857 //==============================================================================
2858 
2859 
2860 //==============================================================================
2861 //        PADCFG1 Bits
2862 
2863 extern __at(0x0F53) __sfr PADCFG1;
2864 
2865 typedef union
2866   {
2867   struct
2868     {
2869     unsigned                    : 1;
2870     unsigned RTSECSEL0          : 1;
2871     unsigned RTSECSEL1          : 1;
2872     unsigned                    : 1;
2873     unsigned                    : 1;
2874     unsigned                    : 1;
2875     unsigned REPU               : 1;
2876     unsigned RDPU               : 1;
2877     };
2878 
2879   struct
2880     {
2881     unsigned                    : 1;
2882     unsigned RTSECSEL           : 2;
2883     unsigned                    : 5;
2884     };
2885   } __PADCFG1bits_t;
2886 
2887 extern __at(0x0F53) volatile __PADCFG1bits_t PADCFG1bits;
2888 
2889 #define _RTSECSEL0              0x02
2890 #define _RTSECSEL1              0x04
2891 #define _REPU                   0x40
2892 #define _RDPU                   0x80
2893 
2894 //==============================================================================
2895 
2896 
2897 //==============================================================================
2898 //        CM1CON Bits
2899 
2900 extern __at(0x0F54) __sfr CM1CON;
2901 
2902 typedef union
2903   {
2904   struct
2905     {
2906     unsigned CCH0               : 1;
2907     unsigned CCH1               : 1;
2908     unsigned CREF               : 1;
2909     unsigned EVPOL0             : 1;
2910     unsigned EVPOL1             : 1;
2911     unsigned CPOL               : 1;
2912     unsigned COE                : 1;
2913     unsigned CON                : 1;
2914     };
2915 
2916   struct
2917     {
2918     unsigned CCH                : 2;
2919     unsigned                    : 6;
2920     };
2921 
2922   struct
2923     {
2924     unsigned                    : 3;
2925     unsigned EVPOL              : 2;
2926     unsigned                    : 3;
2927     };
2928   } __CM1CONbits_t;
2929 
2930 extern __at(0x0F54) volatile __CM1CONbits_t CM1CONbits;
2931 
2932 #define _CCH0                   0x01
2933 #define _CCH1                   0x02
2934 #define _CREF                   0x04
2935 #define _EVPOL0                 0x08
2936 #define _EVPOL1                 0x10
2937 #define _CPOL                   0x20
2938 #define _COE                    0x40
2939 #define _CON                    0x80
2940 
2941 //==============================================================================
2942 
2943 
2944 //==============================================================================
2945 //        CM1CON1 Bits
2946 
2947 extern __at(0x0F54) __sfr CM1CON1;
2948 
2949 typedef union
2950   {
2951   struct
2952     {
2953     unsigned CCH0               : 1;
2954     unsigned CCH1               : 1;
2955     unsigned CREF               : 1;
2956     unsigned EVPOL0             : 1;
2957     unsigned EVPOL1             : 1;
2958     unsigned CPOL               : 1;
2959     unsigned COE                : 1;
2960     unsigned CON                : 1;
2961     };
2962 
2963   struct
2964     {
2965     unsigned CCH                : 2;
2966     unsigned                    : 6;
2967     };
2968 
2969   struct
2970     {
2971     unsigned                    : 3;
2972     unsigned EVPOL              : 2;
2973     unsigned                    : 3;
2974     };
2975   } __CM1CON1bits_t;
2976 
2977 extern __at(0x0F54) volatile __CM1CON1bits_t CM1CON1bits;
2978 
2979 #define _CM1CON1_CCH0           0x01
2980 #define _CM1CON1_CCH1           0x02
2981 #define _CM1CON1_CREF           0x04
2982 #define _CM1CON1_EVPOL0         0x08
2983 #define _CM1CON1_EVPOL1         0x10
2984 #define _CM1CON1_CPOL           0x20
2985 #define _CM1CON1_COE            0x40
2986 #define _CM1CON1_CON            0x80
2987 
2988 //==============================================================================
2989 
2990 
2991 //==============================================================================
2992 //        CTMUICON Bits
2993 
2994 extern __at(0x0F55) __sfr CTMUICON;
2995 
2996 typedef union
2997   {
2998   struct
2999     {
3000     unsigned IRNG0              : 1;
3001     unsigned IRNG1              : 1;
3002     unsigned ITRIM0             : 1;
3003     unsigned ITRIM1             : 1;
3004     unsigned ITRIM2             : 1;
3005     unsigned ITRIM3             : 1;
3006     unsigned ITRIM4             : 1;
3007     unsigned ITRIM5             : 1;
3008     };
3009 
3010   struct
3011     {
3012     unsigned IRNG               : 2;
3013     unsigned                    : 6;
3014     };
3015 
3016   struct
3017     {
3018     unsigned                    : 2;
3019     unsigned ITRIM              : 6;
3020     };
3021   } __CTMUICONbits_t;
3022 
3023 extern __at(0x0F55) volatile __CTMUICONbits_t CTMUICONbits;
3024 
3025 #define _IRNG0                  0x01
3026 #define _IRNG1                  0x02
3027 #define _ITRIM0                 0x04
3028 #define _ITRIM1                 0x08
3029 #define _ITRIM2                 0x10
3030 #define _ITRIM3                 0x20
3031 #define _ITRIM4                 0x40
3032 #define _ITRIM5                 0x80
3033 
3034 //==============================================================================
3035 
3036 
3037 //==============================================================================
3038 //        CTMUCONL Bits
3039 
3040 extern __at(0x0F56) __sfr CTMUCONL;
3041 
3042 typedef union
3043   {
3044   struct
3045     {
3046     unsigned EDG1STAT           : 1;
3047     unsigned EDG2STAT           : 1;
3048     unsigned EDG1SEL0           : 1;
3049     unsigned EDG1SEL1           : 1;
3050     unsigned EDG1POL            : 1;
3051     unsigned EDG2SEL0           : 1;
3052     unsigned EDG2SEL1           : 1;
3053     unsigned EDG2POL            : 1;
3054     };
3055 
3056   struct
3057     {
3058     unsigned                    : 2;
3059     unsigned EDG1SEL            : 2;
3060     unsigned                    : 4;
3061     };
3062 
3063   struct
3064     {
3065     unsigned                    : 5;
3066     unsigned EDG2SEL            : 2;
3067     unsigned                    : 1;
3068     };
3069   } __CTMUCONLbits_t;
3070 
3071 extern __at(0x0F56) volatile __CTMUCONLbits_t CTMUCONLbits;
3072 
3073 #define _EDG1STAT               0x01
3074 #define _EDG2STAT               0x02
3075 #define _EDG1SEL0               0x04
3076 #define _EDG1SEL1               0x08
3077 #define _EDG1POL                0x10
3078 #define _EDG2SEL0               0x20
3079 #define _EDG2SEL1               0x40
3080 #define _EDG2POL                0x80
3081 
3082 //==============================================================================
3083 
3084 
3085 //==============================================================================
3086 //        CTMUCONH Bits
3087 
3088 extern __at(0x0F57) __sfr CTMUCONH;
3089 
3090 typedef struct
3091   {
3092   unsigned CTTRIG               : 1;
3093   unsigned IDISSEN              : 1;
3094   unsigned EDGSEQEN             : 1;
3095   unsigned EDGEN                : 1;
3096   unsigned TGEN                 : 1;
3097   unsigned CTMUSIDL             : 1;
3098   unsigned                      : 1;
3099   unsigned CTMUEN               : 1;
3100   } __CTMUCONHbits_t;
3101 
3102 extern __at(0x0F57) volatile __CTMUCONHbits_t CTMUCONHbits;
3103 
3104 #define _CTTRIG                 0x01
3105 #define _IDISSEN                0x02
3106 #define _EDGSEQEN               0x04
3107 #define _EDGEN                  0x08
3108 #define _TGEN                   0x10
3109 #define _CTMUSIDL               0x20
3110 #define _CTMUEN                 0x80
3111 
3112 //==============================================================================
3113 
3114 extern __at(0x0F58) __sfr ALRMVAL;
3115 extern __at(0x0F58) __sfr ALRMVALL;
3116 extern __at(0x0F59) __sfr ALRMVALH;
3117 
3118 //==============================================================================
3119 //        ALRMRPT Bits
3120 
3121 extern __at(0x0F5A) __sfr ALRMRPT;
3122 
3123 typedef struct
3124   {
3125   unsigned ARPT0                : 1;
3126   unsigned ARPT1                : 1;
3127   unsigned ARPT2                : 1;
3128   unsigned ARPT3                : 1;
3129   unsigned ARPT4                : 1;
3130   unsigned ARPT5                : 1;
3131   unsigned ARPT6                : 1;
3132   unsigned ARPT7                : 1;
3133   } __ALRMRPTbits_t;
3134 
3135 extern __at(0x0F5A) volatile __ALRMRPTbits_t ALRMRPTbits;
3136 
3137 #define _ARPT0                  0x01
3138 #define _ARPT1                  0x02
3139 #define _ARPT2                  0x04
3140 #define _ARPT3                  0x08
3141 #define _ARPT4                  0x10
3142 #define _ARPT5                  0x20
3143 #define _ARPT6                  0x40
3144 #define _ARPT7                  0x80
3145 
3146 //==============================================================================
3147 
3148 
3149 //==============================================================================
3150 //        ALRMCFG Bits
3151 
3152 extern __at(0x0F5B) __sfr ALRMCFG;
3153 
3154 typedef union
3155   {
3156   struct
3157     {
3158     unsigned ALRMPTR0           : 1;
3159     unsigned ALRMPTR1           : 1;
3160     unsigned AMASK0             : 1;
3161     unsigned AMASK1             : 1;
3162     unsigned AMASK2             : 1;
3163     unsigned AMASK3             : 1;
3164     unsigned CHIME              : 1;
3165     unsigned ALRMEN             : 1;
3166     };
3167 
3168   struct
3169     {
3170     unsigned ALRMPTR            : 2;
3171     unsigned                    : 6;
3172     };
3173 
3174   struct
3175     {
3176     unsigned                    : 2;
3177     unsigned AMASK              : 4;
3178     unsigned                    : 2;
3179     };
3180   } __ALRMCFGbits_t;
3181 
3182 extern __at(0x0F5B) volatile __ALRMCFGbits_t ALRMCFGbits;
3183 
3184 #define _ALRMPTR0               0x01
3185 #define _ALRMPTR1               0x02
3186 #define _AMASK0                 0x04
3187 #define _AMASK1                 0x08
3188 #define _AMASK2                 0x10
3189 #define _AMASK3                 0x20
3190 #define _CHIME                  0x40
3191 #define _ALRMEN                 0x80
3192 
3193 //==============================================================================
3194 
3195 extern __at(0x0F5C) __sfr RTCVAL;
3196 extern __at(0x0F5C) __sfr RTCVALL;
3197 
3198 //==============================================================================
3199 //        RTCVALH Bits
3200 
3201 extern __at(0x0F5D) __sfr RTCVALH;
3202 
3203 typedef union
3204   {
3205   struct
3206     {
3207     unsigned WAITE0             : 1;
3208     unsigned WAITE1             : 1;
3209     unsigned WAITM0             : 1;
3210     unsigned WAITM1             : 1;
3211     unsigned WAITM2             : 1;
3212     unsigned WAITM3             : 1;
3213     unsigned WAITB0             : 1;
3214     unsigned WAITB1             : 1;
3215     };
3216 
3217   struct
3218     {
3219     unsigned WAITE              : 2;
3220     unsigned                    : 6;
3221     };
3222 
3223   struct
3224     {
3225     unsigned                    : 2;
3226     unsigned WAITM              : 4;
3227     unsigned                    : 2;
3228     };
3229 
3230   struct
3231     {
3232     unsigned                    : 6;
3233     unsigned WAITB              : 2;
3234     };
3235   } __RTCVALHbits_t;
3236 
3237 extern __at(0x0F5D) volatile __RTCVALHbits_t RTCVALHbits;
3238 
3239 #define _WAITE0                 0x01
3240 #define _WAITE1                 0x02
3241 #define _WAITM0                 0x04
3242 #define _WAITM1                 0x08
3243 #define _WAITM2                 0x10
3244 #define _WAITM3                 0x20
3245 #define _WAITB0                 0x40
3246 #define _WAITB1                 0x80
3247 
3248 //==============================================================================
3249 
3250 
3251 //==============================================================================
3252 //        RTCCAL Bits
3253 
3254 extern __at(0x0F5E) __sfr RTCCAL;
3255 
3256 typedef struct
3257   {
3258   unsigned CAL0                 : 1;
3259   unsigned CAL1                 : 1;
3260   unsigned CAL2                 : 1;
3261   unsigned CAL3                 : 1;
3262   unsigned CAL4                 : 1;
3263   unsigned CAL5                 : 1;
3264   unsigned CAL6                 : 1;
3265   unsigned CAL7                 : 1;
3266   } __RTCCALbits_t;
3267 
3268 extern __at(0x0F5E) volatile __RTCCALbits_t RTCCALbits;
3269 
3270 #define _CAL0                   0x01
3271 #define _CAL1                   0x02
3272 #define _CAL2                   0x04
3273 #define _CAL3                   0x08
3274 #define _CAL4                   0x10
3275 #define _CAL5                   0x20
3276 #define _CAL6                   0x40
3277 #define _CAL7                   0x80
3278 
3279 //==============================================================================
3280 
3281 
3282 //==============================================================================
3283 //        RTCCFG Bits
3284 
3285 extern __at(0x0F5F) __sfr RTCCFG;
3286 
3287 typedef union
3288   {
3289   struct
3290     {
3291     unsigned RTCPTR0            : 1;
3292     unsigned RTCPTR1            : 1;
3293     unsigned RTCOE              : 1;
3294     unsigned HALFSEC            : 1;
3295     unsigned RTCSYNC            : 1;
3296     unsigned RTCWREN            : 1;
3297     unsigned                    : 1;
3298     unsigned RTCEN              : 1;
3299     };
3300 
3301   struct
3302     {
3303     unsigned RTCPTR             : 2;
3304     unsigned                    : 6;
3305     };
3306   } __RTCCFGbits_t;
3307 
3308 extern __at(0x0F5F) volatile __RTCCFGbits_t RTCCFGbits;
3309 
3310 #define _RTCPTR0                0x01
3311 #define _RTCPTR1                0x02
3312 #define _RTCOE                  0x04
3313 #define _HALFSEC                0x08
3314 #define _RTCSYNC                0x10
3315 #define _RTCWREN                0x20
3316 #define _RTCEN                  0x80
3317 
3318 //==============================================================================
3319 
3320 
3321 //==============================================================================
3322 //        PIE6 Bits
3323 
3324 extern __at(0x0F60) __sfr PIE6;
3325 
3326 typedef struct
3327   {
3328   unsigned CMP1IE               : 1;
3329   unsigned CMP2IE               : 1;
3330   unsigned CMP3IE               : 1;
3331   unsigned                      : 1;
3332   unsigned EEIE                 : 1;
3333   unsigned                      : 1;
3334   unsigned                      : 1;
3335   unsigned                      : 1;
3336   } __PIE6bits_t;
3337 
3338 extern __at(0x0F60) volatile __PIE6bits_t PIE6bits;
3339 
3340 #define _CMP1IE                 0x01
3341 #define _CMP2IE                 0x02
3342 #define _CMP3IE                 0x04
3343 #define _EEIE                   0x10
3344 
3345 //==============================================================================
3346 
3347 extern __at(0x0F61) __sfr EEDATA;
3348 extern __at(0x0F62) __sfr EEADR;
3349 extern __at(0x0F63) __sfr EEADRH;
3350 
3351 //==============================================================================
3352 //        OSCCON2 Bits
3353 
3354 extern __at(0x0F64) __sfr OSCCON2;
3355 
3356 typedef struct
3357   {
3358   unsigned MFIOSEL              : 1;
3359   unsigned MFIOFS               : 1;
3360   unsigned                      : 1;
3361   unsigned SOSCGO               : 1;
3362   unsigned                      : 1;
3363   unsigned                      : 1;
3364   unsigned SOSCRUN              : 1;
3365   unsigned                      : 1;
3366   } __OSCCON2bits_t;
3367 
3368 extern __at(0x0F64) volatile __OSCCON2bits_t OSCCON2bits;
3369 
3370 #define _MFIOSEL                0x01
3371 #define _MFIOFS                 0x02
3372 #define _SOSCGO                 0x08
3373 #define _SOSCRUN                0x40
3374 
3375 //==============================================================================
3376 
3377 
3378 //==============================================================================
3379 //        BAUDCON Bits
3380 
3381 extern __at(0x0F65) __sfr BAUDCON;
3382 
3383 typedef struct
3384   {
3385   unsigned ABDEN                : 1;
3386   unsigned WUE                  : 1;
3387   unsigned                      : 1;
3388   unsigned BRG16                : 1;
3389   unsigned TXCKP                : 1;
3390   unsigned RXDTP                : 1;
3391   unsigned RCIDL                : 1;
3392   unsigned ABDOVF               : 1;
3393   } __BAUDCONbits_t;
3394 
3395 extern __at(0x0F65) volatile __BAUDCONbits_t BAUDCONbits;
3396 
3397 #define _ABDEN                  0x01
3398 #define _WUE                    0x02
3399 #define _BRG16                  0x08
3400 #define _TXCKP                  0x10
3401 #define _RXDTP                  0x20
3402 #define _RCIDL                  0x40
3403 #define _ABDOVF                 0x80
3404 
3405 //==============================================================================
3406 
3407 
3408 //==============================================================================
3409 //        BAUDCON1 Bits
3410 
3411 extern __at(0x0F65) __sfr BAUDCON1;
3412 
3413 typedef struct
3414   {
3415   unsigned ABDEN                : 1;
3416   unsigned WUE                  : 1;
3417   unsigned                      : 1;
3418   unsigned BRG16                : 1;
3419   unsigned TXCKP                : 1;
3420   unsigned RXDTP                : 1;
3421   unsigned RCIDL                : 1;
3422   unsigned ABDOVF               : 1;
3423   } __BAUDCON1bits_t;
3424 
3425 extern __at(0x0F65) volatile __BAUDCON1bits_t BAUDCON1bits;
3426 
3427 #define _BAUDCON1_ABDEN         0x01
3428 #define _BAUDCON1_WUE           0x02
3429 #define _BAUDCON1_BRG16         0x08
3430 #define _BAUDCON1_TXCKP         0x10
3431 #define _BAUDCON1_RXDTP         0x20
3432 #define _BAUDCON1_RCIDL         0x40
3433 #define _BAUDCON1_ABDOVF        0x80
3434 
3435 //==============================================================================
3436 
3437 
3438 //==============================================================================
3439 //        BAUDCTL Bits
3440 
3441 extern __at(0x0F65) __sfr BAUDCTL;
3442 
3443 typedef struct
3444   {
3445   unsigned ABDEN                : 1;
3446   unsigned WUE                  : 1;
3447   unsigned                      : 1;
3448   unsigned BRG16                : 1;
3449   unsigned TXCKP                : 1;
3450   unsigned RXDTP                : 1;
3451   unsigned RCIDL                : 1;
3452   unsigned ABDOVF               : 1;
3453   } __BAUDCTLbits_t;
3454 
3455 extern __at(0x0F65) volatile __BAUDCTLbits_t BAUDCTLbits;
3456 
3457 #define _BAUDCTL_ABDEN          0x01
3458 #define _BAUDCTL_WUE            0x02
3459 #define _BAUDCTL_BRG16          0x08
3460 #define _BAUDCTL_TXCKP          0x10
3461 #define _BAUDCTL_RXDTP          0x20
3462 #define _BAUDCTL_RCIDL          0x40
3463 #define _BAUDCTL_ABDOVF         0x80
3464 
3465 //==============================================================================
3466 
3467 
3468 //==============================================================================
3469 //        LCDDATA0 Bits
3470 
3471 extern __at(0x0F66) __sfr LCDDATA0;
3472 
3473 typedef struct
3474   {
3475   unsigned S00C0                : 1;
3476   unsigned S01C0                : 1;
3477   unsigned S02C0                : 1;
3478   unsigned S03C0                : 1;
3479   unsigned S04C0                : 1;
3480   unsigned S05C0                : 1;
3481   unsigned S06C0                : 1;
3482   unsigned S07C0                : 1;
3483   } __LCDDATA0bits_t;
3484 
3485 extern __at(0x0F66) volatile __LCDDATA0bits_t LCDDATA0bits;
3486 
3487 #define _S00C0                  0x01
3488 #define _S01C0                  0x02
3489 #define _S02C0                  0x04
3490 #define _S03C0                  0x08
3491 #define _S04C0                  0x10
3492 #define _S05C0                  0x20
3493 #define _S06C0                  0x40
3494 #define _S07C0                  0x80
3495 
3496 //==============================================================================
3497 
3498 
3499 //==============================================================================
3500 //        LCDDATA1 Bits
3501 
3502 extern __at(0x0F67) __sfr LCDDATA1;
3503 
3504 typedef struct
3505   {
3506   unsigned S08C0                : 1;
3507   unsigned S09C0                : 1;
3508   unsigned S10C0                : 1;
3509   unsigned S11C0                : 1;
3510   unsigned S12C0                : 1;
3511   unsigned S13C0                : 1;
3512   unsigned S14C0                : 1;
3513   unsigned S15C0                : 1;
3514   } __LCDDATA1bits_t;
3515 
3516 extern __at(0x0F67) volatile __LCDDATA1bits_t LCDDATA1bits;
3517 
3518 #define _S08C0                  0x01
3519 #define _S09C0                  0x02
3520 #define _S10C0                  0x04
3521 #define _S11C0                  0x08
3522 #define _S12C0                  0x10
3523 #define _S13C0                  0x20
3524 #define _S14C0                  0x40
3525 #define _S15C0                  0x80
3526 
3527 //==============================================================================
3528 
3529 
3530 //==============================================================================
3531 //        LCDDATA2 Bits
3532 
3533 extern __at(0x0F68) __sfr LCDDATA2;
3534 
3535 typedef struct
3536   {
3537   unsigned S16C0                : 1;
3538   unsigned S17C0                : 1;
3539   unsigned S18C0                : 1;
3540   unsigned S19C0                : 1;
3541   unsigned S20C0                : 1;
3542   unsigned S21C0                : 1;
3543   unsigned S22C0                : 1;
3544   unsigned S23C0                : 1;
3545   } __LCDDATA2bits_t;
3546 
3547 extern __at(0x0F68) volatile __LCDDATA2bits_t LCDDATA2bits;
3548 
3549 #define _S16C0                  0x01
3550 #define _S17C0                  0x02
3551 #define _S18C0                  0x04
3552 #define _S19C0                  0x08
3553 #define _S20C0                  0x10
3554 #define _S21C0                  0x20
3555 #define _S22C0                  0x40
3556 #define _S23C0                  0x80
3557 
3558 //==============================================================================
3559 
3560 
3561 //==============================================================================
3562 //        LCDDATA3 Bits
3563 
3564 extern __at(0x0F69) __sfr LCDDATA3;
3565 
3566 typedef struct
3567   {
3568   unsigned S24C0                : 1;
3569   unsigned S25C0                : 1;
3570   unsigned S26C0                : 1;
3571   unsigned S27C0                : 1;
3572   unsigned S28C0                : 1;
3573   unsigned S29C0                : 1;
3574   unsigned S30C0                : 1;
3575   unsigned S31C0                : 1;
3576   } __LCDDATA3bits_t;
3577 
3578 extern __at(0x0F69) volatile __LCDDATA3bits_t LCDDATA3bits;
3579 
3580 #define _S24C0                  0x01
3581 #define _S25C0                  0x02
3582 #define _S26C0                  0x04
3583 #define _S27C0                  0x08
3584 #define _S28C0                  0x10
3585 #define _S29C0                  0x20
3586 #define _S30C0                  0x40
3587 #define _S31C0                  0x80
3588 
3589 //==============================================================================
3590 
3591 
3592 //==============================================================================
3593 //        LCDDATA4 Bits
3594 
3595 extern __at(0x0F6A) __sfr LCDDATA4;
3596 
3597 typedef struct
3598   {
3599   unsigned S32C0                : 1;
3600   unsigned                      : 1;
3601   unsigned                      : 1;
3602   unsigned                      : 1;
3603   unsigned                      : 1;
3604   unsigned                      : 1;
3605   unsigned                      : 1;
3606   unsigned                      : 1;
3607   } __LCDDATA4bits_t;
3608 
3609 extern __at(0x0F6A) volatile __LCDDATA4bits_t LCDDATA4bits;
3610 
3611 #define _S32C0                  0x01
3612 
3613 //==============================================================================
3614 
3615 
3616 //==============================================================================
3617 //        LCDDATA6 Bits
3618 
3619 extern __at(0x0F6C) __sfr LCDDATA6;
3620 
3621 typedef struct
3622   {
3623   unsigned S00C1                : 1;
3624   unsigned S01C1                : 1;
3625   unsigned S02C1                : 1;
3626   unsigned S03C1                : 1;
3627   unsigned S04C1                : 1;
3628   unsigned S05C1                : 1;
3629   unsigned S06C1                : 1;
3630   unsigned S07C1                : 1;
3631   } __LCDDATA6bits_t;
3632 
3633 extern __at(0x0F6C) volatile __LCDDATA6bits_t LCDDATA6bits;
3634 
3635 #define _S00C1                  0x01
3636 #define _S01C1                  0x02
3637 #define _S02C1                  0x04
3638 #define _S03C1                  0x08
3639 #define _S04C1                  0x10
3640 #define _S05C1                  0x20
3641 #define _S06C1                  0x40
3642 #define _S07C1                  0x80
3643 
3644 //==============================================================================
3645 
3646 
3647 //==============================================================================
3648 //        LCDDATA7 Bits
3649 
3650 extern __at(0x0F6D) __sfr LCDDATA7;
3651 
3652 typedef struct
3653   {
3654   unsigned S08C1                : 1;
3655   unsigned S09C1                : 1;
3656   unsigned S10C1                : 1;
3657   unsigned S11C1                : 1;
3658   unsigned S12C1                : 1;
3659   unsigned S13C1                : 1;
3660   unsigned S14C1                : 1;
3661   unsigned S15C1                : 1;
3662   } __LCDDATA7bits_t;
3663 
3664 extern __at(0x0F6D) volatile __LCDDATA7bits_t LCDDATA7bits;
3665 
3666 #define _S08C1                  0x01
3667 #define _S09C1                  0x02
3668 #define _S10C1                  0x04
3669 #define _S11C1                  0x08
3670 #define _S12C1                  0x10
3671 #define _S13C1                  0x20
3672 #define _S14C1                  0x40
3673 #define _S15C1                  0x80
3674 
3675 //==============================================================================
3676 
3677 
3678 //==============================================================================
3679 //        LCDDATA8 Bits
3680 
3681 extern __at(0x0F6E) __sfr LCDDATA8;
3682 
3683 typedef struct
3684   {
3685   unsigned S16C1                : 1;
3686   unsigned S17C1                : 1;
3687   unsigned S18C1                : 1;
3688   unsigned S19C1                : 1;
3689   unsigned S20C1                : 1;
3690   unsigned S21C1                : 1;
3691   unsigned S22C1                : 1;
3692   unsigned S23C1                : 1;
3693   } __LCDDATA8bits_t;
3694 
3695 extern __at(0x0F6E) volatile __LCDDATA8bits_t LCDDATA8bits;
3696 
3697 #define _S16C1                  0x01
3698 #define _S17C1                  0x02
3699 #define _S18C1                  0x04
3700 #define _S19C1                  0x08
3701 #define _S20C1                  0x10
3702 #define _S21C1                  0x20
3703 #define _S22C1                  0x40
3704 #define _S23C1                  0x80
3705 
3706 //==============================================================================
3707 
3708 
3709 //==============================================================================
3710 //        LCDDATA9 Bits
3711 
3712 extern __at(0x0F6F) __sfr LCDDATA9;
3713 
3714 typedef struct
3715   {
3716   unsigned S24C1                : 1;
3717   unsigned S25C1                : 1;
3718   unsigned S26C1                : 1;
3719   unsigned S27C1                : 1;
3720   unsigned S28C1                : 1;
3721   unsigned S29C1                : 1;
3722   unsigned S30C1                : 1;
3723   unsigned S31C1                : 1;
3724   } __LCDDATA9bits_t;
3725 
3726 extern __at(0x0F6F) volatile __LCDDATA9bits_t LCDDATA9bits;
3727 
3728 #define _S24C1                  0x01
3729 #define _S25C1                  0x02
3730 #define _S26C1                  0x04
3731 #define _S27C1                  0x08
3732 #define _S28C1                  0x10
3733 #define _S29C1                  0x20
3734 #define _S30C1                  0x40
3735 #define _S31C1                  0x80
3736 
3737 //==============================================================================
3738 
3739 
3740 //==============================================================================
3741 //        LCDDATA10 Bits
3742 
3743 extern __at(0x0F70) __sfr LCDDATA10;
3744 
3745 typedef struct
3746   {
3747   unsigned S32C1                : 1;
3748   unsigned                      : 1;
3749   unsigned                      : 1;
3750   unsigned                      : 1;
3751   unsigned                      : 1;
3752   unsigned                      : 1;
3753   unsigned                      : 1;
3754   unsigned                      : 1;
3755   } __LCDDATA10bits_t;
3756 
3757 extern __at(0x0F70) volatile __LCDDATA10bits_t LCDDATA10bits;
3758 
3759 #define _S32C1                  0x01
3760 
3761 //==============================================================================
3762 
3763 
3764 //==============================================================================
3765 //        LCDDATA12 Bits
3766 
3767 extern __at(0x0F72) __sfr LCDDATA12;
3768 
3769 typedef struct
3770   {
3771   unsigned S00C2                : 1;
3772   unsigned S01C2                : 1;
3773   unsigned S02C2                : 1;
3774   unsigned S03C2                : 1;
3775   unsigned S04C2                : 1;
3776   unsigned S05C2                : 1;
3777   unsigned S06C2                : 1;
3778   unsigned S07C2                : 1;
3779   } __LCDDATA12bits_t;
3780 
3781 extern __at(0x0F72) volatile __LCDDATA12bits_t LCDDATA12bits;
3782 
3783 #define _S00C2                  0x01
3784 #define _S01C2                  0x02
3785 #define _S02C2                  0x04
3786 #define _S03C2                  0x08
3787 #define _S04C2                  0x10
3788 #define _S05C2                  0x20
3789 #define _S06C2                  0x40
3790 #define _S07C2                  0x80
3791 
3792 //==============================================================================
3793 
3794 
3795 //==============================================================================
3796 //        LCDDATA13 Bits
3797 
3798 extern __at(0x0F73) __sfr LCDDATA13;
3799 
3800 typedef struct
3801   {
3802   unsigned S08C2                : 1;
3803   unsigned S09C2                : 1;
3804   unsigned S10C2                : 1;
3805   unsigned S11C2                : 1;
3806   unsigned S12C2                : 1;
3807   unsigned S13C2                : 1;
3808   unsigned S14C2                : 1;
3809   unsigned S15C2                : 1;
3810   } __LCDDATA13bits_t;
3811 
3812 extern __at(0x0F73) volatile __LCDDATA13bits_t LCDDATA13bits;
3813 
3814 #define _S08C2                  0x01
3815 #define _S09C2                  0x02
3816 #define _S10C2                  0x04
3817 #define _S11C2                  0x08
3818 #define _S12C2                  0x10
3819 #define _S13C2                  0x20
3820 #define _S14C2                  0x40
3821 #define _S15C2                  0x80
3822 
3823 //==============================================================================
3824 
3825 
3826 //==============================================================================
3827 //        LCDDATA14 Bits
3828 
3829 extern __at(0x0F74) __sfr LCDDATA14;
3830 
3831 typedef struct
3832   {
3833   unsigned S16C2                : 1;
3834   unsigned S17C2                : 1;
3835   unsigned S18C2                : 1;
3836   unsigned S19C2                : 1;
3837   unsigned S20C2                : 1;
3838   unsigned S21C2                : 1;
3839   unsigned S22C2                : 1;
3840   unsigned S23C2                : 1;
3841   } __LCDDATA14bits_t;
3842 
3843 extern __at(0x0F74) volatile __LCDDATA14bits_t LCDDATA14bits;
3844 
3845 #define _S16C2                  0x01
3846 #define _S17C2                  0x02
3847 #define _S18C2                  0x04
3848 #define _S19C2                  0x08
3849 #define _S20C2                  0x10
3850 #define _S21C2                  0x20
3851 #define _S22C2                  0x40
3852 #define _S23C2                  0x80
3853 
3854 //==============================================================================
3855 
3856 
3857 //==============================================================================
3858 //        LCDDATA15 Bits
3859 
3860 extern __at(0x0F75) __sfr LCDDATA15;
3861 
3862 typedef struct
3863   {
3864   unsigned S24C2                : 1;
3865   unsigned S25C2                : 1;
3866   unsigned S26C2                : 1;
3867   unsigned S27C2                : 1;
3868   unsigned S28C2                : 1;
3869   unsigned S29C2                : 1;
3870   unsigned S30C2                : 1;
3871   unsigned S31C2                : 1;
3872   } __LCDDATA15bits_t;
3873 
3874 extern __at(0x0F75) volatile __LCDDATA15bits_t LCDDATA15bits;
3875 
3876 #define _S24C2                  0x01
3877 #define _S25C2                  0x02
3878 #define _S26C2                  0x04
3879 #define _S27C2                  0x08
3880 #define _S28C2                  0x10
3881 #define _S29C2                  0x20
3882 #define _S30C2                  0x40
3883 #define _S31C2                  0x80
3884 
3885 //==============================================================================
3886 
3887 
3888 //==============================================================================
3889 //        LCDDATA16 Bits
3890 
3891 extern __at(0x0F76) __sfr LCDDATA16;
3892 
3893 typedef struct
3894   {
3895   unsigned S32C2                : 1;
3896   unsigned                      : 1;
3897   unsigned                      : 1;
3898   unsigned                      : 1;
3899   unsigned                      : 1;
3900   unsigned                      : 1;
3901   unsigned                      : 1;
3902   unsigned                      : 1;
3903   } __LCDDATA16bits_t;
3904 
3905 extern __at(0x0F76) volatile __LCDDATA16bits_t LCDDATA16bits;
3906 
3907 #define _S32C2                  0x01
3908 
3909 //==============================================================================
3910 
3911 
3912 //==============================================================================
3913 //        LCDDATA18 Bits
3914 
3915 extern __at(0x0F78) __sfr LCDDATA18;
3916 
3917 typedef struct
3918   {
3919   unsigned S00C3                : 1;
3920   unsigned S01C3                : 1;
3921   unsigned S02C3                : 1;
3922   unsigned S03C3                : 1;
3923   unsigned S04C3                : 1;
3924   unsigned S05C3                : 1;
3925   unsigned S06C3                : 1;
3926   unsigned S07C3                : 1;
3927   } __LCDDATA18bits_t;
3928 
3929 extern __at(0x0F78) volatile __LCDDATA18bits_t LCDDATA18bits;
3930 
3931 #define _S00C3                  0x01
3932 #define _S01C3                  0x02
3933 #define _S02C3                  0x04
3934 #define _S03C3                  0x08
3935 #define _S04C3                  0x10
3936 #define _S05C3                  0x20
3937 #define _S06C3                  0x40
3938 #define _S07C3                  0x80
3939 
3940 //==============================================================================
3941 
3942 
3943 //==============================================================================
3944 //        LCDDATA19 Bits
3945 
3946 extern __at(0x0F79) __sfr LCDDATA19;
3947 
3948 typedef struct
3949   {
3950   unsigned S08C3                : 1;
3951   unsigned S09C3                : 1;
3952   unsigned S10C3                : 1;
3953   unsigned S11C3                : 1;
3954   unsigned S12C3                : 1;
3955   unsigned S13C3                : 1;
3956   unsigned S14C3                : 1;
3957   unsigned S15C3                : 1;
3958   } __LCDDATA19bits_t;
3959 
3960 extern __at(0x0F79) volatile __LCDDATA19bits_t LCDDATA19bits;
3961 
3962 #define _S08C3                  0x01
3963 #define _S09C3                  0x02
3964 #define _S10C3                  0x04
3965 #define _S11C3                  0x08
3966 #define _S12C3                  0x10
3967 #define _S13C3                  0x20
3968 #define _S14C3                  0x40
3969 #define _S15C3                  0x80
3970 
3971 //==============================================================================
3972 
3973 
3974 //==============================================================================
3975 //        LCDDATA20 Bits
3976 
3977 extern __at(0x0F7A) __sfr LCDDATA20;
3978 
3979 typedef struct
3980   {
3981   unsigned S16C3                : 1;
3982   unsigned S17C3                : 1;
3983   unsigned S18C3                : 1;
3984   unsigned S19C3                : 1;
3985   unsigned S20C3                : 1;
3986   unsigned S21C3                : 1;
3987   unsigned S22C3                : 1;
3988   unsigned S23C3                : 1;
3989   } __LCDDATA20bits_t;
3990 
3991 extern __at(0x0F7A) volatile __LCDDATA20bits_t LCDDATA20bits;
3992 
3993 #define _S16C3                  0x01
3994 #define _S17C3                  0x02
3995 #define _S18C3                  0x04
3996 #define _S19C3                  0x08
3997 #define _S20C3                  0x10
3998 #define _S21C3                  0x20
3999 #define _S22C3                  0x40
4000 #define _S23C3                  0x80
4001 
4002 //==============================================================================
4003 
4004 
4005 //==============================================================================
4006 //        LCDDATA21 Bits
4007 
4008 extern __at(0x0F7B) __sfr LCDDATA21;
4009 
4010 typedef struct
4011   {
4012   unsigned S24C3                : 1;
4013   unsigned S25C3                : 1;
4014   unsigned S26C3                : 1;
4015   unsigned S27C3                : 1;
4016   unsigned S28C3                : 1;
4017   unsigned S29C3                : 1;
4018   unsigned S30C3                : 1;
4019   unsigned S31C3                : 1;
4020   } __LCDDATA21bits_t;
4021 
4022 extern __at(0x0F7B) volatile __LCDDATA21bits_t LCDDATA21bits;
4023 
4024 #define _S24C3                  0x01
4025 #define _S25C3                  0x02
4026 #define _S26C3                  0x04
4027 #define _S27C3                  0x08
4028 #define _S28C3                  0x10
4029 #define _S29C3                  0x20
4030 #define _S30C3                  0x40
4031 #define _S31C3                  0x80
4032 
4033 //==============================================================================
4034 
4035 
4036 //==============================================================================
4037 //        LCDDATA22 Bits
4038 
4039 extern __at(0x0F7C) __sfr LCDDATA22;
4040 
4041 typedef struct
4042   {
4043   unsigned S32C3                : 1;
4044   unsigned                      : 1;
4045   unsigned                      : 1;
4046   unsigned                      : 1;
4047   unsigned                      : 1;
4048   unsigned                      : 1;
4049   unsigned                      : 1;
4050   unsigned                      : 1;
4051   } __LCDDATA22bits_t;
4052 
4053 extern __at(0x0F7C) volatile __LCDDATA22bits_t LCDDATA22bits;
4054 
4055 #define _S32C3                  0x01
4056 
4057 //==============================================================================
4058 
4059 extern __at(0x0F7E) __sfr EECON2;
4060 
4061 //==============================================================================
4062 //        EECON1 Bits
4063 
4064 extern __at(0x0F7F) __sfr EECON1;
4065 
4066 typedef struct
4067   {
4068   unsigned RD                   : 1;
4069   unsigned WR                   : 1;
4070   unsigned WREN                 : 1;
4071   unsigned WRERR                : 1;
4072   unsigned FREE                 : 1;
4073   unsigned                      : 1;
4074   unsigned CFGS                 : 1;
4075   unsigned EEPGD                : 1;
4076   } __EECON1bits_t;
4077 
4078 extern __at(0x0F7F) volatile __EECON1bits_t EECON1bits;
4079 
4080 #define _RD                     0x01
4081 #define _WR                     0x02
4082 #define _WREN                   0x04
4083 #define _WRERR                  0x08
4084 #define _FREE                   0x10
4085 #define _CFGS                   0x40
4086 #define _EEPGD                  0x80
4087 
4088 //==============================================================================
4089 
4090 
4091 //==============================================================================
4092 //        PORTA Bits
4093 
4094 extern __at(0x0F80) __sfr PORTA;
4095 
4096 typedef union
4097   {
4098   struct
4099     {
4100     unsigned RA0                : 1;
4101     unsigned RA1                : 1;
4102     unsigned RA2                : 1;
4103     unsigned RA3                : 1;
4104     unsigned RA4                : 1;
4105     unsigned RA5                : 1;
4106     unsigned RA6                : 1;
4107     unsigned RA7                : 1;
4108     };
4109 
4110   struct
4111     {
4112     unsigned AN0                : 1;
4113     unsigned AN1                : 1;
4114     unsigned AN2                : 1;
4115     unsigned AN3                : 1;
4116     unsigned SEG14              : 1;
4117     unsigned AN4                : 1;
4118     unsigned OSC2               : 1;
4119     unsigned OSC1               : 1;
4120     };
4121 
4122   struct
4123     {
4124     unsigned ULPWUIN            : 1;
4125     unsigned SEG18              : 1;
4126     unsigned VREF_MINUS         : 1;
4127     unsigned VREF_PLUS          : 1;
4128     unsigned T0CKI              : 1;
4129     unsigned SEG15              : 1;
4130     unsigned CLKO               : 1;
4131     unsigned CLKI               : 1;
4132     };
4133 
4134   struct
4135     {
4136     unsigned                    : 1;
4137     unsigned                    : 1;
4138     unsigned                    : 1;
4139     unsigned                    : 1;
4140     unsigned                    : 1;
4141     unsigned T1CKI              : 1;
4142     unsigned                    : 1;
4143     unsigned                    : 1;
4144     };
4145 
4146   struct
4147     {
4148     unsigned                    : 1;
4149     unsigned                    : 1;
4150     unsigned                    : 1;
4151     unsigned                    : 1;
4152     unsigned                    : 1;
4153     unsigned T3G                : 1;
4154     unsigned                    : 1;
4155     unsigned                    : 1;
4156     };
4157 
4158   struct
4159     {
4160     unsigned                    : 1;
4161     unsigned                    : 1;
4162     unsigned                    : 1;
4163     unsigned                    : 1;
4164     unsigned                    : 1;
4165     unsigned LVDIN              : 1;
4166     unsigned                    : 1;
4167     unsigned                    : 1;
4168     };
4169   } __PORTAbits_t;
4170 
4171 extern __at(0x0F80) volatile __PORTAbits_t PORTAbits;
4172 
4173 #define _RA0                    0x01
4174 #define _AN0                    0x01
4175 #define _ULPWUIN                0x01
4176 #define _RA1                    0x02
4177 #define _AN1                    0x02
4178 #define _SEG18                  0x02
4179 #define _RA2                    0x04
4180 #define _AN2                    0x04
4181 #define _VREF_MINUS             0x04
4182 #define _RA3                    0x08
4183 #define _AN3                    0x08
4184 #define _VREF_PLUS              0x08
4185 #define _RA4                    0x10
4186 #define _SEG14                  0x10
4187 #define _T0CKI                  0x10
4188 #define _RA5                    0x20
4189 #define _AN4                    0x20
4190 #define _SEG15                  0x20
4191 #define _T1CKI                  0x20
4192 #define _T3G                    0x20
4193 #define _LVDIN                  0x20
4194 #define _RA6                    0x40
4195 #define _OSC2                   0x40
4196 #define _CLKO                   0x40
4197 #define _RA7                    0x80
4198 #define _OSC1                   0x80
4199 #define _CLKI                   0x80
4200 
4201 //==============================================================================
4202 
4203 
4204 //==============================================================================
4205 //        PORTB Bits
4206 
4207 extern __at(0x0F81) __sfr PORTB;
4208 
4209 typedef union
4210   {
4211   struct
4212     {
4213     unsigned RB0                : 1;
4214     unsigned RB1                : 1;
4215     unsigned RB2                : 1;
4216     unsigned RB3                : 1;
4217     unsigned RB4                : 1;
4218     unsigned RB5                : 1;
4219     unsigned RB6                : 1;
4220     unsigned RB7                : 1;
4221     };
4222 
4223   struct
4224     {
4225     unsigned INT0               : 1;
4226     unsigned INT1               : 1;
4227     unsigned INT2               : 1;
4228     unsigned INT3               : 1;
4229     unsigned KBI0               : 1;
4230     unsigned KBI1               : 1;
4231     unsigned KBI2               : 1;
4232     unsigned KBI3               : 1;
4233     };
4234 
4235   struct
4236     {
4237     unsigned SEG30              : 1;
4238     unsigned SEG8               : 1;
4239     unsigned SEG9               : 1;
4240     unsigned SEG10              : 1;
4241     unsigned SEG11              : 1;
4242     unsigned SEG29              : 1;
4243     unsigned PGC                : 1;
4244     unsigned PGD                : 1;
4245     };
4246 
4247   struct
4248     {
4249     unsigned FLT0               : 1;
4250     unsigned                    : 1;
4251     unsigned CTED1              : 1;
4252     unsigned CTED2              : 1;
4253     unsigned                    : 1;
4254     unsigned T3CKI              : 1;
4255     unsigned                    : 1;
4256     unsigned                    : 1;
4257     };
4258 
4259   struct
4260     {
4261     unsigned                    : 1;
4262     unsigned                    : 1;
4263     unsigned                    : 1;
4264     unsigned CCP2_PA2           : 1;
4265     unsigned                    : 1;
4266     unsigned T1G                : 1;
4267     unsigned                    : 1;
4268     unsigned                    : 1;
4269     };
4270 
4271   struct
4272     {
4273     unsigned                    : 1;
4274     unsigned                    : 1;
4275     unsigned                    : 1;
4276     unsigned                    : 1;
4277     unsigned                    : 1;
4278     unsigned PGM                : 1;
4279     unsigned                    : 1;
4280     unsigned                    : 1;
4281     };
4282 
4283   struct
4284     {
4285     unsigned INT                : 4;
4286     unsigned                    : 4;
4287     };
4288 
4289   struct
4290     {
4291     unsigned                    : 4;
4292     unsigned KBI                : 4;
4293     };
4294   } __PORTBbits_t;
4295 
4296 extern __at(0x0F81) volatile __PORTBbits_t PORTBbits;
4297 
4298 #define _RB0                    0x01
4299 #define _INT0                   0x01
4300 #define _SEG30                  0x01
4301 #define _FLT0                   0x01
4302 #define _RB1                    0x02
4303 #define _INT1                   0x02
4304 #define _SEG8                   0x02
4305 #define _RB2                    0x04
4306 #define _INT2                   0x04
4307 #define _SEG9                   0x04
4308 #define _CTED1                  0x04
4309 #define _RB3                    0x08
4310 #define _INT3                   0x08
4311 #define _SEG10                  0x08
4312 #define _CTED2                  0x08
4313 #define _CCP2_PA2               0x08
4314 #define _RB4                    0x10
4315 #define _KBI0                   0x10
4316 #define _SEG11                  0x10
4317 #define _RB5                    0x20
4318 #define _KBI1                   0x20
4319 #define _SEG29                  0x20
4320 #define _T3CKI                  0x20
4321 #define _T1G                    0x20
4322 #define _PGM                    0x20
4323 #define _RB6                    0x40
4324 #define _KBI2                   0x40
4325 #define _PGC                    0x40
4326 #define _RB7                    0x80
4327 #define _KBI3                   0x80
4328 #define _PGD                    0x80
4329 
4330 //==============================================================================
4331 
4332 
4333 //==============================================================================
4334 //        PORTC Bits
4335 
4336 extern __at(0x0F82) __sfr PORTC;
4337 
4338 typedef union
4339   {
4340   struct
4341     {
4342     unsigned RC0                : 1;
4343     unsigned RC1                : 1;
4344     unsigned RC2                : 1;
4345     unsigned RC3                : 1;
4346     unsigned RC4                : 1;
4347     unsigned RC5                : 1;
4348     unsigned RC6                : 1;
4349     unsigned RC7                : 1;
4350     };
4351 
4352   struct
4353     {
4354     unsigned SOSCO              : 1;
4355     unsigned SEG32              : 1;
4356     unsigned SEG13              : 1;
4357     unsigned SEG17              : 1;
4358     unsigned SEG16              : 1;
4359     unsigned SEG12              : 1;
4360     unsigned SEG27              : 1;
4361     unsigned SEG28              : 1;
4362     };
4363 
4364   struct
4365     {
4366     unsigned SCKLI              : 1;
4367     unsigned SOSCI              : 1;
4368     unsigned CCP1               : 1;
4369     unsigned SCK1               : 1;
4370     unsigned SDI1               : 1;
4371     unsigned SDO1               : 1;
4372     unsigned TX1                : 1;
4373     unsigned RX1                : 1;
4374     };
4375 
4376   struct
4377     {
4378     unsigned                    : 1;
4379     unsigned CCP2               : 1;
4380     unsigned PA1                : 1;
4381     unsigned SCL1               : 1;
4382     unsigned SDA1               : 1;
4383     unsigned                    : 1;
4384     unsigned CK1                : 1;
4385     unsigned DT1                : 1;
4386     };
4387 
4388   struct
4389     {
4390     unsigned                    : 1;
4391     unsigned PA2                : 1;
4392     unsigned                    : 1;
4393     unsigned                    : 1;
4394     unsigned                    : 1;
4395     unsigned                    : 1;
4396     unsigned                    : 1;
4397     unsigned                    : 1;
4398     };
4399   } __PORTCbits_t;
4400 
4401 extern __at(0x0F82) volatile __PORTCbits_t PORTCbits;
4402 
4403 #define _RC0                    0x01
4404 #define _SOSCO                  0x01
4405 #define _SCKLI                  0x01
4406 #define _RC1                    0x02
4407 #define _SEG32                  0x02
4408 #define _SOSCI                  0x02
4409 #define _CCP2                   0x02
4410 #define _PA2                    0x02
4411 #define _RC2                    0x04
4412 #define _SEG13                  0x04
4413 #define _CCP1                   0x04
4414 #define _PA1                    0x04
4415 #define _RC3                    0x08
4416 #define _SEG17                  0x08
4417 #define _SCK1                   0x08
4418 #define _SCL1                   0x08
4419 #define _RC4                    0x10
4420 #define _SEG16                  0x10
4421 #define _SDI1                   0x10
4422 #define _SDA1                   0x10
4423 #define _RC5                    0x20
4424 #define _SEG12                  0x20
4425 #define _SDO1                   0x20
4426 #define _RC6                    0x40
4427 #define _SEG27                  0x40
4428 #define _TX1                    0x40
4429 #define _CK1                    0x40
4430 #define _RC7                    0x80
4431 #define _SEG28                  0x80
4432 #define _RX1                    0x80
4433 #define _DT1                    0x80
4434 
4435 //==============================================================================
4436 
4437 
4438 //==============================================================================
4439 //        PORTD Bits
4440 
4441 extern __at(0x0F83) __sfr PORTD;
4442 
4443 typedef union
4444   {
4445   struct
4446     {
4447     unsigned RD0                : 1;
4448     unsigned RD1                : 1;
4449     unsigned RD2                : 1;
4450     unsigned RD3                : 1;
4451     unsigned RD4                : 1;
4452     unsigned RD5                : 1;
4453     unsigned RD6                : 1;
4454     unsigned RD7                : 1;
4455     };
4456 
4457   struct
4458     {
4459     unsigned AD0                : 1;
4460     unsigned AD1                : 1;
4461     unsigned AD2                : 1;
4462     unsigned AD3                : 1;
4463     unsigned AD4                : 1;
4464     unsigned AD5                : 1;
4465     unsigned AD6                : 1;
4466     unsigned AD7                : 1;
4467     };
4468 
4469   struct
4470     {
4471     unsigned PSP0               : 1;
4472     unsigned PSP1               : 1;
4473     unsigned PSP2               : 1;
4474     unsigned PSP3               : 1;
4475     unsigned PSP4               : 1;
4476     unsigned PSP5               : 1;
4477     unsigned PSP6               : 1;
4478     unsigned PSP7               : 1;
4479     };
4480 
4481   struct
4482     {
4483     unsigned SEG0               : 1;
4484     unsigned SEG1               : 1;
4485     unsigned SEG2               : 1;
4486     unsigned SEG3               : 1;
4487     unsigned SEG4               : 1;
4488     unsigned SEG5               : 1;
4489     unsigned SEG6               : 1;
4490     unsigned SEG7               : 1;
4491     };
4492 
4493   struct
4494     {
4495     unsigned CTPLS              : 1;
4496     unsigned T5CKI              : 1;
4497     unsigned                    : 1;
4498     unsigned                    : 1;
4499     unsigned SDO2               : 1;
4500     unsigned SDI2               : 1;
4501     unsigned SCK2               : 1;
4502     unsigned SS2                : 1;
4503     };
4504 
4505   struct
4506     {
4507     unsigned                    : 1;
4508     unsigned T7G                : 1;
4509     unsigned                    : 1;
4510     unsigned                    : 1;
4511     unsigned                    : 1;
4512     unsigned SDA2               : 1;
4513     unsigned SCL2               : 1;
4514     unsigned                    : 1;
4515     };
4516   } __PORTDbits_t;
4517 
4518 extern __at(0x0F83) volatile __PORTDbits_t PORTDbits;
4519 
4520 #define _RD0                    0x01
4521 #define _AD0                    0x01
4522 #define _PSP0                   0x01
4523 #define _SEG0                   0x01
4524 #define _CTPLS                  0x01
4525 #define _RD1                    0x02
4526 #define _AD1                    0x02
4527 #define _PSP1                   0x02
4528 #define _SEG1                   0x02
4529 #define _T5CKI                  0x02
4530 #define _T7G                    0x02
4531 #define _RD2                    0x04
4532 #define _AD2                    0x04
4533 #define _PSP2                   0x04
4534 #define _SEG2                   0x04
4535 #define _RD3                    0x08
4536 #define _AD3                    0x08
4537 #define _PSP3                   0x08
4538 #define _SEG3                   0x08
4539 #define _RD4                    0x10
4540 #define _AD4                    0x10
4541 #define _PSP4                   0x10
4542 #define _SEG4                   0x10
4543 #define _SDO2                   0x10
4544 #define _RD5                    0x20
4545 #define _AD5                    0x20
4546 #define _PSP5                   0x20
4547 #define _SEG5                   0x20
4548 #define _SDI2                   0x20
4549 #define _SDA2                   0x20
4550 #define _RD6                    0x40
4551 #define _AD6                    0x40
4552 #define _PSP6                   0x40
4553 #define _SEG6                   0x40
4554 #define _SCK2                   0x40
4555 #define _SCL2                   0x40
4556 #define _RD7                    0x80
4557 #define _AD7                    0x80
4558 #define _PSP7                   0x80
4559 #define _SEG7                   0x80
4560 #define _SS2                    0x80
4561 
4562 //==============================================================================
4563 
4564 
4565 //==============================================================================
4566 //        PORTE Bits
4567 
4568 extern __at(0x0F84) __sfr PORTE;
4569 
4570 typedef union
4571   {
4572   struct
4573     {
4574     unsigned RE0                : 1;
4575     unsigned RE1                : 1;
4576     unsigned RE2                : 1;
4577     unsigned RE3                : 1;
4578     unsigned RE4                : 1;
4579     unsigned RE5                : 1;
4580     unsigned RE6                : 1;
4581     unsigned RE7                : 1;
4582     };
4583 
4584   struct
4585     {
4586     unsigned AD8                : 1;
4587     unsigned AD9                : 1;
4588     unsigned AD10               : 1;
4589     unsigned AD11               : 1;
4590     unsigned AD12               : 1;
4591     unsigned AD13               : 1;
4592     unsigned AD14               : 1;
4593     unsigned AD15               : 1;
4594     };
4595 
4596   struct
4597     {
4598     unsigned PD2                : 1;
4599     unsigned PC2                : 1;
4600     unsigned PB2                : 1;
4601     unsigned PC3                : 1;
4602     unsigned PB3                : 1;
4603     unsigned PC1                : 1;
4604     unsigned PB1                : 1;
4605     unsigned PA2                : 1;
4606     };
4607 
4608   struct
4609     {
4610     unsigned RD                 : 1;
4611     unsigned WR                 : 1;
4612     unsigned CCP10              : 1;
4613     unsigned CCP9               : 1;
4614     unsigned CCP8               : 1;
4615     unsigned CCP7               : 1;
4616     unsigned CCP6               : 1;
4617     unsigned CCP2               : 1;
4618     };
4619 
4620   struct
4621     {
4622     unsigned LCDBIAS1           : 1;
4623     unsigned LCDBIAS2           : 1;
4624     unsigned CS                 : 1;
4625     unsigned COM0               : 1;
4626     unsigned COM1               : 1;
4627     unsigned COM2               : 1;
4628     unsigned COM3               : 1;
4629     unsigned SEG31              : 1;
4630     };
4631 
4632   struct
4633     {
4634     unsigned                    : 1;
4635     unsigned                    : 1;
4636     unsigned LCDBIAS3           : 1;
4637     unsigned                    : 1;
4638     unsigned REFO               : 1;
4639     unsigned                    : 1;
4640     unsigned                    : 1;
4641     unsigned                    : 1;
4642     };
4643 
4644   struct
4645     {
4646     unsigned                    : 3;
4647     unsigned COM                : 4;
4648     unsigned                    : 1;
4649     };
4650   } __PORTEbits_t;
4651 
4652 extern __at(0x0F84) volatile __PORTEbits_t PORTEbits;
4653 
4654 #define _PORTE_RE0              0x01
4655 #define _PORTE_AD8              0x01
4656 #define _PORTE_PD2              0x01
4657 #define _PORTE_RD               0x01
4658 #define _PORTE_LCDBIAS1         0x01
4659 #define _PORTE_RE1              0x02
4660 #define _PORTE_AD9              0x02
4661 #define _PORTE_PC2              0x02
4662 #define _PORTE_WR               0x02
4663 #define _PORTE_LCDBIAS2         0x02
4664 #define _PORTE_RE2              0x04
4665 #define _PORTE_AD10             0x04
4666 #define _PORTE_PB2              0x04
4667 #define _PORTE_CCP10            0x04
4668 #define _PORTE_CS               0x04
4669 #define _PORTE_LCDBIAS3         0x04
4670 #define _PORTE_RE3              0x08
4671 #define _PORTE_AD11             0x08
4672 #define _PORTE_PC3              0x08
4673 #define _PORTE_CCP9             0x08
4674 #define _PORTE_COM0             0x08
4675 #define _PORTE_RE4              0x10
4676 #define _PORTE_AD12             0x10
4677 #define _PORTE_PB3              0x10
4678 #define _PORTE_CCP8             0x10
4679 #define _PORTE_COM1             0x10
4680 #define _PORTE_REFO             0x10
4681 #define _PORTE_RE5              0x20
4682 #define _PORTE_AD13             0x20
4683 #define _PORTE_PC1              0x20
4684 #define _PORTE_CCP7             0x20
4685 #define _PORTE_COM2             0x20
4686 #define _PORTE_RE6              0x40
4687 #define _PORTE_AD14             0x40
4688 #define _PORTE_PB1              0x40
4689 #define _PORTE_CCP6             0x40
4690 #define _PORTE_COM3             0x40
4691 #define _PORTE_RE7              0x80
4692 #define _PORTE_AD15             0x80
4693 #define _PORTE_PA2              0x80
4694 #define _PORTE_CCP2             0x80
4695 #define _PORTE_SEG31            0x80
4696 
4697 //==============================================================================
4698 
4699 
4700 //==============================================================================
4701 //        PORTF Bits
4702 
4703 extern __at(0x0F85) __sfr PORTF;
4704 
4705 typedef union
4706   {
4707   struct
4708     {
4709     unsigned                    : 1;
4710     unsigned RF1                : 1;
4711     unsigned RF2                : 1;
4712     unsigned RF3                : 1;
4713     unsigned RF4                : 1;
4714     unsigned RF5                : 1;
4715     unsigned RF6                : 1;
4716     unsigned RF7                : 1;
4717     };
4718 
4719   struct
4720     {
4721     unsigned                    : 1;
4722     unsigned AN6                : 1;
4723     unsigned AN7                : 1;
4724     unsigned AN8                : 1;
4725     unsigned AN9                : 1;
4726     unsigned AN10               : 1;
4727     unsigned AN11               : 1;
4728     unsigned AN5                : 1;
4729     };
4730 
4731   struct
4732     {
4733     unsigned                    : 1;
4734     unsigned SEG19              : 1;
4735     unsigned SEG20              : 1;
4736     unsigned SEG21              : 1;
4737     unsigned SEG22              : 1;
4738     unsigned SEG23              : 1;
4739     unsigned SEG24              : 1;
4740     unsigned SEG25              : 1;
4741     };
4742 
4743   struct
4744     {
4745     unsigned                    : 1;
4746     unsigned C2OUT              : 1;
4747     unsigned C1OUT              : 1;
4748     unsigned C2INB              : 1;
4749     unsigned C2INA              : 1;
4750     unsigned C1INB              : 1;
4751     unsigned C1INA              : 1;
4752     unsigned SS1                : 1;
4753     };
4754 
4755   struct
4756     {
4757     unsigned                    : 1;
4758     unsigned CTDIN              : 1;
4759     unsigned                    : 1;
4760     unsigned CTMUI              : 1;
4761     unsigned                    : 1;
4762     unsigned CVREF              : 1;
4763     unsigned                    : 1;
4764     unsigned                    : 1;
4765     };
4766   } __PORTFbits_t;
4767 
4768 extern __at(0x0F85) volatile __PORTFbits_t PORTFbits;
4769 
4770 #define _PORTF_RF1              0x02
4771 #define _PORTF_AN6              0x02
4772 #define _PORTF_SEG19            0x02
4773 #define _PORTF_C2OUT            0x02
4774 #define _PORTF_CTDIN            0x02
4775 #define _PORTF_RF2              0x04
4776 #define _PORTF_AN7              0x04
4777 #define _PORTF_SEG20            0x04
4778 #define _PORTF_C1OUT            0x04
4779 #define _PORTF_RF3              0x08
4780 #define _PORTF_AN8              0x08
4781 #define _PORTF_SEG21            0x08
4782 #define _PORTF_C2INB            0x08
4783 #define _PORTF_CTMUI            0x08
4784 #define _PORTF_RF4              0x10
4785 #define _PORTF_AN9              0x10
4786 #define _PORTF_SEG22            0x10
4787 #define _PORTF_C2INA            0x10
4788 #define _PORTF_RF5              0x20
4789 #define _PORTF_AN10             0x20
4790 #define _PORTF_SEG23            0x20
4791 #define _PORTF_C1INB            0x20
4792 #define _PORTF_CVREF            0x20
4793 #define _PORTF_RF6              0x40
4794 #define _PORTF_AN11             0x40
4795 #define _PORTF_SEG24            0x40
4796 #define _PORTF_C1INA            0x40
4797 #define _PORTF_RF7              0x80
4798 #define _PORTF_AN5              0x80
4799 #define _PORTF_SEG25            0x80
4800 #define _PORTF_SS1              0x80
4801 
4802 //==============================================================================
4803 
4804 
4805 //==============================================================================
4806 //        PORTG Bits
4807 
4808 extern __at(0x0F86) __sfr PORTG;
4809 
4810 typedef union
4811   {
4812   struct
4813     {
4814     unsigned RG0                : 1;
4815     unsigned RG1                : 1;
4816     unsigned RG2                : 1;
4817     unsigned RG3                : 1;
4818     unsigned RG4                : 1;
4819     unsigned RG5                : 1;
4820     unsigned                    : 1;
4821     unsigned                    : 1;
4822     };
4823 
4824   struct
4825     {
4826     unsigned CCP3               : 1;
4827     unsigned C3OUT              : 1;
4828     unsigned C3INA              : 1;
4829     unsigned C3INB              : 1;
4830     unsigned C3INC              : 1;
4831     unsigned                    : 1;
4832     unsigned                    : 1;
4833     unsigned                    : 1;
4834     };
4835 
4836   struct
4837     {
4838     unsigned PA3                : 1;
4839     unsigned TX2                : 1;
4840     unsigned RX2                : 1;
4841     unsigned PD3                : 1;
4842     unsigned PD1                : 1;
4843     unsigned                    : 1;
4844     unsigned                    : 1;
4845     unsigned                    : 1;
4846     };
4847 
4848   struct
4849     {
4850     unsigned                    : 1;
4851     unsigned AN19               : 1;
4852     unsigned AN18               : 1;
4853     unsigned AN17               : 1;
4854     unsigned AN16               : 1;
4855     unsigned                    : 1;
4856     unsigned                    : 1;
4857     unsigned                    : 1;
4858     };
4859 
4860   struct
4861     {
4862     unsigned                    : 1;
4863     unsigned CK2                : 1;
4864     unsigned DT2                : 1;
4865     unsigned CCP4               : 1;
4866     unsigned CCP5               : 1;
4867     unsigned                    : 1;
4868     unsigned                    : 1;
4869     unsigned                    : 1;
4870     };
4871 
4872   struct
4873     {
4874     unsigned                    : 1;
4875     unsigned                    : 1;
4876     unsigned                    : 1;
4877     unsigned                    : 1;
4878     unsigned SEG26              : 1;
4879     unsigned                    : 1;
4880     unsigned                    : 1;
4881     unsigned                    : 1;
4882     };
4883 
4884   struct
4885     {
4886     unsigned                    : 1;
4887     unsigned                    : 1;
4888     unsigned                    : 1;
4889     unsigned                    : 1;
4890     unsigned T7CKI              : 1;
4891     unsigned                    : 1;
4892     unsigned                    : 1;
4893     unsigned                    : 1;
4894     };
4895 
4896   struct
4897     {
4898     unsigned                    : 1;
4899     unsigned                    : 1;
4900     unsigned                    : 1;
4901     unsigned                    : 1;
4902     unsigned T5G                : 1;
4903     unsigned                    : 1;
4904     unsigned                    : 1;
4905     unsigned                    : 1;
4906     };
4907 
4908   struct
4909     {
4910     unsigned                    : 1;
4911     unsigned                    : 1;
4912     unsigned                    : 1;
4913     unsigned                    : 1;
4914     unsigned RTCC               : 1;
4915     unsigned                    : 1;
4916     unsigned                    : 1;
4917     unsigned                    : 1;
4918     };
4919 
4920   struct
4921     {
4922     unsigned RG                 : 6;
4923     unsigned                    : 2;
4924     };
4925   } __PORTGbits_t;
4926 
4927 extern __at(0x0F86) volatile __PORTGbits_t PORTGbits;
4928 
4929 #define _PORTG_RG0              0x01
4930 #define _PORTG_CCP3             0x01
4931 #define _PORTG_PA3              0x01
4932 #define _PORTG_RG1              0x02
4933 #define _PORTG_C3OUT            0x02
4934 #define _PORTG_TX2              0x02
4935 #define _PORTG_AN19             0x02
4936 #define _PORTG_CK2              0x02
4937 #define _PORTG_RG2              0x04
4938 #define _PORTG_C3INA            0x04
4939 #define _PORTG_RX2              0x04
4940 #define _PORTG_AN18             0x04
4941 #define _PORTG_DT2              0x04
4942 #define _PORTG_RG3              0x08
4943 #define _PORTG_C3INB            0x08
4944 #define _PORTG_PD3              0x08
4945 #define _PORTG_AN17             0x08
4946 #define _PORTG_CCP4             0x08
4947 #define _PORTG_RG4              0x10
4948 #define _PORTG_C3INC            0x10
4949 #define _PORTG_PD1              0x10
4950 #define _PORTG_AN16             0x10
4951 #define _PORTG_CCP5             0x10
4952 #define _PORTG_SEG26            0x10
4953 #define _PORTG_T7CKI            0x10
4954 #define _PORTG_T5G              0x10
4955 #define _PORTG_RTCC             0x10
4956 #define _PORTG_RG5              0x20
4957 
4958 //==============================================================================
4959 
4960 
4961 //==============================================================================
4962 //        LATA Bits
4963 
4964 extern __at(0x0F89) __sfr LATA;
4965 
4966 typedef struct
4967   {
4968   unsigned LATA0                : 1;
4969   unsigned LATA1                : 1;
4970   unsigned LATA2                : 1;
4971   unsigned LATA3                : 1;
4972   unsigned LATA4                : 1;
4973   unsigned LATA5                : 1;
4974   unsigned LATA6                : 1;
4975   unsigned LATA7                : 1;
4976   } __LATAbits_t;
4977 
4978 extern __at(0x0F89) volatile __LATAbits_t LATAbits;
4979 
4980 #define _LATA0                  0x01
4981 #define _LATA1                  0x02
4982 #define _LATA2                  0x04
4983 #define _LATA3                  0x08
4984 #define _LATA4                  0x10
4985 #define _LATA5                  0x20
4986 #define _LATA6                  0x40
4987 #define _LATA7                  0x80
4988 
4989 //==============================================================================
4990 
4991 
4992 //==============================================================================
4993 //        LATB Bits
4994 
4995 extern __at(0x0F8A) __sfr LATB;
4996 
4997 typedef struct
4998   {
4999   unsigned LATB0                : 1;
5000   unsigned LATB1                : 1;
5001   unsigned LATB2                : 1;
5002   unsigned LATB3                : 1;
5003   unsigned LATB4                : 1;
5004   unsigned LATB5                : 1;
5005   unsigned LATB6                : 1;
5006   unsigned LATB7                : 1;
5007   } __LATBbits_t;
5008 
5009 extern __at(0x0F8A) volatile __LATBbits_t LATBbits;
5010 
5011 #define _LATB0                  0x01
5012 #define _LATB1                  0x02
5013 #define _LATB2                  0x04
5014 #define _LATB3                  0x08
5015 #define _LATB4                  0x10
5016 #define _LATB5                  0x20
5017 #define _LATB6                  0x40
5018 #define _LATB7                  0x80
5019 
5020 //==============================================================================
5021 
5022 
5023 //==============================================================================
5024 //        LATC Bits
5025 
5026 extern __at(0x0F8B) __sfr LATC;
5027 
5028 typedef struct
5029   {
5030   unsigned LATC0                : 1;
5031   unsigned LATC1                : 1;
5032   unsigned LATC2                : 1;
5033   unsigned LATC3                : 1;
5034   unsigned LATC4                : 1;
5035   unsigned LATC5                : 1;
5036   unsigned LATC6                : 1;
5037   unsigned LATC7                : 1;
5038   } __LATCbits_t;
5039 
5040 extern __at(0x0F8B) volatile __LATCbits_t LATCbits;
5041 
5042 #define _LATC0                  0x01
5043 #define _LATC1                  0x02
5044 #define _LATC2                  0x04
5045 #define _LATC3                  0x08
5046 #define _LATC4                  0x10
5047 #define _LATC5                  0x20
5048 #define _LATC6                  0x40
5049 #define _LATC7                  0x80
5050 
5051 //==============================================================================
5052 
5053 
5054 //==============================================================================
5055 //        LATD Bits
5056 
5057 extern __at(0x0F8C) __sfr LATD;
5058 
5059 typedef struct
5060   {
5061   unsigned LATD0                : 1;
5062   unsigned LATD1                : 1;
5063   unsigned LATD2                : 1;
5064   unsigned LATD3                : 1;
5065   unsigned LATD4                : 1;
5066   unsigned LATD5                : 1;
5067   unsigned LATD6                : 1;
5068   unsigned LATD7                : 1;
5069   } __LATDbits_t;
5070 
5071 extern __at(0x0F8C) volatile __LATDbits_t LATDbits;
5072 
5073 #define _LATD0                  0x01
5074 #define _LATD1                  0x02
5075 #define _LATD2                  0x04
5076 #define _LATD3                  0x08
5077 #define _LATD4                  0x10
5078 #define _LATD5                  0x20
5079 #define _LATD6                  0x40
5080 #define _LATD7                  0x80
5081 
5082 //==============================================================================
5083 
5084 
5085 //==============================================================================
5086 //        LATE Bits
5087 
5088 extern __at(0x0F8D) __sfr LATE;
5089 
5090 typedef struct
5091   {
5092   unsigned LATE0                : 1;
5093   unsigned LATE1                : 1;
5094   unsigned LATE2                : 1;
5095   unsigned LATE3                : 1;
5096   unsigned LATE4                : 1;
5097   unsigned LATE5                : 1;
5098   unsigned LATE6                : 1;
5099   unsigned LATE7                : 1;
5100   } __LATEbits_t;
5101 
5102 extern __at(0x0F8D) volatile __LATEbits_t LATEbits;
5103 
5104 #define _LATE0                  0x01
5105 #define _LATE1                  0x02
5106 #define _LATE2                  0x04
5107 #define _LATE3                  0x08
5108 #define _LATE4                  0x10
5109 #define _LATE5                  0x20
5110 #define _LATE6                  0x40
5111 #define _LATE7                  0x80
5112 
5113 //==============================================================================
5114 
5115 
5116 //==============================================================================
5117 //        LATF Bits
5118 
5119 extern __at(0x0F8E) __sfr LATF;
5120 
5121 typedef struct
5122   {
5123   unsigned                      : 1;
5124   unsigned LATF1                : 1;
5125   unsigned LATF2                : 1;
5126   unsigned LATF3                : 1;
5127   unsigned LATF4                : 1;
5128   unsigned LATF5                : 1;
5129   unsigned LATF6                : 1;
5130   unsigned LATF7                : 1;
5131   } __LATFbits_t;
5132 
5133 extern __at(0x0F8E) volatile __LATFbits_t LATFbits;
5134 
5135 #define _LATF1                  0x02
5136 #define _LATF2                  0x04
5137 #define _LATF3                  0x08
5138 #define _LATF4                  0x10
5139 #define _LATF5                  0x20
5140 #define _LATF6                  0x40
5141 #define _LATF7                  0x80
5142 
5143 //==============================================================================
5144 
5145 
5146 //==============================================================================
5147 //        LATG Bits
5148 
5149 extern __at(0x0F8F) __sfr LATG;
5150 
5151 typedef union
5152   {
5153   struct
5154     {
5155     unsigned LATG0              : 1;
5156     unsigned LATG1              : 1;
5157     unsigned LATG2              : 1;
5158     unsigned LATG3              : 1;
5159     unsigned LATG4              : 1;
5160     unsigned                    : 1;
5161     unsigned                    : 1;
5162     unsigned                    : 1;
5163     };
5164 
5165   struct
5166     {
5167     unsigned LATG               : 5;
5168     unsigned                    : 3;
5169     };
5170   } __LATGbits_t;
5171 
5172 extern __at(0x0F8F) volatile __LATGbits_t LATGbits;
5173 
5174 #define _LATG0                  0x01
5175 #define _LATG1                  0x02
5176 #define _LATG2                  0x04
5177 #define _LATG3                  0x08
5178 #define _LATG4                  0x10
5179 
5180 //==============================================================================
5181 
5182 
5183 //==============================================================================
5184 //        TRISA Bits
5185 
5186 extern __at(0x0F92) __sfr TRISA;
5187 
5188 typedef struct
5189   {
5190   unsigned TRISA0               : 1;
5191   unsigned TRISA1               : 1;
5192   unsigned TRISA2               : 1;
5193   unsigned TRISA3               : 1;
5194   unsigned TRISA4               : 1;
5195   unsigned TRISA5               : 1;
5196   unsigned TRISA6               : 1;
5197   unsigned TRISA7               : 1;
5198   } __TRISAbits_t;
5199 
5200 extern __at(0x0F92) volatile __TRISAbits_t TRISAbits;
5201 
5202 #define _TRISA0                 0x01
5203 #define _TRISA1                 0x02
5204 #define _TRISA2                 0x04
5205 #define _TRISA3                 0x08
5206 #define _TRISA4                 0x10
5207 #define _TRISA5                 0x20
5208 #define _TRISA6                 0x40
5209 #define _TRISA7                 0x80
5210 
5211 //==============================================================================
5212 
5213 
5214 //==============================================================================
5215 //        TRISB Bits
5216 
5217 extern __at(0x0F93) __sfr TRISB;
5218 
5219 typedef struct
5220   {
5221   unsigned TRISB0               : 1;
5222   unsigned TRISB1               : 1;
5223   unsigned TRISB2               : 1;
5224   unsigned TRISB3               : 1;
5225   unsigned TRISB4               : 1;
5226   unsigned TRISB5               : 1;
5227   unsigned TRISB6               : 1;
5228   unsigned TRISB7               : 1;
5229   } __TRISBbits_t;
5230 
5231 extern __at(0x0F93) volatile __TRISBbits_t TRISBbits;
5232 
5233 #define _TRISB0                 0x01
5234 #define _TRISB1                 0x02
5235 #define _TRISB2                 0x04
5236 #define _TRISB3                 0x08
5237 #define _TRISB4                 0x10
5238 #define _TRISB5                 0x20
5239 #define _TRISB6                 0x40
5240 #define _TRISB7                 0x80
5241 
5242 //==============================================================================
5243 
5244 
5245 //==============================================================================
5246 //        TRISC Bits
5247 
5248 extern __at(0x0F94) __sfr TRISC;
5249 
5250 typedef struct
5251   {
5252   unsigned TRISC0               : 1;
5253   unsigned TRISC1               : 1;
5254   unsigned TRISC2               : 1;
5255   unsigned TRISC3               : 1;
5256   unsigned TRISC4               : 1;
5257   unsigned TRISC5               : 1;
5258   unsigned TRISC6               : 1;
5259   unsigned TRISC7               : 1;
5260   } __TRISCbits_t;
5261 
5262 extern __at(0x0F94) volatile __TRISCbits_t TRISCbits;
5263 
5264 #define _TRISC0                 0x01
5265 #define _TRISC1                 0x02
5266 #define _TRISC2                 0x04
5267 #define _TRISC3                 0x08
5268 #define _TRISC4                 0x10
5269 #define _TRISC5                 0x20
5270 #define _TRISC6                 0x40
5271 #define _TRISC7                 0x80
5272 
5273 //==============================================================================
5274 
5275 
5276 //==============================================================================
5277 //        TRISD Bits
5278 
5279 extern __at(0x0F95) __sfr TRISD;
5280 
5281 typedef struct
5282   {
5283   unsigned TRISD0               : 1;
5284   unsigned TRISD1               : 1;
5285   unsigned TRISD2               : 1;
5286   unsigned TRISD3               : 1;
5287   unsigned TRISD4               : 1;
5288   unsigned TRISD5               : 1;
5289   unsigned TRISD6               : 1;
5290   unsigned TRISD7               : 1;
5291   } __TRISDbits_t;
5292 
5293 extern __at(0x0F95) volatile __TRISDbits_t TRISDbits;
5294 
5295 #define _TRISD0                 0x01
5296 #define _TRISD1                 0x02
5297 #define _TRISD2                 0x04
5298 #define _TRISD3                 0x08
5299 #define _TRISD4                 0x10
5300 #define _TRISD5                 0x20
5301 #define _TRISD6                 0x40
5302 #define _TRISD7                 0x80
5303 
5304 //==============================================================================
5305 
5306 
5307 //==============================================================================
5308 //        TRISE Bits
5309 
5310 extern __at(0x0F96) __sfr TRISE;
5311 
5312 typedef struct
5313   {
5314   unsigned TRISE0               : 1;
5315   unsigned TRISE1               : 1;
5316   unsigned TRISE2               : 1;
5317   unsigned TRISE3               : 1;
5318   unsigned TRISE4               : 1;
5319   unsigned TRISE5               : 1;
5320   unsigned TRISE6               : 1;
5321   unsigned TRISE7               : 1;
5322   } __TRISEbits_t;
5323 
5324 extern __at(0x0F96) volatile __TRISEbits_t TRISEbits;
5325 
5326 #define _TRISE0                 0x01
5327 #define _TRISE1                 0x02
5328 #define _TRISE2                 0x04
5329 #define _TRISE3                 0x08
5330 #define _TRISE4                 0x10
5331 #define _TRISE5                 0x20
5332 #define _TRISE6                 0x40
5333 #define _TRISE7                 0x80
5334 
5335 //==============================================================================
5336 
5337 
5338 //==============================================================================
5339 //        TRISF Bits
5340 
5341 extern __at(0x0F97) __sfr TRISF;
5342 
5343 typedef struct
5344   {
5345   unsigned                      : 1;
5346   unsigned TRISF1               : 1;
5347   unsigned TRISF2               : 1;
5348   unsigned TRISF3               : 1;
5349   unsigned TRISF4               : 1;
5350   unsigned TRISF5               : 1;
5351   unsigned TRISF6               : 1;
5352   unsigned TRISF7               : 1;
5353   } __TRISFbits_t;
5354 
5355 extern __at(0x0F97) volatile __TRISFbits_t TRISFbits;
5356 
5357 #define _TRISF1                 0x02
5358 #define _TRISF2                 0x04
5359 #define _TRISF3                 0x08
5360 #define _TRISF4                 0x10
5361 #define _TRISF5                 0x20
5362 #define _TRISF6                 0x40
5363 #define _TRISF7                 0x80
5364 
5365 //==============================================================================
5366 
5367 
5368 //==============================================================================
5369 //        TRISG Bits
5370 
5371 extern __at(0x0F98) __sfr TRISG;
5372 
5373 typedef union
5374   {
5375   struct
5376     {
5377     unsigned TRISG0             : 1;
5378     unsigned TRISG1             : 1;
5379     unsigned TRISG2             : 1;
5380     unsigned TRISG3             : 1;
5381     unsigned TRISG4             : 1;
5382     unsigned                    : 1;
5383     unsigned                    : 1;
5384     unsigned                    : 1;
5385     };
5386 
5387   struct
5388     {
5389     unsigned TRISG              : 5;
5390     unsigned                    : 3;
5391     };
5392   } __TRISGbits_t;
5393 
5394 extern __at(0x0F98) volatile __TRISGbits_t TRISGbits;
5395 
5396 #define _TRISG0                 0x01
5397 #define _TRISG1                 0x02
5398 #define _TRISG2                 0x04
5399 #define _TRISG3                 0x08
5400 #define _TRISG4                 0x10
5401 
5402 //==============================================================================
5403 
5404 
5405 //==============================================================================
5406 //        OSCTUNE Bits
5407 
5408 extern __at(0x0F9B) __sfr OSCTUNE;
5409 
5410 typedef union
5411   {
5412   struct
5413     {
5414     unsigned TUN0               : 1;
5415     unsigned TUN1               : 1;
5416     unsigned TUN2               : 1;
5417     unsigned TUN3               : 1;
5418     unsigned TUN4               : 1;
5419     unsigned TUN5               : 1;
5420     unsigned PLLEN              : 1;
5421     unsigned INTSRC             : 1;
5422     };
5423 
5424   struct
5425     {
5426     unsigned TUN                : 6;
5427     unsigned                    : 2;
5428     };
5429   } __OSCTUNEbits_t;
5430 
5431 extern __at(0x0F9B) volatile __OSCTUNEbits_t OSCTUNEbits;
5432 
5433 #define _TUN0                   0x01
5434 #define _TUN1                   0x02
5435 #define _TUN2                   0x04
5436 #define _TUN3                   0x08
5437 #define _TUN4                   0x10
5438 #define _TUN5                   0x20
5439 #define _PLLEN                  0x40
5440 #define _INTSRC                 0x80
5441 
5442 //==============================================================================
5443 
5444 
5445 //==============================================================================
5446 //        PSTR1CON Bits
5447 
5448 extern __at(0x0F9C) __sfr PSTR1CON;
5449 
5450 typedef union
5451   {
5452   struct
5453     {
5454     unsigned STRA               : 1;
5455     unsigned STRB               : 1;
5456     unsigned STRC               : 1;
5457     unsigned STRD               : 1;
5458     unsigned STRSYNC            : 1;
5459     unsigned                    : 1;
5460     unsigned CMPL0              : 1;
5461     unsigned CMPL1              : 1;
5462     };
5463 
5464   struct
5465     {
5466     unsigned                    : 6;
5467     unsigned CMPL               : 2;
5468     };
5469   } __PSTR1CONbits_t;
5470 
5471 extern __at(0x0F9C) volatile __PSTR1CONbits_t PSTR1CONbits;
5472 
5473 #define _STRA                   0x01
5474 #define _STRB                   0x02
5475 #define _STRC                   0x04
5476 #define _STRD                   0x08
5477 #define _STRSYNC                0x10
5478 #define _CMPL0                  0x40
5479 #define _CMPL1                  0x80
5480 
5481 //==============================================================================
5482 
5483 
5484 //==============================================================================
5485 //        PIE1 Bits
5486 
5487 extern __at(0x0F9D) __sfr PIE1;
5488 
5489 typedef union
5490   {
5491   struct
5492     {
5493     unsigned TMR1IE             : 1;
5494     unsigned TMR2IE             : 1;
5495     unsigned TMR1GIE            : 1;
5496     unsigned SSP1IE             : 1;
5497     unsigned TX1IE              : 1;
5498     unsigned RC1IE              : 1;
5499     unsigned ADIE               : 1;
5500     unsigned                    : 1;
5501     };
5502 
5503   struct
5504     {
5505     unsigned                    : 1;
5506     unsigned                    : 1;
5507     unsigned                    : 1;
5508     unsigned SSPIE              : 1;
5509     unsigned TXIE               : 1;
5510     unsigned RCIE               : 1;
5511     unsigned                    : 1;
5512     unsigned                    : 1;
5513     };
5514   } __PIE1bits_t;
5515 
5516 extern __at(0x0F9D) volatile __PIE1bits_t PIE1bits;
5517 
5518 #define _TMR1IE                 0x01
5519 #define _TMR2IE                 0x02
5520 #define _TMR1GIE                0x04
5521 #define _SSP1IE                 0x08
5522 #define _SSPIE                  0x08
5523 #define _TX1IE                  0x10
5524 #define _TXIE                   0x10
5525 #define _RC1IE                  0x20
5526 #define _RCIE                   0x20
5527 #define _ADIE                   0x40
5528 
5529 //==============================================================================
5530 
5531 
5532 //==============================================================================
5533 //        PIR1 Bits
5534 
5535 extern __at(0x0F9E) __sfr PIR1;
5536 
5537 typedef union
5538   {
5539   struct
5540     {
5541     unsigned TMR1IF             : 1;
5542     unsigned TMR2IF             : 1;
5543     unsigned TMR1GIF            : 1;
5544     unsigned SSP1IF             : 1;
5545     unsigned TX1IF              : 1;
5546     unsigned RC1IF              : 1;
5547     unsigned ADIF               : 1;
5548     unsigned                    : 1;
5549     };
5550 
5551   struct
5552     {
5553     unsigned                    : 1;
5554     unsigned                    : 1;
5555     unsigned                    : 1;
5556     unsigned SSPIF              : 1;
5557     unsigned TXIF               : 1;
5558     unsigned RCIF               : 1;
5559     unsigned                    : 1;
5560     unsigned                    : 1;
5561     };
5562   } __PIR1bits_t;
5563 
5564 extern __at(0x0F9E) volatile __PIR1bits_t PIR1bits;
5565 
5566 #define _TMR1IF                 0x01
5567 #define _TMR2IF                 0x02
5568 #define _TMR1GIF                0x04
5569 #define _SSP1IF                 0x08
5570 #define _SSPIF                  0x08
5571 #define _TX1IF                  0x10
5572 #define _TXIF                   0x10
5573 #define _RC1IF                  0x20
5574 #define _RCIF                   0x20
5575 #define _ADIF                   0x40
5576 
5577 //==============================================================================
5578 
5579 
5580 //==============================================================================
5581 //        IPR1 Bits
5582 
5583 extern __at(0x0F9F) __sfr IPR1;
5584 
5585 typedef union
5586   {
5587   struct
5588     {
5589     unsigned TMR1IP             : 1;
5590     unsigned TMR2IP             : 1;
5591     unsigned TMR1GIP            : 1;
5592     unsigned SSP1IP             : 1;
5593     unsigned TX1IP              : 1;
5594     unsigned RC1IP              : 1;
5595     unsigned ADIP               : 1;
5596     unsigned                    : 1;
5597     };
5598 
5599   struct
5600     {
5601     unsigned                    : 1;
5602     unsigned                    : 1;
5603     unsigned                    : 1;
5604     unsigned SSPIP              : 1;
5605     unsigned TXIP               : 1;
5606     unsigned RCIP               : 1;
5607     unsigned                    : 1;
5608     unsigned                    : 1;
5609     };
5610   } __IPR1bits_t;
5611 
5612 extern __at(0x0F9F) volatile __IPR1bits_t IPR1bits;
5613 
5614 #define _TMR1IP                 0x01
5615 #define _TMR2IP                 0x02
5616 #define _TMR1GIP                0x04
5617 #define _SSP1IP                 0x08
5618 #define _SSPIP                  0x08
5619 #define _TX1IP                  0x10
5620 #define _TXIP                   0x10
5621 #define _RC1IP                  0x20
5622 #define _RCIP                   0x20
5623 #define _ADIP                   0x40
5624 
5625 //==============================================================================
5626 
5627 
5628 //==============================================================================
5629 //        PIE2 Bits
5630 
5631 extern __at(0x0FA0) __sfr PIE2;
5632 
5633 typedef union
5634   {
5635   struct
5636     {
5637     unsigned TMR3GIE            : 1;
5638     unsigned TMR3IE             : 1;
5639     unsigned HLVDIE             : 1;
5640     unsigned BCL1IE             : 1;
5641     unsigned BCL2IE             : 1;
5642     unsigned SSP2IE             : 1;
5643     unsigned                    : 1;
5644     unsigned OSCFIE             : 1;
5645     };
5646 
5647   struct
5648     {
5649     unsigned                    : 1;
5650     unsigned                    : 1;
5651     unsigned LVDIE              : 1;
5652     unsigned BCLIE              : 1;
5653     unsigned                    : 1;
5654     unsigned                    : 1;
5655     unsigned                    : 1;
5656     unsigned                    : 1;
5657     };
5658   } __PIE2bits_t;
5659 
5660 extern __at(0x0FA0) volatile __PIE2bits_t PIE2bits;
5661 
5662 #define _TMR3GIE                0x01
5663 #define _TMR3IE                 0x02
5664 #define _HLVDIE                 0x04
5665 #define _LVDIE                  0x04
5666 #define _BCL1IE                 0x08
5667 #define _BCLIE                  0x08
5668 #define _BCL2IE                 0x10
5669 #define _SSP2IE                 0x20
5670 #define _OSCFIE                 0x80
5671 
5672 //==============================================================================
5673 
5674 
5675 //==============================================================================
5676 //        PIR2 Bits
5677 
5678 extern __at(0x0FA1) __sfr PIR2;
5679 
5680 typedef union
5681   {
5682   struct
5683     {
5684     unsigned TMR3GIF            : 1;
5685     unsigned TMR3IF             : 1;
5686     unsigned HLVDIF             : 1;
5687     unsigned BCL1IF             : 1;
5688     unsigned BCL2IF             : 1;
5689     unsigned SSP2IF             : 1;
5690     unsigned                    : 1;
5691     unsigned OSCFIF             : 1;
5692     };
5693 
5694   struct
5695     {
5696     unsigned                    : 1;
5697     unsigned                    : 1;
5698     unsigned LVDIF              : 1;
5699     unsigned BCLIF              : 1;
5700     unsigned                    : 1;
5701     unsigned                    : 1;
5702     unsigned                    : 1;
5703     unsigned                    : 1;
5704     };
5705   } __PIR2bits_t;
5706 
5707 extern __at(0x0FA1) volatile __PIR2bits_t PIR2bits;
5708 
5709 #define _TMR3GIF                0x01
5710 #define _TMR3IF                 0x02
5711 #define _HLVDIF                 0x04
5712 #define _LVDIF                  0x04
5713 #define _BCL1IF                 0x08
5714 #define _BCLIF                  0x08
5715 #define _BCL2IF                 0x10
5716 #define _SSP2IF                 0x20
5717 #define _OSCFIF                 0x80
5718 
5719 //==============================================================================
5720 
5721 
5722 //==============================================================================
5723 //        IPR2 Bits
5724 
5725 extern __at(0x0FA2) __sfr IPR2;
5726 
5727 typedef union
5728   {
5729   struct
5730     {
5731     unsigned TMR3GIP            : 1;
5732     unsigned TMR3IP             : 1;
5733     unsigned HLVDIP             : 1;
5734     unsigned BCL1IP             : 1;
5735     unsigned BCL2IP             : 1;
5736     unsigned SSP2IP             : 1;
5737     unsigned                    : 1;
5738     unsigned OSCFIP             : 1;
5739     };
5740 
5741   struct
5742     {
5743     unsigned                    : 1;
5744     unsigned                    : 1;
5745     unsigned LVDIP              : 1;
5746     unsigned BCLIP              : 1;
5747     unsigned                    : 1;
5748     unsigned                    : 1;
5749     unsigned                    : 1;
5750     unsigned                    : 1;
5751     };
5752   } __IPR2bits_t;
5753 
5754 extern __at(0x0FA2) volatile __IPR2bits_t IPR2bits;
5755 
5756 #define _TMR3GIP                0x01
5757 #define _TMR3IP                 0x02
5758 #define _HLVDIP                 0x04
5759 #define _LVDIP                  0x04
5760 #define _BCL1IP                 0x08
5761 #define _BCLIP                  0x08
5762 #define _BCL2IP                 0x10
5763 #define _SSP2IP                 0x20
5764 #define _OSCFIP                 0x80
5765 
5766 //==============================================================================
5767 
5768 
5769 //==============================================================================
5770 //        PIE3 Bits
5771 
5772 extern __at(0x0FA3) __sfr PIE3;
5773 
5774 typedef struct
5775   {
5776   unsigned RTCCIE               : 1;
5777   unsigned CCP1IE               : 1;
5778   unsigned CCP2IE               : 1;
5779   unsigned CTMUIE               : 1;
5780   unsigned TX2IE                : 1;
5781   unsigned RC2IE                : 1;
5782   unsigned LCDIE                : 1;
5783   unsigned TMR5GIE              : 1;
5784   } __PIE3bits_t;
5785 
5786 extern __at(0x0FA3) volatile __PIE3bits_t PIE3bits;
5787 
5788 #define _RTCCIE                 0x01
5789 #define _CCP1IE                 0x02
5790 #define _CCP2IE                 0x04
5791 #define _CTMUIE                 0x08
5792 #define _TX2IE                  0x10
5793 #define _RC2IE                  0x20
5794 #define _LCDIE                  0x40
5795 #define _TMR5GIE                0x80
5796 
5797 //==============================================================================
5798 
5799 
5800 //==============================================================================
5801 //        PIR3 Bits
5802 
5803 extern __at(0x0FA4) __sfr PIR3;
5804 
5805 typedef struct
5806   {
5807   unsigned RTCCIF               : 1;
5808   unsigned CCP1IF               : 1;
5809   unsigned CCP2IF               : 1;
5810   unsigned CTMUIF               : 1;
5811   unsigned TX2IF                : 1;
5812   unsigned RC2IF                : 1;
5813   unsigned LCDIF                : 1;
5814   unsigned TMR5GIF              : 1;
5815   } __PIR3bits_t;
5816 
5817 extern __at(0x0FA4) volatile __PIR3bits_t PIR3bits;
5818 
5819 #define _RTCCIF                 0x01
5820 #define _CCP1IF                 0x02
5821 #define _CCP2IF                 0x04
5822 #define _CTMUIF                 0x08
5823 #define _TX2IF                  0x10
5824 #define _RC2IF                  0x20
5825 #define _LCDIF                  0x40
5826 #define _TMR5GIF                0x80
5827 
5828 //==============================================================================
5829 
5830 
5831 //==============================================================================
5832 //        IPR3 Bits
5833 
5834 extern __at(0x0FA5) __sfr IPR3;
5835 
5836 typedef struct
5837   {
5838   unsigned RTCCIP               : 1;
5839   unsigned CCP1IP               : 1;
5840   unsigned CCP2IP               : 1;
5841   unsigned CTMUIP               : 1;
5842   unsigned TX2IP                : 1;
5843   unsigned RC2IP                : 1;
5844   unsigned LCDIP                : 1;
5845   unsigned TMR5GIP              : 1;
5846   } __IPR3bits_t;
5847 
5848 extern __at(0x0FA5) volatile __IPR3bits_t IPR3bits;
5849 
5850 #define _RTCCIP                 0x01
5851 #define _CCP1IP                 0x02
5852 #define _CCP2IP                 0x04
5853 #define _CTMUIP                 0x08
5854 #define _TX2IP                  0x10
5855 #define _RC2IP                  0x20
5856 #define _LCDIP                  0x40
5857 #define _TMR5GIP                0x80
5858 
5859 //==============================================================================
5860 
5861 
5862 //==============================================================================
5863 //        PIR6 Bits
5864 
5865 extern __at(0x0FA6) __sfr PIR6;
5866 
5867 typedef struct
5868   {
5869   unsigned CMP1IF               : 1;
5870   unsigned CMP2IF               : 1;
5871   unsigned CMP3IF               : 1;
5872   unsigned                      : 1;
5873   unsigned EEIF                 : 1;
5874   unsigned                      : 1;
5875   unsigned                      : 1;
5876   unsigned                      : 1;
5877   } __PIR6bits_t;
5878 
5879 extern __at(0x0FA6) volatile __PIR6bits_t PIR6bits;
5880 
5881 #define _CMP1IF                 0x01
5882 #define _CMP2IF                 0x02
5883 #define _CMP3IF                 0x04
5884 #define _EEIF                   0x10
5885 
5886 //==============================================================================
5887 
5888 
5889 //==============================================================================
5890 //        HLVDCON Bits
5891 
5892 extern __at(0x0FA8) __sfr HLVDCON;
5893 
5894 typedef union
5895   {
5896   struct
5897     {
5898     unsigned HLVDL0             : 1;
5899     unsigned HLVDL1             : 1;
5900     unsigned HLVDL2             : 1;
5901     unsigned HLVDL3             : 1;
5902     unsigned HLVDEN             : 1;
5903     unsigned IRVST              : 1;
5904     unsigned BGVST              : 1;
5905     unsigned VDIRMAG            : 1;
5906     };
5907 
5908   struct
5909     {
5910     unsigned HLVDL              : 4;
5911     unsigned                    : 4;
5912     };
5913   } __HLVDCONbits_t;
5914 
5915 extern __at(0x0FA8) volatile __HLVDCONbits_t HLVDCONbits;
5916 
5917 #define _HLVDL0                 0x01
5918 #define _HLVDL1                 0x02
5919 #define _HLVDL2                 0x04
5920 #define _HLVDL3                 0x08
5921 #define _HLVDEN                 0x10
5922 #define _IRVST                  0x20
5923 #define _BGVST                  0x40
5924 #define _VDIRMAG                0x80
5925 
5926 //==============================================================================
5927 
5928 
5929 //==============================================================================
5930 //        IPR6 Bits
5931 
5932 extern __at(0x0FA9) __sfr IPR6;
5933 
5934 typedef struct
5935   {
5936   unsigned CMP1IP               : 1;
5937   unsigned CMP2IP               : 1;
5938   unsigned CMP3IP               : 1;
5939   unsigned                      : 1;
5940   unsigned EEIP                 : 1;
5941   unsigned                      : 1;
5942   unsigned                      : 1;
5943   unsigned                      : 1;
5944   } __IPR6bits_t;
5945 
5946 extern __at(0x0FA9) volatile __IPR6bits_t IPR6bits;
5947 
5948 #define _CMP1IP                 0x01
5949 #define _CMP2IP                 0x02
5950 #define _CMP3IP                 0x04
5951 #define _EEIP                   0x10
5952 
5953 //==============================================================================
5954 
5955 
5956 //==============================================================================
5957 //        T1GCON Bits
5958 
5959 extern __at(0x0FAA) __sfr T1GCON;
5960 
5961 typedef union
5962   {
5963   struct
5964     {
5965     unsigned T1GSS0             : 1;
5966     unsigned T1GSS1             : 1;
5967     unsigned T1GVAL             : 1;
5968     unsigned T1GGO_NOT_T1DONE   : 1;
5969     unsigned T1GSPM             : 1;
5970     unsigned T1GTM              : 1;
5971     unsigned T1GPOL             : 1;
5972     unsigned TMR1GE             : 1;
5973     };
5974 
5975   struct
5976     {
5977     unsigned                    : 1;
5978     unsigned                    : 1;
5979     unsigned                    : 1;
5980     unsigned T1GGO              : 1;
5981     unsigned                    : 1;
5982     unsigned                    : 1;
5983     unsigned                    : 1;
5984     unsigned                    : 1;
5985     };
5986 
5987   struct
5988     {
5989     unsigned                    : 1;
5990     unsigned                    : 1;
5991     unsigned                    : 1;
5992     unsigned NOT_T1DONE         : 1;
5993     unsigned                    : 1;
5994     unsigned                    : 1;
5995     unsigned                    : 1;
5996     unsigned                    : 1;
5997     };
5998 
5999   struct
6000     {
6001     unsigned T1GSS              : 2;
6002     unsigned                    : 6;
6003     };
6004   } __T1GCONbits_t;
6005 
6006 extern __at(0x0FAA) volatile __T1GCONbits_t T1GCONbits;
6007 
6008 #define _T1GSS0                 0x01
6009 #define _T1GSS1                 0x02
6010 #define _T1GVAL                 0x04
6011 #define _T1GGO_NOT_T1DONE       0x08
6012 #define _T1GGO                  0x08
6013 #define _NOT_T1DONE             0x08
6014 #define _T1GSPM                 0x10
6015 #define _T1GTM                  0x20
6016 #define _T1GPOL                 0x40
6017 #define _TMR1GE                 0x80
6018 
6019 //==============================================================================
6020 
6021 
6022 //==============================================================================
6023 //        RCSTA Bits
6024 
6025 extern __at(0x0FAB) __sfr RCSTA;
6026 
6027 typedef union
6028   {
6029   struct
6030     {
6031     unsigned RX9D               : 1;
6032     unsigned OERR               : 1;
6033     unsigned FERR               : 1;
6034     unsigned ADDEN              : 1;
6035     unsigned CREN               : 1;
6036     unsigned SREN               : 1;
6037     unsigned RX9                : 1;
6038     unsigned SPEN               : 1;
6039     };
6040 
6041   struct
6042     {
6043     unsigned RCD8               : 1;
6044     unsigned OERR1              : 1;
6045     unsigned FERR1              : 1;
6046     unsigned ADEN               : 1;
6047     unsigned CREN1              : 1;
6048     unsigned SREN1              : 1;
6049     unsigned RC9                : 1;
6050     unsigned SPEN1              : 1;
6051     };
6052 
6053   struct
6054     {
6055     unsigned RX9D1              : 1;
6056     unsigned                    : 1;
6057     unsigned                    : 1;
6058     unsigned ADDEN1             : 1;
6059     unsigned                    : 1;
6060     unsigned                    : 1;
6061     unsigned NOT_RC8            : 1;
6062     unsigned                    : 1;
6063     };
6064 
6065   struct
6066     {
6067     unsigned                    : 1;
6068     unsigned                    : 1;
6069     unsigned                    : 1;
6070     unsigned                    : 1;
6071     unsigned                    : 1;
6072     unsigned                    : 1;
6073     unsigned RC8_9              : 1;
6074     unsigned                    : 1;
6075     };
6076 
6077   struct
6078     {
6079     unsigned                    : 1;
6080     unsigned                    : 1;
6081     unsigned                    : 1;
6082     unsigned                    : 1;
6083     unsigned                    : 1;
6084     unsigned                    : 1;
6085     unsigned RX91               : 1;
6086     unsigned                    : 1;
6087     };
6088   } __RCSTAbits_t;
6089 
6090 extern __at(0x0FAB) volatile __RCSTAbits_t RCSTAbits;
6091 
6092 #define _RX9D                   0x01
6093 #define _RCD8                   0x01
6094 #define _RX9D1                  0x01
6095 #define _OERR                   0x02
6096 #define _OERR1                  0x02
6097 #define _FERR                   0x04
6098 #define _FERR1                  0x04
6099 #define _ADDEN                  0x08
6100 #define _ADEN                   0x08
6101 #define _ADDEN1                 0x08
6102 #define _CREN                   0x10
6103 #define _CREN1                  0x10
6104 #define _SREN                   0x20
6105 #define _SREN1                  0x20
6106 #define _RX9                    0x40
6107 #define _RC9                    0x40
6108 #define _NOT_RC8                0x40
6109 #define _RC8_9                  0x40
6110 #define _RX91                   0x40
6111 #define _SPEN                   0x80
6112 #define _SPEN1                  0x80
6113 
6114 //==============================================================================
6115 
6116 
6117 //==============================================================================
6118 //        RCSTA1 Bits
6119 
6120 extern __at(0x0FAB) __sfr RCSTA1;
6121 
6122 typedef union
6123   {
6124   struct
6125     {
6126     unsigned RX9D               : 1;
6127     unsigned OERR               : 1;
6128     unsigned FERR               : 1;
6129     unsigned ADDEN              : 1;
6130     unsigned CREN               : 1;
6131     unsigned SREN               : 1;
6132     unsigned RX9                : 1;
6133     unsigned SPEN               : 1;
6134     };
6135 
6136   struct
6137     {
6138     unsigned RCD8               : 1;
6139     unsigned OERR1              : 1;
6140     unsigned FERR1              : 1;
6141     unsigned ADEN               : 1;
6142     unsigned CREN1              : 1;
6143     unsigned SREN1              : 1;
6144     unsigned RC9                : 1;
6145     unsigned SPEN1              : 1;
6146     };
6147 
6148   struct
6149     {
6150     unsigned RX9D1              : 1;
6151     unsigned                    : 1;
6152     unsigned                    : 1;
6153     unsigned ADDEN1             : 1;
6154     unsigned                    : 1;
6155     unsigned                    : 1;
6156     unsigned NOT_RC8            : 1;
6157     unsigned                    : 1;
6158     };
6159 
6160   struct
6161     {
6162     unsigned                    : 1;
6163     unsigned                    : 1;
6164     unsigned                    : 1;
6165     unsigned                    : 1;
6166     unsigned                    : 1;
6167     unsigned                    : 1;
6168     unsigned RC8_9              : 1;
6169     unsigned                    : 1;
6170     };
6171 
6172   struct
6173     {
6174     unsigned                    : 1;
6175     unsigned                    : 1;
6176     unsigned                    : 1;
6177     unsigned                    : 1;
6178     unsigned                    : 1;
6179     unsigned                    : 1;
6180     unsigned RX91               : 1;
6181     unsigned                    : 1;
6182     };
6183   } __RCSTA1bits_t;
6184 
6185 extern __at(0x0FAB) volatile __RCSTA1bits_t RCSTA1bits;
6186 
6187 #define _RCSTA1_RX9D            0x01
6188 #define _RCSTA1_RCD8            0x01
6189 #define _RCSTA1_RX9D1           0x01
6190 #define _RCSTA1_OERR            0x02
6191 #define _RCSTA1_OERR1           0x02
6192 #define _RCSTA1_FERR            0x04
6193 #define _RCSTA1_FERR1           0x04
6194 #define _RCSTA1_ADDEN           0x08
6195 #define _RCSTA1_ADEN            0x08
6196 #define _RCSTA1_ADDEN1          0x08
6197 #define _RCSTA1_CREN            0x10
6198 #define _RCSTA1_CREN1           0x10
6199 #define _RCSTA1_SREN            0x20
6200 #define _RCSTA1_SREN1           0x20
6201 #define _RCSTA1_RX9             0x40
6202 #define _RCSTA1_RC9             0x40
6203 #define _RCSTA1_NOT_RC8         0x40
6204 #define _RCSTA1_RC8_9           0x40
6205 #define _RCSTA1_RX91            0x40
6206 #define _RCSTA1_SPEN            0x80
6207 #define _RCSTA1_SPEN1           0x80
6208 
6209 //==============================================================================
6210 
6211 
6212 //==============================================================================
6213 //        TXSTA Bits
6214 
6215 extern __at(0x0FAC) __sfr TXSTA;
6216 
6217 typedef union
6218   {
6219   struct
6220     {
6221     unsigned TX9D               : 1;
6222     unsigned TRMT               : 1;
6223     unsigned BRGH               : 1;
6224     unsigned SENDB              : 1;
6225     unsigned SYNC               : 1;
6226     unsigned TXEN               : 1;
6227     unsigned TX9                : 1;
6228     unsigned CSRC               : 1;
6229     };
6230 
6231   struct
6232     {
6233     unsigned TXD8               : 1;
6234     unsigned TRMT1              : 1;
6235     unsigned BRGH1              : 1;
6236     unsigned SENDB1             : 1;
6237     unsigned SYNC1              : 1;
6238     unsigned TXEN1              : 1;
6239     unsigned TX8_9              : 1;
6240     unsigned CSRC1              : 1;
6241     };
6242 
6243   struct
6244     {
6245     unsigned TX9D1              : 1;
6246     unsigned                    : 1;
6247     unsigned                    : 1;
6248     unsigned                    : 1;
6249     unsigned                    : 1;
6250     unsigned                    : 1;
6251     unsigned NOT_TX8            : 1;
6252     unsigned                    : 1;
6253     };
6254 
6255   struct
6256     {
6257     unsigned                    : 1;
6258     unsigned                    : 1;
6259     unsigned                    : 1;
6260     unsigned                    : 1;
6261     unsigned                    : 1;
6262     unsigned                    : 1;
6263     unsigned TX91               : 1;
6264     unsigned                    : 1;
6265     };
6266   } __TXSTAbits_t;
6267 
6268 extern __at(0x0FAC) volatile __TXSTAbits_t TXSTAbits;
6269 
6270 #define _TX9D                   0x01
6271 #define _TXD8                   0x01
6272 #define _TX9D1                  0x01
6273 #define _TRMT                   0x02
6274 #define _TRMT1                  0x02
6275 #define _BRGH                   0x04
6276 #define _BRGH1                  0x04
6277 #define _SENDB                  0x08
6278 #define _SENDB1                 0x08
6279 #define _SYNC                   0x10
6280 #define _SYNC1                  0x10
6281 #define _TXEN                   0x20
6282 #define _TXEN1                  0x20
6283 #define _TX9                    0x40
6284 #define _TX8_9                  0x40
6285 #define _NOT_TX8                0x40
6286 #define _TX91                   0x40
6287 #define _CSRC                   0x80
6288 #define _CSRC1                  0x80
6289 
6290 //==============================================================================
6291 
6292 
6293 //==============================================================================
6294 //        TXSTA1 Bits
6295 
6296 extern __at(0x0FAC) __sfr TXSTA1;
6297 
6298 typedef union
6299   {
6300   struct
6301     {
6302     unsigned TX9D               : 1;
6303     unsigned TRMT               : 1;
6304     unsigned BRGH               : 1;
6305     unsigned SENDB              : 1;
6306     unsigned SYNC               : 1;
6307     unsigned TXEN               : 1;
6308     unsigned TX9                : 1;
6309     unsigned CSRC               : 1;
6310     };
6311 
6312   struct
6313     {
6314     unsigned TXD8               : 1;
6315     unsigned TRMT1              : 1;
6316     unsigned BRGH1              : 1;
6317     unsigned SENDB1             : 1;
6318     unsigned SYNC1              : 1;
6319     unsigned TXEN1              : 1;
6320     unsigned TX8_9              : 1;
6321     unsigned CSRC1              : 1;
6322     };
6323 
6324   struct
6325     {
6326     unsigned TX9D1              : 1;
6327     unsigned                    : 1;
6328     unsigned                    : 1;
6329     unsigned                    : 1;
6330     unsigned                    : 1;
6331     unsigned                    : 1;
6332     unsigned NOT_TX8            : 1;
6333     unsigned                    : 1;
6334     };
6335 
6336   struct
6337     {
6338     unsigned                    : 1;
6339     unsigned                    : 1;
6340     unsigned                    : 1;
6341     unsigned                    : 1;
6342     unsigned                    : 1;
6343     unsigned                    : 1;
6344     unsigned TX91               : 1;
6345     unsigned                    : 1;
6346     };
6347   } __TXSTA1bits_t;
6348 
6349 extern __at(0x0FAC) volatile __TXSTA1bits_t TXSTA1bits;
6350 
6351 #define _TXSTA1_TX9D            0x01
6352 #define _TXSTA1_TXD8            0x01
6353 #define _TXSTA1_TX9D1           0x01
6354 #define _TXSTA1_TRMT            0x02
6355 #define _TXSTA1_TRMT1           0x02
6356 #define _TXSTA1_BRGH            0x04
6357 #define _TXSTA1_BRGH1           0x04
6358 #define _TXSTA1_SENDB           0x08
6359 #define _TXSTA1_SENDB1          0x08
6360 #define _TXSTA1_SYNC            0x10
6361 #define _TXSTA1_SYNC1           0x10
6362 #define _TXSTA1_TXEN            0x20
6363 #define _TXSTA1_TXEN1           0x20
6364 #define _TXSTA1_TX9             0x40
6365 #define _TXSTA1_TX8_9           0x40
6366 #define _TXSTA1_NOT_TX8         0x40
6367 #define _TXSTA1_TX91            0x40
6368 #define _TXSTA1_CSRC            0x80
6369 #define _TXSTA1_CSRC1           0x80
6370 
6371 //==============================================================================
6372 
6373 extern __at(0x0FAD) __sfr TXREG;
6374 extern __at(0x0FAD) __sfr TXREG1;
6375 extern __at(0x0FAE) __sfr RCREG;
6376 extern __at(0x0FAE) __sfr RCREG1;
6377 extern __at(0x0FAF) __sfr SPBRG;
6378 extern __at(0x0FAF) __sfr SPBRG1;
6379 
6380 //==============================================================================
6381 //        T3GCON Bits
6382 
6383 extern __at(0x0FB0) __sfr T3GCON;
6384 
6385 typedef union
6386   {
6387   struct
6388     {
6389     unsigned T3GSS0             : 1;
6390     unsigned T3GSS1             : 1;
6391     unsigned T3GVAL             : 1;
6392     unsigned T3GGO_NOT_T3DONE   : 1;
6393     unsigned T3GSPM             : 1;
6394     unsigned T3GTM              : 1;
6395     unsigned T3GPOL             : 1;
6396     unsigned TMR3GE             : 1;
6397     };
6398 
6399   struct
6400     {
6401     unsigned                    : 1;
6402     unsigned                    : 1;
6403     unsigned                    : 1;
6404     unsigned T3GGO              : 1;
6405     unsigned                    : 1;
6406     unsigned                    : 1;
6407     unsigned                    : 1;
6408     unsigned                    : 1;
6409     };
6410 
6411   struct
6412     {
6413     unsigned                    : 1;
6414     unsigned                    : 1;
6415     unsigned                    : 1;
6416     unsigned NOT_T3DONE         : 1;
6417     unsigned                    : 1;
6418     unsigned                    : 1;
6419     unsigned                    : 1;
6420     unsigned                    : 1;
6421     };
6422 
6423   struct
6424     {
6425     unsigned T3GSS              : 2;
6426     unsigned                    : 6;
6427     };
6428   } __T3GCONbits_t;
6429 
6430 extern __at(0x0FB0) volatile __T3GCONbits_t T3GCONbits;
6431 
6432 #define _T3GSS0                 0x01
6433 #define _T3GSS1                 0x02
6434 #define _T3GVAL                 0x04
6435 #define _T3GGO_NOT_T3DONE       0x08
6436 #define _T3GGO                  0x08
6437 #define _NOT_T3DONE             0x08
6438 #define _T3GSPM                 0x10
6439 #define _T3GTM                  0x20
6440 #define _T3GPOL                 0x40
6441 #define _TMR3GE                 0x80
6442 
6443 //==============================================================================
6444 
6445 
6446 //==============================================================================
6447 //        T3CON Bits
6448 
6449 extern __at(0x0FB1) __sfr T3CON;
6450 
6451 typedef union
6452   {
6453   struct
6454     {
6455     unsigned TMR3ON             : 1;
6456     unsigned RD16               : 1;
6457     unsigned NOT_T3SYNC         : 1;
6458     unsigned SOSCEN             : 1;
6459     unsigned T3CKPS0            : 1;
6460     unsigned T3CKPS1            : 1;
6461     unsigned TMR3CS0            : 1;
6462     unsigned TMR3CS1            : 1;
6463     };
6464 
6465   struct
6466     {
6467     unsigned                    : 4;
6468     unsigned T3CKPS             : 2;
6469     unsigned                    : 2;
6470     };
6471 
6472   struct
6473     {
6474     unsigned                    : 6;
6475     unsigned TMR3CS             : 2;
6476     };
6477   } __T3CONbits_t;
6478 
6479 extern __at(0x0FB1) volatile __T3CONbits_t T3CONbits;
6480 
6481 #define _T3CON_TMR3ON           0x01
6482 #define _T3CON_RD16             0x02
6483 #define _T3CON_NOT_T3SYNC       0x04
6484 #define _T3CON_SOSCEN           0x08
6485 #define _T3CON_T3CKPS0          0x10
6486 #define _T3CON_T3CKPS1          0x20
6487 #define _T3CON_TMR3CS0          0x40
6488 #define _T3CON_TMR3CS1          0x80
6489 
6490 //==============================================================================
6491 
6492 extern __at(0x0FB2) __sfr TMR3;
6493 extern __at(0x0FB2) __sfr TMR3L;
6494 extern __at(0x0FB3) __sfr TMR3H;
6495 
6496 //==============================================================================
6497 //        CMSTAT Bits
6498 
6499 extern __at(0x0FB4) __sfr CMSTAT;
6500 
6501 typedef union
6502   {
6503   struct
6504     {
6505     unsigned                    : 1;
6506     unsigned                    : 1;
6507     unsigned                    : 1;
6508     unsigned                    : 1;
6509     unsigned                    : 1;
6510     unsigned CMP1OUT            : 1;
6511     unsigned CMP2OUT            : 1;
6512     unsigned CMP3OUT            : 1;
6513     };
6514 
6515   struct
6516     {
6517     unsigned                    : 1;
6518     unsigned                    : 1;
6519     unsigned                    : 1;
6520     unsigned                    : 1;
6521     unsigned                    : 1;
6522     unsigned C1OUT              : 1;
6523     unsigned C2OUT              : 1;
6524     unsigned C3OUT              : 1;
6525     };
6526   } __CMSTATbits_t;
6527 
6528 extern __at(0x0FB4) volatile __CMSTATbits_t CMSTATbits;
6529 
6530 #define _CMP1OUT                0x20
6531 #define _C1OUT                  0x20
6532 #define _CMP2OUT                0x40
6533 #define _C2OUT                  0x40
6534 #define _CMP3OUT                0x80
6535 #define _C3OUT                  0x80
6536 
6537 //==============================================================================
6538 
6539 
6540 //==============================================================================
6541 //        CMSTATUS Bits
6542 
6543 extern __at(0x0FB4) __sfr CMSTATUS;
6544 
6545 typedef union
6546   {
6547   struct
6548     {
6549     unsigned                    : 1;
6550     unsigned                    : 1;
6551     unsigned                    : 1;
6552     unsigned                    : 1;
6553     unsigned                    : 1;
6554     unsigned CMP1OUT            : 1;
6555     unsigned CMP2OUT            : 1;
6556     unsigned CMP3OUT            : 1;
6557     };
6558 
6559   struct
6560     {
6561     unsigned                    : 1;
6562     unsigned                    : 1;
6563     unsigned                    : 1;
6564     unsigned                    : 1;
6565     unsigned                    : 1;
6566     unsigned C1OUT              : 1;
6567     unsigned C2OUT              : 1;
6568     unsigned C3OUT              : 1;
6569     };
6570   } __CMSTATUSbits_t;
6571 
6572 extern __at(0x0FB4) volatile __CMSTATUSbits_t CMSTATUSbits;
6573 
6574 #define _CMSTATUS_CMP1OUT       0x20
6575 #define _CMSTATUS_C1OUT         0x20
6576 #define _CMSTATUS_CMP2OUT       0x40
6577 #define _CMSTATUS_C2OUT         0x40
6578 #define _CMSTATUS_CMP3OUT       0x80
6579 #define _CMSTATUS_C3OUT         0x80
6580 
6581 //==============================================================================
6582 
6583 
6584 //==============================================================================
6585 //        CVRCON Bits
6586 
6587 extern __at(0x0FB5) __sfr CVRCON;
6588 
6589 typedef union
6590   {
6591   struct
6592     {
6593     unsigned CVR0               : 1;
6594     unsigned CVR1               : 1;
6595     unsigned CVR2               : 1;
6596     unsigned CVR3               : 1;
6597     unsigned CVR4               : 1;
6598     unsigned CVRSS              : 1;
6599     unsigned CVROE              : 1;
6600     unsigned CVREN              : 1;
6601     };
6602 
6603   struct
6604     {
6605     unsigned CVR                : 5;
6606     unsigned                    : 3;
6607     };
6608   } __CVRCONbits_t;
6609 
6610 extern __at(0x0FB5) volatile __CVRCONbits_t CVRCONbits;
6611 
6612 #define _CVR0                   0x01
6613 #define _CVR1                   0x02
6614 #define _CVR2                   0x04
6615 #define _CVR3                   0x08
6616 #define _CVR4                   0x10
6617 #define _CVRSS                  0x20
6618 #define _CVROE                  0x40
6619 #define _CVREN                  0x80
6620 
6621 //==============================================================================
6622 
6623 
6624 //==============================================================================
6625 //        PIE4 Bits
6626 
6627 extern __at(0x0FB6) __sfr PIE4;
6628 
6629 typedef struct
6630   {
6631   unsigned CCP3IE               : 1;
6632   unsigned CCP4IE               : 1;
6633   unsigned CCP5IE               : 1;
6634   unsigned CCP6IE               : 1;
6635   unsigned CCP7IE               : 1;
6636   unsigned CCP8IE               : 1;
6637   unsigned CCP9IE               : 1;
6638   unsigned CCP10IE              : 1;
6639   } __PIE4bits_t;
6640 
6641 extern __at(0x0FB6) volatile __PIE4bits_t PIE4bits;
6642 
6643 #define _CCP3IE                 0x01
6644 #define _CCP4IE                 0x02
6645 #define _CCP5IE                 0x04
6646 #define _CCP6IE                 0x08
6647 #define _CCP7IE                 0x10
6648 #define _CCP8IE                 0x20
6649 #define _CCP9IE                 0x40
6650 #define _CCP10IE                0x80
6651 
6652 //==============================================================================
6653 
6654 
6655 //==============================================================================
6656 //        PIR4 Bits
6657 
6658 extern __at(0x0FB7) __sfr PIR4;
6659 
6660 typedef struct
6661   {
6662   unsigned CCP3IF               : 1;
6663   unsigned CCP4IF               : 1;
6664   unsigned CCP5IF               : 1;
6665   unsigned CCP6IF               : 1;
6666   unsigned CCP7IF               : 1;
6667   unsigned CCP8IF               : 1;
6668   unsigned CCP9IF               : 1;
6669   unsigned CCP10IF              : 1;
6670   } __PIR4bits_t;
6671 
6672 extern __at(0x0FB7) volatile __PIR4bits_t PIR4bits;
6673 
6674 #define _CCP3IF                 0x01
6675 #define _CCP4IF                 0x02
6676 #define _CCP5IF                 0x04
6677 #define _CCP6IF                 0x08
6678 #define _CCP7IF                 0x10
6679 #define _CCP8IF                 0x20
6680 #define _CCP9IF                 0x40
6681 #define _CCP10IF                0x80
6682 
6683 //==============================================================================
6684 
6685 
6686 //==============================================================================
6687 //        IPR4 Bits
6688 
6689 extern __at(0x0FB8) __sfr IPR4;
6690 
6691 typedef struct
6692   {
6693   unsigned CCP3IP               : 1;
6694   unsigned CCP4IP               : 1;
6695   unsigned CCP5IP               : 1;
6696   unsigned CCP6IP               : 1;
6697   unsigned CCP7IP               : 1;
6698   unsigned CCP8IP               : 1;
6699   unsigned CCP9IP               : 1;
6700   unsigned CCP10IP              : 1;
6701   } __IPR4bits_t;
6702 
6703 extern __at(0x0FB8) volatile __IPR4bits_t IPR4bits;
6704 
6705 #define _CCP3IP                 0x01
6706 #define _CCP4IP                 0x02
6707 #define _CCP5IP                 0x04
6708 #define _CCP6IP                 0x08
6709 #define _CCP7IP                 0x10
6710 #define _CCP8IP                 0x20
6711 #define _CCP9IP                 0x40
6712 #define _CCP10IP                0x80
6713 
6714 //==============================================================================
6715 
6716 
6717 //==============================================================================
6718 //        PIE5 Bits
6719 
6720 extern __at(0x0FB9) __sfr PIE5;
6721 
6722 typedef struct
6723   {
6724   unsigned TMR4IE               : 1;
6725   unsigned TMR5IE               : 1;
6726   unsigned TMR6IE               : 1;
6727   unsigned TMR7IE               : 1;
6728   unsigned TMR8IE               : 1;
6729   unsigned TMR10IE              : 1;
6730   unsigned TMR12IE              : 1;
6731   unsigned TMR7GIE              : 1;
6732   } __PIE5bits_t;
6733 
6734 extern __at(0x0FB9) volatile __PIE5bits_t PIE5bits;
6735 
6736 #define _TMR4IE                 0x01
6737 #define _TMR5IE                 0x02
6738 #define _TMR6IE                 0x04
6739 #define _TMR7IE                 0x08
6740 #define _TMR8IE                 0x10
6741 #define _TMR10IE                0x20
6742 #define _TMR12IE                0x40
6743 #define _TMR7GIE                0x80
6744 
6745 //==============================================================================
6746 
6747 
6748 //==============================================================================
6749 //        PIR5 Bits
6750 
6751 extern __at(0x0FBA) __sfr PIR5;
6752 
6753 typedef struct
6754   {
6755   unsigned TMR4IF               : 1;
6756   unsigned TMR5IF               : 1;
6757   unsigned TMR6IF               : 1;
6758   unsigned TMR7IF               : 1;
6759   unsigned TMR8IF               : 1;
6760   unsigned TMR10IF              : 1;
6761   unsigned TMR12IF              : 1;
6762   unsigned TMR7GIF              : 1;
6763   } __PIR5bits_t;
6764 
6765 extern __at(0x0FBA) volatile __PIR5bits_t PIR5bits;
6766 
6767 #define _TMR4IF                 0x01
6768 #define _TMR5IF                 0x02
6769 #define _TMR6IF                 0x04
6770 #define _TMR7IF                 0x08
6771 #define _TMR8IF                 0x10
6772 #define _TMR10IF                0x20
6773 #define _TMR12IF                0x40
6774 #define _TMR7GIF                0x80
6775 
6776 //==============================================================================
6777 
6778 
6779 //==============================================================================
6780 //        CCP1CON Bits
6781 
6782 extern __at(0x0FBB) __sfr CCP1CON;
6783 
6784 typedef union
6785   {
6786   struct
6787     {
6788     unsigned CCP1M0             : 1;
6789     unsigned CCP1M1             : 1;
6790     unsigned CCP1M2             : 1;
6791     unsigned CCP1M3             : 1;
6792     unsigned DC1B0              : 1;
6793     unsigned DC1B1              : 1;
6794     unsigned P1M0               : 1;
6795     unsigned P1M1               : 1;
6796     };
6797 
6798   struct
6799     {
6800     unsigned                    : 1;
6801     unsigned                    : 1;
6802     unsigned                    : 1;
6803     unsigned                    : 1;
6804     unsigned CCP1Y              : 1;
6805     unsigned CCP1X              : 1;
6806     unsigned                    : 1;
6807     unsigned                    : 1;
6808     };
6809 
6810   struct
6811     {
6812     unsigned CCP1M              : 4;
6813     unsigned                    : 4;
6814     };
6815 
6816   struct
6817     {
6818     unsigned                    : 4;
6819     unsigned DC1B               : 2;
6820     unsigned                    : 2;
6821     };
6822 
6823   struct
6824     {
6825     unsigned                    : 6;
6826     unsigned P1M                : 2;
6827     };
6828   } __CCP1CONbits_t;
6829 
6830 extern __at(0x0FBB) volatile __CCP1CONbits_t CCP1CONbits;
6831 
6832 #define _CCP1M0                 0x01
6833 #define _CCP1M1                 0x02
6834 #define _CCP1M2                 0x04
6835 #define _CCP1M3                 0x08
6836 #define _DC1B0                  0x10
6837 #define _CCP1Y                  0x10
6838 #define _DC1B1                  0x20
6839 #define _CCP1X                  0x20
6840 #define _P1M0                   0x40
6841 #define _P1M1                   0x80
6842 
6843 //==============================================================================
6844 
6845 
6846 //==============================================================================
6847 //        ECCP1CON Bits
6848 
6849 extern __at(0x0FBB) __sfr ECCP1CON;
6850 
6851 typedef union
6852   {
6853   struct
6854     {
6855     unsigned CCP1M0             : 1;
6856     unsigned CCP1M1             : 1;
6857     unsigned CCP1M2             : 1;
6858     unsigned CCP1M3             : 1;
6859     unsigned DC1B0              : 1;
6860     unsigned DC1B1              : 1;
6861     unsigned P1M0               : 1;
6862     unsigned P1M1               : 1;
6863     };
6864 
6865   struct
6866     {
6867     unsigned                    : 1;
6868     unsigned                    : 1;
6869     unsigned                    : 1;
6870     unsigned                    : 1;
6871     unsigned CCP1Y              : 1;
6872     unsigned CCP1X              : 1;
6873     unsigned                    : 1;
6874     unsigned                    : 1;
6875     };
6876 
6877   struct
6878     {
6879     unsigned CCP1M              : 4;
6880     unsigned                    : 4;
6881     };
6882 
6883   struct
6884     {
6885     unsigned                    : 4;
6886     unsigned DC1B               : 2;
6887     unsigned                    : 2;
6888     };
6889 
6890   struct
6891     {
6892     unsigned                    : 6;
6893     unsigned P1M                : 2;
6894     };
6895   } __ECCP1CONbits_t;
6896 
6897 extern __at(0x0FBB) volatile __ECCP1CONbits_t ECCP1CONbits;
6898 
6899 #define _ECCP1CON_CCP1M0        0x01
6900 #define _ECCP1CON_CCP1M1        0x02
6901 #define _ECCP1CON_CCP1M2        0x04
6902 #define _ECCP1CON_CCP1M3        0x08
6903 #define _ECCP1CON_DC1B0         0x10
6904 #define _ECCP1CON_CCP1Y         0x10
6905 #define _ECCP1CON_DC1B1         0x20
6906 #define _ECCP1CON_CCP1X         0x20
6907 #define _ECCP1CON_P1M0          0x40
6908 #define _ECCP1CON_P1M1          0x80
6909 
6910 //==============================================================================
6911 
6912 extern __at(0x0FBC) __sfr CCPR1;
6913 extern __at(0x0FBC) __sfr CCPR1L;
6914 extern __at(0x0FBD) __sfr CCPR1H;
6915 
6916 //==============================================================================
6917 //        ECCP1DEL Bits
6918 
6919 extern __at(0x0FBE) __sfr ECCP1DEL;
6920 
6921 typedef union
6922   {
6923   struct
6924     {
6925     unsigned P1DC0              : 1;
6926     unsigned P1DC1              : 1;
6927     unsigned P1DC2              : 1;
6928     unsigned P1DC3              : 1;
6929     unsigned P1DC4              : 1;
6930     unsigned P1DC5              : 1;
6931     unsigned P1DC6              : 1;
6932     unsigned P1RSEN             : 1;
6933     };
6934 
6935   struct
6936     {
6937     unsigned P1DC               : 7;
6938     unsigned                    : 1;
6939     };
6940   } __ECCP1DELbits_t;
6941 
6942 extern __at(0x0FBE) volatile __ECCP1DELbits_t ECCP1DELbits;
6943 
6944 #define _P1DC0                  0x01
6945 #define _P1DC1                  0x02
6946 #define _P1DC2                  0x04
6947 #define _P1DC3                  0x08
6948 #define _P1DC4                  0x10
6949 #define _P1DC5                  0x20
6950 #define _P1DC6                  0x40
6951 #define _P1RSEN                 0x80
6952 
6953 //==============================================================================
6954 
6955 
6956 //==============================================================================
6957 //        PWM1CON Bits
6958 
6959 extern __at(0x0FBE) __sfr PWM1CON;
6960 
6961 typedef union
6962   {
6963   struct
6964     {
6965     unsigned P1DC0              : 1;
6966     unsigned P1DC1              : 1;
6967     unsigned P1DC2              : 1;
6968     unsigned P1DC3              : 1;
6969     unsigned P1DC4              : 1;
6970     unsigned P1DC5              : 1;
6971     unsigned P1DC6              : 1;
6972     unsigned P1RSEN             : 1;
6973     };
6974 
6975   struct
6976     {
6977     unsigned P1DC               : 7;
6978     unsigned                    : 1;
6979     };
6980   } __PWM1CONbits_t;
6981 
6982 extern __at(0x0FBE) volatile __PWM1CONbits_t PWM1CONbits;
6983 
6984 #define _PWM1CON_P1DC0          0x01
6985 #define _PWM1CON_P1DC1          0x02
6986 #define _PWM1CON_P1DC2          0x04
6987 #define _PWM1CON_P1DC3          0x08
6988 #define _PWM1CON_P1DC4          0x10
6989 #define _PWM1CON_P1DC5          0x20
6990 #define _PWM1CON_P1DC6          0x40
6991 #define _PWM1CON_P1RSEN         0x80
6992 
6993 //==============================================================================
6994 
6995 
6996 //==============================================================================
6997 //        ECCP1AS Bits
6998 
6999 extern __at(0x0FBF) __sfr ECCP1AS;
7000 
7001 typedef union
7002   {
7003   struct
7004     {
7005     unsigned PSS1BD0            : 1;
7006     unsigned PSS1BD1            : 1;
7007     unsigned PSS1AC0            : 1;
7008     unsigned PSS1AC1            : 1;
7009     unsigned ECCP1AS0           : 1;
7010     unsigned ECCP1AS1           : 1;
7011     unsigned ECCP1AS2           : 1;
7012     unsigned ECCP1ASE           : 1;
7013     };
7014 
7015   struct
7016     {
7017     unsigned PSS1BD             : 2;
7018     unsigned                    : 6;
7019     };
7020 
7021   struct
7022     {
7023     unsigned                    : 2;
7024     unsigned PSS1AC             : 2;
7025     unsigned                    : 4;
7026     };
7027 
7028   struct
7029     {
7030     unsigned                    : 4;
7031     unsigned ECCP1AS            : 3;
7032     unsigned                    : 1;
7033     };
7034   } __ECCP1ASbits_t;
7035 
7036 extern __at(0x0FBF) volatile __ECCP1ASbits_t ECCP1ASbits;
7037 
7038 #define _PSS1BD0                0x01
7039 #define _PSS1BD1                0x02
7040 #define _PSS1AC0                0x04
7041 #define _PSS1AC1                0x08
7042 #define _ECCP1AS0               0x10
7043 #define _ECCP1AS1               0x20
7044 #define _ECCP1AS2               0x40
7045 #define _ECCP1ASE               0x80
7046 
7047 //==============================================================================
7048 
7049 
7050 //==============================================================================
7051 //        ADCON2 Bits
7052 
7053 extern __at(0x0FC0) __sfr ADCON2;
7054 
7055 typedef union
7056   {
7057   struct
7058     {
7059     unsigned ADCS0              : 1;
7060     unsigned ADCS1              : 1;
7061     unsigned ADCS2              : 1;
7062     unsigned ACQT0              : 1;
7063     unsigned ACQT1              : 1;
7064     unsigned ACQT2              : 1;
7065     unsigned                    : 1;
7066     unsigned ADFM               : 1;
7067     };
7068 
7069   struct
7070     {
7071     unsigned ADCS               : 3;
7072     unsigned                    : 5;
7073     };
7074 
7075   struct
7076     {
7077     unsigned                    : 3;
7078     unsigned ACQT               : 3;
7079     unsigned                    : 2;
7080     };
7081   } __ADCON2bits_t;
7082 
7083 extern __at(0x0FC0) volatile __ADCON2bits_t ADCON2bits;
7084 
7085 #define _ADCS0                  0x01
7086 #define _ADCS1                  0x02
7087 #define _ADCS2                  0x04
7088 #define _ACQT0                  0x08
7089 #define _ACQT1                  0x10
7090 #define _ACQT2                  0x20
7091 #define _ADFM                   0x80
7092 
7093 //==============================================================================
7094 
7095 
7096 //==============================================================================
7097 //        ADCON1 Bits
7098 
7099 extern __at(0x0FC1) __sfr ADCON1;
7100 
7101 typedef union
7102   {
7103   struct
7104     {
7105     unsigned CHSN0              : 1;
7106     unsigned CHSN1              : 1;
7107     unsigned CHSN2              : 1;
7108     unsigned VNCFG              : 1;
7109     unsigned VCFG0              : 1;
7110     unsigned VCFG1              : 1;
7111     unsigned TRIGSEL0           : 1;
7112     unsigned TRIGSEL1           : 1;
7113     };
7114 
7115   struct
7116     {
7117     unsigned CHSN               : 3;
7118     unsigned                    : 5;
7119     };
7120 
7121   struct
7122     {
7123     unsigned                    : 4;
7124     unsigned VCFG               : 2;
7125     unsigned                    : 2;
7126     };
7127 
7128   struct
7129     {
7130     unsigned                    : 6;
7131     unsigned TRIGSEL            : 2;
7132     };
7133   } __ADCON1bits_t;
7134 
7135 extern __at(0x0FC1) volatile __ADCON1bits_t ADCON1bits;
7136 
7137 #define _CHSN0                  0x01
7138 #define _CHSN1                  0x02
7139 #define _CHSN2                  0x04
7140 #define _VNCFG                  0x08
7141 #define _VCFG0                  0x10
7142 #define _VCFG1                  0x20
7143 #define _TRIGSEL0               0x40
7144 #define _TRIGSEL1               0x80
7145 
7146 //==============================================================================
7147 
7148 
7149 //==============================================================================
7150 //        ADCON0 Bits
7151 
7152 extern __at(0x0FC2) __sfr ADCON0;
7153 
7154 typedef union
7155   {
7156   struct
7157     {
7158     unsigned ADON               : 1;
7159     unsigned GO_NOT_DONE        : 1;
7160     unsigned CHS0               : 1;
7161     unsigned CHS1               : 1;
7162     unsigned CHS2               : 1;
7163     unsigned CHS3               : 1;
7164     unsigned CHS4               : 1;
7165     unsigned                    : 1;
7166     };
7167 
7168   struct
7169     {
7170     unsigned                    : 1;
7171     unsigned DONE               : 1;
7172     unsigned                    : 1;
7173     unsigned                    : 1;
7174     unsigned                    : 1;
7175     unsigned                    : 1;
7176     unsigned                    : 1;
7177     unsigned                    : 1;
7178     };
7179 
7180   struct
7181     {
7182     unsigned                    : 1;
7183     unsigned GO                 : 1;
7184     unsigned                    : 1;
7185     unsigned                    : 1;
7186     unsigned                    : 1;
7187     unsigned                    : 1;
7188     unsigned                    : 1;
7189     unsigned                    : 1;
7190     };
7191 
7192   struct
7193     {
7194     unsigned                    : 1;
7195     unsigned NOT_DONE           : 1;
7196     unsigned                    : 1;
7197     unsigned                    : 1;
7198     unsigned                    : 1;
7199     unsigned                    : 1;
7200     unsigned                    : 1;
7201     unsigned                    : 1;
7202     };
7203 
7204   struct
7205     {
7206     unsigned                    : 2;
7207     unsigned CHS                : 5;
7208     unsigned                    : 1;
7209     };
7210   } __ADCON0bits_t;
7211 
7212 extern __at(0x0FC2) volatile __ADCON0bits_t ADCON0bits;
7213 
7214 #define _ADON                   0x01
7215 #define _GO_NOT_DONE            0x02
7216 #define _DONE                   0x02
7217 #define _GO                     0x02
7218 #define _NOT_DONE               0x02
7219 #define _CHS0                   0x04
7220 #define _CHS1                   0x08
7221 #define _CHS2                   0x10
7222 #define _CHS3                   0x20
7223 #define _CHS4                   0x40
7224 
7225 //==============================================================================
7226 
7227 extern __at(0x0FC3) __sfr ADRES;
7228 extern __at(0x0FC3) __sfr ADRESL;
7229 extern __at(0x0FC4) __sfr ADRESH;
7230 
7231 //==============================================================================
7232 //        SSP1CON2 Bits
7233 
7234 extern __at(0x0FC5) __sfr SSP1CON2;
7235 
7236 typedef union
7237   {
7238   struct
7239     {
7240     unsigned SEN                : 1;
7241     unsigned RSEN               : 1;
7242     unsigned PEN                : 1;
7243     unsigned RCEN               : 1;
7244     unsigned ACKEN              : 1;
7245     unsigned ACKDT              : 1;
7246     unsigned ACKSTAT            : 1;
7247     unsigned GCEN               : 1;
7248     };
7249 
7250   struct
7251     {
7252     unsigned                    : 1;
7253     unsigned ADMSK1             : 1;
7254     unsigned ADMSK2             : 1;
7255     unsigned ADMSK3             : 1;
7256     unsigned ADMSK4             : 1;
7257     unsigned ADMSK5             : 1;
7258     unsigned                    : 1;
7259     unsigned                    : 1;
7260     };
7261   } __SSP1CON2bits_t;
7262 
7263 extern __at(0x0FC5) volatile __SSP1CON2bits_t SSP1CON2bits;
7264 
7265 #define _SEN                    0x01
7266 #define _RSEN                   0x02
7267 #define _ADMSK1                 0x02
7268 #define _PEN                    0x04
7269 #define _ADMSK2                 0x04
7270 #define _RCEN                   0x08
7271 #define _ADMSK3                 0x08
7272 #define _ACKEN                  0x10
7273 #define _ADMSK4                 0x10
7274 #define _ACKDT                  0x20
7275 #define _ADMSK5                 0x20
7276 #define _ACKSTAT                0x40
7277 #define _GCEN                   0x80
7278 
7279 //==============================================================================
7280 
7281 
7282 //==============================================================================
7283 //        SSPCON2 Bits
7284 
7285 extern __at(0x0FC5) __sfr SSPCON2;
7286 
7287 typedef union
7288   {
7289   struct
7290     {
7291     unsigned SEN                : 1;
7292     unsigned RSEN               : 1;
7293     unsigned PEN                : 1;
7294     unsigned RCEN               : 1;
7295     unsigned ACKEN              : 1;
7296     unsigned ACKDT              : 1;
7297     unsigned ACKSTAT            : 1;
7298     unsigned GCEN               : 1;
7299     };
7300 
7301   struct
7302     {
7303     unsigned                    : 1;
7304     unsigned ADMSK1             : 1;
7305     unsigned ADMSK2             : 1;
7306     unsigned ADMSK3             : 1;
7307     unsigned ADMSK4             : 1;
7308     unsigned ADMSK5             : 1;
7309     unsigned                    : 1;
7310     unsigned                    : 1;
7311     };
7312   } __SSPCON2bits_t;
7313 
7314 extern __at(0x0FC5) volatile __SSPCON2bits_t SSPCON2bits;
7315 
7316 #define _SSPCON2_SEN            0x01
7317 #define _SSPCON2_RSEN           0x02
7318 #define _SSPCON2_ADMSK1         0x02
7319 #define _SSPCON2_PEN            0x04
7320 #define _SSPCON2_ADMSK2         0x04
7321 #define _SSPCON2_RCEN           0x08
7322 #define _SSPCON2_ADMSK3         0x08
7323 #define _SSPCON2_ACKEN          0x10
7324 #define _SSPCON2_ADMSK4         0x10
7325 #define _SSPCON2_ACKDT          0x20
7326 #define _SSPCON2_ADMSK5         0x20
7327 #define _SSPCON2_ACKSTAT        0x40
7328 #define _SSPCON2_GCEN           0x80
7329 
7330 //==============================================================================
7331 
7332 
7333 //==============================================================================
7334 //        SSP1CON1 Bits
7335 
7336 extern __at(0x0FC6) __sfr SSP1CON1;
7337 
7338 typedef union
7339   {
7340   struct
7341     {
7342     unsigned SSPM0              : 1;
7343     unsigned SSPM1              : 1;
7344     unsigned SSPM2              : 1;
7345     unsigned SSPM3              : 1;
7346     unsigned CKP                : 1;
7347     unsigned SSPEN              : 1;
7348     unsigned SSPOV              : 1;
7349     unsigned WCOL               : 1;
7350     };
7351 
7352   struct
7353     {
7354     unsigned SSPM               : 4;
7355     unsigned                    : 4;
7356     };
7357   } __SSP1CON1bits_t;
7358 
7359 extern __at(0x0FC6) volatile __SSP1CON1bits_t SSP1CON1bits;
7360 
7361 #define _SSPM0                  0x01
7362 #define _SSPM1                  0x02
7363 #define _SSPM2                  0x04
7364 #define _SSPM3                  0x08
7365 #define _CKP                    0x10
7366 #define _SSPEN                  0x20
7367 #define _SSPOV                  0x40
7368 #define _WCOL                   0x80
7369 
7370 //==============================================================================
7371 
7372 
7373 //==============================================================================
7374 //        SSPCON1 Bits
7375 
7376 extern __at(0x0FC6) __sfr SSPCON1;
7377 
7378 typedef union
7379   {
7380   struct
7381     {
7382     unsigned SSPM0              : 1;
7383     unsigned SSPM1              : 1;
7384     unsigned SSPM2              : 1;
7385     unsigned SSPM3              : 1;
7386     unsigned CKP                : 1;
7387     unsigned SSPEN              : 1;
7388     unsigned SSPOV              : 1;
7389     unsigned WCOL               : 1;
7390     };
7391 
7392   struct
7393     {
7394     unsigned SSPM               : 4;
7395     unsigned                    : 4;
7396     };
7397   } __SSPCON1bits_t;
7398 
7399 extern __at(0x0FC6) volatile __SSPCON1bits_t SSPCON1bits;
7400 
7401 #define _SSPCON1_SSPM0          0x01
7402 #define _SSPCON1_SSPM1          0x02
7403 #define _SSPCON1_SSPM2          0x04
7404 #define _SSPCON1_SSPM3          0x08
7405 #define _SSPCON1_CKP            0x10
7406 #define _SSPCON1_SSPEN          0x20
7407 #define _SSPCON1_SSPOV          0x40
7408 #define _SSPCON1_WCOL           0x80
7409 
7410 //==============================================================================
7411 
7412 
7413 //==============================================================================
7414 //        SSP1STAT Bits
7415 
7416 extern __at(0x0FC7) __sfr SSP1STAT;
7417 
7418 typedef union
7419   {
7420   struct
7421     {
7422     unsigned BF                 : 1;
7423     unsigned UA                 : 1;
7424     unsigned R_NOT_W            : 1;
7425     unsigned S                  : 1;
7426     unsigned P                  : 1;
7427     unsigned D_NOT_A            : 1;
7428     unsigned CKE                : 1;
7429     unsigned SMP                : 1;
7430     };
7431 
7432   struct
7433     {
7434     unsigned                    : 1;
7435     unsigned                    : 1;
7436     unsigned R                  : 1;
7437     unsigned I2C_START          : 1;
7438     unsigned I2C_STOP           : 1;
7439     unsigned D                  : 1;
7440     unsigned                    : 1;
7441     unsigned                    : 1;
7442     };
7443 
7444   struct
7445     {
7446     unsigned                    : 1;
7447     unsigned                    : 1;
7448     unsigned R_W                : 1;
7449     unsigned                    : 1;
7450     unsigned                    : 1;
7451     unsigned D_A                : 1;
7452     unsigned                    : 1;
7453     unsigned                    : 1;
7454     };
7455 
7456   struct
7457     {
7458     unsigned                    : 1;
7459     unsigned                    : 1;
7460     unsigned NOT_W              : 1;
7461     unsigned                    : 1;
7462     unsigned                    : 1;
7463     unsigned NOT_A              : 1;
7464     unsigned                    : 1;
7465     unsigned                    : 1;
7466     };
7467 
7468   struct
7469     {
7470     unsigned                    : 1;
7471     unsigned                    : 1;
7472     unsigned NOT_WRITE          : 1;
7473     unsigned                    : 1;
7474     unsigned                    : 1;
7475     unsigned NOT_ADDRESS        : 1;
7476     unsigned                    : 1;
7477     unsigned                    : 1;
7478     };
7479 
7480   struct
7481     {
7482     unsigned                    : 1;
7483     unsigned                    : 1;
7484     unsigned READ_WRITE         : 1;
7485     unsigned                    : 1;
7486     unsigned                    : 1;
7487     unsigned DATA_ADDRESS       : 1;
7488     unsigned                    : 1;
7489     unsigned                    : 1;
7490     };
7491 
7492   struct
7493     {
7494     unsigned                    : 1;
7495     unsigned                    : 1;
7496     unsigned I2C_READ           : 1;
7497     unsigned                    : 1;
7498     unsigned                    : 1;
7499     unsigned I2C_DAT            : 1;
7500     unsigned                    : 1;
7501     unsigned                    : 1;
7502     };
7503   } __SSP1STATbits_t;
7504 
7505 extern __at(0x0FC7) volatile __SSP1STATbits_t SSP1STATbits;
7506 
7507 #define _BF                     0x01
7508 #define _UA                     0x02
7509 #define _R_NOT_W                0x04
7510 #define _R                      0x04
7511 #define _R_W                    0x04
7512 #define _NOT_W                  0x04
7513 #define _NOT_WRITE              0x04
7514 #define _READ_WRITE             0x04
7515 #define _I2C_READ               0x04
7516 #define _S                      0x08
7517 #define _I2C_START              0x08
7518 #define _P                      0x10
7519 #define _I2C_STOP               0x10
7520 #define _D_NOT_A                0x20
7521 #define _D                      0x20
7522 #define _D_A                    0x20
7523 #define _NOT_A                  0x20
7524 #define _NOT_ADDRESS            0x20
7525 #define _DATA_ADDRESS           0x20
7526 #define _I2C_DAT                0x20
7527 #define _CKE                    0x40
7528 #define _SMP                    0x80
7529 
7530 //==============================================================================
7531 
7532 
7533 //==============================================================================
7534 //        SSPSTAT Bits
7535 
7536 extern __at(0x0FC7) __sfr SSPSTAT;
7537 
7538 typedef union
7539   {
7540   struct
7541     {
7542     unsigned BF                 : 1;
7543     unsigned UA                 : 1;
7544     unsigned R_NOT_W            : 1;
7545     unsigned S                  : 1;
7546     unsigned P                  : 1;
7547     unsigned D_NOT_A            : 1;
7548     unsigned CKE                : 1;
7549     unsigned SMP                : 1;
7550     };
7551 
7552   struct
7553     {
7554     unsigned                    : 1;
7555     unsigned                    : 1;
7556     unsigned R                  : 1;
7557     unsigned I2C_START          : 1;
7558     unsigned I2C_STOP           : 1;
7559     unsigned D                  : 1;
7560     unsigned                    : 1;
7561     unsigned                    : 1;
7562     };
7563 
7564   struct
7565     {
7566     unsigned                    : 1;
7567     unsigned                    : 1;
7568     unsigned R_W                : 1;
7569     unsigned                    : 1;
7570     unsigned                    : 1;
7571     unsigned D_A                : 1;
7572     unsigned                    : 1;
7573     unsigned                    : 1;
7574     };
7575 
7576   struct
7577     {
7578     unsigned                    : 1;
7579     unsigned                    : 1;
7580     unsigned NOT_W              : 1;
7581     unsigned                    : 1;
7582     unsigned                    : 1;
7583     unsigned NOT_A              : 1;
7584     unsigned                    : 1;
7585     unsigned                    : 1;
7586     };
7587 
7588   struct
7589     {
7590     unsigned                    : 1;
7591     unsigned                    : 1;
7592     unsigned NOT_WRITE          : 1;
7593     unsigned                    : 1;
7594     unsigned                    : 1;
7595     unsigned NOT_ADDRESS        : 1;
7596     unsigned                    : 1;
7597     unsigned                    : 1;
7598     };
7599 
7600   struct
7601     {
7602     unsigned                    : 1;
7603     unsigned                    : 1;
7604     unsigned READ_WRITE         : 1;
7605     unsigned                    : 1;
7606     unsigned                    : 1;
7607     unsigned DATA_ADDRESS       : 1;
7608     unsigned                    : 1;
7609     unsigned                    : 1;
7610     };
7611 
7612   struct
7613     {
7614     unsigned                    : 1;
7615     unsigned                    : 1;
7616     unsigned I2C_READ           : 1;
7617     unsigned                    : 1;
7618     unsigned                    : 1;
7619     unsigned I2C_DAT            : 1;
7620     unsigned                    : 1;
7621     unsigned                    : 1;
7622     };
7623   } __SSPSTATbits_t;
7624 
7625 extern __at(0x0FC7) volatile __SSPSTATbits_t SSPSTATbits;
7626 
7627 #define _SSPSTAT_BF             0x01
7628 #define _SSPSTAT_UA             0x02
7629 #define _SSPSTAT_R_NOT_W        0x04
7630 #define _SSPSTAT_R              0x04
7631 #define _SSPSTAT_R_W            0x04
7632 #define _SSPSTAT_NOT_W          0x04
7633 #define _SSPSTAT_NOT_WRITE      0x04
7634 #define _SSPSTAT_READ_WRITE     0x04
7635 #define _SSPSTAT_I2C_READ       0x04
7636 #define _SSPSTAT_S              0x08
7637 #define _SSPSTAT_I2C_START      0x08
7638 #define _SSPSTAT_P              0x10
7639 #define _SSPSTAT_I2C_STOP       0x10
7640 #define _SSPSTAT_D_NOT_A        0x20
7641 #define _SSPSTAT_D              0x20
7642 #define _SSPSTAT_D_A            0x20
7643 #define _SSPSTAT_NOT_A          0x20
7644 #define _SSPSTAT_NOT_ADDRESS    0x20
7645 #define _SSPSTAT_DATA_ADDRESS   0x20
7646 #define _SSPSTAT_I2C_DAT        0x20
7647 #define _SSPSTAT_CKE            0x40
7648 #define _SSPSTAT_SMP            0x80
7649 
7650 //==============================================================================
7651 
7652 
7653 //==============================================================================
7654 //        SSP1ADD Bits
7655 
7656 extern __at(0x0FC8) __sfr SSP1ADD;
7657 
7658 typedef struct
7659   {
7660   unsigned MSK0                 : 1;
7661   unsigned MSK1                 : 1;
7662   unsigned MSK2                 : 1;
7663   unsigned MSK3                 : 1;
7664   unsigned MSK4                 : 1;
7665   unsigned MSK5                 : 1;
7666   unsigned MSK6                 : 1;
7667   unsigned MSK7                 : 1;
7668   } __SSP1ADDbits_t;
7669 
7670 extern __at(0x0FC8) volatile __SSP1ADDbits_t SSP1ADDbits;
7671 
7672 #define _MSK0                   0x01
7673 #define _MSK1                   0x02
7674 #define _MSK2                   0x04
7675 #define _MSK3                   0x08
7676 #define _MSK4                   0x10
7677 #define _MSK5                   0x20
7678 #define _MSK6                   0x40
7679 #define _MSK7                   0x80
7680 
7681 //==============================================================================
7682 
7683 
7684 //==============================================================================
7685 //        SSPADD Bits
7686 
7687 extern __at(0x0FC8) __sfr SSPADD;
7688 
7689 typedef struct
7690   {
7691   unsigned MSK0                 : 1;
7692   unsigned MSK1                 : 1;
7693   unsigned MSK2                 : 1;
7694   unsigned MSK3                 : 1;
7695   unsigned MSK4                 : 1;
7696   unsigned MSK5                 : 1;
7697   unsigned MSK6                 : 1;
7698   unsigned MSK7                 : 1;
7699   } __SSPADDbits_t;
7700 
7701 extern __at(0x0FC8) volatile __SSPADDbits_t SSPADDbits;
7702 
7703 #define _SSPADD_MSK0            0x01
7704 #define _SSPADD_MSK1            0x02
7705 #define _SSPADD_MSK2            0x04
7706 #define _SSPADD_MSK3            0x08
7707 #define _SSPADD_MSK4            0x10
7708 #define _SSPADD_MSK5            0x20
7709 #define _SSPADD_MSK6            0x40
7710 #define _SSPADD_MSK7            0x80
7711 
7712 //==============================================================================
7713 
7714 extern __at(0x0FC9) __sfr SSP1BUF;
7715 extern __at(0x0FC9) __sfr SSPBUF;
7716 
7717 //==============================================================================
7718 //        T2CON Bits
7719 
7720 extern __at(0x0FCA) __sfr T2CON;
7721 
7722 typedef union
7723   {
7724   struct
7725     {
7726     unsigned T2CKPS0            : 1;
7727     unsigned T2CKPS1            : 1;
7728     unsigned TMR2ON             : 1;
7729     unsigned T2OUTPS0           : 1;
7730     unsigned T2OUTPS1           : 1;
7731     unsigned T2OUTPS2           : 1;
7732     unsigned T2OUTPS3           : 1;
7733     unsigned                    : 1;
7734     };
7735 
7736   struct
7737     {
7738     unsigned T2CKPS             : 2;
7739     unsigned                    : 6;
7740     };
7741 
7742   struct
7743     {
7744     unsigned                    : 3;
7745     unsigned T2OUTPS            : 4;
7746     unsigned                    : 1;
7747     };
7748   } __T2CONbits_t;
7749 
7750 extern __at(0x0FCA) volatile __T2CONbits_t T2CONbits;
7751 
7752 #define _T2CKPS0                0x01
7753 #define _T2CKPS1                0x02
7754 #define _TMR2ON                 0x04
7755 #define _T2OUTPS0               0x08
7756 #define _T2OUTPS1               0x10
7757 #define _T2OUTPS2               0x20
7758 #define _T2OUTPS3               0x40
7759 
7760 //==============================================================================
7761 
7762 extern __at(0x0FCB) __sfr PR2;
7763 extern __at(0x0FCC) __sfr TMR2;
7764 
7765 //==============================================================================
7766 //        T1CON Bits
7767 
7768 extern __at(0x0FCD) __sfr T1CON;
7769 
7770 typedef union
7771   {
7772   struct
7773     {
7774     unsigned TMR1ON             : 1;
7775     unsigned RD16               : 1;
7776     unsigned NOT_T1SYNC         : 1;
7777     unsigned SOSCEN             : 1;
7778     unsigned T1CKPS0            : 1;
7779     unsigned T1CKPS1            : 1;
7780     unsigned TMR1CS0            : 1;
7781     unsigned TMR1CS1            : 1;
7782     };
7783 
7784   struct
7785     {
7786     unsigned                    : 4;
7787     unsigned T1CKPS             : 2;
7788     unsigned                    : 2;
7789     };
7790 
7791   struct
7792     {
7793     unsigned                    : 6;
7794     unsigned TMR1CS             : 2;
7795     };
7796   } __T1CONbits_t;
7797 
7798 extern __at(0x0FCD) volatile __T1CONbits_t T1CONbits;
7799 
7800 #define _TMR1ON                 0x01
7801 #define _RD16                   0x02
7802 #define _NOT_T1SYNC             0x04
7803 #define _SOSCEN                 0x08
7804 #define _T1CKPS0                0x10
7805 #define _T1CKPS1                0x20
7806 #define _TMR1CS0                0x40
7807 #define _TMR1CS1                0x80
7808 
7809 //==============================================================================
7810 
7811 extern __at(0x0FCE) __sfr TMR1;
7812 extern __at(0x0FCE) __sfr TMR1L;
7813 extern __at(0x0FCF) __sfr TMR1H;
7814 
7815 //==============================================================================
7816 //        RCON Bits
7817 
7818 extern __at(0x0FD0) __sfr RCON;
7819 
7820 typedef union
7821   {
7822   struct
7823     {
7824     unsigned NOT_BOR            : 1;
7825     unsigned NOT_POR            : 1;
7826     unsigned NOT_PD             : 1;
7827     unsigned NOT_TO             : 1;
7828     unsigned NOT_RI             : 1;
7829     unsigned NOT_CM             : 1;
7830     unsigned SBOREN             : 1;
7831     unsigned IPEN               : 1;
7832     };
7833 
7834   struct
7835     {
7836     unsigned BOR                : 1;
7837     unsigned POR                : 1;
7838     unsigned PD                 : 1;
7839     unsigned TO                 : 1;
7840     unsigned RI                 : 1;
7841     unsigned CM                 : 1;
7842     unsigned                    : 1;
7843     unsigned                    : 1;
7844     };
7845   } __RCONbits_t;
7846 
7847 extern __at(0x0FD0) volatile __RCONbits_t RCONbits;
7848 
7849 #define _NOT_BOR                0x01
7850 #define _BOR                    0x01
7851 #define _NOT_POR                0x02
7852 #define _POR                    0x02
7853 #define _NOT_PD                 0x04
7854 #define _PD                     0x04
7855 #define _NOT_TO                 0x08
7856 #define _TO                     0x08
7857 #define _NOT_RI                 0x10
7858 #define _RI                     0x10
7859 #define _NOT_CM                 0x20
7860 #define _CM                     0x20
7861 #define _SBOREN                 0x40
7862 #define _IPEN                   0x80
7863 
7864 //==============================================================================
7865 
7866 
7867 //==============================================================================
7868 //        WDTCON Bits
7869 
7870 extern __at(0x0FD1) __sfr WDTCON;
7871 
7872 typedef union
7873   {
7874   struct
7875     {
7876     unsigned SWDTEN             : 1;
7877     unsigned ULPSINK            : 1;
7878     unsigned ULPEN              : 1;
7879     unsigned                    : 1;
7880     unsigned SRETEN             : 1;
7881     unsigned ULPLVL             : 1;
7882     unsigned                    : 1;
7883     unsigned REGSLP             : 1;
7884     };
7885 
7886   struct
7887     {
7888     unsigned SWDTE              : 1;
7889     unsigned                    : 1;
7890     unsigned                    : 1;
7891     unsigned                    : 1;
7892     unsigned                    : 1;
7893     unsigned                    : 1;
7894     unsigned                    : 1;
7895     unsigned                    : 1;
7896     };
7897   } __WDTCONbits_t;
7898 
7899 extern __at(0x0FD1) volatile __WDTCONbits_t WDTCONbits;
7900 
7901 #define _SWDTEN                 0x01
7902 #define _SWDTE                  0x01
7903 #define _ULPSINK                0x02
7904 #define _ULPEN                  0x04
7905 #define _SRETEN                 0x10
7906 #define _ULPLVL                 0x20
7907 #define _REGSLP                 0x80
7908 
7909 //==============================================================================
7910 
7911 
7912 //==============================================================================
7913 //        IPR5 Bits
7914 
7915 extern __at(0x0FD2) __sfr IPR5;
7916 
7917 typedef struct
7918   {
7919   unsigned TMR4IP               : 1;
7920   unsigned TMR5IP               : 1;
7921   unsigned TMR6IP               : 1;
7922   unsigned TMR7IP               : 1;
7923   unsigned TMR8IP               : 1;
7924   unsigned TMR10IP              : 1;
7925   unsigned TMR12IP              : 1;
7926   unsigned TMR7GIP              : 1;
7927   } __IPR5bits_t;
7928 
7929 extern __at(0x0FD2) volatile __IPR5bits_t IPR5bits;
7930 
7931 #define _TMR4IP                 0x01
7932 #define _TMR5IP                 0x02
7933 #define _TMR6IP                 0x04
7934 #define _TMR7IP                 0x08
7935 #define _TMR8IP                 0x10
7936 #define _TMR10IP                0x20
7937 #define _TMR12IP                0x40
7938 #define _TMR7GIP                0x80
7939 
7940 //==============================================================================
7941 
7942 
7943 //==============================================================================
7944 //        OSCCON Bits
7945 
7946 extern __at(0x0FD3) __sfr OSCCON;
7947 
7948 typedef union
7949   {
7950   struct
7951     {
7952     unsigned SCS0               : 1;
7953     unsigned SCS1               : 1;
7954     unsigned HFIOFS             : 1;
7955     unsigned OSTS               : 1;
7956     unsigned IRCF0              : 1;
7957     unsigned IRCF1              : 1;
7958     unsigned IRCF2              : 1;
7959     unsigned IDLEN              : 1;
7960     };
7961 
7962   struct
7963     {
7964     unsigned SCS                : 2;
7965     unsigned                    : 6;
7966     };
7967 
7968   struct
7969     {
7970     unsigned                    : 4;
7971     unsigned IRCF               : 3;
7972     unsigned                    : 1;
7973     };
7974   } __OSCCONbits_t;
7975 
7976 extern __at(0x0FD3) volatile __OSCCONbits_t OSCCONbits;
7977 
7978 #define _SCS0                   0x01
7979 #define _SCS1                   0x02
7980 #define _HFIOFS                 0x04
7981 #define _OSTS                   0x08
7982 #define _IRCF0                  0x10
7983 #define _IRCF1                  0x20
7984 #define _IRCF2                  0x40
7985 #define _IDLEN                  0x80
7986 
7987 //==============================================================================
7988 
7989 extern __at(0x0FD4) __sfr SPBRGH1;
7990 
7991 //==============================================================================
7992 //        T0CON Bits
7993 
7994 extern __at(0x0FD5) __sfr T0CON;
7995 
7996 typedef union
7997   {
7998   struct
7999     {
8000     unsigned T0PS0              : 1;
8001     unsigned T0PS1              : 1;
8002     unsigned T0PS2              : 1;
8003     unsigned PSA                : 1;
8004     unsigned T0SE               : 1;
8005     unsigned T0CS               : 1;
8006     unsigned T08BIT             : 1;
8007     unsigned TMR0ON             : 1;
8008     };
8009 
8010   struct
8011     {
8012     unsigned T0PS               : 3;
8013     unsigned                    : 5;
8014     };
8015   } __T0CONbits_t;
8016 
8017 extern __at(0x0FD5) volatile __T0CONbits_t T0CONbits;
8018 
8019 #define _T0PS0                  0x01
8020 #define _T0PS1                  0x02
8021 #define _T0PS2                  0x04
8022 #define _PSA                    0x08
8023 #define _T0SE                   0x10
8024 #define _T0CS                   0x20
8025 #define _T08BIT                 0x40
8026 #define _TMR0ON                 0x80
8027 
8028 //==============================================================================
8029 
8030 extern __at(0x0FD6) __sfr TMR0;
8031 extern __at(0x0FD6) __sfr TMR0L;
8032 extern __at(0x0FD7) __sfr TMR0H;
8033 
8034 //==============================================================================
8035 //        STATUS Bits
8036 
8037 extern __at(0x0FD8) __sfr STATUS;
8038 
8039 typedef struct
8040   {
8041   unsigned C                    : 1;
8042   unsigned DC                   : 1;
8043   unsigned Z                    : 1;
8044   unsigned OV                   : 1;
8045   unsigned N                    : 1;
8046   unsigned                      : 1;
8047   unsigned                      : 1;
8048   unsigned                      : 1;
8049   } __STATUSbits_t;
8050 
8051 extern __at(0x0FD8) volatile __STATUSbits_t STATUSbits;
8052 
8053 #define _C                      0x01
8054 #define _DC                     0x02
8055 #define _Z                      0x04
8056 #define _OV                     0x08
8057 #define _N                      0x10
8058 
8059 //==============================================================================
8060 
8061 extern __at(0x0FD9) __sfr FSR2L;
8062 extern __at(0x0FDA) __sfr FSR2H;
8063 extern __at(0x0FDB) __sfr PLUSW2;
8064 extern __at(0x0FDC) __sfr PREINC2;
8065 extern __at(0x0FDD) __sfr POSTDEC2;
8066 extern __at(0x0FDE) __sfr POSTINC2;
8067 extern __at(0x0FDF) __sfr INDF2;
8068 extern __at(0x0FE0) __sfr BSR;
8069 extern __at(0x0FE1) __sfr FSR1L;
8070 extern __at(0x0FE2) __sfr FSR1H;
8071 extern __at(0x0FE3) __sfr PLUSW1;
8072 extern __at(0x0FE4) __sfr PREINC1;
8073 extern __at(0x0FE5) __sfr POSTDEC1;
8074 extern __at(0x0FE6) __sfr POSTINC1;
8075 extern __at(0x0FE7) __sfr INDF1;
8076 extern __at(0x0FE8) __sfr WREG;
8077 extern __at(0x0FE9) __sfr FSR0L;
8078 extern __at(0x0FEA) __sfr FSR0H;
8079 extern __at(0x0FEB) __sfr PLUSW0;
8080 extern __at(0x0FEC) __sfr PREINC0;
8081 extern __at(0x0FED) __sfr POSTDEC0;
8082 extern __at(0x0FEE) __sfr POSTINC0;
8083 extern __at(0x0FEF) __sfr INDF0;
8084 
8085 //==============================================================================
8086 //        INTCON3 Bits
8087 
8088 extern __at(0x0FF0) __sfr INTCON3;
8089 
8090 typedef union
8091   {
8092   struct
8093     {
8094     unsigned INT1IF             : 1;
8095     unsigned INT2IF             : 1;
8096     unsigned INT3IF             : 1;
8097     unsigned INT1IE             : 1;
8098     unsigned INT2IE             : 1;
8099     unsigned INT3IE             : 1;
8100     unsigned INT1IP             : 1;
8101     unsigned INT2IP             : 1;
8102     };
8103 
8104   struct
8105     {
8106     unsigned INT1F              : 1;
8107     unsigned INT2F              : 1;
8108     unsigned INT3F              : 1;
8109     unsigned INT1E              : 1;
8110     unsigned INT2E              : 1;
8111     unsigned INT3E              : 1;
8112     unsigned INT1P              : 1;
8113     unsigned INT2P              : 1;
8114     };
8115   } __INTCON3bits_t;
8116 
8117 extern __at(0x0FF0) volatile __INTCON3bits_t INTCON3bits;
8118 
8119 #define _INT1IF                 0x01
8120 #define _INT1F                  0x01
8121 #define _INT2IF                 0x02
8122 #define _INT2F                  0x02
8123 #define _INT3IF                 0x04
8124 #define _INT3F                  0x04
8125 #define _INT1IE                 0x08
8126 #define _INT1E                  0x08
8127 #define _INT2IE                 0x10
8128 #define _INT2E                  0x10
8129 #define _INT3IE                 0x20
8130 #define _INT3E                  0x20
8131 #define _INT1IP                 0x40
8132 #define _INT1P                  0x40
8133 #define _INT2IP                 0x80
8134 #define _INT2P                  0x80
8135 
8136 //==============================================================================
8137 
8138 
8139 //==============================================================================
8140 //        INTCON2 Bits
8141 
8142 extern __at(0x0FF1) __sfr INTCON2;
8143 
8144 typedef union
8145   {
8146   struct
8147     {
8148     unsigned RBIP               : 1;
8149     unsigned INT3IP             : 1;
8150     unsigned TMR0IP             : 1;
8151     unsigned INTEDG3            : 1;
8152     unsigned INTEDG2            : 1;
8153     unsigned INTEDG1            : 1;
8154     unsigned INTEDG0            : 1;
8155     unsigned NOT_RBPU           : 1;
8156     };
8157 
8158   struct
8159     {
8160     unsigned                    : 1;
8161     unsigned INT3P              : 1;
8162     unsigned T0IP               : 1;
8163     unsigned                    : 1;
8164     unsigned                    : 1;
8165     unsigned                    : 1;
8166     unsigned                    : 1;
8167     unsigned RBPU               : 1;
8168     };
8169   } __INTCON2bits_t;
8170 
8171 extern __at(0x0FF1) volatile __INTCON2bits_t INTCON2bits;
8172 
8173 #define _RBIP                   0x01
8174 #define _INT3IP                 0x02
8175 #define _INT3P                  0x02
8176 #define _TMR0IP                 0x04
8177 #define _T0IP                   0x04
8178 #define _INTEDG3                0x08
8179 #define _INTEDG2                0x10
8180 #define _INTEDG1                0x20
8181 #define _INTEDG0                0x40
8182 #define _NOT_RBPU               0x80
8183 #define _RBPU                   0x80
8184 
8185 //==============================================================================
8186 
8187 
8188 //==============================================================================
8189 //        INTCON Bits
8190 
8191 extern __at(0x0FF2) __sfr INTCON;
8192 
8193 typedef union
8194   {
8195   struct
8196     {
8197     unsigned RBIF               : 1;
8198     unsigned INT0IF             : 1;
8199     unsigned TMR0IF             : 1;
8200     unsigned RBIE               : 1;
8201     unsigned INT0IE             : 1;
8202     unsigned TMR0IE             : 1;
8203     unsigned PEIE_GIEL          : 1;
8204     unsigned GIE_GIEH           : 1;
8205     };
8206 
8207   struct
8208     {
8209     unsigned                    : 1;
8210     unsigned INT0F              : 1;
8211     unsigned T0IF               : 1;
8212     unsigned                    : 1;
8213     unsigned INT0E              : 1;
8214     unsigned T0IE               : 1;
8215     unsigned PEIE               : 1;
8216     unsigned GIE                : 1;
8217     };
8218 
8219   struct
8220     {
8221     unsigned                    : 1;
8222     unsigned                    : 1;
8223     unsigned                    : 1;
8224     unsigned                    : 1;
8225     unsigned                    : 1;
8226     unsigned                    : 1;
8227     unsigned GIEL               : 1;
8228     unsigned GIEH               : 1;
8229     };
8230   } __INTCONbits_t;
8231 
8232 extern __at(0x0FF2) volatile __INTCONbits_t INTCONbits;
8233 
8234 #define _RBIF                   0x01
8235 #define _INT0IF                 0x02
8236 #define _INT0F                  0x02
8237 #define _TMR0IF                 0x04
8238 #define _T0IF                   0x04
8239 #define _RBIE                   0x08
8240 #define _INT0IE                 0x10
8241 #define _INT0E                  0x10
8242 #define _TMR0IE                 0x20
8243 #define _T0IE                   0x20
8244 #define _PEIE_GIEL              0x40
8245 #define _PEIE                   0x40
8246 #define _GIEL                   0x40
8247 #define _GIE_GIEH               0x80
8248 #define _GIE                    0x80
8249 #define _GIEH                   0x80
8250 
8251 //==============================================================================
8252 
8253 extern __at(0x0FF3) __sfr PROD;
8254 extern __at(0x0FF3) __sfr PRODL;
8255 extern __at(0x0FF4) __sfr PRODH;
8256 extern __at(0x0FF5) __sfr TABLAT;
8257 extern __at(0x0FF6) __sfr TBLPTR;
8258 extern __at(0x0FF6) __sfr TBLPTRL;
8259 extern __at(0x0FF7) __sfr TBLPTRH;
8260 extern __at(0x0FF8) __sfr TBLPTRU;
8261 extern __at(0x0FF9) __sfr PC;
8262 extern __at(0x0FF9) __sfr PCL;
8263 extern __at(0x0FFA) __sfr PCLATH;
8264 extern __at(0x0FFB) __sfr PCLATU;
8265 
8266 //==============================================================================
8267 //        STKPTR Bits
8268 
8269 extern __at(0x0FFC) __sfr STKPTR;
8270 
8271 typedef union
8272   {
8273   struct
8274     {
8275     unsigned SP0                : 1;
8276     unsigned SP1                : 1;
8277     unsigned SP2                : 1;
8278     unsigned SP3                : 1;
8279     unsigned SP4                : 1;
8280     unsigned                    : 1;
8281     unsigned STKUNF             : 1;
8282     unsigned STKFUL             : 1;
8283     };
8284 
8285   struct
8286     {
8287     unsigned                    : 1;
8288     unsigned                    : 1;
8289     unsigned                    : 1;
8290     unsigned                    : 1;
8291     unsigned                    : 1;
8292     unsigned                    : 1;
8293     unsigned                    : 1;
8294     unsigned STKOVF             : 1;
8295     };
8296 
8297   struct
8298     {
8299     unsigned SP                 : 5;
8300     unsigned                    : 3;
8301     };
8302   } __STKPTRbits_t;
8303 
8304 extern __at(0x0FFC) volatile __STKPTRbits_t STKPTRbits;
8305 
8306 #define _SP0                    0x01
8307 #define _SP1                    0x02
8308 #define _SP2                    0x04
8309 #define _SP3                    0x08
8310 #define _SP4                    0x10
8311 #define _STKUNF                 0x40
8312 #define _STKFUL                 0x80
8313 #define _STKOVF                 0x80
8314 
8315 //==============================================================================
8316 
8317 extern __at(0x0FFD) __sfr TOS;
8318 extern __at(0x0FFD) __sfr TOSL;
8319 extern __at(0x0FFE) __sfr TOSH;
8320 extern __at(0x0FFF) __sfr TOSU;
8321 
8322 //==============================================================================
8323 //
8324 //        Configuration Bits
8325 //
8326 //==============================================================================
8327 
8328 #define __CONFIG1L              0x300000
8329 #define __CONFIG1H              0x300001
8330 #define __CONFIG2L              0x300002
8331 #define __CONFIG2H              0x300003
8332 #define __CONFIG3L              0x300004
8333 #define __CONFIG3H              0x300005
8334 #define __CONFIG4L              0x300006
8335 #define __CONFIG5L              0x300008
8336 #define __CONFIG5H              0x300009
8337 #define __CONFIG6L              0x30000A
8338 #define __CONFIG6H              0x30000B
8339 #define __CONFIG7L              0x30000C
8340 #define __CONFIG7H              0x30000D
8341 
8342 //----------------------------- CONFIG1L Options -------------------------------
8343 
8344 #define _RETEN_OFF_1L           0xFE    // Disabled - Controlled by SRETEN bit.
8345 #define _RETEN_ON_1L            0xFF    // Enabled.
8346 #define _INTOSCSEL_LOW_1L       0xFB    // LF-INTOSC in Low-power mode during Sleep.
8347 #define _INTOSCSEL_HIGH_1L      0xFF    // LF-INTOSC in High-power mode during Sleep.
8348 #define _SOSCSEL_LOW_1L         0xEF    // Low Power SOSC circuit selected.
8349 #define _SOSCSEL_DIG_1L         0xF7    // Digital (SCLKI) mode.
8350 #define _SOSCSEL_HIGH_1L        0xFF    // High Power SOSC circuit selected.
8351 #define _XINST_OFF_1L           0xBF    // Disabled.
8352 #define _XINST_ON_1L            0xFF    // Enabled.
8353 
8354 //----------------------------- CONFIG1H Options -------------------------------
8355 
8356 #define _FOSC_LP_1H             0xF0    // LP oscillator.
8357 #define _FOSC_XT_1H             0xF1    // XT oscillator.
8358 #define _FOSC_HS2_1H            0xF2    // HS oscillator (High power, 16 MHz - 25 MHz).
8359 #define _FOSC_HS1_1H            0xF3    // HS oscillator (Medium power, 4 MHz - 16 MHz).
8360 #define _FOSC_EC3IO_1H          0xF4    // EC oscillator, CLKOUT function on OSC2 (High power, 16 MHz - 64 MHz).
8361 #define _FOSC_EC3_1H            0xF5    // EC oscillator (High power, 16 MHz - 64 MHz).
8362 #define _FOSC_RC_1H             0xF6    // External RC oscillator, CLKOUT function on OSC2.
8363 #define _FOSC_RCIO_1H           0xF7    // External RC oscillator.
8364 #define _FOSC_INTIO2_1H         0xF8    // Internal RC oscillator.
8365 #define _FOSC_INTIO1_1H         0xF9    // Internal RC oscillator, CLKOUT function on OSC2.
8366 #define _FOSC_EC2IO_1H          0xFA    // EC oscillator, CLKOUT function on OSC2 (Medium power, 160 kHz - 16 MHz).
8367 #define _FOSC_EC2_1H            0xFB    // EC oscillator (Medium power, 160 kHz -  16 MHz).
8368 #define _FOSC_EC1IO_1H          0xFC    // EC oscillator, CLKOUT function on OSC2 (Low power, DC - 160 kHz).
8369 #define _FOSC_EC1_1H            0xFD    // EC oscillator (Low power, DC - 160 kHz).
8370 #define _PLLCFG_OFF_1H          0xEF    // Disabled.
8371 #define _PLLCFG_ON_1H           0xFF    // Enabled.
8372 #define _FCMEN_OFF_1H           0xBF    // Disabled.
8373 #define _FCMEN_ON_1H            0xFF    // Enabled.
8374 #define _IESO_OFF_1H            0x7F    // Disabled.
8375 #define _IESO_ON_1H             0xFF    // Enabled.
8376 
8377 //----------------------------- CONFIG2L Options -------------------------------
8378 
8379 #define _PWRTEN_ON_2L           0xFE    // Enabled.
8380 #define _PWRTEN_OFF_2L          0xFF    // Disabled.
8381 #define _BOREN_OFF_2L           0xF9    // Disabled in hardware, SBOREN disabled.
8382 #define _BOREN_ON_2L            0xFB    // Controlled with SBOREN bit.
8383 #define _BOREN_NOSLP_2L         0xFD    // Enabled while active, disabled in SLEEP, SBOREN disabled.
8384 #define _BOREN_SBORDIS_2L       0xFF    // Enabled in hardware, SBOREN disabled.
8385 #define _BORV_0_2L              0xE7    // 3.0V.
8386 #define _BORV_1_2L              0xEF    // 2.7V.
8387 #define _BORV_2_2L              0xF7    // 2.0V.
8388 #define _BORV_3_2L              0xFF    // 1.8V.
8389 #define _BORPWR_LOW_2L          0x9F    // BORMV set to low power level.
8390 #define _BORPWR_MEDIUM_2L       0xBF    // BORMV set to medium power level.
8391 #define _BORPWR_HIGH_2L         0xDF    // BORMV set to high power level.
8392 #define _BORPWR_ZPBORMV_2L      0xFF    // ZPBORMV instead of BORMV is selected.
8393 
8394 //----------------------------- CONFIG2H Options -------------------------------
8395 
8396 #define _WDTEN_OFF_2H           0xFC    // WDT disabled in hardware; SWDTEN bit disabled.
8397 #define _WDTEN_NOSLP_2H         0xFD    // WDT enabled only while device is active and disabled in Sleep mode; SWDTEN bit disabled.
8398 #define _WDTEN_ON_2H            0xFE    // WDT controlled by SWDTEN bit setting.
8399 #define _WDTEN_SWDTDIS_2H       0xFF    // WDT enabled in hardware; SWDTEN bit disabled.
8400 #define _WDTPS_1_2H             0x83    // 1:1.
8401 #define _WDTPS_2_2H             0x87    // 1:2.
8402 #define _WDTPS_4_2H             0x8B    // 1:4.
8403 #define _WDTPS_8_2H             0x8F    // 1:8.
8404 #define _WDTPS_16_2H            0x93    // 1:16.
8405 #define _WDTPS_32_2H            0x97    // 1:32.
8406 #define _WDTPS_64_2H            0x9B    // 1:64.
8407 #define _WDTPS_128_2H           0x9F    // 1:128.
8408 #define _WDTPS_256_2H           0xA3    // 1:256.
8409 #define _WDTPS_512_2H           0xA7    // 1:512.
8410 #define _WDTPS_1024_2H          0xAB    // 1:1024.
8411 #define _WDTPS_2048_2H          0xAF    // 1:2048.
8412 #define _WDTPS_4096_2H          0xB3    // 1:4096.
8413 #define _WDTPS_8192_2H          0xB7    // 1:8192.
8414 #define _WDTPS_16384_2H         0xBB    // 1:16384.
8415 #define _WDTPS_32768_2H         0xBF    // 1:32768.
8416 #define _WDTPS_65536_2H         0xC3    // 1:65536.
8417 #define _WDTPS_131072_2H        0xC7    // 1:131072.
8418 #define _WDTPS_262144_2H        0xCB    // 1:262144.
8419 #define _WDTPS_524288_2H        0xCF    // 1:524288.
8420 #define _WDTPS_1048576_2H       0xFF    // 1:1048576.
8421 
8422 //----------------------------- CONFIG3L Options -------------------------------
8423 
8424 #define _RTCOSC_INTOSCREF_3L    0xFE    // RTCC uses INTRC.
8425 #define _RTCOSC_SOSCREF_3L      0xFF    // RTCC uses SOSC.
8426 
8427 //----------------------------- CONFIG3H Options -------------------------------
8428 
8429 #define _CCP2MX_PORTBE_3H       0xFE    // RE7-Microcontroller Mode/RB3-All other modes.
8430 #define _CCP2MX_PORTC_3H        0xFF    // RC1.
8431 #define _MSSPMSK_MSK5_3H        0xF7    // 5 bit address masking mode.
8432 #define _MSSPMSK_MSK7_3H        0xFF    // 7 Bit address masking mode.
8433 #define _MCLRE_OFF_3H           0x7F    // MCLR Disabled, RG5 Enabled.
8434 #define _MCLRE_ON_3H            0xFF    // MCLR Enabled, RG5 Disabled.
8435 
8436 //----------------------------- CONFIG4L Options -------------------------------
8437 
8438 #define _STVREN_OFF_4L          0xFE    // Disabled.
8439 #define _STVREN_ON_4L           0xFF    // Enabled.
8440 #define _BBSIZ_BB1K_4L          0xEF    // 1K word Boot Block size.
8441 #define _BBSIZ_BB2K_4L          0xFF    // 2K word Boot Block size.
8442 #define _DEBUG_ON_4L            0x7F    // Enabled.
8443 #define _DEBUG_OFF_4L           0xFF    // Disabled.
8444 
8445 //----------------------------- CONFIG5L Options -------------------------------
8446 
8447 #define _CP0_ON_5L              0xFE    // Enabled.
8448 #define _CP0_OFF_5L             0xFF    // Disabled.
8449 #define _CP1_ON_5L              0xFD    // Enabled.
8450 #define _CP1_OFF_5L             0xFF    // Disabled.
8451 #define _CP2_ON_5L              0xFB    // Enabled.
8452 #define _CP2_OFF_5L             0xFF    // Disabled.
8453 #define _CP3_ON_5L              0xF7    // Enabled.
8454 #define _CP3_OFF_5L             0xFF    // Disabled.
8455 #define _CP4_ON_5L              0xEF    // Enabled.
8456 #define _CP4_OFF_5L             0xFF    // Disabled.
8457 #define _CP5_ON_5L              0xDF    // Enabled.
8458 #define _CP5_OFF_5L             0xFF    // Disabled.
8459 #define _CP6_ON_5L              0xBF    // Enabled.
8460 #define _CP6_OFF_5L             0xFF    // Disabled.
8461 #define _CP7_ON_5L              0x7F    // Enabled.
8462 #define _CP7_OFF_5L             0xFF    // Disabled.
8463 
8464 //----------------------------- CONFIG5H Options -------------------------------
8465 
8466 #define _CPB_ON_5H              0xBF    // Enabled.
8467 #define _CPB_OFF_5H             0xFF    // Disabled.
8468 #define _CPD_ON_5H              0x7F    // Enabled.
8469 #define _CPD_OFF_5H             0xFF    // Disabled.
8470 
8471 //----------------------------- CONFIG6L Options -------------------------------
8472 
8473 #define _WRT0_ON_6L             0xFE    // Enabled.
8474 #define _WRT0_OFF_6L            0xFF    // Disabled.
8475 #define _WRT1_ON_6L             0xFD    // Enabled.
8476 #define _WRT1_OFF_6L            0xFF    // Disabled.
8477 #define _WRT2_ON_6L             0xFB    // Enabled.
8478 #define _WRT2_OFF_6L            0xFF    // Disabled.
8479 #define _WRT3_ON_6L             0xF7    // Enabled.
8480 #define _WRT3_OFF_6L            0xFF    // Disabled.
8481 #define _WRT4_ON_6L             0xEF    // Enabled.
8482 #define _WRT4_OFF_6L            0xFF    // Disabled.
8483 #define _WRT5_ON_6L             0xDF    // Enabled.
8484 #define _WRT5_OFF_6L            0xFF    // Disabled.
8485 #define _WRT6_ON_6L             0xBF    // Enabled.
8486 #define _WRT6_OFF_6L            0xFF    // Disabled.
8487 #define _WRT7_ON_6L             0x7F    // Enabled.
8488 #define _WRT7_OFF_6L            0xFF    // Disabled.
8489 
8490 //----------------------------- CONFIG6H Options -------------------------------
8491 
8492 #define _WRTC_ON_6H             0xDF    // Enabled.
8493 #define _WRTC_OFF_6H            0xFF    // Disabled.
8494 #define _WRTB_ON_6H             0xBF    // Enabled.
8495 #define _WRTB_OFF_6H            0xFF    // Disabled.
8496 #define _WRTD_ON_6H             0x7F    // Enabled.
8497 #define _WRTD_OFF_6H            0xFF    // Disabled.
8498 
8499 //----------------------------- CONFIG7L Options -------------------------------
8500 
8501 #define _EBRT0_ON_7L            0xFE    // Enabled.
8502 #define _EBRT0_OFF_7L           0xFF    // Disabled.
8503 #define _EBRT1_ON_7L            0xFD    // Enabled.
8504 #define _EBRT1_OFF_7L           0xFF    // Disabled.
8505 #define _EBRT2_ON_7L            0xFB    // Enabled.
8506 #define _EBRT2_OFF_7L           0xFF    // Disabled.
8507 #define _EBRT3_ON_7L            0xF7    // Enabled.
8508 #define _EBRT3_OFF_7L           0xFF    // Disabled.
8509 #define _EBRT4_ON_7L            0xEF    // Enabled.
8510 #define _EBRT4_OFF_7L           0xFF    // Disabled.
8511 #define _EBRT5_ON_7L            0xDF    // Enabled.
8512 #define _EBRT5_OFF_7L           0xFF    // Disabled.
8513 #define _EBRT6_ON_7L            0xBF    // Enabled.
8514 #define _EBRT6_OFF_7L           0xFF    // Disabled.
8515 #define _EBRT7_ON_7L            0x7F    // Enabled.
8516 #define _EBRT7_OFF_7L           0xFF    // Disabled.
8517 
8518 //----------------------------- CONFIG7H Options -------------------------------
8519 
8520 #define _EBRTB_ON_7H            0xBF    // Enabled.
8521 #define _EBRTB_OFF_7H           0xFF    // Disabled.
8522 
8523 //==============================================================================
8524 
8525 #define __DEVID1                0x3FFFFE
8526 #define __DEVID2                0x3FFFFF
8527 
8528 #define __IDLOC0                0x200000
8529 #define __IDLOC1                0x200001
8530 #define __IDLOC2                0x200002
8531 #define __IDLOC3                0x200003
8532 #define __IDLOC4                0x200004
8533 #define __IDLOC5                0x200005
8534 #define __IDLOC6                0x200006
8535 #define __IDLOC7                0x200007
8536 
8537 #endif // #ifndef __PIC18F67K90_H__
8538