struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic16 / pic18f87j93.h
bloba9359bfd05f29dcb2fa894754ecdb5e9bf409db0
1 /*
2 * This declarations of the PIC18F87J93 MCU.
4 * This file is part of the GNU PIC library for SDCC, originally
5 * created by Molnar Karoly <molnarkaroly@users.sf.net> 2016.
7 * This file is generated automatically by the cinc2h.pl, 2016-04-13 17:23:40 UTC.
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.
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.
22 * See http://sdcc.sourceforge.net/ for the latest information on sdcc.
25 #ifndef __PIC18F87J93_H__
26 #define __PIC18F87J93_H__
28 //==============================================================================
30 //==============================================================================
32 // Register Definitions
34 //==============================================================================
37 //==============================================================================
38 // PADCFG1 Bits
40 extern __at(0x0F54) __sfr PADCFG1;
42 typedef union
44 struct
46 unsigned : 1;
47 unsigned RTSECSEL0 : 1;
48 unsigned RTSECSEL1 : 1;
49 unsigned : 1;
50 unsigned : 1;
51 unsigned : 1;
52 unsigned : 1;
53 unsigned : 1;
56 struct
58 unsigned : 1;
59 unsigned RTSECSEL : 2;
60 unsigned : 5;
62 } __PADCFG1bits_t;
64 extern __at(0x0F54) volatile __PADCFG1bits_t PADCFG1bits;
66 #define _RTSECSEL0 0x02
67 #define _RTSECSEL1 0x04
69 //==============================================================================
72 //==============================================================================
73 // CTMUICON Bits
75 extern __at(0x0F55) __sfr CTMUICON;
77 typedef union
79 struct
81 unsigned IRNG0 : 1;
82 unsigned IRNG1 : 1;
83 unsigned ITRIM0 : 1;
84 unsigned ITRIM1 : 1;
85 unsigned ITRIM2 : 1;
86 unsigned ITRIM3 : 1;
87 unsigned ITRIM4 : 1;
88 unsigned ITRIM5 : 1;
91 struct
93 unsigned IRNG : 2;
94 unsigned : 6;
97 struct
99 unsigned : 2;
100 unsigned ITRIM : 6;
102 } __CTMUICONbits_t;
104 extern __at(0x0F55) volatile __CTMUICONbits_t CTMUICONbits;
106 #define _IRNG0 0x01
107 #define _IRNG1 0x02
108 #define _ITRIM0 0x04
109 #define _ITRIM1 0x08
110 #define _ITRIM2 0x10
111 #define _ITRIM3 0x20
112 #define _ITRIM4 0x40
113 #define _ITRIM5 0x80
115 //==============================================================================
118 //==============================================================================
119 // CTMUCONL Bits
121 extern __at(0x0F56) __sfr CTMUCONL;
123 typedef union
125 struct
127 unsigned EDG1STAT : 1;
128 unsigned EDG2STAT : 1;
129 unsigned EDG1SEL0 : 1;
130 unsigned EDG1SEL1 : 1;
131 unsigned EDG1POL : 1;
132 unsigned EDG2SEL0 : 1;
133 unsigned EDG2SEL1 : 1;
134 unsigned EDG2POL : 1;
137 struct
139 unsigned : 2;
140 unsigned EDG1SEL : 2;
141 unsigned : 4;
144 struct
146 unsigned : 5;
147 unsigned EDG2SEL : 2;
148 unsigned : 1;
150 } __CTMUCONLbits_t;
152 extern __at(0x0F56) volatile __CTMUCONLbits_t CTMUCONLbits;
154 #define _EDG1STAT 0x01
155 #define _EDG2STAT 0x02
156 #define _EDG1SEL0 0x04
157 #define _EDG1SEL1 0x08
158 #define _EDG1POL 0x10
159 #define _EDG2SEL0 0x20
160 #define _EDG2SEL1 0x40
161 #define _EDG2POL 0x80
163 //==============================================================================
166 //==============================================================================
167 // CTMUCONH Bits
169 extern __at(0x0F57) __sfr CTMUCONH;
171 typedef struct
173 unsigned CTTRIG : 1;
174 unsigned IDISSEN : 1;
175 unsigned EDGSEQEN : 1;
176 unsigned EDGEN : 1;
177 unsigned TGEN : 1;
178 unsigned CTMUSIDL : 1;
179 unsigned : 1;
180 unsigned CTMUEN : 1;
181 } __CTMUCONHbits_t;
183 extern __at(0x0F57) volatile __CTMUCONHbits_t CTMUCONHbits;
185 #define _CTTRIG 0x01
186 #define _IDISSEN 0x02
187 #define _EDGSEQEN 0x04
188 #define _EDGEN 0x08
189 #define _TGEN 0x10
190 #define _CTMUSIDL 0x20
191 #define _CTMUEN 0x80
193 //==============================================================================
195 extern __at(0x0F58) __sfr ALRMVALL;
196 extern __at(0x0F59) __sfr ALRMVALH;
198 //==============================================================================
199 // ALRMRPT Bits
201 extern __at(0x0F5A) __sfr ALRMRPT;
203 typedef struct
205 unsigned ARPT0 : 1;
206 unsigned ARPT1 : 1;
207 unsigned ARPT2 : 1;
208 unsigned ARPT3 : 1;
209 unsigned ARPT4 : 1;
210 unsigned ARPT5 : 1;
211 unsigned ARPT6 : 1;
212 unsigned ARPT7 : 1;
213 } __ALRMRPTbits_t;
215 extern __at(0x0F5A) volatile __ALRMRPTbits_t ALRMRPTbits;
217 #define _ARPT0 0x01
218 #define _ARPT1 0x02
219 #define _ARPT2 0x04
220 #define _ARPT3 0x08
221 #define _ARPT4 0x10
222 #define _ARPT5 0x20
223 #define _ARPT6 0x40
224 #define _ARPT7 0x80
226 //==============================================================================
229 //==============================================================================
230 // ALRMCFG Bits
232 extern __at(0x0F5B) __sfr ALRMCFG;
234 typedef union
236 struct
238 unsigned ALRMPTR0 : 1;
239 unsigned ALRMPTR1 : 1;
240 unsigned AMASK0 : 1;
241 unsigned AMASK1 : 1;
242 unsigned AMASK2 : 1;
243 unsigned AMASK3 : 1;
244 unsigned CHIME : 1;
245 unsigned ALRMEN : 1;
248 struct
250 unsigned ALRMPTR : 2;
251 unsigned : 6;
254 struct
256 unsigned : 2;
257 unsigned AMASK : 4;
258 unsigned : 2;
260 } __ALRMCFGbits_t;
262 extern __at(0x0F5B) volatile __ALRMCFGbits_t ALRMCFGbits;
264 #define _ALRMPTR0 0x01
265 #define _ALRMPTR1 0x02
266 #define _AMASK0 0x04
267 #define _AMASK1 0x08
268 #define _AMASK2 0x10
269 #define _AMASK3 0x20
270 #define _CHIME 0x40
271 #define _ALRMEN 0x80
273 //==============================================================================
275 extern __at(0x0F5C) __sfr RTCVALL;
276 extern __at(0x0F5D) __sfr RTCVALH;
278 //==============================================================================
279 // RTCCAL Bits
281 extern __at(0x0F5E) __sfr RTCCAL;
283 typedef struct
285 unsigned CAL0 : 1;
286 unsigned CAL1 : 1;
287 unsigned CAL2 : 1;
288 unsigned CAL3 : 1;
289 unsigned CAL4 : 1;
290 unsigned CAL5 : 1;
291 unsigned CAL6 : 1;
292 unsigned CAL7 : 1;
293 } __RTCCALbits_t;
295 extern __at(0x0F5E) volatile __RTCCALbits_t RTCCALbits;
297 #define _CAL0 0x01
298 #define _CAL1 0x02
299 #define _CAL2 0x04
300 #define _CAL3 0x08
301 #define _CAL4 0x10
302 #define _CAL5 0x20
303 #define _CAL6 0x40
304 #define _CAL7 0x80
306 //==============================================================================
309 //==============================================================================
310 // RTCCFG Bits
312 extern __at(0x0F5F) __sfr RTCCFG;
314 typedef union
316 struct
318 unsigned RTCPTR0 : 1;
319 unsigned RTCPTR1 : 1;
320 unsigned RTCOE : 1;
321 unsigned HALFSEC : 1;
322 unsigned RTCSYNC : 1;
323 unsigned RTCWREN : 1;
324 unsigned : 1;
325 unsigned RTCEN : 1;
328 struct
330 unsigned RTCPTR : 2;
331 unsigned : 6;
333 } __RTCCFGbits_t;
335 extern __at(0x0F5F) volatile __RTCCFGbits_t RTCCFGbits;
337 #define _RTCPTR0 0x01
338 #define _RTCPTR1 0x02
339 #define _RTCOE 0x04
340 #define _HALFSEC 0x08
341 #define _RTCSYNC 0x10
342 #define _RTCWREN 0x20
343 #define _RTCEN 0x80
345 //==============================================================================
348 //==============================================================================
349 // RCSTA2 Bits
351 extern __at(0x0F60) __sfr RCSTA2;
353 typedef union
355 struct
357 unsigned RX9D : 1;
358 unsigned OERR : 1;
359 unsigned FERR : 1;
360 unsigned ADDEN : 1;
361 unsigned CREN : 1;
362 unsigned SREN : 1;
363 unsigned RX9 : 1;
364 unsigned SPEN : 1;
367 struct
369 unsigned RCD8 : 1;
370 unsigned OERR2 : 1;
371 unsigned FERR2 : 1;
372 unsigned ADDEN2 : 1;
373 unsigned CREN2 : 1;
374 unsigned SREN2 : 1;
375 unsigned RC9 : 1;
376 unsigned SPEN2 : 1;
379 struct
381 unsigned RX9D2 : 1;
382 unsigned : 1;
383 unsigned : 1;
384 unsigned : 1;
385 unsigned : 1;
386 unsigned : 1;
387 unsigned NOT_RC8 : 1;
388 unsigned : 1;
391 struct
393 unsigned RCD82 : 1;
394 unsigned : 1;
395 unsigned : 1;
396 unsigned : 1;
397 unsigned : 1;
398 unsigned : 1;
399 unsigned RC8_9 : 1;
400 unsigned : 1;
403 struct
405 unsigned : 1;
406 unsigned : 1;
407 unsigned : 1;
408 unsigned : 1;
409 unsigned : 1;
410 unsigned : 1;
411 unsigned RX92 : 1;
412 unsigned : 1;
415 struct
417 unsigned : 1;
418 unsigned : 1;
419 unsigned : 1;
420 unsigned : 1;
421 unsigned : 1;
422 unsigned : 1;
423 unsigned RC92 : 1;
424 unsigned : 1;
427 struct
429 unsigned : 1;
430 unsigned : 1;
431 unsigned : 1;
432 unsigned : 1;
433 unsigned : 1;
434 unsigned : 1;
435 unsigned RC8_92 : 1;
436 unsigned : 1;
438 } __RCSTA2bits_t;
440 extern __at(0x0F60) volatile __RCSTA2bits_t RCSTA2bits;
442 #define _RCSTA2_RX9D 0x01
443 #define _RCSTA2_RCD8 0x01
444 #define _RCSTA2_RX9D2 0x01
445 #define _RCSTA2_RCD82 0x01
446 #define _RCSTA2_OERR 0x02
447 #define _RCSTA2_OERR2 0x02
448 #define _RCSTA2_FERR 0x04
449 #define _RCSTA2_FERR2 0x04
450 #define _RCSTA2_ADDEN 0x08
451 #define _RCSTA2_ADDEN2 0x08
452 #define _RCSTA2_CREN 0x10
453 #define _RCSTA2_CREN2 0x10
454 #define _RCSTA2_SREN 0x20
455 #define _RCSTA2_SREN2 0x20
456 #define _RCSTA2_RX9 0x40
457 #define _RCSTA2_RC9 0x40
458 #define _RCSTA2_NOT_RC8 0x40
459 #define _RCSTA2_RC8_9 0x40
460 #define _RCSTA2_RX92 0x40
461 #define _RCSTA2_RC92 0x40
462 #define _RCSTA2_RC8_92 0x40
463 #define _RCSTA2_SPEN 0x80
464 #define _RCSTA2_SPEN2 0x80
466 //==============================================================================
469 //==============================================================================
470 // TXSTA2 Bits
472 extern __at(0x0F61) __sfr TXSTA2;
474 typedef union
476 struct
478 unsigned TX9D : 1;
479 unsigned TRMT : 1;
480 unsigned BRGH : 1;
481 unsigned SENDB2 : 1;
482 unsigned SYNC : 1;
483 unsigned TXEN : 1;
484 unsigned TX9 : 1;
485 unsigned CSRC : 1;
488 struct
490 unsigned TXD8 : 1;
491 unsigned TRMT2 : 1;
492 unsigned BRGH2 : 1;
493 unsigned : 1;
494 unsigned SYNC2 : 1;
495 unsigned TXEN2 : 1;
496 unsigned TX8_9 : 1;
497 unsigned CSRC2 : 1;
500 struct
502 unsigned TX9D2 : 1;
503 unsigned : 1;
504 unsigned : 1;
505 unsigned : 1;
506 unsigned : 1;
507 unsigned : 1;
508 unsigned NOT_TX8 : 1;
509 unsigned : 1;
512 struct
514 unsigned TXD82 : 1;
515 unsigned : 1;
516 unsigned : 1;
517 unsigned : 1;
518 unsigned : 1;
519 unsigned : 1;
520 unsigned TX92 : 1;
521 unsigned : 1;
524 struct
526 unsigned : 1;
527 unsigned : 1;
528 unsigned : 1;
529 unsigned : 1;
530 unsigned : 1;
531 unsigned : 1;
532 unsigned TX8_92 : 1;
533 unsigned : 1;
535 } __TXSTA2bits_t;
537 extern __at(0x0F61) volatile __TXSTA2bits_t TXSTA2bits;
539 #define _TXSTA2_TX9D 0x01
540 #define _TXSTA2_TXD8 0x01
541 #define _TXSTA2_TX9D2 0x01
542 #define _TXSTA2_TXD82 0x01
543 #define _TXSTA2_TRMT 0x02
544 #define _TXSTA2_TRMT2 0x02
545 #define _TXSTA2_BRGH 0x04
546 #define _TXSTA2_BRGH2 0x04
547 #define _TXSTA2_SENDB2 0x08
548 #define _TXSTA2_SYNC 0x10
549 #define _TXSTA2_SYNC2 0x10
550 #define _TXSTA2_TXEN 0x20
551 #define _TXSTA2_TXEN2 0x20
552 #define _TXSTA2_TX9 0x40
553 #define _TXSTA2_TX8_9 0x40
554 #define _TXSTA2_NOT_TX8 0x40
555 #define _TXSTA2_TX92 0x40
556 #define _TXSTA2_TX8_92 0x40
557 #define _TXSTA2_CSRC 0x80
558 #define _TXSTA2_CSRC2 0x80
560 //==============================================================================
562 extern __at(0x0F62) __sfr TXREG2;
563 extern __at(0x0F63) __sfr RCREG2;
564 extern __at(0x0F64) __sfr SPBRG2;
566 //==============================================================================
567 // CCP2CON Bits
569 extern __at(0x0F65) __sfr CCP2CON;
571 typedef union
573 struct
575 unsigned CCP2M0 : 1;
576 unsigned CCP2M1 : 1;
577 unsigned CCP2M2 : 1;
578 unsigned CCP2M3 : 1;
579 unsigned DC2B0 : 1;
580 unsigned DC2B1 : 1;
581 unsigned : 1;
582 unsigned : 1;
585 struct
587 unsigned : 1;
588 unsigned : 1;
589 unsigned : 1;
590 unsigned : 1;
591 unsigned DCCP2Y : 1;
592 unsigned DCCP2X : 1;
593 unsigned : 1;
594 unsigned : 1;
597 struct
599 unsigned CCP2M : 4;
600 unsigned : 4;
603 struct
605 unsigned : 4;
606 unsigned DC2B : 2;
607 unsigned : 2;
609 } __CCP2CONbits_t;
611 extern __at(0x0F65) volatile __CCP2CONbits_t CCP2CONbits;
613 #define _CCP2M0 0x01
614 #define _CCP2M1 0x02
615 #define _CCP2M2 0x04
616 #define _CCP2M3 0x08
617 #define _DC2B0 0x10
618 #define _DCCP2Y 0x10
619 #define _DC2B1 0x20
620 #define _DCCP2X 0x20
622 //==============================================================================
625 //==============================================================================
626 // ECCP2CON Bits
628 extern __at(0x0F65) __sfr ECCP2CON;
630 typedef union
632 struct
634 unsigned CCP2M0 : 1;
635 unsigned CCP2M1 : 1;
636 unsigned CCP2M2 : 1;
637 unsigned CCP2M3 : 1;
638 unsigned DC2B0 : 1;
639 unsigned DC2B1 : 1;
640 unsigned : 1;
641 unsigned : 1;
644 struct
646 unsigned : 1;
647 unsigned : 1;
648 unsigned : 1;
649 unsigned : 1;
650 unsigned DCCP2Y : 1;
651 unsigned DCCP2X : 1;
652 unsigned : 1;
653 unsigned : 1;
656 struct
658 unsigned CCP2M : 4;
659 unsigned : 4;
662 struct
664 unsigned : 4;
665 unsigned DC2B : 2;
666 unsigned : 2;
668 } __ECCP2CONbits_t;
670 extern __at(0x0F65) volatile __ECCP2CONbits_t ECCP2CONbits;
672 #define _ECCP2CON_CCP2M0 0x01
673 #define _ECCP2CON_CCP2M1 0x02
674 #define _ECCP2CON_CCP2M2 0x04
675 #define _ECCP2CON_CCP2M3 0x08
676 #define _ECCP2CON_DC2B0 0x10
677 #define _ECCP2CON_DCCP2Y 0x10
678 #define _ECCP2CON_DC2B1 0x20
679 #define _ECCP2CON_DCCP2X 0x20
681 //==============================================================================
683 extern __at(0x0F66) __sfr CCPR2;
684 extern __at(0x0F66) __sfr CCPR2L;
685 extern __at(0x0F67) __sfr CCPR2H;
687 //==============================================================================
688 // CCP1CON Bits
690 extern __at(0x0F68) __sfr CCP1CON;
692 typedef union
694 struct
696 unsigned CCP1M0 : 1;
697 unsigned CCP1M1 : 1;
698 unsigned CCP1M2 : 1;
699 unsigned CCP1M3 : 1;
700 unsigned DC1B0 : 1;
701 unsigned DC1B1 : 1;
702 unsigned : 1;
703 unsigned : 1;
706 struct
708 unsigned : 1;
709 unsigned : 1;
710 unsigned : 1;
711 unsigned : 1;
712 unsigned DCCP1Y : 1;
713 unsigned DCCP1X : 1;
714 unsigned : 1;
715 unsigned : 1;
718 struct
720 unsigned CCP1M : 4;
721 unsigned : 4;
724 struct
726 unsigned : 4;
727 unsigned DC1B : 2;
728 unsigned : 2;
730 } __CCP1CONbits_t;
732 extern __at(0x0F68) volatile __CCP1CONbits_t CCP1CONbits;
734 #define _CCP1M0 0x01
735 #define _CCP1M1 0x02
736 #define _CCP1M2 0x04
737 #define _CCP1M3 0x08
738 #define _DC1B0 0x10
739 #define _DCCP1Y 0x10
740 #define _DC1B1 0x20
741 #define _DCCP1X 0x20
743 //==============================================================================
746 //==============================================================================
747 // ECCP1CON Bits
749 extern __at(0x0F68) __sfr ECCP1CON;
751 typedef union
753 struct
755 unsigned CCP1M0 : 1;
756 unsigned CCP1M1 : 1;
757 unsigned CCP1M2 : 1;
758 unsigned CCP1M3 : 1;
759 unsigned DC1B0 : 1;
760 unsigned DC1B1 : 1;
761 unsigned : 1;
762 unsigned : 1;
765 struct
767 unsigned : 1;
768 unsigned : 1;
769 unsigned : 1;
770 unsigned : 1;
771 unsigned DCCP1Y : 1;
772 unsigned DCCP1X : 1;
773 unsigned : 1;
774 unsigned : 1;
777 struct
779 unsigned CCP1M : 4;
780 unsigned : 4;
783 struct
785 unsigned : 4;
786 unsigned DC1B : 2;
787 unsigned : 2;
789 } __ECCP1CONbits_t;
791 extern __at(0x0F68) volatile __ECCP1CONbits_t ECCP1CONbits;
793 #define _ECCP1CON_CCP1M0 0x01
794 #define _ECCP1CON_CCP1M1 0x02
795 #define _ECCP1CON_CCP1M2 0x04
796 #define _ECCP1CON_CCP1M3 0x08
797 #define _ECCP1CON_DC1B0 0x10
798 #define _ECCP1CON_DCCP1Y 0x10
799 #define _ECCP1CON_DC1B1 0x20
800 #define _ECCP1CON_DCCP1X 0x20
802 //==============================================================================
804 extern __at(0x0F69) __sfr CCPR1;
805 extern __at(0x0F69) __sfr CCPR1L;
806 extern __at(0x0F6A) __sfr CCPR1H;
808 //==============================================================================
809 // LCDDATA5 Bits
811 extern __at(0x0F6B) __sfr LCDDATA5;
813 typedef union
815 struct
817 unsigned S40C0 : 1;
818 unsigned S41C0 : 1;
819 unsigned S42C0 : 1;
820 unsigned S43C0 : 1;
821 unsigned S44C0 : 1;
822 unsigned S45C0 : 1;
823 unsigned S46C0 : 1;
824 unsigned S47C0 : 1;
827 struct
829 unsigned SEG40COM0 : 1;
830 unsigned SEG41COM0 : 1;
831 unsigned SEG42COM0 : 1;
832 unsigned SEG43COM0 : 1;
833 unsigned SEG44COM0 : 1;
834 unsigned SEG45COM0 : 1;
835 unsigned SEG46COM0 : 1;
836 unsigned SEG47COM0 : 1;
838 } __LCDDATA5bits_t;
840 extern __at(0x0F6B) volatile __LCDDATA5bits_t LCDDATA5bits;
842 #define _S40C0 0x01
843 #define _SEG40COM0 0x01
844 #define _S41C0 0x02
845 #define _SEG41COM0 0x02
846 #define _S42C0 0x04
847 #define _SEG42COM0 0x04
848 #define _S43C0 0x08
849 #define _SEG43COM0 0x08
850 #define _S44C0 0x10
851 #define _SEG44COM0 0x10
852 #define _S45C0 0x20
853 #define _SEG45COM0 0x20
854 #define _S46C0 0x40
855 #define _SEG46COM0 0x40
856 #define _S47C0 0x80
857 #define _SEG47COM0 0x80
859 //==============================================================================
862 //==============================================================================
863 // LCDDATA6 Bits
865 extern __at(0x0F6C) __sfr LCDDATA6;
867 typedef union
869 struct
871 unsigned S00C1 : 1;
872 unsigned S01C1 : 1;
873 unsigned S02C1 : 1;
874 unsigned S03C1 : 1;
875 unsigned S04C1 : 1;
876 unsigned S05C1 : 1;
877 unsigned S06C1 : 1;
878 unsigned S07C1 : 1;
881 struct
883 unsigned SEG0COM1 : 1;
884 unsigned SEG1COM1 : 1;
885 unsigned SEG2COM1 : 1;
886 unsigned SEG3COM1 : 1;
887 unsigned SEG4COM1 : 1;
888 unsigned SEG5COM1 : 1;
889 unsigned SEG6COM1 : 1;
890 unsigned SEG7COM1 : 1;
893 struct
895 unsigned S0C1 : 1;
896 unsigned S1C1 : 1;
897 unsigned S2C1 : 1;
898 unsigned S3C1 : 1;
899 unsigned S4C1 : 1;
900 unsigned S5C1 : 1;
901 unsigned S6C1 : 1;
902 unsigned S7C1 : 1;
904 } __LCDDATA6bits_t;
906 extern __at(0x0F6C) volatile __LCDDATA6bits_t LCDDATA6bits;
908 #define _S00C1 0x01
909 #define _SEG0COM1 0x01
910 #define _S0C1 0x01
911 #define _S01C1 0x02
912 #define _SEG1COM1 0x02
913 #define _S1C1 0x02
914 #define _S02C1 0x04
915 #define _SEG2COM1 0x04
916 #define _S2C1 0x04
917 #define _S03C1 0x08
918 #define _SEG3COM1 0x08
919 #define _S3C1 0x08
920 #define _S04C1 0x10
921 #define _SEG4COM1 0x10
922 #define _S4C1 0x10
923 #define _S05C1 0x20
924 #define _SEG5COM1 0x20
925 #define _S5C1 0x20
926 #define _S06C1 0x40
927 #define _SEG6COM1 0x40
928 #define _S6C1 0x40
929 #define _S07C1 0x80
930 #define _SEG7COM1 0x80
931 #define _S7C1 0x80
933 //==============================================================================
936 //==============================================================================
937 // LCDDATA7 Bits
939 extern __at(0x0F6D) __sfr LCDDATA7;
941 typedef union
943 struct
945 unsigned S8C1 : 1;
946 unsigned S9C1 : 1;
947 unsigned S10C1 : 1;
948 unsigned S11C1 : 1;
949 unsigned S12C1 : 1;
950 unsigned S13C1 : 1;
951 unsigned S14C1 : 1;
952 unsigned S15C1 : 1;
955 struct
957 unsigned SEG8COM1 : 1;
958 unsigned SEG9COM1 : 1;
959 unsigned SEG10COM1 : 1;
960 unsigned SEG11COM1 : 1;
961 unsigned SEG12COM1 : 1;
962 unsigned SEG13COM1 : 1;
963 unsigned SEG14COM1 : 1;
964 unsigned SEG15COM1 : 1;
967 struct
969 unsigned S08C1 : 1;
970 unsigned S09C1 : 1;
971 unsigned : 1;
972 unsigned : 1;
973 unsigned : 1;
974 unsigned : 1;
975 unsigned : 1;
976 unsigned : 1;
978 } __LCDDATA7bits_t;
980 extern __at(0x0F6D) volatile __LCDDATA7bits_t LCDDATA7bits;
982 #define _S8C1 0x01
983 #define _SEG8COM1 0x01
984 #define _S08C1 0x01
985 #define _S9C1 0x02
986 #define _SEG9COM1 0x02
987 #define _S09C1 0x02
988 #define _S10C1 0x04
989 #define _SEG10COM1 0x04
990 #define _S11C1 0x08
991 #define _SEG11COM1 0x08
992 #define _S12C1 0x10
993 #define _SEG12COM1 0x10
994 #define _S13C1 0x20
995 #define _SEG13COM1 0x20
996 #define _S14C1 0x40
997 #define _SEG14COM1 0x40
998 #define _S15C1 0x80
999 #define _SEG15COM1 0x80
1001 //==============================================================================
1004 //==============================================================================
1005 // LCDDATA8 Bits
1007 extern __at(0x0F6E) __sfr LCDDATA8;
1009 typedef union
1011 struct
1013 unsigned S16C1 : 1;
1014 unsigned S17C1 : 1;
1015 unsigned S18C1 : 1;
1016 unsigned S19C1 : 1;
1017 unsigned S20C1 : 1;
1018 unsigned S21C1 : 1;
1019 unsigned S22C1 : 1;
1020 unsigned S23C1 : 1;
1023 struct
1025 unsigned SEG16COM1 : 1;
1026 unsigned SEG17COM1 : 1;
1027 unsigned SEG18COM1 : 1;
1028 unsigned SEG19COM1 : 1;
1029 unsigned SEG20COM1 : 1;
1030 unsigned SEG21COM1 : 1;
1031 unsigned SEG22COM1 : 1;
1032 unsigned SEG23COM1 : 1;
1034 } __LCDDATA8bits_t;
1036 extern __at(0x0F6E) volatile __LCDDATA8bits_t LCDDATA8bits;
1038 #define _S16C1 0x01
1039 #define _SEG16COM1 0x01
1040 #define _S17C1 0x02
1041 #define _SEG17COM1 0x02
1042 #define _S18C1 0x04
1043 #define _SEG18COM1 0x04
1044 #define _S19C1 0x08
1045 #define _SEG19COM1 0x08
1046 #define _S20C1 0x10
1047 #define _SEG20COM1 0x10
1048 #define _S21C1 0x20
1049 #define _SEG21COM1 0x20
1050 #define _S22C1 0x40
1051 #define _SEG22COM1 0x40
1052 #define _S23C1 0x80
1053 #define _SEG23COM1 0x80
1055 //==============================================================================
1058 //==============================================================================
1059 // LCDDATA9 Bits
1061 extern __at(0x0F6F) __sfr LCDDATA9;
1063 typedef union
1065 struct
1067 unsigned S24C1 : 1;
1068 unsigned S25C1 : 1;
1069 unsigned S26C1 : 1;
1070 unsigned S27C1 : 1;
1071 unsigned S28C1 : 1;
1072 unsigned S29C1 : 1;
1073 unsigned S30C1 : 1;
1074 unsigned S31C1 : 1;
1077 struct
1079 unsigned SEG24COM1 : 1;
1080 unsigned SEG25COM1 : 1;
1081 unsigned SEG26COM1 : 1;
1082 unsigned SEG27COM1 : 1;
1083 unsigned SEG28COM1 : 1;
1084 unsigned SEG29COM1 : 1;
1085 unsigned SEG30COM1 : 1;
1086 unsigned SEG31COM1 : 1;
1088 } __LCDDATA9bits_t;
1090 extern __at(0x0F6F) volatile __LCDDATA9bits_t LCDDATA9bits;
1092 #define _S24C1 0x01
1093 #define _SEG24COM1 0x01
1094 #define _S25C1 0x02
1095 #define _SEG25COM1 0x02
1096 #define _S26C1 0x04
1097 #define _SEG26COM1 0x04
1098 #define _S27C1 0x08
1099 #define _SEG27COM1 0x08
1100 #define _S28C1 0x10
1101 #define _SEG28COM1 0x10
1102 #define _S29C1 0x20
1103 #define _SEG29COM1 0x20
1104 #define _S30C1 0x40
1105 #define _SEG30COM1 0x40
1106 #define _S31C1 0x80
1107 #define _SEG31COM1 0x80
1109 //==============================================================================
1112 //==============================================================================
1113 // LCDDATA10 Bits
1115 extern __at(0x0F70) __sfr LCDDATA10;
1117 typedef union
1119 struct
1121 unsigned S32C1 : 1;
1122 unsigned S33C1 : 1;
1123 unsigned S34C1 : 1;
1124 unsigned S35C1 : 1;
1125 unsigned S36C1 : 1;
1126 unsigned S37C1 : 1;
1127 unsigned S38C1 : 1;
1128 unsigned S39C1 : 1;
1131 struct
1133 unsigned SEG32COM1 : 1;
1134 unsigned SEG33COM1 : 1;
1135 unsigned SEG34COM1 : 1;
1136 unsigned SEG35COM1 : 1;
1137 unsigned SEG36COM1 : 1;
1138 unsigned SEG37COM1 : 1;
1139 unsigned SEG38COM1 : 1;
1140 unsigned SEG39COM1 : 1;
1142 } __LCDDATA10bits_t;
1144 extern __at(0x0F70) volatile __LCDDATA10bits_t LCDDATA10bits;
1146 #define _S32C1 0x01
1147 #define _SEG32COM1 0x01
1148 #define _S33C1 0x02
1149 #define _SEG33COM1 0x02
1150 #define _S34C1 0x04
1151 #define _SEG34COM1 0x04
1152 #define _S35C1 0x08
1153 #define _SEG35COM1 0x08
1154 #define _S36C1 0x10
1155 #define _SEG36COM1 0x10
1156 #define _S37C1 0x20
1157 #define _SEG37COM1 0x20
1158 #define _S38C1 0x40
1159 #define _SEG38COM1 0x40
1160 #define _S39C1 0x80
1161 #define _SEG39COM1 0x80
1163 //==============================================================================
1166 //==============================================================================
1167 // LCDDATA11 Bits
1169 extern __at(0x0F71) __sfr LCDDATA11;
1171 typedef union
1173 struct
1175 unsigned S40C1 : 1;
1176 unsigned S41C1 : 1;
1177 unsigned S42C1 : 1;
1178 unsigned S43C1 : 1;
1179 unsigned S44C1 : 1;
1180 unsigned S45C1 : 1;
1181 unsigned S46C1 : 1;
1182 unsigned S47C1 : 1;
1185 struct
1187 unsigned SEG40COM1 : 1;
1188 unsigned SEG41COM1 : 1;
1189 unsigned SEG42COM1 : 1;
1190 unsigned SEG43COM1 : 1;
1191 unsigned SEG44COM1 : 1;
1192 unsigned SEG45COM1 : 1;
1193 unsigned SEG46COM1 : 1;
1194 unsigned SEG47COM1 : 1;
1196 } __LCDDATA11bits_t;
1198 extern __at(0x0F71) volatile __LCDDATA11bits_t LCDDATA11bits;
1200 #define _S40C1 0x01
1201 #define _SEG40COM1 0x01
1202 #define _S41C1 0x02
1203 #define _SEG41COM1 0x02
1204 #define _S42C1 0x04
1205 #define _SEG42COM1 0x04
1206 #define _S43C1 0x08
1207 #define _SEG43COM1 0x08
1208 #define _S44C1 0x10
1209 #define _SEG44COM1 0x10
1210 #define _S45C1 0x20
1211 #define _SEG45COM1 0x20
1212 #define _S46C1 0x40
1213 #define _SEG46COM1 0x40
1214 #define _S47C1 0x80
1215 #define _SEG47COM1 0x80
1217 //==============================================================================
1220 //==============================================================================
1221 // LCDDATA12 Bits
1223 extern __at(0x0F72) __sfr LCDDATA12;
1225 typedef union
1227 struct
1229 unsigned S00C2 : 1;
1230 unsigned S01C2 : 1;
1231 unsigned S02C2 : 1;
1232 unsigned S03C2 : 1;
1233 unsigned S04C2 : 1;
1234 unsigned S05C2 : 1;
1235 unsigned S06C2 : 1;
1236 unsigned S07C2 : 1;
1239 struct
1241 unsigned SEG0COM2 : 1;
1242 unsigned SEG1COM2 : 1;
1243 unsigned SEG2COM2 : 1;
1244 unsigned SEG3COM2 : 1;
1245 unsigned SEG4COM2 : 1;
1246 unsigned SEG5COM2 : 1;
1247 unsigned SEG6COM2 : 1;
1248 unsigned SEG7COM2 : 1;
1251 struct
1253 unsigned S0C2 : 1;
1254 unsigned S1C2 : 1;
1255 unsigned S2C2 : 1;
1256 unsigned S3C2 : 1;
1257 unsigned S4C2 : 1;
1258 unsigned S5C2 : 1;
1259 unsigned S6C2 : 1;
1260 unsigned S7C2 : 1;
1262 } __LCDDATA12bits_t;
1264 extern __at(0x0F72) volatile __LCDDATA12bits_t LCDDATA12bits;
1266 #define _S00C2 0x01
1267 #define _SEG0COM2 0x01
1268 #define _S0C2 0x01
1269 #define _S01C2 0x02
1270 #define _SEG1COM2 0x02
1271 #define _S1C2 0x02
1272 #define _S02C2 0x04
1273 #define _SEG2COM2 0x04
1274 #define _S2C2 0x04
1275 #define _S03C2 0x08
1276 #define _SEG3COM2 0x08
1277 #define _S3C2 0x08
1278 #define _S04C2 0x10
1279 #define _SEG4COM2 0x10
1280 #define _S4C2 0x10
1281 #define _S05C2 0x20
1282 #define _SEG5COM2 0x20
1283 #define _S5C2 0x20
1284 #define _S06C2 0x40
1285 #define _SEG6COM2 0x40
1286 #define _S6C2 0x40
1287 #define _S07C2 0x80
1288 #define _SEG7COM2 0x80
1289 #define _S7C2 0x80
1291 //==============================================================================
1294 //==============================================================================
1295 // LCDDATA13 Bits
1297 extern __at(0x0F73) __sfr LCDDATA13;
1299 typedef union
1301 struct
1303 unsigned S8C2 : 1;
1304 unsigned S9C2 : 1;
1305 unsigned S10C2 : 1;
1306 unsigned S11C2 : 1;
1307 unsigned S12C2 : 1;
1308 unsigned S13C2 : 1;
1309 unsigned S14C2 : 1;
1310 unsigned S15C2 : 1;
1313 struct
1315 unsigned SEG8COM2 : 1;
1316 unsigned SEG9COM2 : 1;
1317 unsigned SEG10COM2 : 1;
1318 unsigned SEG11COM2 : 1;
1319 unsigned SEG12COM2 : 1;
1320 unsigned SEG13COM2 : 1;
1321 unsigned SEG14COM2 : 1;
1322 unsigned SEG15COM2 : 1;
1325 struct
1327 unsigned S08C2 : 1;
1328 unsigned S09C2 : 1;
1329 unsigned : 1;
1330 unsigned : 1;
1331 unsigned : 1;
1332 unsigned : 1;
1333 unsigned : 1;
1334 unsigned : 1;
1336 } __LCDDATA13bits_t;
1338 extern __at(0x0F73) volatile __LCDDATA13bits_t LCDDATA13bits;
1340 #define _S8C2 0x01
1341 #define _SEG8COM2 0x01
1342 #define _S08C2 0x01
1343 #define _S9C2 0x02
1344 #define _SEG9COM2 0x02
1345 #define _S09C2 0x02
1346 #define _S10C2 0x04
1347 #define _SEG10COM2 0x04
1348 #define _S11C2 0x08
1349 #define _SEG11COM2 0x08
1350 #define _S12C2 0x10
1351 #define _SEG12COM2 0x10
1352 #define _S13C2 0x20
1353 #define _SEG13COM2 0x20
1354 #define _S14C2 0x40
1355 #define _SEG14COM2 0x40
1356 #define _S15C2 0x80
1357 #define _SEG15COM2 0x80
1359 //==============================================================================
1362 //==============================================================================
1363 // LCDDATA14 Bits
1365 extern __at(0x0F74) __sfr LCDDATA14;
1367 typedef union
1369 struct
1371 unsigned S16C2 : 1;
1372 unsigned S17C2 : 1;
1373 unsigned S18C2 : 1;
1374 unsigned S19C2 : 1;
1375 unsigned S20C2 : 1;
1376 unsigned S21C2 : 1;
1377 unsigned S22C2 : 1;
1378 unsigned S23C2 : 1;
1381 struct
1383 unsigned SEG16COM2 : 1;
1384 unsigned SEG17COM2 : 1;
1385 unsigned SEG18COM2 : 1;
1386 unsigned SEG19COM2 : 1;
1387 unsigned SEG20COM2 : 1;
1388 unsigned SEG21COM2 : 1;
1389 unsigned SEG22COM2 : 1;
1390 unsigned SEG23COM2 : 1;
1392 } __LCDDATA14bits_t;
1394 extern __at(0x0F74) volatile __LCDDATA14bits_t LCDDATA14bits;
1396 #define _S16C2 0x01
1397 #define _SEG16COM2 0x01
1398 #define _S17C2 0x02
1399 #define _SEG17COM2 0x02
1400 #define _S18C2 0x04
1401 #define _SEG18COM2 0x04
1402 #define _S19C2 0x08
1403 #define _SEG19COM2 0x08
1404 #define _S20C2 0x10
1405 #define _SEG20COM2 0x10
1406 #define _S21C2 0x20
1407 #define _SEG21COM2 0x20
1408 #define _S22C2 0x40
1409 #define _SEG22COM2 0x40
1410 #define _S23C2 0x80
1411 #define _SEG23COM2 0x80
1413 //==============================================================================
1416 //==============================================================================
1417 // LCDDATA15 Bits
1419 extern __at(0x0F75) __sfr LCDDATA15;
1421 typedef union
1423 struct
1425 unsigned S24C2 : 1;
1426 unsigned S25C2 : 1;
1427 unsigned S26C2 : 1;
1428 unsigned S27C2 : 1;
1429 unsigned S28C2 : 1;
1430 unsigned S29C2 : 1;
1431 unsigned S30C2 : 1;
1432 unsigned S31C2 : 1;
1435 struct
1437 unsigned SEG24COM2 : 1;
1438 unsigned SEG25COM2 : 1;
1439 unsigned SEG26COM2 : 1;
1440 unsigned SEG27COM2 : 1;
1441 unsigned SEG28COM2 : 1;
1442 unsigned SEG29COM2 : 1;
1443 unsigned SEG30COM2 : 1;
1444 unsigned SEG31COM2 : 1;
1446 } __LCDDATA15bits_t;
1448 extern __at(0x0F75) volatile __LCDDATA15bits_t LCDDATA15bits;
1450 #define _S24C2 0x01
1451 #define _SEG24COM2 0x01
1452 #define _S25C2 0x02
1453 #define _SEG25COM2 0x02
1454 #define _S26C2 0x04
1455 #define _SEG26COM2 0x04
1456 #define _S27C2 0x08
1457 #define _SEG27COM2 0x08
1458 #define _S28C2 0x10
1459 #define _SEG28COM2 0x10
1460 #define _S29C2 0x20
1461 #define _SEG29COM2 0x20
1462 #define _S30C2 0x40
1463 #define _SEG30COM2 0x40
1464 #define _S31C2 0x80
1465 #define _SEG31COM2 0x80
1467 //==============================================================================
1470 //==============================================================================
1471 // LCDDATA16 Bits
1473 extern __at(0x0F76) __sfr LCDDATA16;
1475 typedef union
1477 struct
1479 unsigned S32C2 : 1;
1480 unsigned S33C2 : 1;
1481 unsigned S34C2 : 1;
1482 unsigned S35C2 : 1;
1483 unsigned S36C2 : 1;
1484 unsigned S37C2 : 1;
1485 unsigned S38C2 : 1;
1486 unsigned S39C2 : 1;
1489 struct
1491 unsigned SEG32COM2 : 1;
1492 unsigned SEG33COM2 : 1;
1493 unsigned SEG34COM2 : 1;
1494 unsigned SEG35COM2 : 1;
1495 unsigned SEG36COM2 : 1;
1496 unsigned SEG37COM2 : 1;
1497 unsigned SEG38COM2 : 1;
1498 unsigned SEG39COM2 : 1;
1500 } __LCDDATA16bits_t;
1502 extern __at(0x0F76) volatile __LCDDATA16bits_t LCDDATA16bits;
1504 #define _S32C2 0x01
1505 #define _SEG32COM2 0x01
1506 #define _S33C2 0x02
1507 #define _SEG33COM2 0x02
1508 #define _S34C2 0x04
1509 #define _SEG34COM2 0x04
1510 #define _S35C2 0x08
1511 #define _SEG35COM2 0x08
1512 #define _S36C2 0x10
1513 #define _SEG36COM2 0x10
1514 #define _S37C2 0x20
1515 #define _SEG37COM2 0x20
1516 #define _S38C2 0x40
1517 #define _SEG38COM2 0x40
1518 #define _S39C2 0x80
1519 #define _SEG39COM2 0x80
1521 //==============================================================================
1524 //==============================================================================
1525 // LCDDATA17 Bits
1527 extern __at(0x0F77) __sfr LCDDATA17;
1529 typedef union
1531 struct
1533 unsigned S40C2 : 1;
1534 unsigned S41C2 : 1;
1535 unsigned S42C2 : 1;
1536 unsigned S43C2 : 1;
1537 unsigned S44C2 : 1;
1538 unsigned S45C2 : 1;
1539 unsigned S46C2 : 1;
1540 unsigned S47C2 : 1;
1543 struct
1545 unsigned SEG40COM2 : 1;
1546 unsigned SEG41COM2 : 1;
1547 unsigned SEG42COM2 : 1;
1548 unsigned SEG43COM2 : 1;
1549 unsigned SEG44COM2 : 1;
1550 unsigned SEG45COM2 : 1;
1551 unsigned SEG46COM2 : 1;
1552 unsigned SEG47COM2 : 1;
1554 } __LCDDATA17bits_t;
1556 extern __at(0x0F77) volatile __LCDDATA17bits_t LCDDATA17bits;
1558 #define _S40C2 0x01
1559 #define _SEG40COM2 0x01
1560 #define _S41C2 0x02
1561 #define _SEG41COM2 0x02
1562 #define _S42C2 0x04
1563 #define _SEG42COM2 0x04
1564 #define _S43C2 0x08
1565 #define _SEG43COM2 0x08
1566 #define _S44C2 0x10
1567 #define _SEG44COM2 0x10
1568 #define _S45C2 0x20
1569 #define _SEG45COM2 0x20
1570 #define _S46C2 0x40
1571 #define _SEG46COM2 0x40
1572 #define _S47C2 0x80
1573 #define _SEG47COM2 0x80
1575 //==============================================================================
1578 //==============================================================================
1579 // LCDDATA18 Bits
1581 extern __at(0x0F78) __sfr LCDDATA18;
1583 typedef union
1585 struct
1587 unsigned S00C3 : 1;
1588 unsigned S01C3 : 1;
1589 unsigned S02C3 : 1;
1590 unsigned S03C3 : 1;
1591 unsigned S04C3 : 1;
1592 unsigned S05C3 : 1;
1593 unsigned S06C3 : 1;
1594 unsigned S07C3 : 1;
1597 struct
1599 unsigned SEG00COM3 : 1;
1600 unsigned SEG01COM3 : 1;
1601 unsigned SEG02COM3 : 1;
1602 unsigned SEG03COM3 : 1;
1603 unsigned SEG04COM3 : 1;
1604 unsigned SEG05COM3 : 1;
1605 unsigned SEG06COM3 : 1;
1606 unsigned SEG07COM3 : 1;
1609 struct
1611 unsigned S0C3 : 1;
1612 unsigned S1C3 : 1;
1613 unsigned S2C3 : 1;
1614 unsigned S3C3 : 1;
1615 unsigned S4C3 : 1;
1616 unsigned S5C3 : 1;
1617 unsigned S6C3 : 1;
1618 unsigned S7C3 : 1;
1620 } __LCDDATA18bits_t;
1622 extern __at(0x0F78) volatile __LCDDATA18bits_t LCDDATA18bits;
1624 #define _S00C3 0x01
1625 #define _SEG00COM3 0x01
1626 #define _S0C3 0x01
1627 #define _S01C3 0x02
1628 #define _SEG01COM3 0x02
1629 #define _S1C3 0x02
1630 #define _S02C3 0x04
1631 #define _SEG02COM3 0x04
1632 #define _S2C3 0x04
1633 #define _S03C3 0x08
1634 #define _SEG03COM3 0x08
1635 #define _S3C3 0x08
1636 #define _S04C3 0x10
1637 #define _SEG04COM3 0x10
1638 #define _S4C3 0x10
1639 #define _S05C3 0x20
1640 #define _SEG05COM3 0x20
1641 #define _S5C3 0x20
1642 #define _S06C3 0x40
1643 #define _SEG06COM3 0x40
1644 #define _S6C3 0x40
1645 #define _S07C3 0x80
1646 #define _SEG07COM3 0x80
1647 #define _S7C3 0x80
1649 //==============================================================================
1652 //==============================================================================
1653 // LCDDATA19 Bits
1655 extern __at(0x0F79) __sfr LCDDATA19;
1657 typedef union
1659 struct
1661 unsigned S8C3 : 1;
1662 unsigned S9C3 : 1;
1663 unsigned S10C3 : 1;
1664 unsigned S11C3 : 1;
1665 unsigned S12C3 : 1;
1666 unsigned S13C3 : 1;
1667 unsigned S14C3 : 1;
1668 unsigned S15C3 : 1;
1671 struct
1673 unsigned SEG8COM3 : 1;
1674 unsigned SEG9COM3 : 1;
1675 unsigned SEG10COM3 : 1;
1676 unsigned SEG11COM3 : 1;
1677 unsigned SEG12COM3 : 1;
1678 unsigned SEG13COM3 : 1;
1679 unsigned SEG14COM3 : 1;
1680 unsigned SEG15COM3 : 1;
1683 struct
1685 unsigned S08C3 : 1;
1686 unsigned S09C3 : 1;
1687 unsigned : 1;
1688 unsigned : 1;
1689 unsigned : 1;
1690 unsigned : 1;
1691 unsigned : 1;
1692 unsigned : 1;
1694 } __LCDDATA19bits_t;
1696 extern __at(0x0F79) volatile __LCDDATA19bits_t LCDDATA19bits;
1698 #define _S8C3 0x01
1699 #define _SEG8COM3 0x01
1700 #define _S08C3 0x01
1701 #define _S9C3 0x02
1702 #define _SEG9COM3 0x02
1703 #define _S09C3 0x02
1704 #define _S10C3 0x04
1705 #define _SEG10COM3 0x04
1706 #define _S11C3 0x08
1707 #define _SEG11COM3 0x08
1708 #define _S12C3 0x10
1709 #define _SEG12COM3 0x10
1710 #define _S13C3 0x20
1711 #define _SEG13COM3 0x20
1712 #define _S14C3 0x40
1713 #define _SEG14COM3 0x40
1714 #define _S15C3 0x80
1715 #define _SEG15COM3 0x80
1717 //==============================================================================
1720 //==============================================================================
1721 // LCDDATA20 Bits
1723 extern __at(0x0F7A) __sfr LCDDATA20;
1725 typedef union
1727 struct
1729 unsigned S16C3 : 1;
1730 unsigned S17C3 : 1;
1731 unsigned S18C3 : 1;
1732 unsigned S19C3 : 1;
1733 unsigned S20C3 : 1;
1734 unsigned S21C3 : 1;
1735 unsigned S22C3 : 1;
1736 unsigned S23C3 : 1;
1739 struct
1741 unsigned SEG16COM3 : 1;
1742 unsigned SEG17COM3 : 1;
1743 unsigned SEG18COM3 : 1;
1744 unsigned SEG19COM3 : 1;
1745 unsigned SEG20COM3 : 1;
1746 unsigned SEG21COM3 : 1;
1747 unsigned SEG22COM3 : 1;
1748 unsigned SEG23COM3 : 1;
1750 } __LCDDATA20bits_t;
1752 extern __at(0x0F7A) volatile __LCDDATA20bits_t LCDDATA20bits;
1754 #define _S16C3 0x01
1755 #define _SEG16COM3 0x01
1756 #define _S17C3 0x02
1757 #define _SEG17COM3 0x02
1758 #define _S18C3 0x04
1759 #define _SEG18COM3 0x04
1760 #define _S19C3 0x08
1761 #define _SEG19COM3 0x08
1762 #define _S20C3 0x10
1763 #define _SEG20COM3 0x10
1764 #define _S21C3 0x20
1765 #define _SEG21COM3 0x20
1766 #define _S22C3 0x40
1767 #define _SEG22COM3 0x40
1768 #define _S23C3 0x80
1769 #define _SEG23COM3 0x80
1771 //==============================================================================
1774 //==============================================================================
1775 // LCDDATA21 Bits
1777 extern __at(0x0F7B) __sfr LCDDATA21;
1779 typedef union
1781 struct
1783 unsigned S24C3 : 1;
1784 unsigned S25C3 : 1;
1785 unsigned S26C3 : 1;
1786 unsigned S27C3 : 1;
1787 unsigned S28C3 : 1;
1788 unsigned S29C3 : 1;
1789 unsigned S30C3 : 1;
1790 unsigned S31C3 : 1;
1793 struct
1795 unsigned SEG24COM3 : 1;
1796 unsigned SEG25COM3 : 1;
1797 unsigned SEG26COM3 : 1;
1798 unsigned SEG27COM3 : 1;
1799 unsigned SEG28COM3 : 1;
1800 unsigned SEG29COM3 : 1;
1801 unsigned SEG30COM3 : 1;
1802 unsigned SEG31COM3 : 1;
1804 } __LCDDATA21bits_t;
1806 extern __at(0x0F7B) volatile __LCDDATA21bits_t LCDDATA21bits;
1808 #define _S24C3 0x01
1809 #define _SEG24COM3 0x01
1810 #define _S25C3 0x02
1811 #define _SEG25COM3 0x02
1812 #define _S26C3 0x04
1813 #define _SEG26COM3 0x04
1814 #define _S27C3 0x08
1815 #define _SEG27COM3 0x08
1816 #define _S28C3 0x10
1817 #define _SEG28COM3 0x10
1818 #define _S29C3 0x20
1819 #define _SEG29COM3 0x20
1820 #define _S30C3 0x40
1821 #define _SEG30COM3 0x40
1822 #define _S31C3 0x80
1823 #define _SEG31COM3 0x80
1825 //==============================================================================
1828 //==============================================================================
1829 // LCDDATA22 Bits
1831 extern __at(0x0F7C) __sfr LCDDATA22;
1833 typedef union
1835 struct
1837 unsigned S32C3 : 1;
1838 unsigned S33C3 : 1;
1839 unsigned S34C3 : 1;
1840 unsigned S35C3 : 1;
1841 unsigned S36C3 : 1;
1842 unsigned S37C3 : 1;
1843 unsigned S38C3 : 1;
1844 unsigned S39C3 : 1;
1847 struct
1849 unsigned SEG32COM3 : 1;
1850 unsigned SEG33COM3 : 1;
1851 unsigned SEG34COM3 : 1;
1852 unsigned SEG35COM3 : 1;
1853 unsigned SEG36COM3 : 1;
1854 unsigned SEG37COM3 : 1;
1855 unsigned SEG38COM3 : 1;
1856 unsigned SEG39COM3 : 1;
1858 } __LCDDATA22bits_t;
1860 extern __at(0x0F7C) volatile __LCDDATA22bits_t LCDDATA22bits;
1862 #define _S32C3 0x01
1863 #define _SEG32COM3 0x01
1864 #define _S33C3 0x02
1865 #define _SEG33COM3 0x02
1866 #define _S34C3 0x04
1867 #define _SEG34COM3 0x04
1868 #define _S35C3 0x08
1869 #define _SEG35COM3 0x08
1870 #define _S36C3 0x10
1871 #define _SEG36COM3 0x10
1872 #define _S37C3 0x20
1873 #define _SEG37COM3 0x20
1874 #define _S38C3 0x40
1875 #define _SEG38COM3 0x40
1876 #define _S39C3 0x80
1877 #define _SEG39COM3 0x80
1879 //==============================================================================
1882 //==============================================================================
1883 // LCDDATA23 Bits
1885 extern __at(0x0F7D) __sfr LCDDATA23;
1887 typedef union
1889 struct
1891 unsigned S40C3 : 1;
1892 unsigned S41C3 : 1;
1893 unsigned S42C3 : 1;
1894 unsigned S43C3 : 1;
1895 unsigned S44C3 : 1;
1896 unsigned S45C3 : 1;
1897 unsigned S46C3 : 1;
1898 unsigned S47C3 : 1;
1901 struct
1903 unsigned SEG40COM3 : 1;
1904 unsigned SEG41COM3 : 1;
1905 unsigned SEG42COM3 : 1;
1906 unsigned SEG43COM3 : 1;
1907 unsigned SEG44COM3 : 1;
1908 unsigned SEG45COM3 : 1;
1909 unsigned SEG46COM3 : 1;
1910 unsigned SEG47COM3 : 1;
1912 } __LCDDATA23bits_t;
1914 extern __at(0x0F7D) volatile __LCDDATA23bits_t LCDDATA23bits;
1916 #define _S40C3 0x01
1917 #define _SEG40COM3 0x01
1918 #define _S41C3 0x02
1919 #define _SEG41COM3 0x02
1920 #define _S42C3 0x04
1921 #define _SEG42COM3 0x04
1922 #define _S43C3 0x08
1923 #define _SEG43COM3 0x08
1924 #define _S44C3 0x10
1925 #define _SEG44COM3 0x10
1926 #define _S45C3 0x20
1927 #define _SEG45COM3 0x20
1928 #define _S46C3 0x40
1929 #define _SEG46COM3 0x40
1930 #define _S47C3 0x80
1931 #define _SEG47COM3 0x80
1933 //==============================================================================
1936 //==============================================================================
1937 // BAUDCON Bits
1939 extern __at(0x0F7E) __sfr BAUDCON;
1941 typedef union
1943 struct
1945 unsigned ABDEN : 1;
1946 unsigned WUE : 1;
1947 unsigned : 1;
1948 unsigned BRG16 : 1;
1949 unsigned TXCKP : 1;
1950 unsigned RXDTP : 1;
1951 unsigned RCMT : 1;
1952 unsigned ABDOVF : 1;
1955 struct
1957 unsigned : 1;
1958 unsigned : 1;
1959 unsigned : 1;
1960 unsigned : 1;
1961 unsigned : 1;
1962 unsigned : 1;
1963 unsigned RCIDL : 1;
1964 unsigned : 1;
1966 } __BAUDCONbits_t;
1968 extern __at(0x0F7E) volatile __BAUDCONbits_t BAUDCONbits;
1970 #define _ABDEN 0x01
1971 #define _WUE 0x02
1972 #define _BRG16 0x08
1973 #define _TXCKP 0x10
1974 #define _RXDTP 0x20
1975 #define _RCMT 0x40
1976 #define _RCIDL 0x40
1977 #define _ABDOVF 0x80
1979 //==============================================================================
1982 //==============================================================================
1983 // BAUDCON1 Bits
1985 extern __at(0x0F7E) __sfr BAUDCON1;
1987 typedef union
1989 struct
1991 unsigned ABDEN : 1;
1992 unsigned WUE : 1;
1993 unsigned : 1;
1994 unsigned BRG16 : 1;
1995 unsigned TXCKP : 1;
1996 unsigned RXDTP : 1;
1997 unsigned RCMT : 1;
1998 unsigned ABDOVF : 1;
2001 struct
2003 unsigned : 1;
2004 unsigned : 1;
2005 unsigned : 1;
2006 unsigned : 1;
2007 unsigned : 1;
2008 unsigned : 1;
2009 unsigned RCIDL : 1;
2010 unsigned : 1;
2012 } __BAUDCON1bits_t;
2014 extern __at(0x0F7E) volatile __BAUDCON1bits_t BAUDCON1bits;
2016 #define _BAUDCON1_ABDEN 0x01
2017 #define _BAUDCON1_WUE 0x02
2018 #define _BAUDCON1_BRG16 0x08
2019 #define _BAUDCON1_TXCKP 0x10
2020 #define _BAUDCON1_RXDTP 0x20
2021 #define _BAUDCON1_RCMT 0x40
2022 #define _BAUDCON1_RCIDL 0x40
2023 #define _BAUDCON1_ABDOVF 0x80
2025 //==============================================================================
2027 extern __at(0x0F7F) __sfr SPBRGH;
2028 extern __at(0x0F7F) __sfr SPBRGH1;
2030 //==============================================================================
2031 // PORTA Bits
2033 extern __at(0x0F80) __sfr PORTA;
2035 typedef union
2037 struct
2039 unsigned RA0 : 1;
2040 unsigned RA1 : 1;
2041 unsigned RA2 : 1;
2042 unsigned RA3 : 1;
2043 unsigned RA4 : 1;
2044 unsigned RA5 : 1;
2045 unsigned RA6 : 1;
2046 unsigned RA7 : 1;
2049 struct
2051 unsigned AN0 : 1;
2052 unsigned AN1 : 1;
2053 unsigned AN2 : 1;
2054 unsigned AN3 : 1;
2055 unsigned TOCKI : 1;
2056 unsigned AN4 : 1;
2057 unsigned OSC2 : 1;
2058 unsigned OSC1 : 1;
2061 struct
2063 unsigned : 1;
2064 unsigned SEG18 : 1;
2065 unsigned VREFM : 1;
2066 unsigned VREFP : 1;
2067 unsigned SEG14 : 1;
2068 unsigned SEG15 : 1;
2069 unsigned CLKO : 1;
2070 unsigned CLKI : 1;
2072 } __PORTAbits_t;
2074 extern __at(0x0F80) volatile __PORTAbits_t PORTAbits;
2076 #define _RA0 0x01
2077 #define _AN0 0x01
2078 #define _RA1 0x02
2079 #define _AN1 0x02
2080 #define _SEG18 0x02
2081 #define _RA2 0x04
2082 #define _AN2 0x04
2083 #define _VREFM 0x04
2084 #define _RA3 0x08
2085 #define _AN3 0x08
2086 #define _VREFP 0x08
2087 #define _RA4 0x10
2088 #define _TOCKI 0x10
2089 #define _SEG14 0x10
2090 #define _RA5 0x20
2091 #define _AN4 0x20
2092 #define _SEG15 0x20
2093 #define _RA6 0x40
2094 #define _OSC2 0x40
2095 #define _CLKO 0x40
2096 #define _RA7 0x80
2097 #define _OSC1 0x80
2098 #define _CLKI 0x80
2100 //==============================================================================
2103 //==============================================================================
2104 // PORTB Bits
2106 extern __at(0x0F81) __sfr PORTB;
2108 typedef union
2110 struct
2112 unsigned RB0 : 1;
2113 unsigned RB1 : 1;
2114 unsigned RB2 : 1;
2115 unsigned RB3 : 1;
2116 unsigned RB4 : 1;
2117 unsigned RB5 : 1;
2118 unsigned RB6 : 1;
2119 unsigned RB7 : 1;
2122 struct
2124 unsigned INT0 : 1;
2125 unsigned INT1 : 1;
2126 unsigned INT2 : 1;
2127 unsigned INT3 : 1;
2128 unsigned KBI0 : 1;
2129 unsigned KBI1 : 1;
2130 unsigned KBI2 : 1;
2131 unsigned KBI3 : 1;
2134 struct
2136 unsigned SEG30 : 1;
2137 unsigned SEG8 : 1;
2138 unsigned SEG9 : 1;
2139 unsigned SEG10 : 1;
2140 unsigned SEG11 : 1;
2141 unsigned SEG29 : 1;
2142 unsigned PGC : 1;
2143 unsigned PGD : 1;
2146 struct
2148 unsigned : 1;
2149 unsigned : 1;
2150 unsigned CTED1 : 1;
2151 unsigned CTED2 : 1;
2152 unsigned : 1;
2153 unsigned : 1;
2154 unsigned : 1;
2155 unsigned : 1;
2158 struct
2160 unsigned INT : 4;
2161 unsigned : 4;
2164 struct
2166 unsigned : 4;
2167 unsigned KBI : 4;
2169 } __PORTBbits_t;
2171 extern __at(0x0F81) volatile __PORTBbits_t PORTBbits;
2173 #define _RB0 0x01
2174 #define _INT0 0x01
2175 #define _SEG30 0x01
2176 #define _RB1 0x02
2177 #define _INT1 0x02
2178 #define _SEG8 0x02
2179 #define _RB2 0x04
2180 #define _INT2 0x04
2181 #define _SEG9 0x04
2182 #define _CTED1 0x04
2183 #define _RB3 0x08
2184 #define _INT3 0x08
2185 #define _SEG10 0x08
2186 #define _CTED2 0x08
2187 #define _RB4 0x10
2188 #define _KBI0 0x10
2189 #define _SEG11 0x10
2190 #define _RB5 0x20
2191 #define _KBI1 0x20
2192 #define _SEG29 0x20
2193 #define _RB6 0x40
2194 #define _KBI2 0x40
2195 #define _PGC 0x40
2196 #define _RB7 0x80
2197 #define _KBI3 0x80
2198 #define _PGD 0x80
2200 //==============================================================================
2203 //==============================================================================
2204 // PORTC Bits
2206 extern __at(0x0F82) __sfr PORTC;
2208 typedef union
2210 struct
2212 unsigned RC0 : 1;
2213 unsigned RC1 : 1;
2214 unsigned RC2 : 1;
2215 unsigned RC3 : 1;
2216 unsigned RC4 : 1;
2217 unsigned RC5 : 1;
2218 unsigned RC6 : 1;
2219 unsigned RC7 : 1;
2222 struct
2224 unsigned T1OSO : 1;
2225 unsigned T1OSI : 1;
2226 unsigned CCP1 : 1;
2227 unsigned SCL : 1;
2228 unsigned SDA : 1;
2229 unsigned SDO : 1;
2230 unsigned CK1 : 1;
2231 unsigned DT1 : 1;
2234 struct
2236 unsigned T13CKI : 1;
2237 unsigned CCP2 : 1;
2238 unsigned SEG13 : 1;
2239 unsigned SCK : 1;
2240 unsigned SDI : 1;
2241 unsigned SEG12 : 1;
2242 unsigned TX1 : 1;
2243 unsigned RX1 : 1;
2246 struct
2248 unsigned : 1;
2249 unsigned SEG32 : 1;
2250 unsigned : 1;
2251 unsigned SEG17 : 1;
2252 unsigned SEG16 : 1;
2253 unsigned : 1;
2254 unsigned SEG27 : 1;
2255 unsigned SEG28 : 1;
2257 } __PORTCbits_t;
2259 extern __at(0x0F82) volatile __PORTCbits_t PORTCbits;
2261 #define _RC0 0x01
2262 #define _T1OSO 0x01
2263 #define _T13CKI 0x01
2264 #define _RC1 0x02
2265 #define _T1OSI 0x02
2266 #define _CCP2 0x02
2267 #define _SEG32 0x02
2268 #define _RC2 0x04
2269 #define _CCP1 0x04
2270 #define _SEG13 0x04
2271 #define _RC3 0x08
2272 #define _SCL 0x08
2273 #define _SCK 0x08
2274 #define _SEG17 0x08
2275 #define _RC4 0x10
2276 #define _SDA 0x10
2277 #define _SDI 0x10
2278 #define _SEG16 0x10
2279 #define _RC5 0x20
2280 #define _SDO 0x20
2281 #define _SEG12 0x20
2282 #define _RC6 0x40
2283 #define _CK1 0x40
2284 #define _TX1 0x40
2285 #define _SEG27 0x40
2286 #define _RC7 0x80
2287 #define _DT1 0x80
2288 #define _RX1 0x80
2289 #define _SEG28 0x80
2291 //==============================================================================
2294 //==============================================================================
2295 // PORTD Bits
2297 extern __at(0x0F83) __sfr PORTD;
2299 typedef union
2301 struct
2303 unsigned RD0 : 1;
2304 unsigned RD1 : 1;
2305 unsigned RD2 : 1;
2306 unsigned RD3 : 1;
2307 unsigned RD4 : 1;
2308 unsigned RD5 : 1;
2309 unsigned RD6 : 1;
2310 unsigned RD7 : 1;
2313 struct
2315 unsigned SEG0 : 1;
2316 unsigned SEG1 : 1;
2317 unsigned SEG2 : 1;
2318 unsigned SEG3 : 1;
2319 unsigned SEG4 : 1;
2320 unsigned SEG5 : 1;
2321 unsigned SEG6 : 1;
2322 unsigned SEG7 : 1;
2325 struct
2327 unsigned CTPLS : 1;
2328 unsigned : 1;
2329 unsigned : 1;
2330 unsigned : 1;
2331 unsigned : 1;
2332 unsigned : 1;
2333 unsigned : 1;
2334 unsigned : 1;
2336 } __PORTDbits_t;
2338 extern __at(0x0F83) volatile __PORTDbits_t PORTDbits;
2340 #define _RD0 0x01
2341 #define _SEG0 0x01
2342 #define _CTPLS 0x01
2343 #define _RD1 0x02
2344 #define _SEG1 0x02
2345 #define _RD2 0x04
2346 #define _SEG2 0x04
2347 #define _RD3 0x08
2348 #define _SEG3 0x08
2349 #define _RD4 0x10
2350 #define _SEG4 0x10
2351 #define _RD5 0x20
2352 #define _SEG5 0x20
2353 #define _RD6 0x40
2354 #define _SEG6 0x40
2355 #define _RD7 0x80
2356 #define _SEG7 0x80
2358 //==============================================================================
2361 //==============================================================================
2362 // PORTE Bits
2364 extern __at(0x0F84) __sfr PORTE;
2366 typedef union
2368 struct
2370 unsigned RE0 : 1;
2371 unsigned RE1 : 1;
2372 unsigned : 1;
2373 unsigned RE3 : 1;
2374 unsigned RE4 : 1;
2375 unsigned RE5 : 1;
2376 unsigned RE6 : 1;
2377 unsigned RE7 : 1;
2380 struct
2382 unsigned LCDBIAS1 : 1;
2383 unsigned LCDBIAS2 : 1;
2384 unsigned : 1;
2385 unsigned COM0 : 1;
2386 unsigned COM1 : 1;
2387 unsigned COM2 : 1;
2388 unsigned COM3 : 1;
2389 unsigned CCP2 : 1;
2392 struct
2394 unsigned : 1;
2395 unsigned : 1;
2396 unsigned : 1;
2397 unsigned : 1;
2398 unsigned : 1;
2399 unsigned : 1;
2400 unsigned : 1;
2401 unsigned SEG31 : 1;
2404 struct
2406 unsigned : 3;
2407 unsigned COM : 4;
2408 unsigned : 1;
2410 } __PORTEbits_t;
2412 extern __at(0x0F84) volatile __PORTEbits_t PORTEbits;
2414 #define _PORTE_RE0 0x01
2415 #define _PORTE_LCDBIAS1 0x01
2416 #define _PORTE_RE1 0x02
2417 #define _PORTE_LCDBIAS2 0x02
2418 #define _PORTE_RE3 0x08
2419 #define _PORTE_COM0 0x08
2420 #define _PORTE_RE4 0x10
2421 #define _PORTE_COM1 0x10
2422 #define _PORTE_RE5 0x20
2423 #define _PORTE_COM2 0x20
2424 #define _PORTE_RE6 0x40
2425 #define _PORTE_COM3 0x40
2426 #define _PORTE_RE7 0x80
2427 #define _PORTE_CCP2 0x80
2428 #define _PORTE_SEG31 0x80
2430 //==============================================================================
2433 //==============================================================================
2434 // PORTF Bits
2436 extern __at(0x0F85) __sfr PORTF;
2438 typedef union
2440 struct
2442 unsigned : 1;
2443 unsigned RF1 : 1;
2444 unsigned RF2 : 1;
2445 unsigned RF3 : 1;
2446 unsigned RF4 : 1;
2447 unsigned RF5 : 1;
2448 unsigned RF6 : 1;
2449 unsigned RF7 : 1;
2452 struct
2454 unsigned : 1;
2455 unsigned AN6 : 1;
2456 unsigned AN7 : 1;
2457 unsigned AN8 : 1;
2458 unsigned AN9 : 1;
2459 unsigned AN10 : 1;
2460 unsigned AN11 : 1;
2461 unsigned AN5 : 1;
2464 struct
2466 unsigned : 1;
2467 unsigned C2OUT : 1;
2468 unsigned C1OUT : 1;
2469 unsigned C2INB : 1;
2470 unsigned C2INA : 1;
2471 unsigned C1INB : 1;
2472 unsigned C1INA : 1;
2473 unsigned SS1 : 1;
2476 struct
2478 unsigned : 1;
2479 unsigned SEG19 : 1;
2480 unsigned SEG20 : 1;
2481 unsigned SEG21 : 1;
2482 unsigned SEG22 : 1;
2483 unsigned SEG23 : 1;
2484 unsigned SEG24 : 1;
2485 unsigned SEG25 : 1;
2488 struct
2490 unsigned : 1;
2491 unsigned C1OUTF : 1;
2492 unsigned C2OUTF : 1;
2493 unsigned : 1;
2494 unsigned : 1;
2495 unsigned CVREF : 1;
2496 unsigned : 1;
2497 unsigned : 1;
2499 } __PORTFbits_t;
2501 extern __at(0x0F85) volatile __PORTFbits_t PORTFbits;
2503 #define _PORTF_RF1 0x02
2504 #define _PORTF_AN6 0x02
2505 #define _PORTF_C2OUT 0x02
2506 #define _PORTF_SEG19 0x02
2507 #define _PORTF_C1OUTF 0x02
2508 #define _PORTF_RF2 0x04
2509 #define _PORTF_AN7 0x04
2510 #define _PORTF_C1OUT 0x04
2511 #define _PORTF_SEG20 0x04
2512 #define _PORTF_C2OUTF 0x04
2513 #define _PORTF_RF3 0x08
2514 #define _PORTF_AN8 0x08
2515 #define _PORTF_C2INB 0x08
2516 #define _PORTF_SEG21 0x08
2517 #define _PORTF_RF4 0x10
2518 #define _PORTF_AN9 0x10
2519 #define _PORTF_C2INA 0x10
2520 #define _PORTF_SEG22 0x10
2521 #define _PORTF_RF5 0x20
2522 #define _PORTF_AN10 0x20
2523 #define _PORTF_C1INB 0x20
2524 #define _PORTF_SEG23 0x20
2525 #define _PORTF_CVREF 0x20
2526 #define _PORTF_RF6 0x40
2527 #define _PORTF_AN11 0x40
2528 #define _PORTF_C1INA 0x40
2529 #define _PORTF_SEG24 0x40
2530 #define _PORTF_RF7 0x80
2531 #define _PORTF_AN5 0x80
2532 #define _PORTF_SS1 0x80
2533 #define _PORTF_SEG25 0x80
2535 //==============================================================================
2538 //==============================================================================
2539 // PORTG Bits
2541 extern __at(0x0F86) __sfr PORTG;
2543 typedef union
2545 struct
2547 unsigned RG0 : 1;
2548 unsigned RG1 : 1;
2549 unsigned RG2 : 1;
2550 unsigned RG3 : 1;
2551 unsigned RG4 : 1;
2552 unsigned RJPU : 1;
2553 unsigned REPU : 1;
2554 unsigned RDPU : 1;
2557 struct
2559 unsigned LCDBIAS0 : 1;
2560 unsigned CK2 : 1;
2561 unsigned DT2 : 1;
2562 unsigned VLCAP2 : 1;
2563 unsigned SEG26 : 1;
2564 unsigned : 1;
2565 unsigned : 1;
2566 unsigned : 1;
2569 struct
2571 unsigned : 1;
2572 unsigned TX2 : 1;
2573 unsigned RX2 : 1;
2574 unsigned : 1;
2575 unsigned RTCC : 1;
2576 unsigned : 1;
2577 unsigned : 1;
2578 unsigned : 1;
2581 struct
2583 unsigned : 1;
2584 unsigned : 1;
2585 unsigned VLCAP1 : 1;
2586 unsigned : 1;
2587 unsigned : 1;
2588 unsigned : 1;
2589 unsigned : 1;
2590 unsigned : 1;
2593 struct
2595 unsigned RG : 5;
2596 unsigned : 3;
2598 } __PORTGbits_t;
2600 extern __at(0x0F86) volatile __PORTGbits_t PORTGbits;
2602 #define _RG0 0x01
2603 #define _LCDBIAS0 0x01
2604 #define _RG1 0x02
2605 #define _CK2 0x02
2606 #define _TX2 0x02
2607 #define _RG2 0x04
2608 #define _DT2 0x04
2609 #define _RX2 0x04
2610 #define _VLCAP1 0x04
2611 #define _RG3 0x08
2612 #define _VLCAP2 0x08
2613 #define _RG4 0x10
2614 #define _SEG26 0x10
2615 #define _RTCC 0x10
2616 #define _RJPU 0x20
2617 #define _REPU 0x40
2618 #define _RDPU 0x80
2620 //==============================================================================
2623 //==============================================================================
2624 // PORTH Bits
2626 extern __at(0x0F87) __sfr PORTH;
2628 typedef union
2630 struct
2632 unsigned RH0 : 1;
2633 unsigned RH1 : 1;
2634 unsigned RH2 : 1;
2635 unsigned RH3 : 1;
2636 unsigned RH4 : 1;
2637 unsigned RH5 : 1;
2638 unsigned RH6 : 1;
2639 unsigned RH7 : 1;
2642 struct
2644 unsigned SEG47 : 1;
2645 unsigned SEG46 : 1;
2646 unsigned SEG45 : 1;
2647 unsigned SEG44 : 1;
2648 unsigned SEG40 : 1;
2649 unsigned SEG41 : 1;
2650 unsigned SEG42 : 1;
2651 unsigned SEG43 : 1;
2653 } __PORTHbits_t;
2655 extern __at(0x0F87) volatile __PORTHbits_t PORTHbits;
2657 #define _RH0 0x01
2658 #define _SEG47 0x01
2659 #define _RH1 0x02
2660 #define _SEG46 0x02
2661 #define _RH2 0x04
2662 #define _SEG45 0x04
2663 #define _RH3 0x08
2664 #define _SEG44 0x08
2665 #define _RH4 0x10
2666 #define _SEG40 0x10
2667 #define _RH5 0x20
2668 #define _SEG41 0x20
2669 #define _RH6 0x40
2670 #define _SEG42 0x40
2671 #define _RH7 0x80
2672 #define _SEG43 0x80
2674 //==============================================================================
2677 //==============================================================================
2678 // PORTJ Bits
2680 extern __at(0x0F88) __sfr PORTJ;
2682 typedef union
2684 struct
2686 unsigned RJ0 : 1;
2687 unsigned RJ1 : 1;
2688 unsigned RJ2 : 1;
2689 unsigned RJ3 : 1;
2690 unsigned RJ4 : 1;
2691 unsigned RJ5 : 1;
2692 unsigned RJ6 : 1;
2693 unsigned RJ7 : 1;
2696 struct
2698 unsigned : 1;
2699 unsigned SEG33 : 1;
2700 unsigned SEG34 : 1;
2701 unsigned SEG35 : 1;
2702 unsigned SEG39 : 1;
2703 unsigned SEG38 : 1;
2704 unsigned SEG37 : 1;
2705 unsigned SEG36 : 1;
2707 } __PORTJbits_t;
2709 extern __at(0x0F88) volatile __PORTJbits_t PORTJbits;
2711 #define _RJ0 0x01
2712 #define _RJ1 0x02
2713 #define _SEG33 0x02
2714 #define _RJ2 0x04
2715 #define _SEG34 0x04
2716 #define _RJ3 0x08
2717 #define _SEG35 0x08
2718 #define _RJ4 0x10
2719 #define _SEG39 0x10
2720 #define _RJ5 0x20
2721 #define _SEG38 0x20
2722 #define _RJ6 0x40
2723 #define _SEG37 0x40
2724 #define _RJ7 0x80
2725 #define _SEG36 0x80
2727 //==============================================================================
2730 //==============================================================================
2731 // LATA Bits
2733 extern __at(0x0F89) __sfr LATA;
2735 typedef struct
2737 unsigned LATA0 : 1;
2738 unsigned LATA1 : 1;
2739 unsigned LATA2 : 1;
2740 unsigned LATA3 : 1;
2741 unsigned LATA4 : 1;
2742 unsigned LATA5 : 1;
2743 unsigned LATA6 : 1;
2744 unsigned LATA7 : 1;
2745 } __LATAbits_t;
2747 extern __at(0x0F89) volatile __LATAbits_t LATAbits;
2749 #define _LATA0 0x01
2750 #define _LATA1 0x02
2751 #define _LATA2 0x04
2752 #define _LATA3 0x08
2753 #define _LATA4 0x10
2754 #define _LATA5 0x20
2755 #define _LATA6 0x40
2756 #define _LATA7 0x80
2758 //==============================================================================
2761 //==============================================================================
2762 // LATB Bits
2764 extern __at(0x0F8A) __sfr LATB;
2766 typedef struct
2768 unsigned LATB0 : 1;
2769 unsigned LATB1 : 1;
2770 unsigned LATB2 : 1;
2771 unsigned LATB3 : 1;
2772 unsigned LATB4 : 1;
2773 unsigned LATB5 : 1;
2774 unsigned LATB6 : 1;
2775 unsigned LATB7 : 1;
2776 } __LATBbits_t;
2778 extern __at(0x0F8A) volatile __LATBbits_t LATBbits;
2780 #define _LATB0 0x01
2781 #define _LATB1 0x02
2782 #define _LATB2 0x04
2783 #define _LATB3 0x08
2784 #define _LATB4 0x10
2785 #define _LATB5 0x20
2786 #define _LATB6 0x40
2787 #define _LATB7 0x80
2789 //==============================================================================
2792 //==============================================================================
2793 // LATC Bits
2795 extern __at(0x0F8B) __sfr LATC;
2797 typedef struct
2799 unsigned LATC0 : 1;
2800 unsigned LATC1 : 1;
2801 unsigned LATC2 : 1;
2802 unsigned LATC3 : 1;
2803 unsigned LATC4 : 1;
2804 unsigned LATC5 : 1;
2805 unsigned LATC6 : 1;
2806 unsigned LATC7 : 1;
2807 } __LATCbits_t;
2809 extern __at(0x0F8B) volatile __LATCbits_t LATCbits;
2811 #define _LATC0 0x01
2812 #define _LATC1 0x02
2813 #define _LATC2 0x04
2814 #define _LATC3 0x08
2815 #define _LATC4 0x10
2816 #define _LATC5 0x20
2817 #define _LATC6 0x40
2818 #define _LATC7 0x80
2820 //==============================================================================
2823 //==============================================================================
2824 // LATD Bits
2826 extern __at(0x0F8C) __sfr LATD;
2828 typedef struct
2830 unsigned LATD0 : 1;
2831 unsigned LATD1 : 1;
2832 unsigned LATD2 : 1;
2833 unsigned LATD3 : 1;
2834 unsigned LATD4 : 1;
2835 unsigned LATD5 : 1;
2836 unsigned LATD6 : 1;
2837 unsigned LATD7 : 1;
2838 } __LATDbits_t;
2840 extern __at(0x0F8C) volatile __LATDbits_t LATDbits;
2842 #define _LATD0 0x01
2843 #define _LATD1 0x02
2844 #define _LATD2 0x04
2845 #define _LATD3 0x08
2846 #define _LATD4 0x10
2847 #define _LATD5 0x20
2848 #define _LATD6 0x40
2849 #define _LATD7 0x80
2851 //==============================================================================
2854 //==============================================================================
2855 // LATE Bits
2857 extern __at(0x0F8D) __sfr LATE;
2859 typedef struct
2861 unsigned LATE0 : 1;
2862 unsigned LATE1 : 1;
2863 unsigned : 1;
2864 unsigned LATE3 : 1;
2865 unsigned LATE4 : 1;
2866 unsigned LATE5 : 1;
2867 unsigned LATE6 : 1;
2868 unsigned LATE7 : 1;
2869 } __LATEbits_t;
2871 extern __at(0x0F8D) volatile __LATEbits_t LATEbits;
2873 #define _LATE0 0x01
2874 #define _LATE1 0x02
2875 #define _LATE3 0x08
2876 #define _LATE4 0x10
2877 #define _LATE5 0x20
2878 #define _LATE6 0x40
2879 #define _LATE7 0x80
2881 //==============================================================================
2884 //==============================================================================
2885 // LATF Bits
2887 extern __at(0x0F8E) __sfr LATF;
2889 typedef struct
2891 unsigned : 1;
2892 unsigned LATF1 : 1;
2893 unsigned LATF2 : 1;
2894 unsigned LATF3 : 1;
2895 unsigned LATF4 : 1;
2896 unsigned LATF5 : 1;
2897 unsigned LATF6 : 1;
2898 unsigned LATF7 : 1;
2899 } __LATFbits_t;
2901 extern __at(0x0F8E) volatile __LATFbits_t LATFbits;
2903 #define _LATF1 0x02
2904 #define _LATF2 0x04
2905 #define _LATF3 0x08
2906 #define _LATF4 0x10
2907 #define _LATF5 0x20
2908 #define _LATF6 0x40
2909 #define _LATF7 0x80
2911 //==============================================================================
2914 //==============================================================================
2915 // LATG Bits
2917 extern __at(0x0F8F) __sfr LATG;
2919 typedef union
2921 struct
2923 unsigned LATG0 : 1;
2924 unsigned LATG1 : 1;
2925 unsigned LATG2 : 1;
2926 unsigned LATG3 : 1;
2927 unsigned LATG4 : 1;
2928 unsigned : 1;
2929 unsigned U1OD : 1;
2930 unsigned U2OD : 1;
2933 struct
2935 unsigned LATG : 5;
2936 unsigned : 3;
2938 } __LATGbits_t;
2940 extern __at(0x0F8F) volatile __LATGbits_t LATGbits;
2942 #define _LATG0 0x01
2943 #define _LATG1 0x02
2944 #define _LATG2 0x04
2945 #define _LATG3 0x08
2946 #define _LATG4 0x10
2947 #define _U1OD 0x40
2948 #define _U2OD 0x80
2950 //==============================================================================
2953 //==============================================================================
2954 // LATH Bits
2956 extern __at(0x0F90) __sfr LATH;
2958 typedef struct
2960 unsigned LATH0 : 1;
2961 unsigned LATH1 : 1;
2962 unsigned LATH2 : 1;
2963 unsigned LATH3 : 1;
2964 unsigned LATH4 : 1;
2965 unsigned LATH5 : 1;
2966 unsigned LATH6 : 1;
2967 unsigned LATH7 : 1;
2968 } __LATHbits_t;
2970 extern __at(0x0F90) volatile __LATHbits_t LATHbits;
2972 #define _LATH0 0x01
2973 #define _LATH1 0x02
2974 #define _LATH2 0x04
2975 #define _LATH3 0x08
2976 #define _LATH4 0x10
2977 #define _LATH5 0x20
2978 #define _LATH6 0x40
2979 #define _LATH7 0x80
2981 //==============================================================================
2984 //==============================================================================
2985 // LATJ Bits
2987 extern __at(0x0F91) __sfr LATJ;
2989 typedef struct
2991 unsigned LATJ0 : 1;
2992 unsigned LATJ1 : 1;
2993 unsigned LATJ2 : 1;
2994 unsigned LATJ3 : 1;
2995 unsigned LATJ4 : 1;
2996 unsigned LATJ5 : 1;
2997 unsigned LATJ6 : 1;
2998 unsigned LATJ7 : 1;
2999 } __LATJbits_t;
3001 extern __at(0x0F91) volatile __LATJbits_t LATJbits;
3003 #define _LATJ0 0x01
3004 #define _LATJ1 0x02
3005 #define _LATJ2 0x04
3006 #define _LATJ3 0x08
3007 #define _LATJ4 0x10
3008 #define _LATJ5 0x20
3009 #define _LATJ6 0x40
3010 #define _LATJ7 0x80
3012 //==============================================================================
3015 //==============================================================================
3016 // TRISA Bits
3018 extern __at(0x0F92) __sfr TRISA;
3020 typedef struct
3022 unsigned TRISA0 : 1;
3023 unsigned TRISA1 : 1;
3024 unsigned TRISA2 : 1;
3025 unsigned TRISA3 : 1;
3026 unsigned TRISA4 : 1;
3027 unsigned TRISA5 : 1;
3028 unsigned TRISA6 : 1;
3029 unsigned TRISA7 : 1;
3030 } __TRISAbits_t;
3032 extern __at(0x0F92) volatile __TRISAbits_t TRISAbits;
3034 #define _TRISA0 0x01
3035 #define _TRISA1 0x02
3036 #define _TRISA2 0x04
3037 #define _TRISA3 0x08
3038 #define _TRISA4 0x10
3039 #define _TRISA5 0x20
3040 #define _TRISA6 0x40
3041 #define _TRISA7 0x80
3043 //==============================================================================
3046 //==============================================================================
3047 // TRISB Bits
3049 extern __at(0x0F93) __sfr TRISB;
3051 typedef struct
3053 unsigned TRISB0 : 1;
3054 unsigned TRISB1 : 1;
3055 unsigned TRISB2 : 1;
3056 unsigned TRISB3 : 1;
3057 unsigned TRISB4 : 1;
3058 unsigned TRISB5 : 1;
3059 unsigned TRISB6 : 1;
3060 unsigned TRISB7 : 1;
3061 } __TRISBbits_t;
3063 extern __at(0x0F93) volatile __TRISBbits_t TRISBbits;
3065 #define _TRISB0 0x01
3066 #define _TRISB1 0x02
3067 #define _TRISB2 0x04
3068 #define _TRISB3 0x08
3069 #define _TRISB4 0x10
3070 #define _TRISB5 0x20
3071 #define _TRISB6 0x40
3072 #define _TRISB7 0x80
3074 //==============================================================================
3077 //==============================================================================
3078 // TRISC Bits
3080 extern __at(0x0F94) __sfr TRISC;
3082 typedef struct
3084 unsigned TRISC0 : 1;
3085 unsigned TRISC1 : 1;
3086 unsigned TRISC2 : 1;
3087 unsigned TRISC3 : 1;
3088 unsigned TRISC4 : 1;
3089 unsigned TRISC5 : 1;
3090 unsigned TRISC6 : 1;
3091 unsigned TRISC7 : 1;
3092 } __TRISCbits_t;
3094 extern __at(0x0F94) volatile __TRISCbits_t TRISCbits;
3096 #define _TRISC0 0x01
3097 #define _TRISC1 0x02
3098 #define _TRISC2 0x04
3099 #define _TRISC3 0x08
3100 #define _TRISC4 0x10
3101 #define _TRISC5 0x20
3102 #define _TRISC6 0x40
3103 #define _TRISC7 0x80
3105 //==============================================================================
3108 //==============================================================================
3109 // TRISD Bits
3111 extern __at(0x0F95) __sfr TRISD;
3113 typedef struct
3115 unsigned TRISD0 : 1;
3116 unsigned TRISD1 : 1;
3117 unsigned TRISD2 : 1;
3118 unsigned TRISD3 : 1;
3119 unsigned TRISD4 : 1;
3120 unsigned TRISD5 : 1;
3121 unsigned TRISD6 : 1;
3122 unsigned TRISD7 : 1;
3123 } __TRISDbits_t;
3125 extern __at(0x0F95) volatile __TRISDbits_t TRISDbits;
3127 #define _TRISD0 0x01
3128 #define _TRISD1 0x02
3129 #define _TRISD2 0x04
3130 #define _TRISD3 0x08
3131 #define _TRISD4 0x10
3132 #define _TRISD5 0x20
3133 #define _TRISD6 0x40
3134 #define _TRISD7 0x80
3136 //==============================================================================
3139 //==============================================================================
3140 // TRISE Bits
3142 extern __at(0x0F96) __sfr TRISE;
3144 typedef struct
3146 unsigned TRISE0 : 1;
3147 unsigned TRISE1 : 1;
3148 unsigned : 1;
3149 unsigned TRISE3 : 1;
3150 unsigned TRISE4 : 1;
3151 unsigned TRISE5 : 1;
3152 unsigned TRISE6 : 1;
3153 unsigned TRISE7 : 1;
3154 } __TRISEbits_t;
3156 extern __at(0x0F96) volatile __TRISEbits_t TRISEbits;
3158 #define _TRISE0 0x01
3159 #define _TRISE1 0x02
3160 #define _TRISE3 0x08
3161 #define _TRISE4 0x10
3162 #define _TRISE5 0x20
3163 #define _TRISE6 0x40
3164 #define _TRISE7 0x80
3166 //==============================================================================
3169 //==============================================================================
3170 // TRISF Bits
3172 extern __at(0x0F97) __sfr TRISF;
3174 typedef struct
3176 unsigned : 1;
3177 unsigned TRISF1 : 1;
3178 unsigned TRISF2 : 1;
3179 unsigned TRISF3 : 1;
3180 unsigned TRISF4 : 1;
3181 unsigned TRISF5 : 1;
3182 unsigned TRISF6 : 1;
3183 unsigned TRISF7 : 1;
3184 } __TRISFbits_t;
3186 extern __at(0x0F97) volatile __TRISFbits_t TRISFbits;
3188 #define _TRISF1 0x02
3189 #define _TRISF2 0x04
3190 #define _TRISF3 0x08
3191 #define _TRISF4 0x10
3192 #define _TRISF5 0x20
3193 #define _TRISF6 0x40
3194 #define _TRISF7 0x80
3196 //==============================================================================
3199 //==============================================================================
3200 // TRISG Bits
3202 extern __at(0x0F98) __sfr TRISG;
3204 typedef union
3206 struct
3208 unsigned TRISG0 : 1;
3209 unsigned TRISG1 : 1;
3210 unsigned TRISG2 : 1;
3211 unsigned TRISG3 : 1;
3212 unsigned TRISG4 : 1;
3213 unsigned CCP1OD : 1;
3214 unsigned CCP2OD : 1;
3215 unsigned SPIOD : 1;
3218 struct
3220 unsigned TRISG : 5;
3221 unsigned : 3;
3223 } __TRISGbits_t;
3225 extern __at(0x0F98) volatile __TRISGbits_t TRISGbits;
3227 #define _TRISG0 0x01
3228 #define _TRISG1 0x02
3229 #define _TRISG2 0x04
3230 #define _TRISG3 0x08
3231 #define _TRISG4 0x10
3232 #define _CCP1OD 0x20
3233 #define _CCP2OD 0x40
3234 #define _SPIOD 0x80
3236 //==============================================================================
3239 //==============================================================================
3240 // TRISH Bits
3242 extern __at(0x0F99) __sfr TRISH;
3244 typedef struct
3246 unsigned TRISH0 : 1;
3247 unsigned TRISH1 : 1;
3248 unsigned TRISH2 : 1;
3249 unsigned TRISH3 : 1;
3250 unsigned TRISH4 : 1;
3251 unsigned TRISH5 : 1;
3252 unsigned TRISH6 : 1;
3253 unsigned TRISH7 : 1;
3254 } __TRISHbits_t;
3256 extern __at(0x0F99) volatile __TRISHbits_t TRISHbits;
3258 #define _TRISH0 0x01
3259 #define _TRISH1 0x02
3260 #define _TRISH2 0x04
3261 #define _TRISH3 0x08
3262 #define _TRISH4 0x10
3263 #define _TRISH5 0x20
3264 #define _TRISH6 0x40
3265 #define _TRISH7 0x80
3267 //==============================================================================
3270 //==============================================================================
3271 // TRISJ Bits
3273 extern __at(0x0F9A) __sfr TRISJ;
3275 typedef struct
3277 unsigned TRISJ0 : 1;
3278 unsigned TRISJ1 : 1;
3279 unsigned TRISJ2 : 1;
3280 unsigned TRISJ3 : 1;
3281 unsigned TRISJ4 : 1;
3282 unsigned TRISJ5 : 1;
3283 unsigned TRISJ6 : 1;
3284 unsigned TRISJ7 : 1;
3285 } __TRISJbits_t;
3287 extern __at(0x0F9A) volatile __TRISJbits_t TRISJbits;
3289 #define _TRISJ0 0x01
3290 #define _TRISJ1 0x02
3291 #define _TRISJ2 0x04
3292 #define _TRISJ3 0x08
3293 #define _TRISJ4 0x10
3294 #define _TRISJ5 0x20
3295 #define _TRISJ6 0x40
3296 #define _TRISJ7 0x80
3298 //==============================================================================
3301 //==============================================================================
3302 // OSCTUNE Bits
3304 extern __at(0x0F9B) __sfr OSCTUNE;
3306 typedef union
3308 struct
3310 unsigned TUN0 : 1;
3311 unsigned TUN1 : 1;
3312 unsigned TUN2 : 1;
3313 unsigned TUN3 : 1;
3314 unsigned TUN4 : 1;
3315 unsigned TUN5 : 1;
3316 unsigned PLLEN : 1;
3317 unsigned INTSRC : 1;
3320 struct
3322 unsigned TUN : 6;
3323 unsigned : 2;
3325 } __OSCTUNEbits_t;
3327 extern __at(0x0F9B) volatile __OSCTUNEbits_t OSCTUNEbits;
3329 #define _TUN0 0x01
3330 #define _TUN1 0x02
3331 #define _TUN2 0x04
3332 #define _TUN3 0x08
3333 #define _TUN4 0x10
3334 #define _TUN5 0x20
3335 #define _PLLEN 0x40
3336 #define _INTSRC 0x80
3338 //==============================================================================
3341 //==============================================================================
3342 // PIE1 Bits
3344 extern __at(0x0F9D) __sfr PIE1;
3346 typedef union
3348 struct
3350 unsigned TMR1IE : 1;
3351 unsigned TMR2IE : 1;
3352 unsigned : 1;
3353 unsigned SSPIE : 1;
3354 unsigned TX1IE : 1;
3355 unsigned RC1IE : 1;
3356 unsigned ADIE : 1;
3357 unsigned : 1;
3360 struct
3362 unsigned : 1;
3363 unsigned : 1;
3364 unsigned : 1;
3365 unsigned SSP1IE : 1;
3366 unsigned TXIE : 1;
3367 unsigned RCIE : 1;
3368 unsigned : 1;
3369 unsigned : 1;
3371 } __PIE1bits_t;
3373 extern __at(0x0F9D) volatile __PIE1bits_t PIE1bits;
3375 #define _TMR1IE 0x01
3376 #define _TMR2IE 0x02
3377 #define _SSPIE 0x08
3378 #define _SSP1IE 0x08
3379 #define _TX1IE 0x10
3380 #define _TXIE 0x10
3381 #define _RC1IE 0x20
3382 #define _RCIE 0x20
3383 #define _ADIE 0x40
3385 //==============================================================================
3388 //==============================================================================
3389 // PIR1 Bits
3391 extern __at(0x0F9E) __sfr PIR1;
3393 typedef union
3395 struct
3397 unsigned TMR1IF : 1;
3398 unsigned TMR2IF : 1;
3399 unsigned : 1;
3400 unsigned SSPIF : 1;
3401 unsigned TX1IF : 1;
3402 unsigned RC1IF : 1;
3403 unsigned ADIF : 1;
3404 unsigned : 1;
3407 struct
3409 unsigned : 1;
3410 unsigned : 1;
3411 unsigned : 1;
3412 unsigned SSP1IF : 1;
3413 unsigned TXIF : 1;
3414 unsigned RCIF : 1;
3415 unsigned : 1;
3416 unsigned : 1;
3418 } __PIR1bits_t;
3420 extern __at(0x0F9E) volatile __PIR1bits_t PIR1bits;
3422 #define _TMR1IF 0x01
3423 #define _TMR2IF 0x02
3424 #define _SSPIF 0x08
3425 #define _SSP1IF 0x08
3426 #define _TX1IF 0x10
3427 #define _TXIF 0x10
3428 #define _RC1IF 0x20
3429 #define _RCIF 0x20
3430 #define _ADIF 0x40
3432 //==============================================================================
3435 //==============================================================================
3436 // IPR1 Bits
3438 extern __at(0x0F9F) __sfr IPR1;
3440 typedef union
3442 struct
3444 unsigned TMR1IP : 1;
3445 unsigned TMR2IP : 1;
3446 unsigned : 1;
3447 unsigned SSPIP : 1;
3448 unsigned TX1IP : 1;
3449 unsigned RC1IP : 1;
3450 unsigned ADIP : 1;
3451 unsigned : 1;
3454 struct
3456 unsigned : 1;
3457 unsigned : 1;
3458 unsigned : 1;
3459 unsigned SSP1IP : 1;
3460 unsigned TXIP : 1;
3461 unsigned RCIP : 1;
3462 unsigned : 1;
3463 unsigned : 1;
3465 } __IPR1bits_t;
3467 extern __at(0x0F9F) volatile __IPR1bits_t IPR1bits;
3469 #define _TMR1IP 0x01
3470 #define _TMR2IP 0x02
3471 #define _SSPIP 0x08
3472 #define _SSP1IP 0x08
3473 #define _TX1IP 0x10
3474 #define _TXIP 0x10
3475 #define _RC1IP 0x20
3476 #define _RCIP 0x20
3477 #define _ADIP 0x40
3479 //==============================================================================
3482 //==============================================================================
3483 // PIE2 Bits
3485 extern __at(0x0FA0) __sfr PIE2;
3487 typedef union
3489 struct
3491 unsigned : 1;
3492 unsigned TMR3IE : 1;
3493 unsigned LVDIE : 1;
3494 unsigned BCLIE : 1;
3495 unsigned : 1;
3496 unsigned : 1;
3497 unsigned CMIE : 1;
3498 unsigned OSCFIE : 1;
3501 struct
3503 unsigned : 1;
3504 unsigned : 1;
3505 unsigned : 1;
3506 unsigned BCL1IE : 1;
3507 unsigned : 1;
3508 unsigned : 1;
3509 unsigned : 1;
3510 unsigned : 1;
3512 } __PIE2bits_t;
3514 extern __at(0x0FA0) volatile __PIE2bits_t PIE2bits;
3516 #define _TMR3IE 0x02
3517 #define _LVDIE 0x04
3518 #define _BCLIE 0x08
3519 #define _BCL1IE 0x08
3520 #define _CMIE 0x40
3521 #define _OSCFIE 0x80
3523 //==============================================================================
3526 //==============================================================================
3527 // PIR2 Bits
3529 extern __at(0x0FA1) __sfr PIR2;
3531 typedef union
3533 struct
3535 unsigned : 1;
3536 unsigned TMR3IF : 1;
3537 unsigned LVDIF : 1;
3538 unsigned BCLIF : 1;
3539 unsigned : 1;
3540 unsigned : 1;
3541 unsigned CMIF : 1;
3542 unsigned OSCFIF : 1;
3545 struct
3547 unsigned : 1;
3548 unsigned : 1;
3549 unsigned : 1;
3550 unsigned BCL1IF : 1;
3551 unsigned : 1;
3552 unsigned : 1;
3553 unsigned : 1;
3554 unsigned : 1;
3556 } __PIR2bits_t;
3558 extern __at(0x0FA1) volatile __PIR2bits_t PIR2bits;
3560 #define _TMR3IF 0x02
3561 #define _LVDIF 0x04
3562 #define _BCLIF 0x08
3563 #define _BCL1IF 0x08
3564 #define _CMIF 0x40
3565 #define _OSCFIF 0x80
3567 //==============================================================================
3570 //==============================================================================
3571 // IPR2 Bits
3573 extern __at(0x0FA2) __sfr IPR2;
3575 typedef union
3577 struct
3579 unsigned : 1;
3580 unsigned TMR3IP : 1;
3581 unsigned LVDIP : 1;
3582 unsigned BCLIP : 1;
3583 unsigned : 1;
3584 unsigned : 1;
3585 unsigned CMIP : 1;
3586 unsigned OSCFIP : 1;
3589 struct
3591 unsigned : 1;
3592 unsigned : 1;
3593 unsigned : 1;
3594 unsigned BCL1IP : 1;
3595 unsigned : 1;
3596 unsigned : 1;
3597 unsigned : 1;
3598 unsigned : 1;
3600 } __IPR2bits_t;
3602 extern __at(0x0FA2) volatile __IPR2bits_t IPR2bits;
3604 #define _TMR3IP 0x02
3605 #define _LVDIP 0x04
3606 #define _BCLIP 0x08
3607 #define _BCL1IP 0x08
3608 #define _CMIP 0x40
3609 #define _OSCFIP 0x80
3611 //==============================================================================
3614 //==============================================================================
3615 // PIE3 Bits
3617 extern __at(0x0FA3) __sfr PIE3;
3619 typedef struct
3621 unsigned RTCCIE : 1;
3622 unsigned CCP1IE : 1;
3623 unsigned CCP2IE : 1;
3624 unsigned CTMUIE : 1;
3625 unsigned TX2IE : 1;
3626 unsigned RC2IE : 1;
3627 unsigned LCDIE : 1;
3628 unsigned : 1;
3629 } __PIE3bits_t;
3631 extern __at(0x0FA3) volatile __PIE3bits_t PIE3bits;
3633 #define _RTCCIE 0x01
3634 #define _CCP1IE 0x02
3635 #define _CCP2IE 0x04
3636 #define _CTMUIE 0x08
3637 #define _TX2IE 0x10
3638 #define _RC2IE 0x20
3639 #define _LCDIE 0x40
3641 //==============================================================================
3644 //==============================================================================
3645 // PIR3 Bits
3647 extern __at(0x0FA4) __sfr PIR3;
3649 typedef struct
3651 unsigned RTCCIF : 1;
3652 unsigned CCP1IF : 1;
3653 unsigned CCP2IF : 1;
3654 unsigned CTMUIF : 1;
3655 unsigned TX2IF : 1;
3656 unsigned RC2IF : 1;
3657 unsigned LCDIF : 1;
3658 unsigned : 1;
3659 } __PIR3bits_t;
3661 extern __at(0x0FA4) volatile __PIR3bits_t PIR3bits;
3663 #define _RTCCIF 0x01
3664 #define _CCP1IF 0x02
3665 #define _CCP2IF 0x04
3666 #define _CTMUIF 0x08
3667 #define _TX2IF 0x10
3668 #define _RC2IF 0x20
3669 #define _LCDIF 0x40
3671 //==============================================================================
3674 //==============================================================================
3675 // IPR3 Bits
3677 extern __at(0x0FA5) __sfr IPR3;
3679 typedef struct
3681 unsigned RTCCIP : 1;
3682 unsigned CCP1IP : 1;
3683 unsigned CCP2IP : 1;
3684 unsigned CTMUIP : 1;
3685 unsigned TX2IP : 1;
3686 unsigned RC2IP : 1;
3687 unsigned LCDIP : 1;
3688 unsigned : 1;
3689 } __IPR3bits_t;
3691 extern __at(0x0FA5) volatile __IPR3bits_t IPR3bits;
3693 #define _RTCCIP 0x01
3694 #define _CCP1IP 0x02
3695 #define _CCP2IP 0x04
3696 #define _CTMUIP 0x08
3697 #define _TX2IP 0x10
3698 #define _RC2IP 0x20
3699 #define _LCDIP 0x40
3701 //==============================================================================
3704 //==============================================================================
3705 // EECON1 Bits
3707 extern __at(0x0FA6) __sfr EECON1;
3709 typedef struct
3711 unsigned : 1;
3712 unsigned WR : 1;
3713 unsigned WREN : 1;
3714 unsigned WRERR : 1;
3715 unsigned FREE : 1;
3716 unsigned WPROG : 1;
3717 unsigned : 1;
3718 unsigned : 1;
3719 } __EECON1bits_t;
3721 extern __at(0x0FA6) volatile __EECON1bits_t EECON1bits;
3723 #define _WR 0x02
3724 #define _WREN 0x04
3725 #define _WRERR 0x08
3726 #define _FREE 0x10
3727 #define _WPROG 0x20
3729 //==============================================================================
3731 extern __at(0x0FA7) __sfr EECON2;
3733 //==============================================================================
3734 // LCDCON Bits
3736 extern __at(0x0FA8) __sfr LCDCON;
3738 typedef union
3740 struct
3742 unsigned LMUX0 : 1;
3743 unsigned LMUX1 : 1;
3744 unsigned CS0 : 1;
3745 unsigned CS1 : 1;
3746 unsigned : 1;
3747 unsigned WERR : 1;
3748 unsigned SLPEN : 1;
3749 unsigned LCDEN : 1;
3752 struct
3754 unsigned : 1;
3755 unsigned : 1;
3756 unsigned LCDCS0 : 1;
3757 unsigned LCDCS1 : 1;
3758 unsigned : 1;
3759 unsigned LCDWERR : 1;
3760 unsigned LCDSLPEN : 1;
3761 unsigned : 1;
3764 struct
3766 unsigned LMUX : 2;
3767 unsigned : 6;
3770 struct
3772 unsigned : 2;
3773 unsigned LCDCS : 2;
3774 unsigned : 4;
3777 struct
3779 unsigned : 2;
3780 unsigned CS : 2;
3781 unsigned : 4;
3783 } __LCDCONbits_t;
3785 extern __at(0x0FA8) volatile __LCDCONbits_t LCDCONbits;
3787 #define _LMUX0 0x01
3788 #define _LMUX1 0x02
3789 #define _CS0 0x04
3790 #define _LCDCS0 0x04
3791 #define _CS1 0x08
3792 #define _LCDCS1 0x08
3793 #define _WERR 0x20
3794 #define _LCDWERR 0x20
3795 #define _SLPEN 0x40
3796 #define _LCDSLPEN 0x40
3797 #define _LCDEN 0x80
3799 //==============================================================================
3802 //==============================================================================
3803 // LCDSE0 Bits
3805 extern __at(0x0FA9) __sfr LCDSE0;
3807 typedef union
3809 struct
3811 unsigned SE0 : 1;
3812 unsigned SE1 : 1;
3813 unsigned SE2 : 1;
3814 unsigned SE3 : 1;
3815 unsigned SE4 : 1;
3816 unsigned SE5 : 1;
3817 unsigned SE6 : 1;
3818 unsigned SE7 : 1;
3821 struct
3823 unsigned SEGEN0 : 1;
3824 unsigned SEGEN1 : 1;
3825 unsigned SEGEN2 : 1;
3826 unsigned SEGEN3 : 1;
3827 unsigned SEGEN4 : 1;
3828 unsigned SEGEN5 : 1;
3829 unsigned SEGEN6 : 1;
3830 unsigned SEGEN7 : 1;
3833 struct
3835 unsigned SE00 : 1;
3836 unsigned SE01 : 1;
3837 unsigned SE02 : 1;
3838 unsigned SE03 : 1;
3839 unsigned SE04 : 1;
3840 unsigned SE05 : 1;
3841 unsigned SE06 : 1;
3842 unsigned SE07 : 1;
3844 } __LCDSE0bits_t;
3846 extern __at(0x0FA9) volatile __LCDSE0bits_t LCDSE0bits;
3848 #define _SE0 0x01
3849 #define _SEGEN0 0x01
3850 #define _SE00 0x01
3851 #define _SE1 0x02
3852 #define _SEGEN1 0x02
3853 #define _SE01 0x02
3854 #define _SE2 0x04
3855 #define _SEGEN2 0x04
3856 #define _SE02 0x04
3857 #define _SE3 0x08
3858 #define _SEGEN3 0x08
3859 #define _SE03 0x08
3860 #define _SE4 0x10
3861 #define _SEGEN4 0x10
3862 #define _SE04 0x10
3863 #define _SE5 0x20
3864 #define _SEGEN5 0x20
3865 #define _SE05 0x20
3866 #define _SE6 0x40
3867 #define _SEGEN6 0x40
3868 #define _SE06 0x40
3869 #define _SE7 0x80
3870 #define _SEGEN7 0x80
3871 #define _SE07 0x80
3873 //==============================================================================
3876 //==============================================================================
3877 // LCDPS Bits
3879 extern __at(0x0FAA) __sfr LCDPS;
3881 typedef union
3883 struct
3885 unsigned LP0 : 1;
3886 unsigned LP1 : 1;
3887 unsigned LP2 : 1;
3888 unsigned LP3 : 1;
3889 unsigned WA : 1;
3890 unsigned LCDA : 1;
3891 unsigned BIASMD : 1;
3892 unsigned WFT : 1;
3895 struct
3897 unsigned LCDPS0 : 1;
3898 unsigned LCDPS1 : 1;
3899 unsigned LCDPS2 : 1;
3900 unsigned LCDPS3 : 1;
3901 unsigned : 1;
3902 unsigned : 1;
3903 unsigned : 1;
3904 unsigned : 1;
3907 struct
3909 unsigned LCDPS : 4;
3910 unsigned : 4;
3913 struct
3915 unsigned LP : 4;
3916 unsigned : 4;
3918 } __LCDPSbits_t;
3920 extern __at(0x0FAA) volatile __LCDPSbits_t LCDPSbits;
3922 #define _LP0 0x01
3923 #define _LCDPS0 0x01
3924 #define _LP1 0x02
3925 #define _LCDPS1 0x02
3926 #define _LP2 0x04
3927 #define _LCDPS2 0x04
3928 #define _LP3 0x08
3929 #define _LCDPS3 0x08
3930 #define _WA 0x10
3931 #define _LCDA 0x20
3932 #define _BIASMD 0x40
3933 #define _WFT 0x80
3935 //==============================================================================
3938 //==============================================================================
3939 // RCSTA Bits
3941 extern __at(0x0FAB) __sfr RCSTA;
3943 typedef union
3945 struct
3947 unsigned RX9D : 1;
3948 unsigned OERR : 1;
3949 unsigned FERR : 1;
3950 unsigned ADDEN : 1;
3951 unsigned CREN : 1;
3952 unsigned SREN : 1;
3953 unsigned RX9 : 1;
3954 unsigned SPEN : 1;
3957 struct
3959 unsigned RCD8 : 1;
3960 unsigned OERR1 : 1;
3961 unsigned FERR1 : 1;
3962 unsigned ADEN : 1;
3963 unsigned CREN1 : 1;
3964 unsigned SREN1 : 1;
3965 unsigned RC9 : 1;
3966 unsigned SPEN1 : 1;
3969 struct
3971 unsigned RX9D1 : 1;
3972 unsigned : 1;
3973 unsigned : 1;
3974 unsigned ADDEN1 : 1;
3975 unsigned : 1;
3976 unsigned : 1;
3977 unsigned NOT_RC8 : 1;
3978 unsigned : 1;
3981 struct
3983 unsigned : 1;
3984 unsigned : 1;
3985 unsigned : 1;
3986 unsigned : 1;
3987 unsigned : 1;
3988 unsigned : 1;
3989 unsigned RC8_9 : 1;
3990 unsigned : 1;
3993 struct
3995 unsigned : 1;
3996 unsigned : 1;
3997 unsigned : 1;
3998 unsigned : 1;
3999 unsigned : 1;
4000 unsigned : 1;
4001 unsigned RX91 : 1;
4002 unsigned : 1;
4004 } __RCSTAbits_t;
4006 extern __at(0x0FAB) volatile __RCSTAbits_t RCSTAbits;
4008 #define _RX9D 0x01
4009 #define _RCD8 0x01
4010 #define _RX9D1 0x01
4011 #define _OERR 0x02
4012 #define _OERR1 0x02
4013 #define _FERR 0x04
4014 #define _FERR1 0x04
4015 #define _ADDEN 0x08
4016 #define _ADEN 0x08
4017 #define _ADDEN1 0x08
4018 #define _CREN 0x10
4019 #define _CREN1 0x10
4020 #define _SREN 0x20
4021 #define _SREN1 0x20
4022 #define _RX9 0x40
4023 #define _RC9 0x40
4024 #define _NOT_RC8 0x40
4025 #define _RC8_9 0x40
4026 #define _RX91 0x40
4027 #define _SPEN 0x80
4028 #define _SPEN1 0x80
4030 //==============================================================================
4033 //==============================================================================
4034 // RCSTA1 Bits
4036 extern __at(0x0FAB) __sfr RCSTA1;
4038 typedef union
4040 struct
4042 unsigned RX9D : 1;
4043 unsigned OERR : 1;
4044 unsigned FERR : 1;
4045 unsigned ADDEN : 1;
4046 unsigned CREN : 1;
4047 unsigned SREN : 1;
4048 unsigned RX9 : 1;
4049 unsigned SPEN : 1;
4052 struct
4054 unsigned RCD8 : 1;
4055 unsigned OERR1 : 1;
4056 unsigned FERR1 : 1;
4057 unsigned ADEN : 1;
4058 unsigned CREN1 : 1;
4059 unsigned SREN1 : 1;
4060 unsigned RC9 : 1;
4061 unsigned SPEN1 : 1;
4064 struct
4066 unsigned RX9D1 : 1;
4067 unsigned : 1;
4068 unsigned : 1;
4069 unsigned ADDEN1 : 1;
4070 unsigned : 1;
4071 unsigned : 1;
4072 unsigned NOT_RC8 : 1;
4073 unsigned : 1;
4076 struct
4078 unsigned : 1;
4079 unsigned : 1;
4080 unsigned : 1;
4081 unsigned : 1;
4082 unsigned : 1;
4083 unsigned : 1;
4084 unsigned RC8_9 : 1;
4085 unsigned : 1;
4088 struct
4090 unsigned : 1;
4091 unsigned : 1;
4092 unsigned : 1;
4093 unsigned : 1;
4094 unsigned : 1;
4095 unsigned : 1;
4096 unsigned RX91 : 1;
4097 unsigned : 1;
4099 } __RCSTA1bits_t;
4101 extern __at(0x0FAB) volatile __RCSTA1bits_t RCSTA1bits;
4103 #define _RCSTA1_RX9D 0x01
4104 #define _RCSTA1_RCD8 0x01
4105 #define _RCSTA1_RX9D1 0x01
4106 #define _RCSTA1_OERR 0x02
4107 #define _RCSTA1_OERR1 0x02
4108 #define _RCSTA1_FERR 0x04
4109 #define _RCSTA1_FERR1 0x04
4110 #define _RCSTA1_ADDEN 0x08
4111 #define _RCSTA1_ADEN 0x08
4112 #define _RCSTA1_ADDEN1 0x08
4113 #define _RCSTA1_CREN 0x10
4114 #define _RCSTA1_CREN1 0x10
4115 #define _RCSTA1_SREN 0x20
4116 #define _RCSTA1_SREN1 0x20
4117 #define _RCSTA1_RX9 0x40
4118 #define _RCSTA1_RC9 0x40
4119 #define _RCSTA1_NOT_RC8 0x40
4120 #define _RCSTA1_RC8_9 0x40
4121 #define _RCSTA1_RX91 0x40
4122 #define _RCSTA1_SPEN 0x80
4123 #define _RCSTA1_SPEN1 0x80
4125 //==============================================================================
4128 //==============================================================================
4129 // TXSTA Bits
4131 extern __at(0x0FAC) __sfr TXSTA;
4133 typedef union
4135 struct
4137 unsigned TX9D : 1;
4138 unsigned TRMT : 1;
4139 unsigned BRGH : 1;
4140 unsigned SENDB : 1;
4141 unsigned SYNC : 1;
4142 unsigned TXEN : 1;
4143 unsigned TX9 : 1;
4144 unsigned CSRC : 1;
4147 struct
4149 unsigned TXD8 : 1;
4150 unsigned TRMT1 : 1;
4151 unsigned BRGH1 : 1;
4152 unsigned SENDB1 : 1;
4153 unsigned SYNC1 : 1;
4154 unsigned TXEN1 : 1;
4155 unsigned TX8_9 : 1;
4156 unsigned CSRC1 : 1;
4159 struct
4161 unsigned TX9D1 : 1;
4162 unsigned : 1;
4163 unsigned : 1;
4164 unsigned : 1;
4165 unsigned : 1;
4166 unsigned : 1;
4167 unsigned NOT_TX8 : 1;
4168 unsigned : 1;
4171 struct
4173 unsigned : 1;
4174 unsigned : 1;
4175 unsigned : 1;
4176 unsigned : 1;
4177 unsigned : 1;
4178 unsigned : 1;
4179 unsigned TX91 : 1;
4180 unsigned : 1;
4182 } __TXSTAbits_t;
4184 extern __at(0x0FAC) volatile __TXSTAbits_t TXSTAbits;
4186 #define _TX9D 0x01
4187 #define _TXD8 0x01
4188 #define _TX9D1 0x01
4189 #define _TRMT 0x02
4190 #define _TRMT1 0x02
4191 #define _BRGH 0x04
4192 #define _BRGH1 0x04
4193 #define _SENDB 0x08
4194 #define _SENDB1 0x08
4195 #define _SYNC 0x10
4196 #define _SYNC1 0x10
4197 #define _TXEN 0x20
4198 #define _TXEN1 0x20
4199 #define _TX9 0x40
4200 #define _TX8_9 0x40
4201 #define _NOT_TX8 0x40
4202 #define _TX91 0x40
4203 #define _CSRC 0x80
4204 #define _CSRC1 0x80
4206 //==============================================================================
4209 //==============================================================================
4210 // TXSTA1 Bits
4212 extern __at(0x0FAC) __sfr TXSTA1;
4214 typedef union
4216 struct
4218 unsigned TX9D : 1;
4219 unsigned TRMT : 1;
4220 unsigned BRGH : 1;
4221 unsigned SENDB : 1;
4222 unsigned SYNC : 1;
4223 unsigned TXEN : 1;
4224 unsigned TX9 : 1;
4225 unsigned CSRC : 1;
4228 struct
4230 unsigned TXD8 : 1;
4231 unsigned TRMT1 : 1;
4232 unsigned BRGH1 : 1;
4233 unsigned SENDB1 : 1;
4234 unsigned SYNC1 : 1;
4235 unsigned TXEN1 : 1;
4236 unsigned TX8_9 : 1;
4237 unsigned CSRC1 : 1;
4240 struct
4242 unsigned TX9D1 : 1;
4243 unsigned : 1;
4244 unsigned : 1;
4245 unsigned : 1;
4246 unsigned : 1;
4247 unsigned : 1;
4248 unsigned NOT_TX8 : 1;
4249 unsigned : 1;
4252 struct
4254 unsigned : 1;
4255 unsigned : 1;
4256 unsigned : 1;
4257 unsigned : 1;
4258 unsigned : 1;
4259 unsigned : 1;
4260 unsigned TX91 : 1;
4261 unsigned : 1;
4263 } __TXSTA1bits_t;
4265 extern __at(0x0FAC) volatile __TXSTA1bits_t TXSTA1bits;
4267 #define _TXSTA1_TX9D 0x01
4268 #define _TXSTA1_TXD8 0x01
4269 #define _TXSTA1_TX9D1 0x01
4270 #define _TXSTA1_TRMT 0x02
4271 #define _TXSTA1_TRMT1 0x02
4272 #define _TXSTA1_BRGH 0x04
4273 #define _TXSTA1_BRGH1 0x04
4274 #define _TXSTA1_SENDB 0x08
4275 #define _TXSTA1_SENDB1 0x08
4276 #define _TXSTA1_SYNC 0x10
4277 #define _TXSTA1_SYNC1 0x10
4278 #define _TXSTA1_TXEN 0x20
4279 #define _TXSTA1_TXEN1 0x20
4280 #define _TXSTA1_TX9 0x40
4281 #define _TXSTA1_TX8_9 0x40
4282 #define _TXSTA1_NOT_TX8 0x40
4283 #define _TXSTA1_TX91 0x40
4284 #define _TXSTA1_CSRC 0x80
4285 #define _TXSTA1_CSRC1 0x80
4287 //==============================================================================
4289 extern __at(0x0FAD) __sfr TXREG;
4290 extern __at(0x0FAD) __sfr TXREG1;
4291 extern __at(0x0FAE) __sfr RCREG;
4292 extern __at(0x0FAE) __sfr RCREG1;
4293 extern __at(0x0FAF) __sfr SPBRG;
4294 extern __at(0x0FAF) __sfr SPBRG1;
4296 //==============================================================================
4297 // T3CON Bits
4299 extern __at(0x0FB1) __sfr T3CON;
4301 typedef union
4303 struct
4305 unsigned TMR3ON : 1;
4306 unsigned TMR3CS : 1;
4307 unsigned NOT_T3SYNC : 1;
4308 unsigned T3CCP1 : 1;
4309 unsigned T3CKPS0 : 1;
4310 unsigned T3CKPS1 : 1;
4311 unsigned T3CCP2 : 1;
4312 unsigned RD16 : 1;
4315 struct
4317 unsigned : 1;
4318 unsigned : 1;
4319 unsigned T3SYNC : 1;
4320 unsigned : 1;
4321 unsigned : 1;
4322 unsigned : 1;
4323 unsigned : 1;
4324 unsigned RD163 : 1;
4327 struct
4329 unsigned : 1;
4330 unsigned : 1;
4331 unsigned T3INSYNC : 1;
4332 unsigned : 1;
4333 unsigned : 1;
4334 unsigned : 1;
4335 unsigned : 1;
4336 unsigned : 1;
4339 struct
4341 unsigned : 4;
4342 unsigned T3CKPS : 2;
4343 unsigned : 2;
4345 } __T3CONbits_t;
4347 extern __at(0x0FB1) volatile __T3CONbits_t T3CONbits;
4349 #define _T3CON_TMR3ON 0x01
4350 #define _T3CON_TMR3CS 0x02
4351 #define _T3CON_NOT_T3SYNC 0x04
4352 #define _T3CON_T3SYNC 0x04
4353 #define _T3CON_T3INSYNC 0x04
4354 #define _T3CON_T3CCP1 0x08
4355 #define _T3CON_T3CKPS0 0x10
4356 #define _T3CON_T3CKPS1 0x20
4357 #define _T3CON_T3CCP2 0x40
4358 #define _T3CON_RD16 0x80
4359 #define _T3CON_RD163 0x80
4361 //==============================================================================
4363 extern __at(0x0FB2) __sfr TMR3;
4364 extern __at(0x0FB2) __sfr TMR3L;
4365 extern __at(0x0FB3) __sfr TMR3H;
4367 //==============================================================================
4368 // CMCON Bits
4370 extern __at(0x0FB4) __sfr CMCON;
4372 typedef union
4374 struct
4376 unsigned CM0 : 1;
4377 unsigned CM1 : 1;
4378 unsigned CM2 : 1;
4379 unsigned CIS : 1;
4380 unsigned C1INV : 1;
4381 unsigned C2INV : 1;
4382 unsigned C1OUT : 1;
4383 unsigned C2OUT : 1;
4386 struct
4388 unsigned CM : 3;
4389 unsigned : 5;
4391 } __CMCONbits_t;
4393 extern __at(0x0FB4) volatile __CMCONbits_t CMCONbits;
4395 #define _CM0 0x01
4396 #define _CM1 0x02
4397 #define _CM2 0x04
4398 #define _CIS 0x08
4399 #define _C1INV 0x10
4400 #define _C2INV 0x20
4401 #define _C1OUT 0x40
4402 #define _C2OUT 0x80
4404 //==============================================================================
4407 //==============================================================================
4408 // CVRCON Bits
4410 extern __at(0x0FB5) __sfr CVRCON;
4412 typedef union
4414 struct
4416 unsigned CVR0 : 1;
4417 unsigned CVR1 : 1;
4418 unsigned CVR2 : 1;
4419 unsigned CVR3 : 1;
4420 unsigned CVRSS : 1;
4421 unsigned CVRR : 1;
4422 unsigned CVROE : 1;
4423 unsigned CVREN : 1;
4426 struct
4428 unsigned CVR : 4;
4429 unsigned : 4;
4431 } __CVRCONbits_t;
4433 extern __at(0x0FB5) volatile __CVRCONbits_t CVRCONbits;
4435 #define _CVR0 0x01
4436 #define _CVR1 0x02
4437 #define _CVR2 0x04
4438 #define _CVR3 0x08
4439 #define _CVRSS 0x10
4440 #define _CVRR 0x20
4441 #define _CVROE 0x40
4442 #define _CVREN 0x80
4444 //==============================================================================
4447 //==============================================================================
4448 // LCDSE1 Bits
4450 extern __at(0x0FB6) __sfr LCDSE1;
4452 typedef union
4454 struct
4456 unsigned SE8 : 1;
4457 unsigned SE9 : 1;
4458 unsigned SE10 : 1;
4459 unsigned SE11 : 1;
4460 unsigned SE12 : 1;
4461 unsigned SE13 : 1;
4462 unsigned SE14 : 1;
4463 unsigned SE15 : 1;
4466 struct
4468 unsigned SEGEN8 : 1;
4469 unsigned SEGEN9 : 1;
4470 unsigned SEGEN10 : 1;
4471 unsigned SEGEN11 : 1;
4472 unsigned SEGEN12 : 1;
4473 unsigned SEGEN13 : 1;
4474 unsigned SEGEN14 : 1;
4475 unsigned SEGEN15 : 1;
4478 struct
4480 unsigned SE08 : 1;
4481 unsigned SE09 : 1;
4482 unsigned : 1;
4483 unsigned : 1;
4484 unsigned : 1;
4485 unsigned : 1;
4486 unsigned : 1;
4487 unsigned : 1;
4489 } __LCDSE1bits_t;
4491 extern __at(0x0FB6) volatile __LCDSE1bits_t LCDSE1bits;
4493 #define _SE8 0x01
4494 #define _SEGEN8 0x01
4495 #define _SE08 0x01
4496 #define _SE9 0x02
4497 #define _SEGEN9 0x02
4498 #define _SE09 0x02
4499 #define _SE10 0x04
4500 #define _SEGEN10 0x04
4501 #define _SE11 0x08
4502 #define _SEGEN11 0x08
4503 #define _SE12 0x10
4504 #define _SEGEN12 0x10
4505 #define _SE13 0x20
4506 #define _SEGEN13 0x20
4507 #define _SE14 0x40
4508 #define _SEGEN14 0x40
4509 #define _SE15 0x80
4510 #define _SEGEN15 0x80
4512 //==============================================================================
4515 //==============================================================================
4516 // LCDSE2 Bits
4518 extern __at(0x0FB7) __sfr LCDSE2;
4520 typedef union
4522 struct
4524 unsigned SE16 : 1;
4525 unsigned SE17 : 1;
4526 unsigned SE18 : 1;
4527 unsigned SE19 : 1;
4528 unsigned SE20 : 1;
4529 unsigned SE21 : 1;
4530 unsigned SE22 : 1;
4531 unsigned SE23 : 1;
4534 struct
4536 unsigned SEGEN16 : 1;
4537 unsigned SEGEN17 : 1;
4538 unsigned SEGEN18 : 1;
4539 unsigned SEGEN19 : 1;
4540 unsigned SEGEN20 : 1;
4541 unsigned SEGEN21 : 1;
4542 unsigned SEGEN22 : 1;
4543 unsigned SEGEN23 : 1;
4545 } __LCDSE2bits_t;
4547 extern __at(0x0FB7) volatile __LCDSE2bits_t LCDSE2bits;
4549 #define _SE16 0x01
4550 #define _SEGEN16 0x01
4551 #define _SE17 0x02
4552 #define _SEGEN17 0x02
4553 #define _SE18 0x04
4554 #define _SEGEN18 0x04
4555 #define _SE19 0x08
4556 #define _SEGEN19 0x08
4557 #define _SE20 0x10
4558 #define _SEGEN20 0x10
4559 #define _SE21 0x20
4560 #define _SEGEN21 0x20
4561 #define _SE22 0x40
4562 #define _SEGEN22 0x40
4563 #define _SE23 0x80
4564 #define _SEGEN23 0x80
4566 //==============================================================================
4569 //==============================================================================
4570 // LCDSE3 Bits
4572 extern __at(0x0FB8) __sfr LCDSE3;
4574 typedef union
4576 struct
4578 unsigned SE24 : 1;
4579 unsigned SE25 : 1;
4580 unsigned SE26 : 1;
4581 unsigned SE27 : 1;
4582 unsigned SE28 : 1;
4583 unsigned SE29 : 1;
4584 unsigned SE30 : 1;
4585 unsigned SE31 : 1;
4588 struct
4590 unsigned SEGEN24 : 1;
4591 unsigned SEGEN25 : 1;
4592 unsigned SEGEN26 : 1;
4593 unsigned SEGEN27 : 1;
4594 unsigned SEGEN28 : 1;
4595 unsigned SEGEN29 : 1;
4596 unsigned SEGEN30 : 1;
4597 unsigned SEGEN31 : 1;
4599 } __LCDSE3bits_t;
4601 extern __at(0x0FB8) volatile __LCDSE3bits_t LCDSE3bits;
4603 #define _SE24 0x01
4604 #define _SEGEN24 0x01
4605 #define _SE25 0x02
4606 #define _SEGEN25 0x02
4607 #define _SE26 0x04
4608 #define _SEGEN26 0x04
4609 #define _SE27 0x08
4610 #define _SEGEN27 0x08
4611 #define _SE28 0x10
4612 #define _SEGEN28 0x10
4613 #define _SE29 0x20
4614 #define _SEGEN29 0x20
4615 #define _SE30 0x40
4616 #define _SEGEN30 0x40
4617 #define _SE31 0x80
4618 #define _SEGEN31 0x80
4620 //==============================================================================
4623 //==============================================================================
4624 // LCDSE4 Bits
4626 extern __at(0x0FB9) __sfr LCDSE4;
4628 typedef union
4630 struct
4632 unsigned SE32 : 1;
4633 unsigned SE33 : 1;
4634 unsigned SE34 : 1;
4635 unsigned SE35 : 1;
4636 unsigned SE36 : 1;
4637 unsigned SE37 : 1;
4638 unsigned SE38 : 1;
4639 unsigned SE39 : 1;
4642 struct
4644 unsigned SEGEN32 : 1;
4645 unsigned SEGEN33 : 1;
4646 unsigned SEGEN34 : 1;
4647 unsigned SEGEN35 : 1;
4648 unsigned SEGEN36 : 1;
4649 unsigned SEGEN37 : 1;
4650 unsigned SEGEN38 : 1;
4651 unsigned SEGEN39 : 1;
4653 } __LCDSE4bits_t;
4655 extern __at(0x0FB9) volatile __LCDSE4bits_t LCDSE4bits;
4657 #define _SE32 0x01
4658 #define _SEGEN32 0x01
4659 #define _SE33 0x02
4660 #define _SEGEN33 0x02
4661 #define _SE34 0x04
4662 #define _SEGEN34 0x04
4663 #define _SE35 0x08
4664 #define _SEGEN35 0x08
4665 #define _SE36 0x10
4666 #define _SEGEN36 0x10
4667 #define _SE37 0x20
4668 #define _SEGEN37 0x20
4669 #define _SE38 0x40
4670 #define _SEGEN38 0x40
4671 #define _SE39 0x80
4672 #define _SEGEN39 0x80
4674 //==============================================================================
4677 //==============================================================================
4678 // LCDSE5 Bits
4680 extern __at(0x0FBA) __sfr LCDSE5;
4682 typedef union
4684 struct
4686 unsigned SE40 : 1;
4687 unsigned SE41 : 1;
4688 unsigned SE42 : 1;
4689 unsigned SE43 : 1;
4690 unsigned SE44 : 1;
4691 unsigned SE45 : 1;
4692 unsigned SE46 : 1;
4693 unsigned SE47 : 1;
4696 struct
4698 unsigned SEGEN40 : 1;
4699 unsigned SEGEN41 : 1;
4700 unsigned SEGEN42 : 1;
4701 unsigned SEGEN43 : 1;
4702 unsigned SEGEN44 : 1;
4703 unsigned SEGEN45 : 1;
4704 unsigned SEGEN46 : 1;
4705 unsigned SEGEN47 : 1;
4707 } __LCDSE5bits_t;
4709 extern __at(0x0FBA) volatile __LCDSE5bits_t LCDSE5bits;
4711 #define _SE40 0x01
4712 #define _SEGEN40 0x01
4713 #define _SE41 0x02
4714 #define _SEGEN41 0x02
4715 #define _SE42 0x04
4716 #define _SEGEN42 0x04
4717 #define _SE43 0x08
4718 #define _SEGEN43 0x08
4719 #define _SE44 0x10
4720 #define _SEGEN44 0x10
4721 #define _SE45 0x20
4722 #define _SEGEN45 0x20
4723 #define _SE46 0x40
4724 #define _SEGEN46 0x40
4725 #define _SE47 0x80
4726 #define _SEGEN47 0x80
4728 //==============================================================================
4731 //==============================================================================
4732 // LCDDATA0 Bits
4734 extern __at(0x0FBB) __sfr LCDDATA0;
4736 typedef union
4738 struct
4740 unsigned S0C0 : 1;
4741 unsigned S1C0 : 1;
4742 unsigned S2C0 : 1;
4743 unsigned S3C0 : 1;
4744 unsigned S4C0 : 1;
4745 unsigned S5C0 : 1;
4746 unsigned S6C0 : 1;
4747 unsigned S7C0 : 1;
4750 struct
4752 unsigned SEG0COM0 : 1;
4753 unsigned SEG1COM0 : 1;
4754 unsigned SEG2COM0 : 1;
4755 unsigned SEG3COM0 : 1;
4756 unsigned SEG4COM0 : 1;
4757 unsigned SEG5COM0 : 1;
4758 unsigned SEG6COM0 : 1;
4759 unsigned SEG7COM0 : 1;
4762 struct
4764 unsigned S00C0 : 1;
4765 unsigned S01C0 : 1;
4766 unsigned S02C0 : 1;
4767 unsigned S03C0 : 1;
4768 unsigned S04C0 : 1;
4769 unsigned S05C0 : 1;
4770 unsigned S06C0 : 1;
4771 unsigned S07C0 : 1;
4773 } __LCDDATA0bits_t;
4775 extern __at(0x0FBB) volatile __LCDDATA0bits_t LCDDATA0bits;
4777 #define _S0C0 0x01
4778 #define _SEG0COM0 0x01
4779 #define _S00C0 0x01
4780 #define _S1C0 0x02
4781 #define _SEG1COM0 0x02
4782 #define _S01C0 0x02
4783 #define _S2C0 0x04
4784 #define _SEG2COM0 0x04
4785 #define _S02C0 0x04
4786 #define _S3C0 0x08
4787 #define _SEG3COM0 0x08
4788 #define _S03C0 0x08
4789 #define _S4C0 0x10
4790 #define _SEG4COM0 0x10
4791 #define _S04C0 0x10
4792 #define _S5C0 0x20
4793 #define _SEG5COM0 0x20
4794 #define _S05C0 0x20
4795 #define _S6C0 0x40
4796 #define _SEG6COM0 0x40
4797 #define _S06C0 0x40
4798 #define _S7C0 0x80
4799 #define _SEG7COM0 0x80
4800 #define _S07C0 0x80
4802 //==============================================================================
4805 //==============================================================================
4806 // LCDDATA1 Bits
4808 extern __at(0x0FBC) __sfr LCDDATA1;
4810 typedef union
4812 struct
4814 unsigned S8C0 : 1;
4815 unsigned S9C0 : 1;
4816 unsigned S10C0 : 1;
4817 unsigned S11C0 : 1;
4818 unsigned S12C0 : 1;
4819 unsigned S13C0 : 1;
4820 unsigned S14C0 : 1;
4821 unsigned S15C0 : 1;
4824 struct
4826 unsigned SEG8COM0 : 1;
4827 unsigned SEG9COM0 : 1;
4828 unsigned SEG10COM0 : 1;
4829 unsigned SEG11COM0 : 1;
4830 unsigned SEG12COM0 : 1;
4831 unsigned SEG13COM0 : 1;
4832 unsigned SEG14COM0 : 1;
4833 unsigned SEG15COM0 : 1;
4836 struct
4838 unsigned S08C0 : 1;
4839 unsigned S09C0 : 1;
4840 unsigned : 1;
4841 unsigned : 1;
4842 unsigned : 1;
4843 unsigned : 1;
4844 unsigned : 1;
4845 unsigned : 1;
4847 } __LCDDATA1bits_t;
4849 extern __at(0x0FBC) volatile __LCDDATA1bits_t LCDDATA1bits;
4851 #define _S8C0 0x01
4852 #define _SEG8COM0 0x01
4853 #define _S08C0 0x01
4854 #define _S9C0 0x02
4855 #define _SEG9COM0 0x02
4856 #define _S09C0 0x02
4857 #define _S10C0 0x04
4858 #define _SEG10COM0 0x04
4859 #define _S11C0 0x08
4860 #define _SEG11COM0 0x08
4861 #define _S12C0 0x10
4862 #define _SEG12COM0 0x10
4863 #define _S13C0 0x20
4864 #define _SEG13COM0 0x20
4865 #define _S14C0 0x40
4866 #define _SEG14COM0 0x40
4867 #define _S15C0 0x80
4868 #define _SEG15COM0 0x80
4870 //==============================================================================
4873 //==============================================================================
4874 // LCDDATA2 Bits
4876 extern __at(0x0FBD) __sfr LCDDATA2;
4878 typedef union
4880 struct
4882 unsigned S16C0 : 1;
4883 unsigned S17C0 : 1;
4884 unsigned S18C0 : 1;
4885 unsigned S19C0 : 1;
4886 unsigned S20C0 : 1;
4887 unsigned S21C0 : 1;
4888 unsigned S22C0 : 1;
4889 unsigned S23C0 : 1;
4892 struct
4894 unsigned SEG16COM0 : 1;
4895 unsigned SEG17COM0 : 1;
4896 unsigned SEG18COM0 : 1;
4897 unsigned SEG19COM0 : 1;
4898 unsigned SEG20COM0 : 1;
4899 unsigned SEG21COM0 : 1;
4900 unsigned SEG22COM0 : 1;
4901 unsigned SEG23COM0 : 1;
4903 } __LCDDATA2bits_t;
4905 extern __at(0x0FBD) volatile __LCDDATA2bits_t LCDDATA2bits;
4907 #define _S16C0 0x01
4908 #define _SEG16COM0 0x01
4909 #define _S17C0 0x02
4910 #define _SEG17COM0 0x02
4911 #define _S18C0 0x04
4912 #define _SEG18COM0 0x04
4913 #define _S19C0 0x08
4914 #define _SEG19COM0 0x08
4915 #define _S20C0 0x10
4916 #define _SEG20COM0 0x10
4917 #define _S21C0 0x20
4918 #define _SEG21COM0 0x20
4919 #define _S22C0 0x40
4920 #define _SEG22COM0 0x40
4921 #define _S23C0 0x80
4922 #define _SEG23COM0 0x80
4924 //==============================================================================
4927 //==============================================================================
4928 // LCDDATA3 Bits
4930 extern __at(0x0FBE) __sfr LCDDATA3;
4932 typedef union
4934 struct
4936 unsigned S24C0 : 1;
4937 unsigned S25C0 : 1;
4938 unsigned S26C0 : 1;
4939 unsigned S27C0 : 1;
4940 unsigned S28C0 : 1;
4941 unsigned S29C0 : 1;
4942 unsigned S30C0 : 1;
4943 unsigned S31C0 : 1;
4946 struct
4948 unsigned SEG24COM0 : 1;
4949 unsigned SEG25COM0 : 1;
4950 unsigned SEG26COM0 : 1;
4951 unsigned SEG27COM0 : 1;
4952 unsigned SEG28COM0 : 1;
4953 unsigned SEG29COM0 : 1;
4954 unsigned SEG30COM0 : 1;
4955 unsigned SEG31COM0 : 1;
4957 } __LCDDATA3bits_t;
4959 extern __at(0x0FBE) volatile __LCDDATA3bits_t LCDDATA3bits;
4961 #define _S24C0 0x01
4962 #define _SEG24COM0 0x01
4963 #define _S25C0 0x02
4964 #define _SEG25COM0 0x02
4965 #define _S26C0 0x04
4966 #define _SEG26COM0 0x04
4967 #define _S27C0 0x08
4968 #define _SEG27COM0 0x08
4969 #define _S28C0 0x10
4970 #define _SEG28COM0 0x10
4971 #define _S29C0 0x20
4972 #define _SEG29COM0 0x20
4973 #define _S30C0 0x40
4974 #define _SEG30COM0 0x40
4975 #define _S31C0 0x80
4976 #define _SEG31COM0 0x80
4978 //==============================================================================
4981 //==============================================================================
4982 // LCDDATA4 Bits
4984 extern __at(0x0FBF) __sfr LCDDATA4;
4986 typedef union
4988 struct
4990 unsigned S32C0 : 1;
4991 unsigned S33C0 : 1;
4992 unsigned S34C0 : 1;
4993 unsigned S35C0 : 1;
4994 unsigned S36C0 : 1;
4995 unsigned S37C0 : 1;
4996 unsigned S38C0 : 1;
4997 unsigned S39C0 : 1;
5000 struct
5002 unsigned SEG32COM0 : 1;
5003 unsigned SEG33COM0 : 1;
5004 unsigned SEG34COM0 : 1;
5005 unsigned SEG35COM0 : 1;
5006 unsigned SEG36COM0 : 1;
5007 unsigned SEG37COM0 : 1;
5008 unsigned SEG38COM0 : 1;
5009 unsigned SEG39COM0 : 1;
5011 } __LCDDATA4bits_t;
5013 extern __at(0x0FBF) volatile __LCDDATA4bits_t LCDDATA4bits;
5015 #define _S32C0 0x01
5016 #define _SEG32COM0 0x01
5017 #define _S33C0 0x02
5018 #define _SEG33COM0 0x02
5019 #define _S34C0 0x04
5020 #define _SEG34COM0 0x04
5021 #define _S35C0 0x08
5022 #define _SEG35COM0 0x08
5023 #define _S36C0 0x10
5024 #define _SEG36COM0 0x10
5025 #define _S37C0 0x20
5026 #define _SEG37COM0 0x20
5027 #define _S38C0 0x40
5028 #define _SEG38COM0 0x40
5029 #define _S39C0 0x80
5030 #define _SEG39COM0 0x80
5032 //==============================================================================
5035 //==============================================================================
5036 // ADCON2 Bits
5038 extern __at(0x0FC0) __sfr ADCON2;
5040 typedef union
5042 struct
5044 unsigned ADCS0 : 1;
5045 unsigned ADCS1 : 1;
5046 unsigned ADCS2 : 1;
5047 unsigned ACQT0 : 1;
5048 unsigned ACQT1 : 1;
5049 unsigned ACQT2 : 1;
5050 unsigned : 1;
5051 unsigned ADFM : 1;
5054 struct
5056 unsigned ADCS : 3;
5057 unsigned : 5;
5060 struct
5062 unsigned : 3;
5063 unsigned ACQT : 3;
5064 unsigned : 2;
5066 } __ADCON2bits_t;
5068 extern __at(0x0FC0) volatile __ADCON2bits_t ADCON2bits;
5070 #define _ADCS0 0x01
5071 #define _ADCS1 0x02
5072 #define _ADCS2 0x04
5073 #define _ACQT0 0x08
5074 #define _ACQT1 0x10
5075 #define _ACQT2 0x20
5076 #define _ADFM 0x80
5078 //==============================================================================
5081 //==============================================================================
5082 // ADCON1 Bits
5084 extern __at(0x0FC1) __sfr ADCON1;
5086 typedef union
5088 struct
5090 unsigned PCFG0 : 1;
5091 unsigned PCFG1 : 1;
5092 unsigned PCFG2 : 1;
5093 unsigned PCFG3 : 1;
5094 unsigned VCFG0 : 1;
5095 unsigned VCFG1 : 1;
5096 unsigned : 1;
5097 unsigned TRIGSEL : 1;
5100 struct
5102 unsigned PCFG : 4;
5103 unsigned : 4;
5106 struct
5108 unsigned : 4;
5109 unsigned VCFG : 2;
5110 unsigned : 2;
5112 } __ADCON1bits_t;
5114 extern __at(0x0FC1) volatile __ADCON1bits_t ADCON1bits;
5116 #define _PCFG0 0x01
5117 #define _PCFG1 0x02
5118 #define _PCFG2 0x04
5119 #define _PCFG3 0x08
5120 #define _VCFG0 0x10
5121 #define _VCFG1 0x20
5122 #define _TRIGSEL 0x80
5124 //==============================================================================
5127 //==============================================================================
5128 // ADCON0 Bits
5130 extern __at(0x0FC2) __sfr ADCON0;
5132 typedef union
5134 struct
5136 unsigned ADON : 1;
5137 unsigned GO_NOT_DONE : 1;
5138 unsigned CHS0 : 1;
5139 unsigned CHS1 : 1;
5140 unsigned CHS2 : 1;
5141 unsigned CHS3 : 1;
5142 unsigned : 1;
5143 unsigned ADCAL : 1;
5146 struct
5148 unsigned : 1;
5149 unsigned GO_DONE : 1;
5150 unsigned : 1;
5151 unsigned : 1;
5152 unsigned : 1;
5153 unsigned : 1;
5154 unsigned : 1;
5155 unsigned : 1;
5158 struct
5160 unsigned : 1;
5161 unsigned DONE : 1;
5162 unsigned : 1;
5163 unsigned : 1;
5164 unsigned : 1;
5165 unsigned : 1;
5166 unsigned : 1;
5167 unsigned : 1;
5170 struct
5172 unsigned : 1;
5173 unsigned GO : 1;
5174 unsigned : 1;
5175 unsigned : 1;
5176 unsigned : 1;
5177 unsigned : 1;
5178 unsigned : 1;
5179 unsigned : 1;
5182 struct
5184 unsigned : 1;
5185 unsigned NOT_DONE : 1;
5186 unsigned : 1;
5187 unsigned : 1;
5188 unsigned : 1;
5189 unsigned : 1;
5190 unsigned : 1;
5191 unsigned : 1;
5194 struct
5196 unsigned : 2;
5197 unsigned CHS : 4;
5198 unsigned : 2;
5200 } __ADCON0bits_t;
5202 extern __at(0x0FC2) volatile __ADCON0bits_t ADCON0bits;
5204 #define _ADON 0x01
5205 #define _GO_NOT_DONE 0x02
5206 #define _GO_DONE 0x02
5207 #define _DONE 0x02
5208 #define _GO 0x02
5209 #define _NOT_DONE 0x02
5210 #define _CHS0 0x04
5211 #define _CHS1 0x08
5212 #define _CHS2 0x10
5213 #define _CHS3 0x20
5214 #define _ADCAL 0x80
5216 //==============================================================================
5218 extern __at(0x0FC3) __sfr ADRES;
5219 extern __at(0x0FC3) __sfr ADRESL;
5220 extern __at(0x0FC4) __sfr ADRESH;
5222 //==============================================================================
5223 // SSP1CON2 Bits
5225 extern __at(0x0FC5) __sfr SSP1CON2;
5227 typedef union
5229 struct
5231 unsigned SEN : 1;
5232 unsigned RSEN : 1;
5233 unsigned PEN : 1;
5234 unsigned RCEN : 1;
5235 unsigned ACKEN : 1;
5236 unsigned ACKDT : 1;
5237 unsigned ACKSTAT : 1;
5238 unsigned GCEN : 1;
5241 struct
5243 unsigned : 1;
5244 unsigned ADMSK1 : 1;
5245 unsigned ADMSK2 : 1;
5246 unsigned ADMSK3 : 1;
5247 unsigned ADMSK4 : 1;
5248 unsigned ADMSK5 : 1;
5249 unsigned : 1;
5250 unsigned : 1;
5252 } __SSP1CON2bits_t;
5254 extern __at(0x0FC5) volatile __SSP1CON2bits_t SSP1CON2bits;
5256 #define _SEN 0x01
5257 #define _RSEN 0x02
5258 #define _ADMSK1 0x02
5259 #define _PEN 0x04
5260 #define _ADMSK2 0x04
5261 #define _RCEN 0x08
5262 #define _ADMSK3 0x08
5263 #define _ACKEN 0x10
5264 #define _ADMSK4 0x10
5265 #define _ACKDT 0x20
5266 #define _ADMSK5 0x20
5267 #define _ACKSTAT 0x40
5268 #define _GCEN 0x80
5270 //==============================================================================
5273 //==============================================================================
5274 // SSPCON2 Bits
5276 extern __at(0x0FC5) __sfr SSPCON2;
5278 typedef union
5280 struct
5282 unsigned SEN : 1;
5283 unsigned RSEN : 1;
5284 unsigned PEN : 1;
5285 unsigned RCEN : 1;
5286 unsigned ACKEN : 1;
5287 unsigned ACKDT : 1;
5288 unsigned ACKSTAT : 1;
5289 unsigned GCEN : 1;
5292 struct
5294 unsigned : 1;
5295 unsigned ADMSK1 : 1;
5296 unsigned ADMSK2 : 1;
5297 unsigned ADMSK3 : 1;
5298 unsigned ADMSK4 : 1;
5299 unsigned ADMSK5 : 1;
5300 unsigned : 1;
5301 unsigned : 1;
5303 } __SSPCON2bits_t;
5305 extern __at(0x0FC5) volatile __SSPCON2bits_t SSPCON2bits;
5307 #define _SSPCON2_SEN 0x01
5308 #define _SSPCON2_RSEN 0x02
5309 #define _SSPCON2_ADMSK1 0x02
5310 #define _SSPCON2_PEN 0x04
5311 #define _SSPCON2_ADMSK2 0x04
5312 #define _SSPCON2_RCEN 0x08
5313 #define _SSPCON2_ADMSK3 0x08
5314 #define _SSPCON2_ACKEN 0x10
5315 #define _SSPCON2_ADMSK4 0x10
5316 #define _SSPCON2_ACKDT 0x20
5317 #define _SSPCON2_ADMSK5 0x20
5318 #define _SSPCON2_ACKSTAT 0x40
5319 #define _SSPCON2_GCEN 0x80
5321 //==============================================================================
5324 //==============================================================================
5325 // SSP1CON1 Bits
5327 extern __at(0x0FC6) __sfr SSP1CON1;
5329 typedef union
5331 struct
5333 unsigned SSPM0 : 1;
5334 unsigned SSPM1 : 1;
5335 unsigned SSPM2 : 1;
5336 unsigned SSPM3 : 1;
5337 unsigned CKP : 1;
5338 unsigned SSPEN : 1;
5339 unsigned SSPOV : 1;
5340 unsigned WCOL : 1;
5343 struct
5345 unsigned SSPM : 4;
5346 unsigned : 4;
5348 } __SSP1CON1bits_t;
5350 extern __at(0x0FC6) volatile __SSP1CON1bits_t SSP1CON1bits;
5352 #define _SSPM0 0x01
5353 #define _SSPM1 0x02
5354 #define _SSPM2 0x04
5355 #define _SSPM3 0x08
5356 #define _CKP 0x10
5357 #define _SSPEN 0x20
5358 #define _SSPOV 0x40
5359 #define _WCOL 0x80
5361 //==============================================================================
5364 //==============================================================================
5365 // SSPCON1 Bits
5367 extern __at(0x0FC6) __sfr SSPCON1;
5369 typedef union
5371 struct
5373 unsigned SSPM0 : 1;
5374 unsigned SSPM1 : 1;
5375 unsigned SSPM2 : 1;
5376 unsigned SSPM3 : 1;
5377 unsigned CKP : 1;
5378 unsigned SSPEN : 1;
5379 unsigned SSPOV : 1;
5380 unsigned WCOL : 1;
5383 struct
5385 unsigned SSPM : 4;
5386 unsigned : 4;
5388 } __SSPCON1bits_t;
5390 extern __at(0x0FC6) volatile __SSPCON1bits_t SSPCON1bits;
5392 #define _SSPCON1_SSPM0 0x01
5393 #define _SSPCON1_SSPM1 0x02
5394 #define _SSPCON1_SSPM2 0x04
5395 #define _SSPCON1_SSPM3 0x08
5396 #define _SSPCON1_CKP 0x10
5397 #define _SSPCON1_SSPEN 0x20
5398 #define _SSPCON1_SSPOV 0x40
5399 #define _SSPCON1_WCOL 0x80
5401 //==============================================================================
5404 //==============================================================================
5405 // SSP1STAT Bits
5407 extern __at(0x0FC7) __sfr SSP1STAT;
5409 typedef union
5411 struct
5413 unsigned BF : 1;
5414 unsigned UA : 1;
5415 unsigned R_NOT_W : 1;
5416 unsigned S : 1;
5417 unsigned P : 1;
5418 unsigned D_NOT_A : 1;
5419 unsigned CKE : 1;
5420 unsigned SMP : 1;
5423 struct
5425 unsigned : 1;
5426 unsigned : 1;
5427 unsigned R : 1;
5428 unsigned I2C_START : 1;
5429 unsigned I2C_STOP : 1;
5430 unsigned D : 1;
5431 unsigned : 1;
5432 unsigned : 1;
5435 struct
5437 unsigned : 1;
5438 unsigned : 1;
5439 unsigned R_W : 1;
5440 unsigned : 1;
5441 unsigned : 1;
5442 unsigned D_A : 1;
5443 unsigned : 1;
5444 unsigned : 1;
5447 struct
5449 unsigned : 1;
5450 unsigned : 1;
5451 unsigned NOT_W : 1;
5452 unsigned : 1;
5453 unsigned : 1;
5454 unsigned NOT_A : 1;
5455 unsigned : 1;
5456 unsigned : 1;
5459 struct
5461 unsigned : 1;
5462 unsigned : 1;
5463 unsigned NOT_WRITE : 1;
5464 unsigned : 1;
5465 unsigned : 1;
5466 unsigned NOT_ADDRESS : 1;
5467 unsigned : 1;
5468 unsigned : 1;
5471 struct
5473 unsigned : 1;
5474 unsigned : 1;
5475 unsigned READ_WRITE : 1;
5476 unsigned : 1;
5477 unsigned : 1;
5478 unsigned DATA_ADDRESS : 1;
5479 unsigned : 1;
5480 unsigned : 1;
5483 struct
5485 unsigned : 1;
5486 unsigned : 1;
5487 unsigned I2C_READ : 1;
5488 unsigned : 1;
5489 unsigned : 1;
5490 unsigned I2C_DAT : 1;
5491 unsigned : 1;
5492 unsigned : 1;
5494 } __SSP1STATbits_t;
5496 extern __at(0x0FC7) volatile __SSP1STATbits_t SSP1STATbits;
5498 #define _BF 0x01
5499 #define _UA 0x02
5500 #define _R_NOT_W 0x04
5501 #define _R 0x04
5502 #define _R_W 0x04
5503 #define _NOT_W 0x04
5504 #define _NOT_WRITE 0x04
5505 #define _READ_WRITE 0x04
5506 #define _I2C_READ 0x04
5507 #define _S 0x08
5508 #define _I2C_START 0x08
5509 #define _P 0x10
5510 #define _I2C_STOP 0x10
5511 #define _D_NOT_A 0x20
5512 #define _D 0x20
5513 #define _D_A 0x20
5514 #define _NOT_A 0x20
5515 #define _NOT_ADDRESS 0x20
5516 #define _DATA_ADDRESS 0x20
5517 #define _I2C_DAT 0x20
5518 #define _CKE 0x40
5519 #define _SMP 0x80
5521 //==============================================================================
5524 //==============================================================================
5525 // SSPSTAT Bits
5527 extern __at(0x0FC7) __sfr SSPSTAT;
5529 typedef union
5531 struct
5533 unsigned BF : 1;
5534 unsigned UA : 1;
5535 unsigned R_NOT_W : 1;
5536 unsigned S : 1;
5537 unsigned P : 1;
5538 unsigned D_NOT_A : 1;
5539 unsigned CKE : 1;
5540 unsigned SMP : 1;
5543 struct
5545 unsigned : 1;
5546 unsigned : 1;
5547 unsigned R : 1;
5548 unsigned I2C_START : 1;
5549 unsigned I2C_STOP : 1;
5550 unsigned D : 1;
5551 unsigned : 1;
5552 unsigned : 1;
5555 struct
5557 unsigned : 1;
5558 unsigned : 1;
5559 unsigned R_W : 1;
5560 unsigned : 1;
5561 unsigned : 1;
5562 unsigned D_A : 1;
5563 unsigned : 1;
5564 unsigned : 1;
5567 struct
5569 unsigned : 1;
5570 unsigned : 1;
5571 unsigned NOT_W : 1;
5572 unsigned : 1;
5573 unsigned : 1;
5574 unsigned NOT_A : 1;
5575 unsigned : 1;
5576 unsigned : 1;
5579 struct
5581 unsigned : 1;
5582 unsigned : 1;
5583 unsigned NOT_WRITE : 1;
5584 unsigned : 1;
5585 unsigned : 1;
5586 unsigned NOT_ADDRESS : 1;
5587 unsigned : 1;
5588 unsigned : 1;
5591 struct
5593 unsigned : 1;
5594 unsigned : 1;
5595 unsigned READ_WRITE : 1;
5596 unsigned : 1;
5597 unsigned : 1;
5598 unsigned DATA_ADDRESS : 1;
5599 unsigned : 1;
5600 unsigned : 1;
5603 struct
5605 unsigned : 1;
5606 unsigned : 1;
5607 unsigned I2C_READ : 1;
5608 unsigned : 1;
5609 unsigned : 1;
5610 unsigned I2C_DAT : 1;
5611 unsigned : 1;
5612 unsigned : 1;
5614 } __SSPSTATbits_t;
5616 extern __at(0x0FC7) volatile __SSPSTATbits_t SSPSTATbits;
5618 #define _SSPSTAT_BF 0x01
5619 #define _SSPSTAT_UA 0x02
5620 #define _SSPSTAT_R_NOT_W 0x04
5621 #define _SSPSTAT_R 0x04
5622 #define _SSPSTAT_R_W 0x04
5623 #define _SSPSTAT_NOT_W 0x04
5624 #define _SSPSTAT_NOT_WRITE 0x04
5625 #define _SSPSTAT_READ_WRITE 0x04
5626 #define _SSPSTAT_I2C_READ 0x04
5627 #define _SSPSTAT_S 0x08
5628 #define _SSPSTAT_I2C_START 0x08
5629 #define _SSPSTAT_P 0x10
5630 #define _SSPSTAT_I2C_STOP 0x10
5631 #define _SSPSTAT_D_NOT_A 0x20
5632 #define _SSPSTAT_D 0x20
5633 #define _SSPSTAT_D_A 0x20
5634 #define _SSPSTAT_NOT_A 0x20
5635 #define _SSPSTAT_NOT_ADDRESS 0x20
5636 #define _SSPSTAT_DATA_ADDRESS 0x20
5637 #define _SSPSTAT_I2C_DAT 0x20
5638 #define _SSPSTAT_CKE 0x40
5639 #define _SSPSTAT_SMP 0x80
5641 //==============================================================================
5644 //==============================================================================
5645 // SSP1ADD Bits
5647 extern __at(0x0FC8) __sfr SSP1ADD;
5649 typedef struct
5651 unsigned MSK0 : 1;
5652 unsigned MSK1 : 1;
5653 unsigned MSK2 : 1;
5654 unsigned MSK3 : 1;
5655 unsigned MSK4 : 1;
5656 unsigned MSK5 : 1;
5657 unsigned MSK6 : 1;
5658 unsigned MSK7 : 1;
5659 } __SSP1ADDbits_t;
5661 extern __at(0x0FC8) volatile __SSP1ADDbits_t SSP1ADDbits;
5663 #define _MSK0 0x01
5664 #define _MSK1 0x02
5665 #define _MSK2 0x04
5666 #define _MSK3 0x08
5667 #define _MSK4 0x10
5668 #define _MSK5 0x20
5669 #define _MSK6 0x40
5670 #define _MSK7 0x80
5672 //==============================================================================
5675 //==============================================================================
5676 // SSPADD Bits
5678 extern __at(0x0FC8) __sfr SSPADD;
5680 typedef struct
5682 unsigned MSK0 : 1;
5683 unsigned MSK1 : 1;
5684 unsigned MSK2 : 1;
5685 unsigned MSK3 : 1;
5686 unsigned MSK4 : 1;
5687 unsigned MSK5 : 1;
5688 unsigned MSK6 : 1;
5689 unsigned MSK7 : 1;
5690 } __SSPADDbits_t;
5692 extern __at(0x0FC8) volatile __SSPADDbits_t SSPADDbits;
5694 #define _SSPADD_MSK0 0x01
5695 #define _SSPADD_MSK1 0x02
5696 #define _SSPADD_MSK2 0x04
5697 #define _SSPADD_MSK3 0x08
5698 #define _SSPADD_MSK4 0x10
5699 #define _SSPADD_MSK5 0x20
5700 #define _SSPADD_MSK6 0x40
5701 #define _SSPADD_MSK7 0x80
5703 //==============================================================================
5705 extern __at(0x0FC9) __sfr SSP1BUF;
5706 extern __at(0x0FC9) __sfr SSPBUF;
5708 //==============================================================================
5709 // T2CON Bits
5711 extern __at(0x0FCA) __sfr T2CON;
5713 typedef union
5715 struct
5717 unsigned T2CKPS0 : 1;
5718 unsigned T2CKPS1 : 1;
5719 unsigned TMR2ON : 1;
5720 unsigned T2OUTPS0 : 1;
5721 unsigned T2OUTPS1 : 1;
5722 unsigned T2OUTPS2 : 1;
5723 unsigned T2OUTPS3 : 1;
5724 unsigned : 1;
5727 struct
5729 unsigned T2CKPS : 2;
5730 unsigned : 6;
5733 struct
5735 unsigned : 3;
5736 unsigned T2OUTPS : 4;
5737 unsigned : 1;
5739 } __T2CONbits_t;
5741 extern __at(0x0FCA) volatile __T2CONbits_t T2CONbits;
5743 #define _T2CKPS0 0x01
5744 #define _T2CKPS1 0x02
5745 #define _TMR2ON 0x04
5746 #define _T2OUTPS0 0x08
5747 #define _T2OUTPS1 0x10
5748 #define _T2OUTPS2 0x20
5749 #define _T2OUTPS3 0x40
5751 //==============================================================================
5753 extern __at(0x0FCB) __sfr PR2;
5754 extern __at(0x0FCC) __sfr TMR2;
5756 //==============================================================================
5757 // T1CON Bits
5759 extern __at(0x0FCD) __sfr T1CON;
5761 typedef union
5763 struct
5765 unsigned TMR1ON : 1;
5766 unsigned TMR1CS : 1;
5767 unsigned NOT_T1SYNC : 1;
5768 unsigned T1OSCEN : 1;
5769 unsigned T1CKPS0 : 1;
5770 unsigned T1CKPS1 : 1;
5771 unsigned T1RUN : 1;
5772 unsigned RD16 : 1;
5775 struct
5777 unsigned : 1;
5778 unsigned : 1;
5779 unsigned T1INSYNC : 1;
5780 unsigned : 1;
5781 unsigned : 1;
5782 unsigned : 1;
5783 unsigned : 1;
5784 unsigned : 1;
5787 struct
5789 unsigned : 1;
5790 unsigned : 1;
5791 unsigned T1SYNC : 1;
5792 unsigned : 1;
5793 unsigned : 1;
5794 unsigned : 1;
5795 unsigned : 1;
5796 unsigned : 1;
5799 struct
5801 unsigned : 4;
5802 unsigned T1CKPS : 2;
5803 unsigned : 2;
5805 } __T1CONbits_t;
5807 extern __at(0x0FCD) volatile __T1CONbits_t T1CONbits;
5809 #define _TMR1ON 0x01
5810 #define _TMR1CS 0x02
5811 #define _NOT_T1SYNC 0x04
5812 #define _T1INSYNC 0x04
5813 #define _T1SYNC 0x04
5814 #define _T1OSCEN 0x08
5815 #define _T1CKPS0 0x10
5816 #define _T1CKPS1 0x20
5817 #define _T1RUN 0x40
5818 #define _RD16 0x80
5820 //==============================================================================
5822 extern __at(0x0FCE) __sfr TMR1;
5823 extern __at(0x0FCE) __sfr TMR1L;
5824 extern __at(0x0FCF) __sfr TMR1H;
5826 //==============================================================================
5827 // RCON Bits
5829 extern __at(0x0FD0) __sfr RCON;
5831 typedef union
5833 struct
5835 unsigned NOT_BOR : 1;
5836 unsigned NOT_POR : 1;
5837 unsigned NOT_PD : 1;
5838 unsigned NOT_TO : 1;
5839 unsigned NOT_RI : 1;
5840 unsigned NOT_CM : 1;
5841 unsigned : 1;
5842 unsigned IPEN : 1;
5845 struct
5847 unsigned BOR : 1;
5848 unsigned POR : 1;
5849 unsigned PD : 1;
5850 unsigned TO : 1;
5851 unsigned RI : 1;
5852 unsigned CM : 1;
5853 unsigned : 1;
5854 unsigned : 1;
5856 } __RCONbits_t;
5858 extern __at(0x0FD0) volatile __RCONbits_t RCONbits;
5860 #define _NOT_BOR 0x01
5861 #define _BOR 0x01
5862 #define _NOT_POR 0x02
5863 #define _POR 0x02
5864 #define _NOT_PD 0x04
5865 #define _PD 0x04
5866 #define _NOT_TO 0x08
5867 #define _TO 0x08
5868 #define _NOT_RI 0x10
5869 #define _RI 0x10
5870 #define _NOT_CM 0x20
5871 #define _CM 0x20
5872 #define _IPEN 0x80
5874 //==============================================================================
5877 //==============================================================================
5878 // WDTCON Bits
5880 extern __at(0x0FD1) __sfr WDTCON;
5882 typedef union
5884 struct
5886 unsigned SWDTEN : 1;
5887 unsigned : 1;
5888 unsigned : 1;
5889 unsigned : 1;
5890 unsigned : 1;
5891 unsigned : 1;
5892 unsigned : 1;
5893 unsigned REGSLP : 1;
5896 struct
5898 unsigned SWDTE : 1;
5899 unsigned : 1;
5900 unsigned : 1;
5901 unsigned : 1;
5902 unsigned : 1;
5903 unsigned : 1;
5904 unsigned : 1;
5905 unsigned : 1;
5907 } __WDTCONbits_t;
5909 extern __at(0x0FD1) volatile __WDTCONbits_t WDTCONbits;
5911 #define _SWDTEN 0x01
5912 #define _SWDTE 0x01
5913 #define _REGSLP 0x80
5915 //==============================================================================
5918 //==============================================================================
5919 // LCDREG Bits
5921 extern __at(0x0FD2) __sfr LCDREG;
5923 typedef union
5925 struct
5927 unsigned CKSEL0 : 1;
5928 unsigned CKSEL1 : 1;
5929 unsigned MODE13 : 1;
5930 unsigned BIAS0 : 1;
5931 unsigned BIAS1 : 1;
5932 unsigned BIAS2 : 1;
5933 unsigned CPEN : 1;
5934 unsigned : 1;
5937 struct
5939 unsigned CKSEL : 2;
5940 unsigned : 6;
5943 struct
5945 unsigned : 3;
5946 unsigned BIAS : 3;
5947 unsigned : 2;
5949 } __LCDREGbits_t;
5951 extern __at(0x0FD2) volatile __LCDREGbits_t LCDREGbits;
5953 #define _CKSEL0 0x01
5954 #define _CKSEL1 0x02
5955 #define _MODE13 0x04
5956 #define _BIAS0 0x08
5957 #define _BIAS1 0x10
5958 #define _BIAS2 0x20
5959 #define _CPEN 0x40
5961 //==============================================================================
5964 //==============================================================================
5965 // OSCCON Bits
5967 extern __at(0x0FD3) __sfr OSCCON;
5969 typedef union
5971 struct
5973 unsigned SCS0 : 1;
5974 unsigned SCS1 : 1;
5975 unsigned IOFS : 1;
5976 unsigned OSTS : 1;
5977 unsigned IRCF0 : 1;
5978 unsigned IRCF1 : 1;
5979 unsigned IRCF2 : 1;
5980 unsigned IDLEN : 1;
5983 struct
5985 unsigned SCS : 2;
5986 unsigned : 6;
5989 struct
5991 unsigned : 4;
5992 unsigned IRCF : 3;
5993 unsigned : 1;
5995 } __OSCCONbits_t;
5997 extern __at(0x0FD3) volatile __OSCCONbits_t OSCCONbits;
5999 #define _SCS0 0x01
6000 #define _SCS1 0x02
6001 #define _IOFS 0x04
6002 #define _OSTS 0x08
6003 #define _IRCF0 0x10
6004 #define _IRCF1 0x20
6005 #define _IRCF2 0x40
6006 #define _IDLEN 0x80
6008 //==============================================================================
6011 //==============================================================================
6012 // T0CON Bits
6014 extern __at(0x0FD5) __sfr T0CON;
6016 typedef union
6018 struct
6020 unsigned T0PS0 : 1;
6021 unsigned T0PS1 : 1;
6022 unsigned T0PS2 : 1;
6023 unsigned PSA : 1;
6024 unsigned T0SE : 1;
6025 unsigned T0CS : 1;
6026 unsigned T08BIT : 1;
6027 unsigned TMR0ON : 1;
6030 struct
6032 unsigned T0PS : 3;
6033 unsigned : 5;
6035 } __T0CONbits_t;
6037 extern __at(0x0FD5) volatile __T0CONbits_t T0CONbits;
6039 #define _T0PS0 0x01
6040 #define _T0PS1 0x02
6041 #define _T0PS2 0x04
6042 #define _PSA 0x08
6043 #define _T0SE 0x10
6044 #define _T0CS 0x20
6045 #define _T08BIT 0x40
6046 #define _TMR0ON 0x80
6048 //==============================================================================
6050 extern __at(0x0FD6) __sfr TMR0;
6051 extern __at(0x0FD6) __sfr TMR0L;
6052 extern __at(0x0FD7) __sfr TMR0H;
6054 //==============================================================================
6055 // STATUS Bits
6057 extern __at(0x0FD8) __sfr STATUS;
6059 typedef struct
6061 unsigned C : 1;
6062 unsigned DC : 1;
6063 unsigned Z : 1;
6064 unsigned OV : 1;
6065 unsigned N : 1;
6066 unsigned : 1;
6067 unsigned : 1;
6068 unsigned : 1;
6069 } __STATUSbits_t;
6071 extern __at(0x0FD8) volatile __STATUSbits_t STATUSbits;
6073 #define _C 0x01
6074 #define _DC 0x02
6075 #define _Z 0x04
6076 #define _OV 0x08
6077 #define _N 0x10
6079 //==============================================================================
6081 extern __at(0x0FD9) __sfr FSR2L;
6082 extern __at(0x0FDA) __sfr FSR2H;
6083 extern __at(0x0FDB) __sfr PLUSW2;
6084 extern __at(0x0FDC) __sfr PREINC2;
6085 extern __at(0x0FDD) __sfr POSTDEC2;
6086 extern __at(0x0FDE) __sfr POSTINC2;
6087 extern __at(0x0FDF) __sfr INDF2;
6088 extern __at(0x0FE0) __sfr BSR;
6089 extern __at(0x0FE1) __sfr FSR1L;
6090 extern __at(0x0FE2) __sfr FSR1H;
6091 extern __at(0x0FE3) __sfr PLUSW1;
6092 extern __at(0x0FE4) __sfr PREINC1;
6093 extern __at(0x0FE5) __sfr POSTDEC1;
6094 extern __at(0x0FE6) __sfr POSTINC1;
6095 extern __at(0x0FE7) __sfr INDF1;
6096 extern __at(0x0FE8) __sfr WREG;
6097 extern __at(0x0FE9) __sfr FSR0L;
6098 extern __at(0x0FEA) __sfr FSR0H;
6099 extern __at(0x0FEB) __sfr PLUSW0;
6100 extern __at(0x0FEC) __sfr PREINC0;
6101 extern __at(0x0FED) __sfr POSTDEC0;
6102 extern __at(0x0FEE) __sfr POSTINC0;
6103 extern __at(0x0FEF) __sfr INDF0;
6105 //==============================================================================
6106 // INTCON3 Bits
6108 extern __at(0x0FF0) __sfr INTCON3;
6110 typedef union
6112 struct
6114 unsigned INT1IF : 1;
6115 unsigned INT2IF : 1;
6116 unsigned INT3IF : 1;
6117 unsigned INT1IE : 1;
6118 unsigned INT2IE : 1;
6119 unsigned INT3IE : 1;
6120 unsigned INT1IP : 1;
6121 unsigned INT2IP : 1;
6124 struct
6126 unsigned INT1F : 1;
6127 unsigned INT2F : 1;
6128 unsigned INT3F : 1;
6129 unsigned INT1E : 1;
6130 unsigned INT2E : 1;
6131 unsigned INT3E : 1;
6132 unsigned INT1P : 1;
6133 unsigned INT2P : 1;
6135 } __INTCON3bits_t;
6137 extern __at(0x0FF0) volatile __INTCON3bits_t INTCON3bits;
6139 #define _INT1IF 0x01
6140 #define _INT1F 0x01
6141 #define _INT2IF 0x02
6142 #define _INT2F 0x02
6143 #define _INT3IF 0x04
6144 #define _INT3F 0x04
6145 #define _INT1IE 0x08
6146 #define _INT1E 0x08
6147 #define _INT2IE 0x10
6148 #define _INT2E 0x10
6149 #define _INT3IE 0x20
6150 #define _INT3E 0x20
6151 #define _INT1IP 0x40
6152 #define _INT1P 0x40
6153 #define _INT2IP 0x80
6154 #define _INT2P 0x80
6156 //==============================================================================
6159 //==============================================================================
6160 // INTCON2 Bits
6162 extern __at(0x0FF1) __sfr INTCON2;
6164 typedef union
6166 struct
6168 unsigned RBIP : 1;
6169 unsigned INT3IP : 1;
6170 unsigned TMR0IP : 1;
6171 unsigned INTEDG3 : 1;
6172 unsigned INTEDG2 : 1;
6173 unsigned INTEDG1 : 1;
6174 unsigned INTEDG0 : 1;
6175 unsigned NOT_RBPU : 1;
6178 struct
6180 unsigned : 1;
6181 unsigned INT3P : 1;
6182 unsigned T0IP : 1;
6183 unsigned : 1;
6184 unsigned : 1;
6185 unsigned : 1;
6186 unsigned : 1;
6187 unsigned RBPU : 1;
6189 } __INTCON2bits_t;
6191 extern __at(0x0FF1) volatile __INTCON2bits_t INTCON2bits;
6193 #define _RBIP 0x01
6194 #define _INT3IP 0x02
6195 #define _INT3P 0x02
6196 #define _TMR0IP 0x04
6197 #define _T0IP 0x04
6198 #define _INTEDG3 0x08
6199 #define _INTEDG2 0x10
6200 #define _INTEDG1 0x20
6201 #define _INTEDG0 0x40
6202 #define _NOT_RBPU 0x80
6203 #define _RBPU 0x80
6205 //==============================================================================
6208 //==============================================================================
6209 // INTCON Bits
6211 extern __at(0x0FF2) __sfr INTCON;
6213 typedef union
6215 struct
6217 unsigned RBIF : 1;
6218 unsigned INT0IF : 1;
6219 unsigned TMR0IF : 1;
6220 unsigned RBIE : 1;
6221 unsigned INT0IE : 1;
6222 unsigned TMR0IE : 1;
6223 unsigned PEIE_GIEL : 1;
6224 unsigned GIE_GIEH : 1;
6227 struct
6229 unsigned : 1;
6230 unsigned INT0F : 1;
6231 unsigned T0IF : 1;
6232 unsigned : 1;
6233 unsigned INT0E : 1;
6234 unsigned T0IE : 1;
6235 unsigned PEIE : 1;
6236 unsigned GIE : 1;
6239 struct
6241 unsigned : 1;
6242 unsigned : 1;
6243 unsigned : 1;
6244 unsigned : 1;
6245 unsigned : 1;
6246 unsigned : 1;
6247 unsigned GIEL : 1;
6248 unsigned GIEH : 1;
6250 } __INTCONbits_t;
6252 extern __at(0x0FF2) volatile __INTCONbits_t INTCONbits;
6254 #define _RBIF 0x01
6255 #define _INT0IF 0x02
6256 #define _INT0F 0x02
6257 #define _TMR0IF 0x04
6258 #define _T0IF 0x04
6259 #define _RBIE 0x08
6260 #define _INT0IE 0x10
6261 #define _INT0E 0x10
6262 #define _TMR0IE 0x20
6263 #define _T0IE 0x20
6264 #define _PEIE_GIEL 0x40
6265 #define _PEIE 0x40
6266 #define _GIEL 0x40
6267 #define _GIE_GIEH 0x80
6268 #define _GIE 0x80
6269 #define _GIEH 0x80
6271 //==============================================================================
6273 extern __at(0x0FF3) __sfr PROD;
6274 extern __at(0x0FF3) __sfr PRODL;
6275 extern __at(0x0FF4) __sfr PRODH;
6276 extern __at(0x0FF5) __sfr TABLAT;
6277 extern __at(0x0FF6) __sfr TBLPTR;
6278 extern __at(0x0FF6) __sfr TBLPTRL;
6279 extern __at(0x0FF7) __sfr TBLPTRH;
6280 extern __at(0x0FF8) __sfr TBLPTRU;
6281 extern __at(0x0FF9) __sfr PC;
6282 extern __at(0x0FF9) __sfr PCL;
6283 extern __at(0x0FFA) __sfr PCLATH;
6284 extern __at(0x0FFB) __sfr PCLATU;
6286 //==============================================================================
6287 // STKPTR Bits
6289 extern __at(0x0FFC) __sfr STKPTR;
6291 typedef union
6293 struct
6295 unsigned SP0 : 1;
6296 unsigned SP1 : 1;
6297 unsigned SP2 : 1;
6298 unsigned SP3 : 1;
6299 unsigned SP4 : 1;
6300 unsigned : 1;
6301 unsigned STKUNF : 1;
6302 unsigned STKFUL : 1;
6305 struct
6307 unsigned STKPTR0 : 1;
6308 unsigned STKPTR1 : 1;
6309 unsigned STKPTR2 : 1;
6310 unsigned STKPTR3 : 1;
6311 unsigned STKPTR4 : 1;
6312 unsigned : 1;
6313 unsigned : 1;
6314 unsigned STKOVF : 1;
6317 struct
6319 unsigned SP : 5;
6320 unsigned : 3;
6323 struct
6325 unsigned STKPTR : 5;
6326 unsigned : 3;
6328 } __STKPTRbits_t;
6330 extern __at(0x0FFC) volatile __STKPTRbits_t STKPTRbits;
6332 #define _SP0 0x01
6333 #define _STKPTR0 0x01
6334 #define _SP1 0x02
6335 #define _STKPTR1 0x02
6336 #define _SP2 0x04
6337 #define _STKPTR2 0x04
6338 #define _SP3 0x08
6339 #define _STKPTR3 0x08
6340 #define _SP4 0x10
6341 #define _STKPTR4 0x10
6342 #define _STKUNF 0x40
6343 #define _STKFUL 0x80
6344 #define _STKOVF 0x80
6346 //==============================================================================
6348 extern __at(0x0FFD) __sfr TOS;
6349 extern __at(0x0FFD) __sfr TOSL;
6350 extern __at(0x0FFE) __sfr TOSH;
6351 extern __at(0x0FFF) __sfr TOSU;
6353 //==============================================================================
6355 // Configuration Addresses
6357 //==============================================================================
6359 #define __CONFIG1L 0x01FFF8
6360 #define __CONFIG1H 0x01FFF9
6361 #define __CONFIG2L 0x01FFFA
6362 #define __CONFIG2H 0x01FFFB
6363 #define __CONFIG3L 0x01FFFC
6364 #define __CONFIG3H 0x01FFFD
6365 #define __CONFIG4L 0x01FFFE
6366 #define __CONFIG4H 0x01FFFF
6368 //==============================================================================
6370 #endif // #ifndef __PIC18F87J93_H__