Hackfix and re-enable strtoull and wcstoull, see bug #3798.
[sdcc.git] / sdcc / device / non-free / include / pic16 / pic18f67j93.h
bloba1d0f1fe45d79519a27c1e82095f99616e15d0b0
1 /*
2 * This declarations of the PIC18F67J93 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:35 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 __PIC18F67J93_H__
26 #define __PIC18F67J93_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 // LCDDATA6 Bits
811 extern __at(0x0F6C) __sfr LCDDATA6;
813 typedef union
815 struct
817 unsigned S00C1 : 1;
818 unsigned S01C1 : 1;
819 unsigned S02C1 : 1;
820 unsigned S03C1 : 1;
821 unsigned S04C1 : 1;
822 unsigned S05C1 : 1;
823 unsigned S06C1 : 1;
824 unsigned S07C1 : 1;
827 struct
829 unsigned SEG0COM1 : 1;
830 unsigned SEG1COM1 : 1;
831 unsigned SEG2COM1 : 1;
832 unsigned SEG3COM1 : 1;
833 unsigned SEG4COM1 : 1;
834 unsigned SEG5COM1 : 1;
835 unsigned SEG6COM1 : 1;
836 unsigned SEG7COM1 : 1;
839 struct
841 unsigned S0C1 : 1;
842 unsigned S1C1 : 1;
843 unsigned S2C1 : 1;
844 unsigned S3C1 : 1;
845 unsigned S4C1 : 1;
846 unsigned S5C1 : 1;
847 unsigned S6C1 : 1;
848 unsigned S7C1 : 1;
850 } __LCDDATA6bits_t;
852 extern __at(0x0F6C) volatile __LCDDATA6bits_t LCDDATA6bits;
854 #define _S00C1 0x01
855 #define _SEG0COM1 0x01
856 #define _S0C1 0x01
857 #define _S01C1 0x02
858 #define _SEG1COM1 0x02
859 #define _S1C1 0x02
860 #define _S02C1 0x04
861 #define _SEG2COM1 0x04
862 #define _S2C1 0x04
863 #define _S03C1 0x08
864 #define _SEG3COM1 0x08
865 #define _S3C1 0x08
866 #define _S04C1 0x10
867 #define _SEG4COM1 0x10
868 #define _S4C1 0x10
869 #define _S05C1 0x20
870 #define _SEG5COM1 0x20
871 #define _S5C1 0x20
872 #define _S06C1 0x40
873 #define _SEG6COM1 0x40
874 #define _S6C1 0x40
875 #define _S07C1 0x80
876 #define _SEG7COM1 0x80
877 #define _S7C1 0x80
879 //==============================================================================
882 //==============================================================================
883 // LCDDATA7 Bits
885 extern __at(0x0F6D) __sfr LCDDATA7;
887 typedef union
889 struct
891 unsigned S8C1 : 1;
892 unsigned S9C1 : 1;
893 unsigned S10C1 : 1;
894 unsigned S11C1 : 1;
895 unsigned S12C1 : 1;
896 unsigned S13C1 : 1;
897 unsigned S14C1 : 1;
898 unsigned S15C1 : 1;
901 struct
903 unsigned SEG8COM1 : 1;
904 unsigned SEG9COM1 : 1;
905 unsigned SEG10COM1 : 1;
906 unsigned SEG11COM1 : 1;
907 unsigned SEG12COM1 : 1;
908 unsigned SEG13COM1 : 1;
909 unsigned SEG14COM1 : 1;
910 unsigned SEG15COM1 : 1;
913 struct
915 unsigned S08C1 : 1;
916 unsigned S09C1 : 1;
917 unsigned : 1;
918 unsigned : 1;
919 unsigned : 1;
920 unsigned : 1;
921 unsigned : 1;
922 unsigned : 1;
924 } __LCDDATA7bits_t;
926 extern __at(0x0F6D) volatile __LCDDATA7bits_t LCDDATA7bits;
928 #define _S8C1 0x01
929 #define _SEG8COM1 0x01
930 #define _S08C1 0x01
931 #define _S9C1 0x02
932 #define _SEG9COM1 0x02
933 #define _S09C1 0x02
934 #define _S10C1 0x04
935 #define _SEG10COM1 0x04
936 #define _S11C1 0x08
937 #define _SEG11COM1 0x08
938 #define _S12C1 0x10
939 #define _SEG12COM1 0x10
940 #define _S13C1 0x20
941 #define _SEG13COM1 0x20
942 #define _S14C1 0x40
943 #define _SEG14COM1 0x40
944 #define _S15C1 0x80
945 #define _SEG15COM1 0x80
947 //==============================================================================
950 //==============================================================================
951 // LCDDATA8 Bits
953 extern __at(0x0F6E) __sfr LCDDATA8;
955 typedef union
957 struct
959 unsigned S16C1 : 1;
960 unsigned S17C1 : 1;
961 unsigned S18C1 : 1;
962 unsigned S19C1 : 1;
963 unsigned S20C1 : 1;
964 unsigned S21C1 : 1;
965 unsigned S22C1 : 1;
966 unsigned S23C1 : 1;
969 struct
971 unsigned SEG16COM1 : 1;
972 unsigned SEG17COM1 : 1;
973 unsigned SEG18COM1 : 1;
974 unsigned SEG19COM1 : 1;
975 unsigned SEG20COM1 : 1;
976 unsigned SEG21COM1 : 1;
977 unsigned SEG22COM1 : 1;
978 unsigned SEG23COM1 : 1;
980 } __LCDDATA8bits_t;
982 extern __at(0x0F6E) volatile __LCDDATA8bits_t LCDDATA8bits;
984 #define _S16C1 0x01
985 #define _SEG16COM1 0x01
986 #define _S17C1 0x02
987 #define _SEG17COM1 0x02
988 #define _S18C1 0x04
989 #define _SEG18COM1 0x04
990 #define _S19C1 0x08
991 #define _SEG19COM1 0x08
992 #define _S20C1 0x10
993 #define _SEG20COM1 0x10
994 #define _S21C1 0x20
995 #define _SEG21COM1 0x20
996 #define _S22C1 0x40
997 #define _SEG22COM1 0x40
998 #define _S23C1 0x80
999 #define _SEG23COM1 0x80
1001 //==============================================================================
1004 //==============================================================================
1005 // LCDDATA9 Bits
1007 extern __at(0x0F6F) __sfr LCDDATA9;
1009 typedef union
1011 struct
1013 unsigned S24C1 : 1;
1014 unsigned S25C1 : 1;
1015 unsigned S26C1 : 1;
1016 unsigned S27C1 : 1;
1017 unsigned S28C1 : 1;
1018 unsigned S29C1 : 1;
1019 unsigned S30C1 : 1;
1020 unsigned S31C1 : 1;
1023 struct
1025 unsigned SEG24COM1 : 1;
1026 unsigned SEG25COM1 : 1;
1027 unsigned SEG26COM1 : 1;
1028 unsigned SEG27COM1 : 1;
1029 unsigned SEG28COM1 : 1;
1030 unsigned SEG29COM1 : 1;
1031 unsigned SEG30COM1 : 1;
1032 unsigned SEG31COM1 : 1;
1034 } __LCDDATA9bits_t;
1036 extern __at(0x0F6F) volatile __LCDDATA9bits_t LCDDATA9bits;
1038 #define _S24C1 0x01
1039 #define _SEG24COM1 0x01
1040 #define _S25C1 0x02
1041 #define _SEG25COM1 0x02
1042 #define _S26C1 0x04
1043 #define _SEG26COM1 0x04
1044 #define _S27C1 0x08
1045 #define _SEG27COM1 0x08
1046 #define _S28C1 0x10
1047 #define _SEG28COM1 0x10
1048 #define _S29C1 0x20
1049 #define _SEG29COM1 0x20
1050 #define _S30C1 0x40
1051 #define _SEG30COM1 0x40
1052 #define _S31C1 0x80
1053 #define _SEG31COM1 0x80
1055 //==============================================================================
1058 //==============================================================================
1059 // LCDDATA10 Bits
1061 extern __at(0x0F70) __sfr LCDDATA10;
1063 typedef union
1065 struct
1067 unsigned S32C1 : 1;
1068 unsigned : 1;
1069 unsigned : 1;
1070 unsigned : 1;
1071 unsigned : 1;
1072 unsigned : 1;
1073 unsigned : 1;
1074 unsigned : 1;
1077 struct
1079 unsigned SEG32COM1 : 1;
1080 unsigned : 1;
1081 unsigned : 1;
1082 unsigned : 1;
1083 unsigned : 1;
1084 unsigned : 1;
1085 unsigned : 1;
1086 unsigned : 1;
1088 } __LCDDATA10bits_t;
1090 extern __at(0x0F70) volatile __LCDDATA10bits_t LCDDATA10bits;
1092 #define _S32C1 0x01
1093 #define _SEG32COM1 0x01
1095 //==============================================================================
1098 //==============================================================================
1099 // LCDDATA12 Bits
1101 extern __at(0x0F72) __sfr LCDDATA12;
1103 typedef union
1105 struct
1107 unsigned S00C2 : 1;
1108 unsigned S01C2 : 1;
1109 unsigned S02C2 : 1;
1110 unsigned S03C2 : 1;
1111 unsigned S04C2 : 1;
1112 unsigned S05C2 : 1;
1113 unsigned S06C2 : 1;
1114 unsigned S07C2 : 1;
1117 struct
1119 unsigned SEG0COM2 : 1;
1120 unsigned SEG1COM2 : 1;
1121 unsigned SEG2COM2 : 1;
1122 unsigned SEG3COM2 : 1;
1123 unsigned SEG4COM2 : 1;
1124 unsigned SEG5COM2 : 1;
1125 unsigned SEG6COM2 : 1;
1126 unsigned SEG7COM2 : 1;
1129 struct
1131 unsigned S0C2 : 1;
1132 unsigned S1C2 : 1;
1133 unsigned S2C2 : 1;
1134 unsigned S3C2 : 1;
1135 unsigned S4C2 : 1;
1136 unsigned S5C2 : 1;
1137 unsigned S6C2 : 1;
1138 unsigned S7C2 : 1;
1140 } __LCDDATA12bits_t;
1142 extern __at(0x0F72) volatile __LCDDATA12bits_t LCDDATA12bits;
1144 #define _S00C2 0x01
1145 #define _SEG0COM2 0x01
1146 #define _S0C2 0x01
1147 #define _S01C2 0x02
1148 #define _SEG1COM2 0x02
1149 #define _S1C2 0x02
1150 #define _S02C2 0x04
1151 #define _SEG2COM2 0x04
1152 #define _S2C2 0x04
1153 #define _S03C2 0x08
1154 #define _SEG3COM2 0x08
1155 #define _S3C2 0x08
1156 #define _S04C2 0x10
1157 #define _SEG4COM2 0x10
1158 #define _S4C2 0x10
1159 #define _S05C2 0x20
1160 #define _SEG5COM2 0x20
1161 #define _S5C2 0x20
1162 #define _S06C2 0x40
1163 #define _SEG6COM2 0x40
1164 #define _S6C2 0x40
1165 #define _S07C2 0x80
1166 #define _SEG7COM2 0x80
1167 #define _S7C2 0x80
1169 //==============================================================================
1172 //==============================================================================
1173 // LCDDATA13 Bits
1175 extern __at(0x0F73) __sfr LCDDATA13;
1177 typedef union
1179 struct
1181 unsigned S8C2 : 1;
1182 unsigned S9C2 : 1;
1183 unsigned S10C2 : 1;
1184 unsigned S11C2 : 1;
1185 unsigned S12C2 : 1;
1186 unsigned S13C2 : 1;
1187 unsigned S14C2 : 1;
1188 unsigned S15C2 : 1;
1191 struct
1193 unsigned SEG8COM2 : 1;
1194 unsigned SEG9COM2 : 1;
1195 unsigned SEG10COM2 : 1;
1196 unsigned SEG11COM2 : 1;
1197 unsigned SEG12COM2 : 1;
1198 unsigned SEG13COM2 : 1;
1199 unsigned SEG14COM2 : 1;
1200 unsigned SEG15COM2 : 1;
1203 struct
1205 unsigned S08C2 : 1;
1206 unsigned S09C2 : 1;
1207 unsigned : 1;
1208 unsigned : 1;
1209 unsigned : 1;
1210 unsigned : 1;
1211 unsigned : 1;
1212 unsigned : 1;
1214 } __LCDDATA13bits_t;
1216 extern __at(0x0F73) volatile __LCDDATA13bits_t LCDDATA13bits;
1218 #define _S8C2 0x01
1219 #define _SEG8COM2 0x01
1220 #define _S08C2 0x01
1221 #define _S9C2 0x02
1222 #define _SEG9COM2 0x02
1223 #define _S09C2 0x02
1224 #define _S10C2 0x04
1225 #define _SEG10COM2 0x04
1226 #define _S11C2 0x08
1227 #define _SEG11COM2 0x08
1228 #define _S12C2 0x10
1229 #define _SEG12COM2 0x10
1230 #define _S13C2 0x20
1231 #define _SEG13COM2 0x20
1232 #define _S14C2 0x40
1233 #define _SEG14COM2 0x40
1234 #define _S15C2 0x80
1235 #define _SEG15COM2 0x80
1237 //==============================================================================
1240 //==============================================================================
1241 // LCDDATA14 Bits
1243 extern __at(0x0F74) __sfr LCDDATA14;
1245 typedef union
1247 struct
1249 unsigned S16C2 : 1;
1250 unsigned S17C2 : 1;
1251 unsigned S18C2 : 1;
1252 unsigned S19C2 : 1;
1253 unsigned S20C2 : 1;
1254 unsigned S21C2 : 1;
1255 unsigned S22C2 : 1;
1256 unsigned S23C2 : 1;
1259 struct
1261 unsigned SEG16COM2 : 1;
1262 unsigned SEG17COM2 : 1;
1263 unsigned SEG18COM2 : 1;
1264 unsigned SEG19COM2 : 1;
1265 unsigned SEG20COM2 : 1;
1266 unsigned SEG21COM2 : 1;
1267 unsigned SEG22COM2 : 1;
1268 unsigned SEG23COM2 : 1;
1270 } __LCDDATA14bits_t;
1272 extern __at(0x0F74) volatile __LCDDATA14bits_t LCDDATA14bits;
1274 #define _S16C2 0x01
1275 #define _SEG16COM2 0x01
1276 #define _S17C2 0x02
1277 #define _SEG17COM2 0x02
1278 #define _S18C2 0x04
1279 #define _SEG18COM2 0x04
1280 #define _S19C2 0x08
1281 #define _SEG19COM2 0x08
1282 #define _S20C2 0x10
1283 #define _SEG20COM2 0x10
1284 #define _S21C2 0x20
1285 #define _SEG21COM2 0x20
1286 #define _S22C2 0x40
1287 #define _SEG22COM2 0x40
1288 #define _S23C2 0x80
1289 #define _SEG23COM2 0x80
1291 //==============================================================================
1294 //==============================================================================
1295 // LCDDATA15 Bits
1297 extern __at(0x0F75) __sfr LCDDATA15;
1299 typedef union
1301 struct
1303 unsigned S24C2 : 1;
1304 unsigned S25C2 : 1;
1305 unsigned S26C2 : 1;
1306 unsigned S27C2 : 1;
1307 unsigned S28C2 : 1;
1308 unsigned S29C2 : 1;
1309 unsigned S30C2 : 1;
1310 unsigned S31C2 : 1;
1313 struct
1315 unsigned SEG24COM2 : 1;
1316 unsigned SEG25COM2 : 1;
1317 unsigned SEG26COM2 : 1;
1318 unsigned SEG27COM2 : 1;
1319 unsigned SEG28COM2 : 1;
1320 unsigned SEG29COM2 : 1;
1321 unsigned SEG30COM2 : 1;
1322 unsigned SEG31COM2 : 1;
1324 } __LCDDATA15bits_t;
1326 extern __at(0x0F75) volatile __LCDDATA15bits_t LCDDATA15bits;
1328 #define _S24C2 0x01
1329 #define _SEG24COM2 0x01
1330 #define _S25C2 0x02
1331 #define _SEG25COM2 0x02
1332 #define _S26C2 0x04
1333 #define _SEG26COM2 0x04
1334 #define _S27C2 0x08
1335 #define _SEG27COM2 0x08
1336 #define _S28C2 0x10
1337 #define _SEG28COM2 0x10
1338 #define _S29C2 0x20
1339 #define _SEG29COM2 0x20
1340 #define _S30C2 0x40
1341 #define _SEG30COM2 0x40
1342 #define _S31C2 0x80
1343 #define _SEG31COM2 0x80
1345 //==============================================================================
1348 //==============================================================================
1349 // LCDDATA16 Bits
1351 extern __at(0x0F76) __sfr LCDDATA16;
1353 typedef union
1355 struct
1357 unsigned S32C2 : 1;
1358 unsigned : 1;
1359 unsigned : 1;
1360 unsigned : 1;
1361 unsigned : 1;
1362 unsigned : 1;
1363 unsigned : 1;
1364 unsigned : 1;
1367 struct
1369 unsigned SEG32COM2 : 1;
1370 unsigned : 1;
1371 unsigned : 1;
1372 unsigned : 1;
1373 unsigned : 1;
1374 unsigned : 1;
1375 unsigned : 1;
1376 unsigned : 1;
1378 } __LCDDATA16bits_t;
1380 extern __at(0x0F76) volatile __LCDDATA16bits_t LCDDATA16bits;
1382 #define _S32C2 0x01
1383 #define _SEG32COM2 0x01
1385 //==============================================================================
1388 //==============================================================================
1389 // LCDDATA18 Bits
1391 extern __at(0x0F78) __sfr LCDDATA18;
1393 typedef union
1395 struct
1397 unsigned S00C3 : 1;
1398 unsigned S01C3 : 1;
1399 unsigned S02C3 : 1;
1400 unsigned S03C3 : 1;
1401 unsigned S04C3 : 1;
1402 unsigned S05C3 : 1;
1403 unsigned S06C3 : 1;
1404 unsigned S07C3 : 1;
1407 struct
1409 unsigned SEG00COM3 : 1;
1410 unsigned SEG01COM3 : 1;
1411 unsigned SEG02COM3 : 1;
1412 unsigned SEG03COM3 : 1;
1413 unsigned SEG04COM3 : 1;
1414 unsigned SEG05COM3 : 1;
1415 unsigned SEG06COM3 : 1;
1416 unsigned SEG07COM3 : 1;
1419 struct
1421 unsigned S0C3 : 1;
1422 unsigned S1C3 : 1;
1423 unsigned S2C3 : 1;
1424 unsigned S3C3 : 1;
1425 unsigned S4C3 : 1;
1426 unsigned S5C3 : 1;
1427 unsigned S6C3 : 1;
1428 unsigned S7C3 : 1;
1430 } __LCDDATA18bits_t;
1432 extern __at(0x0F78) volatile __LCDDATA18bits_t LCDDATA18bits;
1434 #define _S00C3 0x01
1435 #define _SEG00COM3 0x01
1436 #define _S0C3 0x01
1437 #define _S01C3 0x02
1438 #define _SEG01COM3 0x02
1439 #define _S1C3 0x02
1440 #define _S02C3 0x04
1441 #define _SEG02COM3 0x04
1442 #define _S2C3 0x04
1443 #define _S03C3 0x08
1444 #define _SEG03COM3 0x08
1445 #define _S3C3 0x08
1446 #define _S04C3 0x10
1447 #define _SEG04COM3 0x10
1448 #define _S4C3 0x10
1449 #define _S05C3 0x20
1450 #define _SEG05COM3 0x20
1451 #define _S5C3 0x20
1452 #define _S06C3 0x40
1453 #define _SEG06COM3 0x40
1454 #define _S6C3 0x40
1455 #define _S07C3 0x80
1456 #define _SEG07COM3 0x80
1457 #define _S7C3 0x80
1459 //==============================================================================
1462 //==============================================================================
1463 // LCDDATA19 Bits
1465 extern __at(0x0F79) __sfr LCDDATA19;
1467 typedef union
1469 struct
1471 unsigned S8C3 : 1;
1472 unsigned S9C3 : 1;
1473 unsigned S10C3 : 1;
1474 unsigned S11C3 : 1;
1475 unsigned S12C3 : 1;
1476 unsigned S13C3 : 1;
1477 unsigned S14C3 : 1;
1478 unsigned S15C3 : 1;
1481 struct
1483 unsigned SEG8COM3 : 1;
1484 unsigned SEG9COM3 : 1;
1485 unsigned SEG10COM3 : 1;
1486 unsigned SEG11COM3 : 1;
1487 unsigned SEG12COM3 : 1;
1488 unsigned SEG13COM3 : 1;
1489 unsigned SEG14COM3 : 1;
1490 unsigned SEG15COM3 : 1;
1493 struct
1495 unsigned S08C3 : 1;
1496 unsigned S09C3 : 1;
1497 unsigned : 1;
1498 unsigned : 1;
1499 unsigned : 1;
1500 unsigned : 1;
1501 unsigned : 1;
1502 unsigned : 1;
1504 } __LCDDATA19bits_t;
1506 extern __at(0x0F79) volatile __LCDDATA19bits_t LCDDATA19bits;
1508 #define _S8C3 0x01
1509 #define _SEG8COM3 0x01
1510 #define _S08C3 0x01
1511 #define _S9C3 0x02
1512 #define _SEG9COM3 0x02
1513 #define _S09C3 0x02
1514 #define _S10C3 0x04
1515 #define _SEG10COM3 0x04
1516 #define _S11C3 0x08
1517 #define _SEG11COM3 0x08
1518 #define _S12C3 0x10
1519 #define _SEG12COM3 0x10
1520 #define _S13C3 0x20
1521 #define _SEG13COM3 0x20
1522 #define _S14C3 0x40
1523 #define _SEG14COM3 0x40
1524 #define _S15C3 0x80
1525 #define _SEG15COM3 0x80
1527 //==============================================================================
1530 //==============================================================================
1531 // LCDDATA20 Bits
1533 extern __at(0x0F7A) __sfr LCDDATA20;
1535 typedef union
1537 struct
1539 unsigned S16C3 : 1;
1540 unsigned S17C3 : 1;
1541 unsigned S18C3 : 1;
1542 unsigned S19C3 : 1;
1543 unsigned S20C3 : 1;
1544 unsigned S21C3 : 1;
1545 unsigned S22C3 : 1;
1546 unsigned S23C3 : 1;
1549 struct
1551 unsigned SEG16COM3 : 1;
1552 unsigned SEG17COM3 : 1;
1553 unsigned SEG18COM3 : 1;
1554 unsigned SEG19COM3 : 1;
1555 unsigned SEG20COM3 : 1;
1556 unsigned SEG21COM3 : 1;
1557 unsigned SEG22COM3 : 1;
1558 unsigned SEG23COM3 : 1;
1560 } __LCDDATA20bits_t;
1562 extern __at(0x0F7A) volatile __LCDDATA20bits_t LCDDATA20bits;
1564 #define _S16C3 0x01
1565 #define _SEG16COM3 0x01
1566 #define _S17C3 0x02
1567 #define _SEG17COM3 0x02
1568 #define _S18C3 0x04
1569 #define _SEG18COM3 0x04
1570 #define _S19C3 0x08
1571 #define _SEG19COM3 0x08
1572 #define _S20C3 0x10
1573 #define _SEG20COM3 0x10
1574 #define _S21C3 0x20
1575 #define _SEG21COM3 0x20
1576 #define _S22C3 0x40
1577 #define _SEG22COM3 0x40
1578 #define _S23C3 0x80
1579 #define _SEG23COM3 0x80
1581 //==============================================================================
1584 //==============================================================================
1585 // LCDDATA21 Bits
1587 extern __at(0x0F7B) __sfr LCDDATA21;
1589 typedef union
1591 struct
1593 unsigned S24C3 : 1;
1594 unsigned S25C3 : 1;
1595 unsigned S26C3 : 1;
1596 unsigned S27C3 : 1;
1597 unsigned S28C3 : 1;
1598 unsigned S29C3 : 1;
1599 unsigned S30C3 : 1;
1600 unsigned S31C3 : 1;
1603 struct
1605 unsigned SEG24COM3 : 1;
1606 unsigned SEG25COM3 : 1;
1607 unsigned SEG26COM3 : 1;
1608 unsigned SEG27COM3 : 1;
1609 unsigned SEG28COM3 : 1;
1610 unsigned SEG29COM3 : 1;
1611 unsigned SEG30COM3 : 1;
1612 unsigned SEG31COM3 : 1;
1614 } __LCDDATA21bits_t;
1616 extern __at(0x0F7B) volatile __LCDDATA21bits_t LCDDATA21bits;
1618 #define _S24C3 0x01
1619 #define _SEG24COM3 0x01
1620 #define _S25C3 0x02
1621 #define _SEG25COM3 0x02
1622 #define _S26C3 0x04
1623 #define _SEG26COM3 0x04
1624 #define _S27C3 0x08
1625 #define _SEG27COM3 0x08
1626 #define _S28C3 0x10
1627 #define _SEG28COM3 0x10
1628 #define _S29C3 0x20
1629 #define _SEG29COM3 0x20
1630 #define _S30C3 0x40
1631 #define _SEG30COM3 0x40
1632 #define _S31C3 0x80
1633 #define _SEG31COM3 0x80
1635 //==============================================================================
1638 //==============================================================================
1639 // LCDDATA22 Bits
1641 extern __at(0x0F7C) __sfr LCDDATA22;
1643 typedef union
1645 struct
1647 unsigned S32C3 : 1;
1648 unsigned : 1;
1649 unsigned : 1;
1650 unsigned : 1;
1651 unsigned : 1;
1652 unsigned : 1;
1653 unsigned : 1;
1654 unsigned : 1;
1657 struct
1659 unsigned SEG32COM3 : 1;
1660 unsigned : 1;
1661 unsigned : 1;
1662 unsigned : 1;
1663 unsigned : 1;
1664 unsigned : 1;
1665 unsigned : 1;
1666 unsigned : 1;
1668 } __LCDDATA22bits_t;
1670 extern __at(0x0F7C) volatile __LCDDATA22bits_t LCDDATA22bits;
1672 #define _S32C3 0x01
1673 #define _SEG32COM3 0x01
1675 //==============================================================================
1678 //==============================================================================
1679 // BAUDCON Bits
1681 extern __at(0x0F7E) __sfr BAUDCON;
1683 typedef union
1685 struct
1687 unsigned ABDEN : 1;
1688 unsigned WUE : 1;
1689 unsigned : 1;
1690 unsigned BRG16 : 1;
1691 unsigned TXCKP : 1;
1692 unsigned RXDTP : 1;
1693 unsigned RCMT : 1;
1694 unsigned ABDOVF : 1;
1697 struct
1699 unsigned : 1;
1700 unsigned : 1;
1701 unsigned : 1;
1702 unsigned : 1;
1703 unsigned : 1;
1704 unsigned : 1;
1705 unsigned RCIDL : 1;
1706 unsigned : 1;
1708 } __BAUDCONbits_t;
1710 extern __at(0x0F7E) volatile __BAUDCONbits_t BAUDCONbits;
1712 #define _ABDEN 0x01
1713 #define _WUE 0x02
1714 #define _BRG16 0x08
1715 #define _TXCKP 0x10
1716 #define _RXDTP 0x20
1717 #define _RCMT 0x40
1718 #define _RCIDL 0x40
1719 #define _ABDOVF 0x80
1721 //==============================================================================
1724 //==============================================================================
1725 // BAUDCON1 Bits
1727 extern __at(0x0F7E) __sfr BAUDCON1;
1729 typedef union
1731 struct
1733 unsigned ABDEN : 1;
1734 unsigned WUE : 1;
1735 unsigned : 1;
1736 unsigned BRG16 : 1;
1737 unsigned TXCKP : 1;
1738 unsigned RXDTP : 1;
1739 unsigned RCMT : 1;
1740 unsigned ABDOVF : 1;
1743 struct
1745 unsigned : 1;
1746 unsigned : 1;
1747 unsigned : 1;
1748 unsigned : 1;
1749 unsigned : 1;
1750 unsigned : 1;
1751 unsigned RCIDL : 1;
1752 unsigned : 1;
1754 } __BAUDCON1bits_t;
1756 extern __at(0x0F7E) volatile __BAUDCON1bits_t BAUDCON1bits;
1758 #define _BAUDCON1_ABDEN 0x01
1759 #define _BAUDCON1_WUE 0x02
1760 #define _BAUDCON1_BRG16 0x08
1761 #define _BAUDCON1_TXCKP 0x10
1762 #define _BAUDCON1_RXDTP 0x20
1763 #define _BAUDCON1_RCMT 0x40
1764 #define _BAUDCON1_RCIDL 0x40
1765 #define _BAUDCON1_ABDOVF 0x80
1767 //==============================================================================
1769 extern __at(0x0F7F) __sfr SPBRGH;
1770 extern __at(0x0F7F) __sfr SPBRGH1;
1772 //==============================================================================
1773 // PORTA Bits
1775 extern __at(0x0F80) __sfr PORTA;
1777 typedef union
1779 struct
1781 unsigned RA0 : 1;
1782 unsigned RA1 : 1;
1783 unsigned RA2 : 1;
1784 unsigned RA3 : 1;
1785 unsigned RA4 : 1;
1786 unsigned RA5 : 1;
1787 unsigned RA6 : 1;
1788 unsigned RA7 : 1;
1791 struct
1793 unsigned AN0 : 1;
1794 unsigned AN1 : 1;
1795 unsigned AN2 : 1;
1796 unsigned AN3 : 1;
1797 unsigned TOCKI : 1;
1798 unsigned AN4 : 1;
1799 unsigned OSC2 : 1;
1800 unsigned OSC1 : 1;
1803 struct
1805 unsigned : 1;
1806 unsigned SEG18 : 1;
1807 unsigned VREFM : 1;
1808 unsigned VREFP : 1;
1809 unsigned SEG14 : 1;
1810 unsigned SEG15 : 1;
1811 unsigned CLKO : 1;
1812 unsigned CLKI : 1;
1814 } __PORTAbits_t;
1816 extern __at(0x0F80) volatile __PORTAbits_t PORTAbits;
1818 #define _RA0 0x01
1819 #define _AN0 0x01
1820 #define _RA1 0x02
1821 #define _AN1 0x02
1822 #define _SEG18 0x02
1823 #define _RA2 0x04
1824 #define _AN2 0x04
1825 #define _VREFM 0x04
1826 #define _RA3 0x08
1827 #define _AN3 0x08
1828 #define _VREFP 0x08
1829 #define _RA4 0x10
1830 #define _TOCKI 0x10
1831 #define _SEG14 0x10
1832 #define _RA5 0x20
1833 #define _AN4 0x20
1834 #define _SEG15 0x20
1835 #define _RA6 0x40
1836 #define _OSC2 0x40
1837 #define _CLKO 0x40
1838 #define _RA7 0x80
1839 #define _OSC1 0x80
1840 #define _CLKI 0x80
1842 //==============================================================================
1845 //==============================================================================
1846 // PORTB Bits
1848 extern __at(0x0F81) __sfr PORTB;
1850 typedef union
1852 struct
1854 unsigned RB0 : 1;
1855 unsigned RB1 : 1;
1856 unsigned RB2 : 1;
1857 unsigned RB3 : 1;
1858 unsigned RB4 : 1;
1859 unsigned RB5 : 1;
1860 unsigned RB6 : 1;
1861 unsigned RB7 : 1;
1864 struct
1866 unsigned INT0 : 1;
1867 unsigned INT1 : 1;
1868 unsigned INT2 : 1;
1869 unsigned INT3 : 1;
1870 unsigned KBI0 : 1;
1871 unsigned KBI1 : 1;
1872 unsigned KBI2 : 1;
1873 unsigned KBI3 : 1;
1876 struct
1878 unsigned SEG30 : 1;
1879 unsigned SEG8 : 1;
1880 unsigned SEG9 : 1;
1881 unsigned SEG10 : 1;
1882 unsigned SEG11 : 1;
1883 unsigned SEG29 : 1;
1884 unsigned PGC : 1;
1885 unsigned PGD : 1;
1888 struct
1890 unsigned : 1;
1891 unsigned : 1;
1892 unsigned CTED1 : 1;
1893 unsigned CTED2 : 1;
1894 unsigned : 1;
1895 unsigned : 1;
1896 unsigned : 1;
1897 unsigned : 1;
1900 struct
1902 unsigned INT : 4;
1903 unsigned : 4;
1906 struct
1908 unsigned : 4;
1909 unsigned KBI : 4;
1911 } __PORTBbits_t;
1913 extern __at(0x0F81) volatile __PORTBbits_t PORTBbits;
1915 #define _RB0 0x01
1916 #define _INT0 0x01
1917 #define _SEG30 0x01
1918 #define _RB1 0x02
1919 #define _INT1 0x02
1920 #define _SEG8 0x02
1921 #define _RB2 0x04
1922 #define _INT2 0x04
1923 #define _SEG9 0x04
1924 #define _CTED1 0x04
1925 #define _RB3 0x08
1926 #define _INT3 0x08
1927 #define _SEG10 0x08
1928 #define _CTED2 0x08
1929 #define _RB4 0x10
1930 #define _KBI0 0x10
1931 #define _SEG11 0x10
1932 #define _RB5 0x20
1933 #define _KBI1 0x20
1934 #define _SEG29 0x20
1935 #define _RB6 0x40
1936 #define _KBI2 0x40
1937 #define _PGC 0x40
1938 #define _RB7 0x80
1939 #define _KBI3 0x80
1940 #define _PGD 0x80
1942 //==============================================================================
1945 //==============================================================================
1946 // PORTC Bits
1948 extern __at(0x0F82) __sfr PORTC;
1950 typedef union
1952 struct
1954 unsigned RC0 : 1;
1955 unsigned RC1 : 1;
1956 unsigned RC2 : 1;
1957 unsigned RC3 : 1;
1958 unsigned RC4 : 1;
1959 unsigned RC5 : 1;
1960 unsigned RC6 : 1;
1961 unsigned RC7 : 1;
1964 struct
1966 unsigned T1OSO : 1;
1967 unsigned T1OSI : 1;
1968 unsigned CCP1 : 1;
1969 unsigned SCL : 1;
1970 unsigned SDA : 1;
1971 unsigned SDO : 1;
1972 unsigned CK1 : 1;
1973 unsigned DT1 : 1;
1976 struct
1978 unsigned T13CKI : 1;
1979 unsigned CCP2 : 1;
1980 unsigned SEG13 : 1;
1981 unsigned SCK : 1;
1982 unsigned SDI : 1;
1983 unsigned SEG12 : 1;
1984 unsigned TX1 : 1;
1985 unsigned RX1 : 1;
1988 struct
1990 unsigned : 1;
1991 unsigned SEG32 : 1;
1992 unsigned : 1;
1993 unsigned SEG17 : 1;
1994 unsigned SEG16 : 1;
1995 unsigned : 1;
1996 unsigned SEG27 : 1;
1997 unsigned SEG28 : 1;
1999 } __PORTCbits_t;
2001 extern __at(0x0F82) volatile __PORTCbits_t PORTCbits;
2003 #define _RC0 0x01
2004 #define _T1OSO 0x01
2005 #define _T13CKI 0x01
2006 #define _RC1 0x02
2007 #define _T1OSI 0x02
2008 #define _CCP2 0x02
2009 #define _SEG32 0x02
2010 #define _RC2 0x04
2011 #define _CCP1 0x04
2012 #define _SEG13 0x04
2013 #define _RC3 0x08
2014 #define _SCL 0x08
2015 #define _SCK 0x08
2016 #define _SEG17 0x08
2017 #define _RC4 0x10
2018 #define _SDA 0x10
2019 #define _SDI 0x10
2020 #define _SEG16 0x10
2021 #define _RC5 0x20
2022 #define _SDO 0x20
2023 #define _SEG12 0x20
2024 #define _RC6 0x40
2025 #define _CK1 0x40
2026 #define _TX1 0x40
2027 #define _SEG27 0x40
2028 #define _RC7 0x80
2029 #define _DT1 0x80
2030 #define _RX1 0x80
2031 #define _SEG28 0x80
2033 //==============================================================================
2036 //==============================================================================
2037 // PORTD Bits
2039 extern __at(0x0F83) __sfr PORTD;
2041 typedef union
2043 struct
2045 unsigned RD0 : 1;
2046 unsigned RD1 : 1;
2047 unsigned RD2 : 1;
2048 unsigned RD3 : 1;
2049 unsigned RD4 : 1;
2050 unsigned RD5 : 1;
2051 unsigned RD6 : 1;
2052 unsigned RD7 : 1;
2055 struct
2057 unsigned SEG0 : 1;
2058 unsigned SEG1 : 1;
2059 unsigned SEG2 : 1;
2060 unsigned SEG3 : 1;
2061 unsigned SEG4 : 1;
2062 unsigned SEG5 : 1;
2063 unsigned SEG6 : 1;
2064 unsigned SEG7 : 1;
2067 struct
2069 unsigned CTPLS : 1;
2070 unsigned : 1;
2071 unsigned : 1;
2072 unsigned : 1;
2073 unsigned : 1;
2074 unsigned : 1;
2075 unsigned : 1;
2076 unsigned : 1;
2078 } __PORTDbits_t;
2080 extern __at(0x0F83) volatile __PORTDbits_t PORTDbits;
2082 #define _RD0 0x01
2083 #define _SEG0 0x01
2084 #define _CTPLS 0x01
2085 #define _RD1 0x02
2086 #define _SEG1 0x02
2087 #define _RD2 0x04
2088 #define _SEG2 0x04
2089 #define _RD3 0x08
2090 #define _SEG3 0x08
2091 #define _RD4 0x10
2092 #define _SEG4 0x10
2093 #define _RD5 0x20
2094 #define _SEG5 0x20
2095 #define _RD6 0x40
2096 #define _SEG6 0x40
2097 #define _RD7 0x80
2098 #define _SEG7 0x80
2100 //==============================================================================
2103 //==============================================================================
2104 // PORTE Bits
2106 extern __at(0x0F84) __sfr PORTE;
2108 typedef union
2110 struct
2112 unsigned RE0 : 1;
2113 unsigned RE1 : 1;
2114 unsigned : 1;
2115 unsigned RE3 : 1;
2116 unsigned RE4 : 1;
2117 unsigned RE5 : 1;
2118 unsigned RE6 : 1;
2119 unsigned RE7 : 1;
2122 struct
2124 unsigned LCDBIAS1 : 1;
2125 unsigned LCDBIAS2 : 1;
2126 unsigned : 1;
2127 unsigned COM0 : 1;
2128 unsigned COM1 : 1;
2129 unsigned COM2 : 1;
2130 unsigned COM3 : 1;
2131 unsigned CCP2 : 1;
2134 struct
2136 unsigned : 1;
2137 unsigned : 1;
2138 unsigned : 1;
2139 unsigned : 1;
2140 unsigned : 1;
2141 unsigned : 1;
2142 unsigned : 1;
2143 unsigned SEG31 : 1;
2146 struct
2148 unsigned : 3;
2149 unsigned COM : 4;
2150 unsigned : 1;
2152 } __PORTEbits_t;
2154 extern __at(0x0F84) volatile __PORTEbits_t PORTEbits;
2156 #define _PORTE_RE0 0x01
2157 #define _PORTE_LCDBIAS1 0x01
2158 #define _PORTE_RE1 0x02
2159 #define _PORTE_LCDBIAS2 0x02
2160 #define _PORTE_RE3 0x08
2161 #define _PORTE_COM0 0x08
2162 #define _PORTE_RE4 0x10
2163 #define _PORTE_COM1 0x10
2164 #define _PORTE_RE5 0x20
2165 #define _PORTE_COM2 0x20
2166 #define _PORTE_RE6 0x40
2167 #define _PORTE_COM3 0x40
2168 #define _PORTE_RE7 0x80
2169 #define _PORTE_CCP2 0x80
2170 #define _PORTE_SEG31 0x80
2172 //==============================================================================
2175 //==============================================================================
2176 // PORTF Bits
2178 extern __at(0x0F85) __sfr PORTF;
2180 typedef union
2182 struct
2184 unsigned : 1;
2185 unsigned RF1 : 1;
2186 unsigned RF2 : 1;
2187 unsigned RF3 : 1;
2188 unsigned RF4 : 1;
2189 unsigned RF5 : 1;
2190 unsigned RF6 : 1;
2191 unsigned RF7 : 1;
2194 struct
2196 unsigned : 1;
2197 unsigned AN6 : 1;
2198 unsigned AN7 : 1;
2199 unsigned AN8 : 1;
2200 unsigned AN9 : 1;
2201 unsigned AN10 : 1;
2202 unsigned AN11 : 1;
2203 unsigned AN5 : 1;
2206 struct
2208 unsigned : 1;
2209 unsigned C2OUT : 1;
2210 unsigned C1OUT : 1;
2211 unsigned C2INB : 1;
2212 unsigned C2INA : 1;
2213 unsigned C1INB : 1;
2214 unsigned C1INA : 1;
2215 unsigned SS1 : 1;
2218 struct
2220 unsigned : 1;
2221 unsigned SEG19 : 1;
2222 unsigned SEG20 : 1;
2223 unsigned SEG21 : 1;
2224 unsigned SEG22 : 1;
2225 unsigned SEG23 : 1;
2226 unsigned SEG24 : 1;
2227 unsigned SEG25 : 1;
2230 struct
2232 unsigned : 1;
2233 unsigned C1OUTF : 1;
2234 unsigned C2OUTF : 1;
2235 unsigned : 1;
2236 unsigned : 1;
2237 unsigned CVREF : 1;
2238 unsigned : 1;
2239 unsigned : 1;
2241 } __PORTFbits_t;
2243 extern __at(0x0F85) volatile __PORTFbits_t PORTFbits;
2245 #define _PORTF_RF1 0x02
2246 #define _PORTF_AN6 0x02
2247 #define _PORTF_C2OUT 0x02
2248 #define _PORTF_SEG19 0x02
2249 #define _PORTF_C1OUTF 0x02
2250 #define _PORTF_RF2 0x04
2251 #define _PORTF_AN7 0x04
2252 #define _PORTF_C1OUT 0x04
2253 #define _PORTF_SEG20 0x04
2254 #define _PORTF_C2OUTF 0x04
2255 #define _PORTF_RF3 0x08
2256 #define _PORTF_AN8 0x08
2257 #define _PORTF_C2INB 0x08
2258 #define _PORTF_SEG21 0x08
2259 #define _PORTF_RF4 0x10
2260 #define _PORTF_AN9 0x10
2261 #define _PORTF_C2INA 0x10
2262 #define _PORTF_SEG22 0x10
2263 #define _PORTF_RF5 0x20
2264 #define _PORTF_AN10 0x20
2265 #define _PORTF_C1INB 0x20
2266 #define _PORTF_SEG23 0x20
2267 #define _PORTF_CVREF 0x20
2268 #define _PORTF_RF6 0x40
2269 #define _PORTF_AN11 0x40
2270 #define _PORTF_C1INA 0x40
2271 #define _PORTF_SEG24 0x40
2272 #define _PORTF_RF7 0x80
2273 #define _PORTF_AN5 0x80
2274 #define _PORTF_SS1 0x80
2275 #define _PORTF_SEG25 0x80
2277 //==============================================================================
2280 //==============================================================================
2281 // PORTG Bits
2283 extern __at(0x0F86) __sfr PORTG;
2285 typedef union
2287 struct
2289 unsigned RG0 : 1;
2290 unsigned RG1 : 1;
2291 unsigned RG2 : 1;
2292 unsigned RG3 : 1;
2293 unsigned RG4 : 1;
2294 unsigned RJPU : 1;
2295 unsigned REPU : 1;
2296 unsigned RDPU : 1;
2299 struct
2301 unsigned LCDBIAS0 : 1;
2302 unsigned CK2 : 1;
2303 unsigned DT2 : 1;
2304 unsigned VLCAP2 : 1;
2305 unsigned SEG26 : 1;
2306 unsigned : 1;
2307 unsigned : 1;
2308 unsigned : 1;
2311 struct
2313 unsigned : 1;
2314 unsigned TX2 : 1;
2315 unsigned RX2 : 1;
2316 unsigned : 1;
2317 unsigned RTCC : 1;
2318 unsigned : 1;
2319 unsigned : 1;
2320 unsigned : 1;
2323 struct
2325 unsigned : 1;
2326 unsigned : 1;
2327 unsigned VLCAP1 : 1;
2328 unsigned : 1;
2329 unsigned : 1;
2330 unsigned : 1;
2331 unsigned : 1;
2332 unsigned : 1;
2335 struct
2337 unsigned RG : 5;
2338 unsigned : 3;
2340 } __PORTGbits_t;
2342 extern __at(0x0F86) volatile __PORTGbits_t PORTGbits;
2344 #define _RG0 0x01
2345 #define _LCDBIAS0 0x01
2346 #define _RG1 0x02
2347 #define _CK2 0x02
2348 #define _TX2 0x02
2349 #define _RG2 0x04
2350 #define _DT2 0x04
2351 #define _RX2 0x04
2352 #define _VLCAP1 0x04
2353 #define _RG3 0x08
2354 #define _VLCAP2 0x08
2355 #define _RG4 0x10
2356 #define _SEG26 0x10
2357 #define _RTCC 0x10
2358 #define _RJPU 0x20
2359 #define _REPU 0x40
2360 #define _RDPU 0x80
2362 //==============================================================================
2365 //==============================================================================
2366 // LATA Bits
2368 extern __at(0x0F89) __sfr LATA;
2370 typedef struct
2372 unsigned LATA0 : 1;
2373 unsigned LATA1 : 1;
2374 unsigned LATA2 : 1;
2375 unsigned LATA3 : 1;
2376 unsigned LATA4 : 1;
2377 unsigned LATA5 : 1;
2378 unsigned LATA6 : 1;
2379 unsigned LATA7 : 1;
2380 } __LATAbits_t;
2382 extern __at(0x0F89) volatile __LATAbits_t LATAbits;
2384 #define _LATA0 0x01
2385 #define _LATA1 0x02
2386 #define _LATA2 0x04
2387 #define _LATA3 0x08
2388 #define _LATA4 0x10
2389 #define _LATA5 0x20
2390 #define _LATA6 0x40
2391 #define _LATA7 0x80
2393 //==============================================================================
2396 //==============================================================================
2397 // LATB Bits
2399 extern __at(0x0F8A) __sfr LATB;
2401 typedef struct
2403 unsigned LATB0 : 1;
2404 unsigned LATB1 : 1;
2405 unsigned LATB2 : 1;
2406 unsigned LATB3 : 1;
2407 unsigned LATB4 : 1;
2408 unsigned LATB5 : 1;
2409 unsigned LATB6 : 1;
2410 unsigned LATB7 : 1;
2411 } __LATBbits_t;
2413 extern __at(0x0F8A) volatile __LATBbits_t LATBbits;
2415 #define _LATB0 0x01
2416 #define _LATB1 0x02
2417 #define _LATB2 0x04
2418 #define _LATB3 0x08
2419 #define _LATB4 0x10
2420 #define _LATB5 0x20
2421 #define _LATB6 0x40
2422 #define _LATB7 0x80
2424 //==============================================================================
2427 //==============================================================================
2428 // LATC Bits
2430 extern __at(0x0F8B) __sfr LATC;
2432 typedef struct
2434 unsigned LATC0 : 1;
2435 unsigned LATC1 : 1;
2436 unsigned LATC2 : 1;
2437 unsigned LATC3 : 1;
2438 unsigned LATC4 : 1;
2439 unsigned LATC5 : 1;
2440 unsigned LATC6 : 1;
2441 unsigned LATC7 : 1;
2442 } __LATCbits_t;
2444 extern __at(0x0F8B) volatile __LATCbits_t LATCbits;
2446 #define _LATC0 0x01
2447 #define _LATC1 0x02
2448 #define _LATC2 0x04
2449 #define _LATC3 0x08
2450 #define _LATC4 0x10
2451 #define _LATC5 0x20
2452 #define _LATC6 0x40
2453 #define _LATC7 0x80
2455 //==============================================================================
2458 //==============================================================================
2459 // LATD Bits
2461 extern __at(0x0F8C) __sfr LATD;
2463 typedef struct
2465 unsigned LATD0 : 1;
2466 unsigned LATD1 : 1;
2467 unsigned LATD2 : 1;
2468 unsigned LATD3 : 1;
2469 unsigned LATD4 : 1;
2470 unsigned LATD5 : 1;
2471 unsigned LATD6 : 1;
2472 unsigned LATD7 : 1;
2473 } __LATDbits_t;
2475 extern __at(0x0F8C) volatile __LATDbits_t LATDbits;
2477 #define _LATD0 0x01
2478 #define _LATD1 0x02
2479 #define _LATD2 0x04
2480 #define _LATD3 0x08
2481 #define _LATD4 0x10
2482 #define _LATD5 0x20
2483 #define _LATD6 0x40
2484 #define _LATD7 0x80
2486 //==============================================================================
2489 //==============================================================================
2490 // LATE Bits
2492 extern __at(0x0F8D) __sfr LATE;
2494 typedef struct
2496 unsigned LATE0 : 1;
2497 unsigned LATE1 : 1;
2498 unsigned : 1;
2499 unsigned LATE3 : 1;
2500 unsigned LATE4 : 1;
2501 unsigned LATE5 : 1;
2502 unsigned LATE6 : 1;
2503 unsigned LATE7 : 1;
2504 } __LATEbits_t;
2506 extern __at(0x0F8D) volatile __LATEbits_t LATEbits;
2508 #define _LATE0 0x01
2509 #define _LATE1 0x02
2510 #define _LATE3 0x08
2511 #define _LATE4 0x10
2512 #define _LATE5 0x20
2513 #define _LATE6 0x40
2514 #define _LATE7 0x80
2516 //==============================================================================
2519 //==============================================================================
2520 // LATF Bits
2522 extern __at(0x0F8E) __sfr LATF;
2524 typedef struct
2526 unsigned : 1;
2527 unsigned LATF1 : 1;
2528 unsigned LATF2 : 1;
2529 unsigned LATF3 : 1;
2530 unsigned LATF4 : 1;
2531 unsigned LATF5 : 1;
2532 unsigned LATF6 : 1;
2533 unsigned LATF7 : 1;
2534 } __LATFbits_t;
2536 extern __at(0x0F8E) volatile __LATFbits_t LATFbits;
2538 #define _LATF1 0x02
2539 #define _LATF2 0x04
2540 #define _LATF3 0x08
2541 #define _LATF4 0x10
2542 #define _LATF5 0x20
2543 #define _LATF6 0x40
2544 #define _LATF7 0x80
2546 //==============================================================================
2549 //==============================================================================
2550 // LATG Bits
2552 extern __at(0x0F8F) __sfr LATG;
2554 typedef union
2556 struct
2558 unsigned LATG0 : 1;
2559 unsigned LATG1 : 1;
2560 unsigned LATG2 : 1;
2561 unsigned LATG3 : 1;
2562 unsigned LATG4 : 1;
2563 unsigned : 1;
2564 unsigned U1OD : 1;
2565 unsigned U2OD : 1;
2568 struct
2570 unsigned LATG : 5;
2571 unsigned : 3;
2573 } __LATGbits_t;
2575 extern __at(0x0F8F) volatile __LATGbits_t LATGbits;
2577 #define _LATG0 0x01
2578 #define _LATG1 0x02
2579 #define _LATG2 0x04
2580 #define _LATG3 0x08
2581 #define _LATG4 0x10
2582 #define _U1OD 0x40
2583 #define _U2OD 0x80
2585 //==============================================================================
2588 //==============================================================================
2589 // TRISA Bits
2591 extern __at(0x0F92) __sfr TRISA;
2593 typedef struct
2595 unsigned TRISA0 : 1;
2596 unsigned TRISA1 : 1;
2597 unsigned TRISA2 : 1;
2598 unsigned TRISA3 : 1;
2599 unsigned TRISA4 : 1;
2600 unsigned TRISA5 : 1;
2601 unsigned TRISA6 : 1;
2602 unsigned TRISA7 : 1;
2603 } __TRISAbits_t;
2605 extern __at(0x0F92) volatile __TRISAbits_t TRISAbits;
2607 #define _TRISA0 0x01
2608 #define _TRISA1 0x02
2609 #define _TRISA2 0x04
2610 #define _TRISA3 0x08
2611 #define _TRISA4 0x10
2612 #define _TRISA5 0x20
2613 #define _TRISA6 0x40
2614 #define _TRISA7 0x80
2616 //==============================================================================
2619 //==============================================================================
2620 // TRISB Bits
2622 extern __at(0x0F93) __sfr TRISB;
2624 typedef struct
2626 unsigned TRISB0 : 1;
2627 unsigned TRISB1 : 1;
2628 unsigned TRISB2 : 1;
2629 unsigned TRISB3 : 1;
2630 unsigned TRISB4 : 1;
2631 unsigned TRISB5 : 1;
2632 unsigned TRISB6 : 1;
2633 unsigned TRISB7 : 1;
2634 } __TRISBbits_t;
2636 extern __at(0x0F93) volatile __TRISBbits_t TRISBbits;
2638 #define _TRISB0 0x01
2639 #define _TRISB1 0x02
2640 #define _TRISB2 0x04
2641 #define _TRISB3 0x08
2642 #define _TRISB4 0x10
2643 #define _TRISB5 0x20
2644 #define _TRISB6 0x40
2645 #define _TRISB7 0x80
2647 //==============================================================================
2650 //==============================================================================
2651 // TRISC Bits
2653 extern __at(0x0F94) __sfr TRISC;
2655 typedef struct
2657 unsigned TRISC0 : 1;
2658 unsigned TRISC1 : 1;
2659 unsigned TRISC2 : 1;
2660 unsigned TRISC3 : 1;
2661 unsigned TRISC4 : 1;
2662 unsigned TRISC5 : 1;
2663 unsigned TRISC6 : 1;
2664 unsigned TRISC7 : 1;
2665 } __TRISCbits_t;
2667 extern __at(0x0F94) volatile __TRISCbits_t TRISCbits;
2669 #define _TRISC0 0x01
2670 #define _TRISC1 0x02
2671 #define _TRISC2 0x04
2672 #define _TRISC3 0x08
2673 #define _TRISC4 0x10
2674 #define _TRISC5 0x20
2675 #define _TRISC6 0x40
2676 #define _TRISC7 0x80
2678 //==============================================================================
2681 //==============================================================================
2682 // TRISD Bits
2684 extern __at(0x0F95) __sfr TRISD;
2686 typedef struct
2688 unsigned TRISD0 : 1;
2689 unsigned TRISD1 : 1;
2690 unsigned TRISD2 : 1;
2691 unsigned TRISD3 : 1;
2692 unsigned TRISD4 : 1;
2693 unsigned TRISD5 : 1;
2694 unsigned TRISD6 : 1;
2695 unsigned TRISD7 : 1;
2696 } __TRISDbits_t;
2698 extern __at(0x0F95) volatile __TRISDbits_t TRISDbits;
2700 #define _TRISD0 0x01
2701 #define _TRISD1 0x02
2702 #define _TRISD2 0x04
2703 #define _TRISD3 0x08
2704 #define _TRISD4 0x10
2705 #define _TRISD5 0x20
2706 #define _TRISD6 0x40
2707 #define _TRISD7 0x80
2709 //==============================================================================
2712 //==============================================================================
2713 // TRISE Bits
2715 extern __at(0x0F96) __sfr TRISE;
2717 typedef struct
2719 unsigned TRISE0 : 1;
2720 unsigned TRISE1 : 1;
2721 unsigned : 1;
2722 unsigned TRISE3 : 1;
2723 unsigned TRISE4 : 1;
2724 unsigned TRISE5 : 1;
2725 unsigned TRISE6 : 1;
2726 unsigned TRISE7 : 1;
2727 } __TRISEbits_t;
2729 extern __at(0x0F96) volatile __TRISEbits_t TRISEbits;
2731 #define _TRISE0 0x01
2732 #define _TRISE1 0x02
2733 #define _TRISE3 0x08
2734 #define _TRISE4 0x10
2735 #define _TRISE5 0x20
2736 #define _TRISE6 0x40
2737 #define _TRISE7 0x80
2739 //==============================================================================
2742 //==============================================================================
2743 // TRISF Bits
2745 extern __at(0x0F97) __sfr TRISF;
2747 typedef struct
2749 unsigned : 1;
2750 unsigned TRISF1 : 1;
2751 unsigned TRISF2 : 1;
2752 unsigned TRISF3 : 1;
2753 unsigned TRISF4 : 1;
2754 unsigned TRISF5 : 1;
2755 unsigned TRISF6 : 1;
2756 unsigned TRISF7 : 1;
2757 } __TRISFbits_t;
2759 extern __at(0x0F97) volatile __TRISFbits_t TRISFbits;
2761 #define _TRISF1 0x02
2762 #define _TRISF2 0x04
2763 #define _TRISF3 0x08
2764 #define _TRISF4 0x10
2765 #define _TRISF5 0x20
2766 #define _TRISF6 0x40
2767 #define _TRISF7 0x80
2769 //==============================================================================
2772 //==============================================================================
2773 // TRISG Bits
2775 extern __at(0x0F98) __sfr TRISG;
2777 typedef union
2779 struct
2781 unsigned TRISG0 : 1;
2782 unsigned TRISG1 : 1;
2783 unsigned TRISG2 : 1;
2784 unsigned TRISG3 : 1;
2785 unsigned TRISG4 : 1;
2786 unsigned CCP1OD : 1;
2787 unsigned CCP2OD : 1;
2788 unsigned SPIOD : 1;
2791 struct
2793 unsigned TRISG : 5;
2794 unsigned : 3;
2796 } __TRISGbits_t;
2798 extern __at(0x0F98) volatile __TRISGbits_t TRISGbits;
2800 #define _TRISG0 0x01
2801 #define _TRISG1 0x02
2802 #define _TRISG2 0x04
2803 #define _TRISG3 0x08
2804 #define _TRISG4 0x10
2805 #define _CCP1OD 0x20
2806 #define _CCP2OD 0x40
2807 #define _SPIOD 0x80
2809 //==============================================================================
2812 //==============================================================================
2813 // OSCTUNE Bits
2815 extern __at(0x0F9B) __sfr OSCTUNE;
2817 typedef union
2819 struct
2821 unsigned TUN0 : 1;
2822 unsigned TUN1 : 1;
2823 unsigned TUN2 : 1;
2824 unsigned TUN3 : 1;
2825 unsigned TUN4 : 1;
2826 unsigned TUN5 : 1;
2827 unsigned PLLEN : 1;
2828 unsigned INTSRC : 1;
2831 struct
2833 unsigned TUN : 6;
2834 unsigned : 2;
2836 } __OSCTUNEbits_t;
2838 extern __at(0x0F9B) volatile __OSCTUNEbits_t OSCTUNEbits;
2840 #define _TUN0 0x01
2841 #define _TUN1 0x02
2842 #define _TUN2 0x04
2843 #define _TUN3 0x08
2844 #define _TUN4 0x10
2845 #define _TUN5 0x20
2846 #define _PLLEN 0x40
2847 #define _INTSRC 0x80
2849 //==============================================================================
2852 //==============================================================================
2853 // PIE1 Bits
2855 extern __at(0x0F9D) __sfr PIE1;
2857 typedef union
2859 struct
2861 unsigned TMR1IE : 1;
2862 unsigned TMR2IE : 1;
2863 unsigned : 1;
2864 unsigned SSPIE : 1;
2865 unsigned TX1IE : 1;
2866 unsigned RC1IE : 1;
2867 unsigned ADIE : 1;
2868 unsigned : 1;
2871 struct
2873 unsigned : 1;
2874 unsigned : 1;
2875 unsigned : 1;
2876 unsigned SSP1IE : 1;
2877 unsigned TXIE : 1;
2878 unsigned RCIE : 1;
2879 unsigned : 1;
2880 unsigned : 1;
2882 } __PIE1bits_t;
2884 extern __at(0x0F9D) volatile __PIE1bits_t PIE1bits;
2886 #define _TMR1IE 0x01
2887 #define _TMR2IE 0x02
2888 #define _SSPIE 0x08
2889 #define _SSP1IE 0x08
2890 #define _TX1IE 0x10
2891 #define _TXIE 0x10
2892 #define _RC1IE 0x20
2893 #define _RCIE 0x20
2894 #define _ADIE 0x40
2896 //==============================================================================
2899 //==============================================================================
2900 // PIR1 Bits
2902 extern __at(0x0F9E) __sfr PIR1;
2904 typedef union
2906 struct
2908 unsigned TMR1IF : 1;
2909 unsigned TMR2IF : 1;
2910 unsigned : 1;
2911 unsigned SSPIF : 1;
2912 unsigned TX1IF : 1;
2913 unsigned RC1IF : 1;
2914 unsigned ADIF : 1;
2915 unsigned : 1;
2918 struct
2920 unsigned : 1;
2921 unsigned : 1;
2922 unsigned : 1;
2923 unsigned SSP1IF : 1;
2924 unsigned TXIF : 1;
2925 unsigned RCIF : 1;
2926 unsigned : 1;
2927 unsigned : 1;
2929 } __PIR1bits_t;
2931 extern __at(0x0F9E) volatile __PIR1bits_t PIR1bits;
2933 #define _TMR1IF 0x01
2934 #define _TMR2IF 0x02
2935 #define _SSPIF 0x08
2936 #define _SSP1IF 0x08
2937 #define _TX1IF 0x10
2938 #define _TXIF 0x10
2939 #define _RC1IF 0x20
2940 #define _RCIF 0x20
2941 #define _ADIF 0x40
2943 //==============================================================================
2946 //==============================================================================
2947 // IPR1 Bits
2949 extern __at(0x0F9F) __sfr IPR1;
2951 typedef union
2953 struct
2955 unsigned TMR1IP : 1;
2956 unsigned TMR2IP : 1;
2957 unsigned : 1;
2958 unsigned SSPIP : 1;
2959 unsigned TX1IP : 1;
2960 unsigned RC1IP : 1;
2961 unsigned ADIP : 1;
2962 unsigned : 1;
2965 struct
2967 unsigned : 1;
2968 unsigned : 1;
2969 unsigned : 1;
2970 unsigned SSP1IP : 1;
2971 unsigned TXIP : 1;
2972 unsigned RCIP : 1;
2973 unsigned : 1;
2974 unsigned : 1;
2976 } __IPR1bits_t;
2978 extern __at(0x0F9F) volatile __IPR1bits_t IPR1bits;
2980 #define _TMR1IP 0x01
2981 #define _TMR2IP 0x02
2982 #define _SSPIP 0x08
2983 #define _SSP1IP 0x08
2984 #define _TX1IP 0x10
2985 #define _TXIP 0x10
2986 #define _RC1IP 0x20
2987 #define _RCIP 0x20
2988 #define _ADIP 0x40
2990 //==============================================================================
2993 //==============================================================================
2994 // PIE2 Bits
2996 extern __at(0x0FA0) __sfr PIE2;
2998 typedef union
3000 struct
3002 unsigned : 1;
3003 unsigned TMR3IE : 1;
3004 unsigned LVDIE : 1;
3005 unsigned BCLIE : 1;
3006 unsigned : 1;
3007 unsigned : 1;
3008 unsigned CMIE : 1;
3009 unsigned OSCFIE : 1;
3012 struct
3014 unsigned : 1;
3015 unsigned : 1;
3016 unsigned : 1;
3017 unsigned BCL1IE : 1;
3018 unsigned : 1;
3019 unsigned : 1;
3020 unsigned : 1;
3021 unsigned : 1;
3023 } __PIE2bits_t;
3025 extern __at(0x0FA0) volatile __PIE2bits_t PIE2bits;
3027 #define _TMR3IE 0x02
3028 #define _LVDIE 0x04
3029 #define _BCLIE 0x08
3030 #define _BCL1IE 0x08
3031 #define _CMIE 0x40
3032 #define _OSCFIE 0x80
3034 //==============================================================================
3037 //==============================================================================
3038 // PIR2 Bits
3040 extern __at(0x0FA1) __sfr PIR2;
3042 typedef union
3044 struct
3046 unsigned : 1;
3047 unsigned TMR3IF : 1;
3048 unsigned LVDIF : 1;
3049 unsigned BCLIF : 1;
3050 unsigned : 1;
3051 unsigned : 1;
3052 unsigned CMIF : 1;
3053 unsigned OSCFIF : 1;
3056 struct
3058 unsigned : 1;
3059 unsigned : 1;
3060 unsigned : 1;
3061 unsigned BCL1IF : 1;
3062 unsigned : 1;
3063 unsigned : 1;
3064 unsigned : 1;
3065 unsigned : 1;
3067 } __PIR2bits_t;
3069 extern __at(0x0FA1) volatile __PIR2bits_t PIR2bits;
3071 #define _TMR3IF 0x02
3072 #define _LVDIF 0x04
3073 #define _BCLIF 0x08
3074 #define _BCL1IF 0x08
3075 #define _CMIF 0x40
3076 #define _OSCFIF 0x80
3078 //==============================================================================
3081 //==============================================================================
3082 // IPR2 Bits
3084 extern __at(0x0FA2) __sfr IPR2;
3086 typedef union
3088 struct
3090 unsigned : 1;
3091 unsigned TMR3IP : 1;
3092 unsigned LVDIP : 1;
3093 unsigned BCLIP : 1;
3094 unsigned : 1;
3095 unsigned : 1;
3096 unsigned CMIP : 1;
3097 unsigned OSCFIP : 1;
3100 struct
3102 unsigned : 1;
3103 unsigned : 1;
3104 unsigned : 1;
3105 unsigned BCL1IP : 1;
3106 unsigned : 1;
3107 unsigned : 1;
3108 unsigned : 1;
3109 unsigned : 1;
3111 } __IPR2bits_t;
3113 extern __at(0x0FA2) volatile __IPR2bits_t IPR2bits;
3115 #define _TMR3IP 0x02
3116 #define _LVDIP 0x04
3117 #define _BCLIP 0x08
3118 #define _BCL1IP 0x08
3119 #define _CMIP 0x40
3120 #define _OSCFIP 0x80
3122 //==============================================================================
3125 //==============================================================================
3126 // PIE3 Bits
3128 extern __at(0x0FA3) __sfr PIE3;
3130 typedef struct
3132 unsigned RTCCIE : 1;
3133 unsigned CCP1IE : 1;
3134 unsigned CCP2IE : 1;
3135 unsigned CTMUIE : 1;
3136 unsigned TX2IE : 1;
3137 unsigned RC2IE : 1;
3138 unsigned LCDIE : 1;
3139 unsigned : 1;
3140 } __PIE3bits_t;
3142 extern __at(0x0FA3) volatile __PIE3bits_t PIE3bits;
3144 #define _RTCCIE 0x01
3145 #define _CCP1IE 0x02
3146 #define _CCP2IE 0x04
3147 #define _CTMUIE 0x08
3148 #define _TX2IE 0x10
3149 #define _RC2IE 0x20
3150 #define _LCDIE 0x40
3152 //==============================================================================
3155 //==============================================================================
3156 // PIR3 Bits
3158 extern __at(0x0FA4) __sfr PIR3;
3160 typedef struct
3162 unsigned RTCCIF : 1;
3163 unsigned CCP1IF : 1;
3164 unsigned CCP2IF : 1;
3165 unsigned CTMUIF : 1;
3166 unsigned TX2IF : 1;
3167 unsigned RC2IF : 1;
3168 unsigned LCDIF : 1;
3169 unsigned : 1;
3170 } __PIR3bits_t;
3172 extern __at(0x0FA4) volatile __PIR3bits_t PIR3bits;
3174 #define _RTCCIF 0x01
3175 #define _CCP1IF 0x02
3176 #define _CCP2IF 0x04
3177 #define _CTMUIF 0x08
3178 #define _TX2IF 0x10
3179 #define _RC2IF 0x20
3180 #define _LCDIF 0x40
3182 //==============================================================================
3185 //==============================================================================
3186 // IPR3 Bits
3188 extern __at(0x0FA5) __sfr IPR3;
3190 typedef struct
3192 unsigned RTCCIP : 1;
3193 unsigned CCP1IP : 1;
3194 unsigned CCP2IP : 1;
3195 unsigned CTMUIP : 1;
3196 unsigned TX2IP : 1;
3197 unsigned RC2IP : 1;
3198 unsigned LCDIP : 1;
3199 unsigned : 1;
3200 } __IPR3bits_t;
3202 extern __at(0x0FA5) volatile __IPR3bits_t IPR3bits;
3204 #define _RTCCIP 0x01
3205 #define _CCP1IP 0x02
3206 #define _CCP2IP 0x04
3207 #define _CTMUIP 0x08
3208 #define _TX2IP 0x10
3209 #define _RC2IP 0x20
3210 #define _LCDIP 0x40
3212 //==============================================================================
3215 //==============================================================================
3216 // EECON1 Bits
3218 extern __at(0x0FA6) __sfr EECON1;
3220 typedef struct
3222 unsigned : 1;
3223 unsigned WR : 1;
3224 unsigned WREN : 1;
3225 unsigned WRERR : 1;
3226 unsigned FREE : 1;
3227 unsigned WPROG : 1;
3228 unsigned : 1;
3229 unsigned : 1;
3230 } __EECON1bits_t;
3232 extern __at(0x0FA6) volatile __EECON1bits_t EECON1bits;
3234 #define _WR 0x02
3235 #define _WREN 0x04
3236 #define _WRERR 0x08
3237 #define _FREE 0x10
3238 #define _WPROG 0x20
3240 //==============================================================================
3242 extern __at(0x0FA7) __sfr EECON2;
3244 //==============================================================================
3245 // LCDCON Bits
3247 extern __at(0x0FA8) __sfr LCDCON;
3249 typedef union
3251 struct
3253 unsigned LMUX0 : 1;
3254 unsigned LMUX1 : 1;
3255 unsigned CS0 : 1;
3256 unsigned CS1 : 1;
3257 unsigned : 1;
3258 unsigned WERR : 1;
3259 unsigned SLPEN : 1;
3260 unsigned LCDEN : 1;
3263 struct
3265 unsigned : 1;
3266 unsigned : 1;
3267 unsigned LCDCS0 : 1;
3268 unsigned LCDCS1 : 1;
3269 unsigned : 1;
3270 unsigned LCDWERR : 1;
3271 unsigned LCDSLPEN : 1;
3272 unsigned : 1;
3275 struct
3277 unsigned LMUX : 2;
3278 unsigned : 6;
3281 struct
3283 unsigned : 2;
3284 unsigned CS : 2;
3285 unsigned : 4;
3288 struct
3290 unsigned : 2;
3291 unsigned LCDCS : 2;
3292 unsigned : 4;
3294 } __LCDCONbits_t;
3296 extern __at(0x0FA8) volatile __LCDCONbits_t LCDCONbits;
3298 #define _LMUX0 0x01
3299 #define _LMUX1 0x02
3300 #define _CS0 0x04
3301 #define _LCDCS0 0x04
3302 #define _CS1 0x08
3303 #define _LCDCS1 0x08
3304 #define _WERR 0x20
3305 #define _LCDWERR 0x20
3306 #define _SLPEN 0x40
3307 #define _LCDSLPEN 0x40
3308 #define _LCDEN 0x80
3310 //==============================================================================
3313 //==============================================================================
3314 // LCDSE0 Bits
3316 extern __at(0x0FA9) __sfr LCDSE0;
3318 typedef union
3320 struct
3322 unsigned SE0 : 1;
3323 unsigned SE1 : 1;
3324 unsigned SE2 : 1;
3325 unsigned SE3 : 1;
3326 unsigned SE4 : 1;
3327 unsigned SE5 : 1;
3328 unsigned SE6 : 1;
3329 unsigned SE7 : 1;
3332 struct
3334 unsigned SEGEN0 : 1;
3335 unsigned SEGEN1 : 1;
3336 unsigned SEGEN2 : 1;
3337 unsigned SEGEN3 : 1;
3338 unsigned SEGEN4 : 1;
3339 unsigned SEGEN5 : 1;
3340 unsigned SEGEN6 : 1;
3341 unsigned SEGEN7 : 1;
3344 struct
3346 unsigned SE00 : 1;
3347 unsigned SE01 : 1;
3348 unsigned SE02 : 1;
3349 unsigned SE03 : 1;
3350 unsigned SE04 : 1;
3351 unsigned SE05 : 1;
3352 unsigned SE06 : 1;
3353 unsigned SE07 : 1;
3355 } __LCDSE0bits_t;
3357 extern __at(0x0FA9) volatile __LCDSE0bits_t LCDSE0bits;
3359 #define _SE0 0x01
3360 #define _SEGEN0 0x01
3361 #define _SE00 0x01
3362 #define _SE1 0x02
3363 #define _SEGEN1 0x02
3364 #define _SE01 0x02
3365 #define _SE2 0x04
3366 #define _SEGEN2 0x04
3367 #define _SE02 0x04
3368 #define _SE3 0x08
3369 #define _SEGEN3 0x08
3370 #define _SE03 0x08
3371 #define _SE4 0x10
3372 #define _SEGEN4 0x10
3373 #define _SE04 0x10
3374 #define _SE5 0x20
3375 #define _SEGEN5 0x20
3376 #define _SE05 0x20
3377 #define _SE6 0x40
3378 #define _SEGEN6 0x40
3379 #define _SE06 0x40
3380 #define _SE7 0x80
3381 #define _SEGEN7 0x80
3382 #define _SE07 0x80
3384 //==============================================================================
3387 //==============================================================================
3388 // LCDPS Bits
3390 extern __at(0x0FAA) __sfr LCDPS;
3392 typedef union
3394 struct
3396 unsigned LP0 : 1;
3397 unsigned LP1 : 1;
3398 unsigned LP2 : 1;
3399 unsigned LP3 : 1;
3400 unsigned WA : 1;
3401 unsigned LCDA : 1;
3402 unsigned BIASMD : 1;
3403 unsigned WFT : 1;
3406 struct
3408 unsigned LCDPS0 : 1;
3409 unsigned LCDPS1 : 1;
3410 unsigned LCDPS2 : 1;
3411 unsigned LCDPS3 : 1;
3412 unsigned : 1;
3413 unsigned : 1;
3414 unsigned : 1;
3415 unsigned : 1;
3418 struct
3420 unsigned LP : 4;
3421 unsigned : 4;
3424 struct
3426 unsigned LCDPS : 4;
3427 unsigned : 4;
3429 } __LCDPSbits_t;
3431 extern __at(0x0FAA) volatile __LCDPSbits_t LCDPSbits;
3433 #define _LP0 0x01
3434 #define _LCDPS0 0x01
3435 #define _LP1 0x02
3436 #define _LCDPS1 0x02
3437 #define _LP2 0x04
3438 #define _LCDPS2 0x04
3439 #define _LP3 0x08
3440 #define _LCDPS3 0x08
3441 #define _WA 0x10
3442 #define _LCDA 0x20
3443 #define _BIASMD 0x40
3444 #define _WFT 0x80
3446 //==============================================================================
3449 //==============================================================================
3450 // RCSTA Bits
3452 extern __at(0x0FAB) __sfr RCSTA;
3454 typedef union
3456 struct
3458 unsigned RX9D : 1;
3459 unsigned OERR : 1;
3460 unsigned FERR : 1;
3461 unsigned ADDEN : 1;
3462 unsigned CREN : 1;
3463 unsigned SREN : 1;
3464 unsigned RX9 : 1;
3465 unsigned SPEN : 1;
3468 struct
3470 unsigned RCD8 : 1;
3471 unsigned OERR1 : 1;
3472 unsigned FERR1 : 1;
3473 unsigned ADEN : 1;
3474 unsigned CREN1 : 1;
3475 unsigned SREN1 : 1;
3476 unsigned RC9 : 1;
3477 unsigned SPEN1 : 1;
3480 struct
3482 unsigned RX9D1 : 1;
3483 unsigned : 1;
3484 unsigned : 1;
3485 unsigned ADDEN1 : 1;
3486 unsigned : 1;
3487 unsigned : 1;
3488 unsigned NOT_RC8 : 1;
3489 unsigned : 1;
3492 struct
3494 unsigned : 1;
3495 unsigned : 1;
3496 unsigned : 1;
3497 unsigned : 1;
3498 unsigned : 1;
3499 unsigned : 1;
3500 unsigned RC8_9 : 1;
3501 unsigned : 1;
3504 struct
3506 unsigned : 1;
3507 unsigned : 1;
3508 unsigned : 1;
3509 unsigned : 1;
3510 unsigned : 1;
3511 unsigned : 1;
3512 unsigned RX91 : 1;
3513 unsigned : 1;
3515 } __RCSTAbits_t;
3517 extern __at(0x0FAB) volatile __RCSTAbits_t RCSTAbits;
3519 #define _RX9D 0x01
3520 #define _RCD8 0x01
3521 #define _RX9D1 0x01
3522 #define _OERR 0x02
3523 #define _OERR1 0x02
3524 #define _FERR 0x04
3525 #define _FERR1 0x04
3526 #define _ADDEN 0x08
3527 #define _ADEN 0x08
3528 #define _ADDEN1 0x08
3529 #define _CREN 0x10
3530 #define _CREN1 0x10
3531 #define _SREN 0x20
3532 #define _SREN1 0x20
3533 #define _RX9 0x40
3534 #define _RC9 0x40
3535 #define _NOT_RC8 0x40
3536 #define _RC8_9 0x40
3537 #define _RX91 0x40
3538 #define _SPEN 0x80
3539 #define _SPEN1 0x80
3541 //==============================================================================
3544 //==============================================================================
3545 // RCSTA1 Bits
3547 extern __at(0x0FAB) __sfr RCSTA1;
3549 typedef union
3551 struct
3553 unsigned RX9D : 1;
3554 unsigned OERR : 1;
3555 unsigned FERR : 1;
3556 unsigned ADDEN : 1;
3557 unsigned CREN : 1;
3558 unsigned SREN : 1;
3559 unsigned RX9 : 1;
3560 unsigned SPEN : 1;
3563 struct
3565 unsigned RCD8 : 1;
3566 unsigned OERR1 : 1;
3567 unsigned FERR1 : 1;
3568 unsigned ADEN : 1;
3569 unsigned CREN1 : 1;
3570 unsigned SREN1 : 1;
3571 unsigned RC9 : 1;
3572 unsigned SPEN1 : 1;
3575 struct
3577 unsigned RX9D1 : 1;
3578 unsigned : 1;
3579 unsigned : 1;
3580 unsigned ADDEN1 : 1;
3581 unsigned : 1;
3582 unsigned : 1;
3583 unsigned NOT_RC8 : 1;
3584 unsigned : 1;
3587 struct
3589 unsigned : 1;
3590 unsigned : 1;
3591 unsigned : 1;
3592 unsigned : 1;
3593 unsigned : 1;
3594 unsigned : 1;
3595 unsigned RC8_9 : 1;
3596 unsigned : 1;
3599 struct
3601 unsigned : 1;
3602 unsigned : 1;
3603 unsigned : 1;
3604 unsigned : 1;
3605 unsigned : 1;
3606 unsigned : 1;
3607 unsigned RX91 : 1;
3608 unsigned : 1;
3610 } __RCSTA1bits_t;
3612 extern __at(0x0FAB) volatile __RCSTA1bits_t RCSTA1bits;
3614 #define _RCSTA1_RX9D 0x01
3615 #define _RCSTA1_RCD8 0x01
3616 #define _RCSTA1_RX9D1 0x01
3617 #define _RCSTA1_OERR 0x02
3618 #define _RCSTA1_OERR1 0x02
3619 #define _RCSTA1_FERR 0x04
3620 #define _RCSTA1_FERR1 0x04
3621 #define _RCSTA1_ADDEN 0x08
3622 #define _RCSTA1_ADEN 0x08
3623 #define _RCSTA1_ADDEN1 0x08
3624 #define _RCSTA1_CREN 0x10
3625 #define _RCSTA1_CREN1 0x10
3626 #define _RCSTA1_SREN 0x20
3627 #define _RCSTA1_SREN1 0x20
3628 #define _RCSTA1_RX9 0x40
3629 #define _RCSTA1_RC9 0x40
3630 #define _RCSTA1_NOT_RC8 0x40
3631 #define _RCSTA1_RC8_9 0x40
3632 #define _RCSTA1_RX91 0x40
3633 #define _RCSTA1_SPEN 0x80
3634 #define _RCSTA1_SPEN1 0x80
3636 //==============================================================================
3639 //==============================================================================
3640 // TXSTA Bits
3642 extern __at(0x0FAC) __sfr TXSTA;
3644 typedef union
3646 struct
3648 unsigned TX9D : 1;
3649 unsigned TRMT : 1;
3650 unsigned BRGH : 1;
3651 unsigned SENDB : 1;
3652 unsigned SYNC : 1;
3653 unsigned TXEN : 1;
3654 unsigned TX9 : 1;
3655 unsigned CSRC : 1;
3658 struct
3660 unsigned TXD8 : 1;
3661 unsigned TRMT1 : 1;
3662 unsigned BRGH1 : 1;
3663 unsigned SENDB1 : 1;
3664 unsigned SYNC1 : 1;
3665 unsigned TXEN1 : 1;
3666 unsigned TX8_9 : 1;
3667 unsigned CSRC1 : 1;
3670 struct
3672 unsigned TX9D1 : 1;
3673 unsigned : 1;
3674 unsigned : 1;
3675 unsigned : 1;
3676 unsigned : 1;
3677 unsigned : 1;
3678 unsigned NOT_TX8 : 1;
3679 unsigned : 1;
3682 struct
3684 unsigned : 1;
3685 unsigned : 1;
3686 unsigned : 1;
3687 unsigned : 1;
3688 unsigned : 1;
3689 unsigned : 1;
3690 unsigned TX91 : 1;
3691 unsigned : 1;
3693 } __TXSTAbits_t;
3695 extern __at(0x0FAC) volatile __TXSTAbits_t TXSTAbits;
3697 #define _TX9D 0x01
3698 #define _TXD8 0x01
3699 #define _TX9D1 0x01
3700 #define _TRMT 0x02
3701 #define _TRMT1 0x02
3702 #define _BRGH 0x04
3703 #define _BRGH1 0x04
3704 #define _SENDB 0x08
3705 #define _SENDB1 0x08
3706 #define _SYNC 0x10
3707 #define _SYNC1 0x10
3708 #define _TXEN 0x20
3709 #define _TXEN1 0x20
3710 #define _TX9 0x40
3711 #define _TX8_9 0x40
3712 #define _NOT_TX8 0x40
3713 #define _TX91 0x40
3714 #define _CSRC 0x80
3715 #define _CSRC1 0x80
3717 //==============================================================================
3720 //==============================================================================
3721 // TXSTA1 Bits
3723 extern __at(0x0FAC) __sfr TXSTA1;
3725 typedef union
3727 struct
3729 unsigned TX9D : 1;
3730 unsigned TRMT : 1;
3731 unsigned BRGH : 1;
3732 unsigned SENDB : 1;
3733 unsigned SYNC : 1;
3734 unsigned TXEN : 1;
3735 unsigned TX9 : 1;
3736 unsigned CSRC : 1;
3739 struct
3741 unsigned TXD8 : 1;
3742 unsigned TRMT1 : 1;
3743 unsigned BRGH1 : 1;
3744 unsigned SENDB1 : 1;
3745 unsigned SYNC1 : 1;
3746 unsigned TXEN1 : 1;
3747 unsigned TX8_9 : 1;
3748 unsigned CSRC1 : 1;
3751 struct
3753 unsigned TX9D1 : 1;
3754 unsigned : 1;
3755 unsigned : 1;
3756 unsigned : 1;
3757 unsigned : 1;
3758 unsigned : 1;
3759 unsigned NOT_TX8 : 1;
3760 unsigned : 1;
3763 struct
3765 unsigned : 1;
3766 unsigned : 1;
3767 unsigned : 1;
3768 unsigned : 1;
3769 unsigned : 1;
3770 unsigned : 1;
3771 unsigned TX91 : 1;
3772 unsigned : 1;
3774 } __TXSTA1bits_t;
3776 extern __at(0x0FAC) volatile __TXSTA1bits_t TXSTA1bits;
3778 #define _TXSTA1_TX9D 0x01
3779 #define _TXSTA1_TXD8 0x01
3780 #define _TXSTA1_TX9D1 0x01
3781 #define _TXSTA1_TRMT 0x02
3782 #define _TXSTA1_TRMT1 0x02
3783 #define _TXSTA1_BRGH 0x04
3784 #define _TXSTA1_BRGH1 0x04
3785 #define _TXSTA1_SENDB 0x08
3786 #define _TXSTA1_SENDB1 0x08
3787 #define _TXSTA1_SYNC 0x10
3788 #define _TXSTA1_SYNC1 0x10
3789 #define _TXSTA1_TXEN 0x20
3790 #define _TXSTA1_TXEN1 0x20
3791 #define _TXSTA1_TX9 0x40
3792 #define _TXSTA1_TX8_9 0x40
3793 #define _TXSTA1_NOT_TX8 0x40
3794 #define _TXSTA1_TX91 0x40
3795 #define _TXSTA1_CSRC 0x80
3796 #define _TXSTA1_CSRC1 0x80
3798 //==============================================================================
3800 extern __at(0x0FAD) __sfr TXREG;
3801 extern __at(0x0FAD) __sfr TXREG1;
3802 extern __at(0x0FAE) __sfr RCREG;
3803 extern __at(0x0FAE) __sfr RCREG1;
3804 extern __at(0x0FAF) __sfr SPBRG;
3805 extern __at(0x0FAF) __sfr SPBRG1;
3807 //==============================================================================
3808 // T3CON Bits
3810 extern __at(0x0FB1) __sfr T3CON;
3812 typedef union
3814 struct
3816 unsigned TMR3ON : 1;
3817 unsigned TMR3CS : 1;
3818 unsigned NOT_T3SYNC : 1;
3819 unsigned T3CCP1 : 1;
3820 unsigned T3CKPS0 : 1;
3821 unsigned T3CKPS1 : 1;
3822 unsigned T3CCP2 : 1;
3823 unsigned RD16 : 1;
3826 struct
3828 unsigned : 1;
3829 unsigned : 1;
3830 unsigned T3SYNC : 1;
3831 unsigned : 1;
3832 unsigned : 1;
3833 unsigned : 1;
3834 unsigned : 1;
3835 unsigned : 1;
3838 struct
3840 unsigned : 1;
3841 unsigned : 1;
3842 unsigned T3INSYNC : 1;
3843 unsigned : 1;
3844 unsigned : 1;
3845 unsigned : 1;
3846 unsigned : 1;
3847 unsigned : 1;
3850 struct
3852 unsigned : 4;
3853 unsigned T3CKPS : 2;
3854 unsigned : 2;
3856 } __T3CONbits_t;
3858 extern __at(0x0FB1) volatile __T3CONbits_t T3CONbits;
3860 #define _T3CON_TMR3ON 0x01
3861 #define _T3CON_TMR3CS 0x02
3862 #define _T3CON_NOT_T3SYNC 0x04
3863 #define _T3CON_T3SYNC 0x04
3864 #define _T3CON_T3INSYNC 0x04
3865 #define _T3CON_T3CCP1 0x08
3866 #define _T3CON_T3CKPS0 0x10
3867 #define _T3CON_T3CKPS1 0x20
3868 #define _T3CON_T3CCP2 0x40
3869 #define _T3CON_RD16 0x80
3871 //==============================================================================
3873 extern __at(0x0FB2) __sfr TMR3;
3874 extern __at(0x0FB2) __sfr TMR3L;
3875 extern __at(0x0FB3) __sfr TMR3H;
3877 //==============================================================================
3878 // CMCON Bits
3880 extern __at(0x0FB4) __sfr CMCON;
3882 typedef union
3884 struct
3886 unsigned CM0 : 1;
3887 unsigned CM1 : 1;
3888 unsigned CM2 : 1;
3889 unsigned CIS : 1;
3890 unsigned C1INV : 1;
3891 unsigned C2INV : 1;
3892 unsigned C1OUT : 1;
3893 unsigned C2OUT : 1;
3896 struct
3898 unsigned CM : 3;
3899 unsigned : 5;
3901 } __CMCONbits_t;
3903 extern __at(0x0FB4) volatile __CMCONbits_t CMCONbits;
3905 #define _CM0 0x01
3906 #define _CM1 0x02
3907 #define _CM2 0x04
3908 #define _CIS 0x08
3909 #define _C1INV 0x10
3910 #define _C2INV 0x20
3911 #define _C1OUT 0x40
3912 #define _C2OUT 0x80
3914 //==============================================================================
3917 //==============================================================================
3918 // CVRCON Bits
3920 extern __at(0x0FB5) __sfr CVRCON;
3922 typedef union
3924 struct
3926 unsigned CVR0 : 1;
3927 unsigned CVR1 : 1;
3928 unsigned CVR2 : 1;
3929 unsigned CVR3 : 1;
3930 unsigned CVRSS : 1;
3931 unsigned CVRR : 1;
3932 unsigned CVROE : 1;
3933 unsigned CVREN : 1;
3936 struct
3938 unsigned CVR : 4;
3939 unsigned : 4;
3941 } __CVRCONbits_t;
3943 extern __at(0x0FB5) volatile __CVRCONbits_t CVRCONbits;
3945 #define _CVR0 0x01
3946 #define _CVR1 0x02
3947 #define _CVR2 0x04
3948 #define _CVR3 0x08
3949 #define _CVRSS 0x10
3950 #define _CVRR 0x20
3951 #define _CVROE 0x40
3952 #define _CVREN 0x80
3954 //==============================================================================
3957 //==============================================================================
3958 // LCDSE1 Bits
3960 extern __at(0x0FB6) __sfr LCDSE1;
3962 typedef union
3964 struct
3966 unsigned SE8 : 1;
3967 unsigned SE9 : 1;
3968 unsigned SE10 : 1;
3969 unsigned SE11 : 1;
3970 unsigned SE12 : 1;
3971 unsigned SE13 : 1;
3972 unsigned SE14 : 1;
3973 unsigned SE15 : 1;
3976 struct
3978 unsigned SEGEN8 : 1;
3979 unsigned SEGEN9 : 1;
3980 unsigned SEGEN10 : 1;
3981 unsigned SEGEN11 : 1;
3982 unsigned SEGEN12 : 1;
3983 unsigned SEGEN13 : 1;
3984 unsigned SEGEN14 : 1;
3985 unsigned SEGEN15 : 1;
3988 struct
3990 unsigned SE08 : 1;
3991 unsigned SE09 : 1;
3992 unsigned : 1;
3993 unsigned : 1;
3994 unsigned : 1;
3995 unsigned : 1;
3996 unsigned : 1;
3997 unsigned : 1;
3999 } __LCDSE1bits_t;
4001 extern __at(0x0FB6) volatile __LCDSE1bits_t LCDSE1bits;
4003 #define _SE8 0x01
4004 #define _SEGEN8 0x01
4005 #define _SE08 0x01
4006 #define _SE9 0x02
4007 #define _SEGEN9 0x02
4008 #define _SE09 0x02
4009 #define _SE10 0x04
4010 #define _SEGEN10 0x04
4011 #define _SE11 0x08
4012 #define _SEGEN11 0x08
4013 #define _SE12 0x10
4014 #define _SEGEN12 0x10
4015 #define _SE13 0x20
4016 #define _SEGEN13 0x20
4017 #define _SE14 0x40
4018 #define _SEGEN14 0x40
4019 #define _SE15 0x80
4020 #define _SEGEN15 0x80
4022 //==============================================================================
4025 //==============================================================================
4026 // LCDSE2 Bits
4028 extern __at(0x0FB7) __sfr LCDSE2;
4030 typedef union
4032 struct
4034 unsigned SE16 : 1;
4035 unsigned SE17 : 1;
4036 unsigned SE18 : 1;
4037 unsigned SE19 : 1;
4038 unsigned SE20 : 1;
4039 unsigned SE21 : 1;
4040 unsigned SE22 : 1;
4041 unsigned SE23 : 1;
4044 struct
4046 unsigned SEGEN16 : 1;
4047 unsigned SEGEN17 : 1;
4048 unsigned SEGEN18 : 1;
4049 unsigned SEGEN19 : 1;
4050 unsigned SEGEN20 : 1;
4051 unsigned SEGEN21 : 1;
4052 unsigned SEGEN22 : 1;
4053 unsigned SEGEN23 : 1;
4055 } __LCDSE2bits_t;
4057 extern __at(0x0FB7) volatile __LCDSE2bits_t LCDSE2bits;
4059 #define _SE16 0x01
4060 #define _SEGEN16 0x01
4061 #define _SE17 0x02
4062 #define _SEGEN17 0x02
4063 #define _SE18 0x04
4064 #define _SEGEN18 0x04
4065 #define _SE19 0x08
4066 #define _SEGEN19 0x08
4067 #define _SE20 0x10
4068 #define _SEGEN20 0x10
4069 #define _SE21 0x20
4070 #define _SEGEN21 0x20
4071 #define _SE22 0x40
4072 #define _SEGEN22 0x40
4073 #define _SE23 0x80
4074 #define _SEGEN23 0x80
4076 //==============================================================================
4079 //==============================================================================
4080 // LCDSE3 Bits
4082 extern __at(0x0FB8) __sfr LCDSE3;
4084 typedef union
4086 struct
4088 unsigned SE24 : 1;
4089 unsigned SE25 : 1;
4090 unsigned SE26 : 1;
4091 unsigned SE27 : 1;
4092 unsigned SE28 : 1;
4093 unsigned SE29 : 1;
4094 unsigned SE30 : 1;
4095 unsigned SE31 : 1;
4098 struct
4100 unsigned SEGEN24 : 1;
4101 unsigned SEGEN25 : 1;
4102 unsigned SEGEN26 : 1;
4103 unsigned SEGEN27 : 1;
4104 unsigned SEGEN28 : 1;
4105 unsigned SEGEN29 : 1;
4106 unsigned SEGEN30 : 1;
4107 unsigned SEGEN31 : 1;
4109 } __LCDSE3bits_t;
4111 extern __at(0x0FB8) volatile __LCDSE3bits_t LCDSE3bits;
4113 #define _SE24 0x01
4114 #define _SEGEN24 0x01
4115 #define _SE25 0x02
4116 #define _SEGEN25 0x02
4117 #define _SE26 0x04
4118 #define _SEGEN26 0x04
4119 #define _SE27 0x08
4120 #define _SEGEN27 0x08
4121 #define _SE28 0x10
4122 #define _SEGEN28 0x10
4123 #define _SE29 0x20
4124 #define _SEGEN29 0x20
4125 #define _SE30 0x40
4126 #define _SEGEN30 0x40
4127 #define _SE31 0x80
4128 #define _SEGEN31 0x80
4130 //==============================================================================
4133 //==============================================================================
4134 // LCDSE4 Bits
4136 extern __at(0x0FB9) __sfr LCDSE4;
4138 typedef union
4140 struct
4142 unsigned SE32 : 1;
4143 unsigned : 1;
4144 unsigned : 1;
4145 unsigned : 1;
4146 unsigned : 1;
4147 unsigned : 1;
4148 unsigned : 1;
4149 unsigned : 1;
4152 struct
4154 unsigned SEGEN32 : 1;
4155 unsigned : 1;
4156 unsigned : 1;
4157 unsigned : 1;
4158 unsigned : 1;
4159 unsigned : 1;
4160 unsigned : 1;
4161 unsigned : 1;
4163 } __LCDSE4bits_t;
4165 extern __at(0x0FB9) volatile __LCDSE4bits_t LCDSE4bits;
4167 #define _SE32 0x01
4168 #define _SEGEN32 0x01
4170 //==============================================================================
4173 //==============================================================================
4174 // LCDDATA0 Bits
4176 extern __at(0x0FBB) __sfr LCDDATA0;
4178 typedef union
4180 struct
4182 unsigned S0C0 : 1;
4183 unsigned S1C0 : 1;
4184 unsigned S2C0 : 1;
4185 unsigned S3C0 : 1;
4186 unsigned S4C0 : 1;
4187 unsigned S5C0 : 1;
4188 unsigned S6C0 : 1;
4189 unsigned S7C0 : 1;
4192 struct
4194 unsigned SEG0COM0 : 1;
4195 unsigned SEG1COM0 : 1;
4196 unsigned SEG2COM0 : 1;
4197 unsigned SEG3COM0 : 1;
4198 unsigned SEG4COM0 : 1;
4199 unsigned SEG5COM0 : 1;
4200 unsigned SEG6COM0 : 1;
4201 unsigned SEG7COM0 : 1;
4204 struct
4206 unsigned S00C0 : 1;
4207 unsigned S01C0 : 1;
4208 unsigned S02C0 : 1;
4209 unsigned S03C0 : 1;
4210 unsigned S04C0 : 1;
4211 unsigned S05C0 : 1;
4212 unsigned S06C0 : 1;
4213 unsigned S07C0 : 1;
4215 } __LCDDATA0bits_t;
4217 extern __at(0x0FBB) volatile __LCDDATA0bits_t LCDDATA0bits;
4219 #define _S0C0 0x01
4220 #define _SEG0COM0 0x01
4221 #define _S00C0 0x01
4222 #define _S1C0 0x02
4223 #define _SEG1COM0 0x02
4224 #define _S01C0 0x02
4225 #define _S2C0 0x04
4226 #define _SEG2COM0 0x04
4227 #define _S02C0 0x04
4228 #define _S3C0 0x08
4229 #define _SEG3COM0 0x08
4230 #define _S03C0 0x08
4231 #define _S4C0 0x10
4232 #define _SEG4COM0 0x10
4233 #define _S04C0 0x10
4234 #define _S5C0 0x20
4235 #define _SEG5COM0 0x20
4236 #define _S05C0 0x20
4237 #define _S6C0 0x40
4238 #define _SEG6COM0 0x40
4239 #define _S06C0 0x40
4240 #define _S7C0 0x80
4241 #define _SEG7COM0 0x80
4242 #define _S07C0 0x80
4244 //==============================================================================
4247 //==============================================================================
4248 // LCDDATA1 Bits
4250 extern __at(0x0FBC) __sfr LCDDATA1;
4252 typedef union
4254 struct
4256 unsigned S8C0 : 1;
4257 unsigned S9C0 : 1;
4258 unsigned S10C0 : 1;
4259 unsigned S11C0 : 1;
4260 unsigned S12C0 : 1;
4261 unsigned S13C0 : 1;
4262 unsigned S14C0 : 1;
4263 unsigned S15C0 : 1;
4266 struct
4268 unsigned SEG8COM0 : 1;
4269 unsigned SEG9COM0 : 1;
4270 unsigned SEG10COM0 : 1;
4271 unsigned SEG11COM0 : 1;
4272 unsigned SEG12COM0 : 1;
4273 unsigned SEG13COM0 : 1;
4274 unsigned SEG14COM0 : 1;
4275 unsigned SEG15COM0 : 1;
4278 struct
4280 unsigned S08C0 : 1;
4281 unsigned S09C0 : 1;
4282 unsigned : 1;
4283 unsigned : 1;
4284 unsigned : 1;
4285 unsigned : 1;
4286 unsigned : 1;
4287 unsigned : 1;
4289 } __LCDDATA1bits_t;
4291 extern __at(0x0FBC) volatile __LCDDATA1bits_t LCDDATA1bits;
4293 #define _S8C0 0x01
4294 #define _SEG8COM0 0x01
4295 #define _S08C0 0x01
4296 #define _S9C0 0x02
4297 #define _SEG9COM0 0x02
4298 #define _S09C0 0x02
4299 #define _S10C0 0x04
4300 #define _SEG10COM0 0x04
4301 #define _S11C0 0x08
4302 #define _SEG11COM0 0x08
4303 #define _S12C0 0x10
4304 #define _SEG12COM0 0x10
4305 #define _S13C0 0x20
4306 #define _SEG13COM0 0x20
4307 #define _S14C0 0x40
4308 #define _SEG14COM0 0x40
4309 #define _S15C0 0x80
4310 #define _SEG15COM0 0x80
4312 //==============================================================================
4315 //==============================================================================
4316 // LCDDATA2 Bits
4318 extern __at(0x0FBD) __sfr LCDDATA2;
4320 typedef union
4322 struct
4324 unsigned S16C0 : 1;
4325 unsigned S17C0 : 1;
4326 unsigned S18C0 : 1;
4327 unsigned S19C0 : 1;
4328 unsigned S20C0 : 1;
4329 unsigned S21C0 : 1;
4330 unsigned S22C0 : 1;
4331 unsigned S23C0 : 1;
4334 struct
4336 unsigned SEG16COM0 : 1;
4337 unsigned SEG17COM0 : 1;
4338 unsigned SEG18COM0 : 1;
4339 unsigned SEG19COM0 : 1;
4340 unsigned SEG20COM0 : 1;
4341 unsigned SEG21COM0 : 1;
4342 unsigned SEG22COM0 : 1;
4343 unsigned SEG23COM0 : 1;
4345 } __LCDDATA2bits_t;
4347 extern __at(0x0FBD) volatile __LCDDATA2bits_t LCDDATA2bits;
4349 #define _S16C0 0x01
4350 #define _SEG16COM0 0x01
4351 #define _S17C0 0x02
4352 #define _SEG17COM0 0x02
4353 #define _S18C0 0x04
4354 #define _SEG18COM0 0x04
4355 #define _S19C0 0x08
4356 #define _SEG19COM0 0x08
4357 #define _S20C0 0x10
4358 #define _SEG20COM0 0x10
4359 #define _S21C0 0x20
4360 #define _SEG21COM0 0x20
4361 #define _S22C0 0x40
4362 #define _SEG22COM0 0x40
4363 #define _S23C0 0x80
4364 #define _SEG23COM0 0x80
4366 //==============================================================================
4369 //==============================================================================
4370 // LCDDATA3 Bits
4372 extern __at(0x0FBE) __sfr LCDDATA3;
4374 typedef union
4376 struct
4378 unsigned S24C0 : 1;
4379 unsigned S25C0 : 1;
4380 unsigned S26C0 : 1;
4381 unsigned S27C0 : 1;
4382 unsigned S28C0 : 1;
4383 unsigned S29C0 : 1;
4384 unsigned S30C0 : 1;
4385 unsigned S31C0 : 1;
4388 struct
4390 unsigned SEG24COM0 : 1;
4391 unsigned SEG25COM0 : 1;
4392 unsigned SEG26COM0 : 1;
4393 unsigned SEG27COM0 : 1;
4394 unsigned SEG28COM0 : 1;
4395 unsigned SEG29COM0 : 1;
4396 unsigned SEG30COM0 : 1;
4397 unsigned SEG31COM0 : 1;
4399 } __LCDDATA3bits_t;
4401 extern __at(0x0FBE) volatile __LCDDATA3bits_t LCDDATA3bits;
4403 #define _S24C0 0x01
4404 #define _SEG24COM0 0x01
4405 #define _S25C0 0x02
4406 #define _SEG25COM0 0x02
4407 #define _S26C0 0x04
4408 #define _SEG26COM0 0x04
4409 #define _S27C0 0x08
4410 #define _SEG27COM0 0x08
4411 #define _S28C0 0x10
4412 #define _SEG28COM0 0x10
4413 #define _S29C0 0x20
4414 #define _SEG29COM0 0x20
4415 #define _S30C0 0x40
4416 #define _SEG30COM0 0x40
4417 #define _S31C0 0x80
4418 #define _SEG31COM0 0x80
4420 //==============================================================================
4423 //==============================================================================
4424 // LCDDATA4 Bits
4426 extern __at(0x0FBF) __sfr LCDDATA4;
4428 typedef union
4430 struct
4432 unsigned S32C0 : 1;
4433 unsigned S33C0 : 1;
4434 unsigned S34C0 : 1;
4435 unsigned S35C0 : 1;
4436 unsigned S36C0 : 1;
4437 unsigned S37C0 : 1;
4438 unsigned S38C0 : 1;
4439 unsigned S39C0 : 1;
4442 struct
4444 unsigned SEG32COM0 : 1;
4445 unsigned SEG33COM0 : 1;
4446 unsigned SEG34COM0 : 1;
4447 unsigned SEG35COM0 : 1;
4448 unsigned SEG36COM0 : 1;
4449 unsigned SEG37COM0 : 1;
4450 unsigned SEG38COM0 : 1;
4451 unsigned SEG39COM0 : 1;
4453 } __LCDDATA4bits_t;
4455 extern __at(0x0FBF) volatile __LCDDATA4bits_t LCDDATA4bits;
4457 #define _S32C0 0x01
4458 #define _SEG32COM0 0x01
4459 #define _S33C0 0x02
4460 #define _SEG33COM0 0x02
4461 #define _S34C0 0x04
4462 #define _SEG34COM0 0x04
4463 #define _S35C0 0x08
4464 #define _SEG35COM0 0x08
4465 #define _S36C0 0x10
4466 #define _SEG36COM0 0x10
4467 #define _S37C0 0x20
4468 #define _SEG37COM0 0x20
4469 #define _S38C0 0x40
4470 #define _SEG38COM0 0x40
4471 #define _S39C0 0x80
4472 #define _SEG39COM0 0x80
4474 //==============================================================================
4477 //==============================================================================
4478 // ADCON2 Bits
4480 extern __at(0x0FC0) __sfr ADCON2;
4482 typedef union
4484 struct
4486 unsigned ADCS0 : 1;
4487 unsigned ADCS1 : 1;
4488 unsigned ADCS2 : 1;
4489 unsigned ACQT0 : 1;
4490 unsigned ACQT1 : 1;
4491 unsigned ACQT2 : 1;
4492 unsigned : 1;
4493 unsigned ADFM : 1;
4496 struct
4498 unsigned ADCS : 3;
4499 unsigned : 5;
4502 struct
4504 unsigned : 3;
4505 unsigned ACQT : 3;
4506 unsigned : 2;
4508 } __ADCON2bits_t;
4510 extern __at(0x0FC0) volatile __ADCON2bits_t ADCON2bits;
4512 #define _ADCS0 0x01
4513 #define _ADCS1 0x02
4514 #define _ADCS2 0x04
4515 #define _ACQT0 0x08
4516 #define _ACQT1 0x10
4517 #define _ACQT2 0x20
4518 #define _ADFM 0x80
4520 //==============================================================================
4523 //==============================================================================
4524 // ADCON1 Bits
4526 extern __at(0x0FC1) __sfr ADCON1;
4528 typedef union
4530 struct
4532 unsigned PCFG0 : 1;
4533 unsigned PCFG1 : 1;
4534 unsigned PCFG2 : 1;
4535 unsigned PCFG3 : 1;
4536 unsigned VCFG0 : 1;
4537 unsigned VCFG1 : 1;
4538 unsigned : 1;
4539 unsigned TRIGSEL : 1;
4542 struct
4544 unsigned PCFG : 4;
4545 unsigned : 4;
4548 struct
4550 unsigned : 4;
4551 unsigned VCFG : 2;
4552 unsigned : 2;
4554 } __ADCON1bits_t;
4556 extern __at(0x0FC1) volatile __ADCON1bits_t ADCON1bits;
4558 #define _PCFG0 0x01
4559 #define _PCFG1 0x02
4560 #define _PCFG2 0x04
4561 #define _PCFG3 0x08
4562 #define _VCFG0 0x10
4563 #define _VCFG1 0x20
4564 #define _TRIGSEL 0x80
4566 //==============================================================================
4569 //==============================================================================
4570 // ADCON0 Bits
4572 extern __at(0x0FC2) __sfr ADCON0;
4574 typedef union
4576 struct
4578 unsigned ADON : 1;
4579 unsigned GO_NOT_DONE : 1;
4580 unsigned CHS0 : 1;
4581 unsigned CHS1 : 1;
4582 unsigned CHS2 : 1;
4583 unsigned CHS3 : 1;
4584 unsigned : 1;
4585 unsigned ADCAL : 1;
4588 struct
4590 unsigned : 1;
4591 unsigned GO_DONE : 1;
4592 unsigned : 1;
4593 unsigned : 1;
4594 unsigned : 1;
4595 unsigned : 1;
4596 unsigned : 1;
4597 unsigned : 1;
4600 struct
4602 unsigned : 1;
4603 unsigned DONE : 1;
4604 unsigned : 1;
4605 unsigned : 1;
4606 unsigned : 1;
4607 unsigned : 1;
4608 unsigned : 1;
4609 unsigned : 1;
4612 struct
4614 unsigned : 1;
4615 unsigned GO : 1;
4616 unsigned : 1;
4617 unsigned : 1;
4618 unsigned : 1;
4619 unsigned : 1;
4620 unsigned : 1;
4621 unsigned : 1;
4624 struct
4626 unsigned : 1;
4627 unsigned NOT_DONE : 1;
4628 unsigned : 1;
4629 unsigned : 1;
4630 unsigned : 1;
4631 unsigned : 1;
4632 unsigned : 1;
4633 unsigned : 1;
4636 struct
4638 unsigned : 2;
4639 unsigned CHS : 4;
4640 unsigned : 2;
4642 } __ADCON0bits_t;
4644 extern __at(0x0FC2) volatile __ADCON0bits_t ADCON0bits;
4646 #define _ADON 0x01
4647 #define _GO_NOT_DONE 0x02
4648 #define _GO_DONE 0x02
4649 #define _DONE 0x02
4650 #define _GO 0x02
4651 #define _NOT_DONE 0x02
4652 #define _CHS0 0x04
4653 #define _CHS1 0x08
4654 #define _CHS2 0x10
4655 #define _CHS3 0x20
4656 #define _ADCAL 0x80
4658 //==============================================================================
4660 extern __at(0x0FC3) __sfr ADRES;
4661 extern __at(0x0FC3) __sfr ADRESL;
4662 extern __at(0x0FC4) __sfr ADRESH;
4664 //==============================================================================
4665 // SSP1CON2 Bits
4667 extern __at(0x0FC5) __sfr SSP1CON2;
4669 typedef union
4671 struct
4673 unsigned SEN : 1;
4674 unsigned RSEN : 1;
4675 unsigned PEN : 1;
4676 unsigned RCEN : 1;
4677 unsigned ACKEN : 1;
4678 unsigned ACKDT : 1;
4679 unsigned ACKSTAT : 1;
4680 unsigned GCEN : 1;
4683 struct
4685 unsigned : 1;
4686 unsigned ADMSK1 : 1;
4687 unsigned ADMSK2 : 1;
4688 unsigned ADMSK3 : 1;
4689 unsigned ADMSK4 : 1;
4690 unsigned ADMSK5 : 1;
4691 unsigned : 1;
4692 unsigned : 1;
4694 } __SSP1CON2bits_t;
4696 extern __at(0x0FC5) volatile __SSP1CON2bits_t SSP1CON2bits;
4698 #define _SEN 0x01
4699 #define _RSEN 0x02
4700 #define _ADMSK1 0x02
4701 #define _PEN 0x04
4702 #define _ADMSK2 0x04
4703 #define _RCEN 0x08
4704 #define _ADMSK3 0x08
4705 #define _ACKEN 0x10
4706 #define _ADMSK4 0x10
4707 #define _ACKDT 0x20
4708 #define _ADMSK5 0x20
4709 #define _ACKSTAT 0x40
4710 #define _GCEN 0x80
4712 //==============================================================================
4715 //==============================================================================
4716 // SSPCON2 Bits
4718 extern __at(0x0FC5) __sfr SSPCON2;
4720 typedef union
4722 struct
4724 unsigned SEN : 1;
4725 unsigned RSEN : 1;
4726 unsigned PEN : 1;
4727 unsigned RCEN : 1;
4728 unsigned ACKEN : 1;
4729 unsigned ACKDT : 1;
4730 unsigned ACKSTAT : 1;
4731 unsigned GCEN : 1;
4734 struct
4736 unsigned : 1;
4737 unsigned ADMSK1 : 1;
4738 unsigned ADMSK2 : 1;
4739 unsigned ADMSK3 : 1;
4740 unsigned ADMSK4 : 1;
4741 unsigned ADMSK5 : 1;
4742 unsigned : 1;
4743 unsigned : 1;
4745 } __SSPCON2bits_t;
4747 extern __at(0x0FC5) volatile __SSPCON2bits_t SSPCON2bits;
4749 #define _SSPCON2_SEN 0x01
4750 #define _SSPCON2_RSEN 0x02
4751 #define _SSPCON2_ADMSK1 0x02
4752 #define _SSPCON2_PEN 0x04
4753 #define _SSPCON2_ADMSK2 0x04
4754 #define _SSPCON2_RCEN 0x08
4755 #define _SSPCON2_ADMSK3 0x08
4756 #define _SSPCON2_ACKEN 0x10
4757 #define _SSPCON2_ADMSK4 0x10
4758 #define _SSPCON2_ACKDT 0x20
4759 #define _SSPCON2_ADMSK5 0x20
4760 #define _SSPCON2_ACKSTAT 0x40
4761 #define _SSPCON2_GCEN 0x80
4763 //==============================================================================
4766 //==============================================================================
4767 // SSP1CON1 Bits
4769 extern __at(0x0FC6) __sfr SSP1CON1;
4771 typedef union
4773 struct
4775 unsigned SSPM0 : 1;
4776 unsigned SSPM1 : 1;
4777 unsigned SSPM2 : 1;
4778 unsigned SSPM3 : 1;
4779 unsigned CKP : 1;
4780 unsigned SSPEN : 1;
4781 unsigned SSPOV : 1;
4782 unsigned WCOL : 1;
4785 struct
4787 unsigned SSPM : 4;
4788 unsigned : 4;
4790 } __SSP1CON1bits_t;
4792 extern __at(0x0FC6) volatile __SSP1CON1bits_t SSP1CON1bits;
4794 #define _SSPM0 0x01
4795 #define _SSPM1 0x02
4796 #define _SSPM2 0x04
4797 #define _SSPM3 0x08
4798 #define _CKP 0x10
4799 #define _SSPEN 0x20
4800 #define _SSPOV 0x40
4801 #define _WCOL 0x80
4803 //==============================================================================
4806 //==============================================================================
4807 // SSPCON1 Bits
4809 extern __at(0x0FC6) __sfr SSPCON1;
4811 typedef union
4813 struct
4815 unsigned SSPM0 : 1;
4816 unsigned SSPM1 : 1;
4817 unsigned SSPM2 : 1;
4818 unsigned SSPM3 : 1;
4819 unsigned CKP : 1;
4820 unsigned SSPEN : 1;
4821 unsigned SSPOV : 1;
4822 unsigned WCOL : 1;
4825 struct
4827 unsigned SSPM : 4;
4828 unsigned : 4;
4830 } __SSPCON1bits_t;
4832 extern __at(0x0FC6) volatile __SSPCON1bits_t SSPCON1bits;
4834 #define _SSPCON1_SSPM0 0x01
4835 #define _SSPCON1_SSPM1 0x02
4836 #define _SSPCON1_SSPM2 0x04
4837 #define _SSPCON1_SSPM3 0x08
4838 #define _SSPCON1_CKP 0x10
4839 #define _SSPCON1_SSPEN 0x20
4840 #define _SSPCON1_SSPOV 0x40
4841 #define _SSPCON1_WCOL 0x80
4843 //==============================================================================
4846 //==============================================================================
4847 // SSP1STAT Bits
4849 extern __at(0x0FC7) __sfr SSP1STAT;
4851 typedef union
4853 struct
4855 unsigned BF : 1;
4856 unsigned UA : 1;
4857 unsigned R_NOT_W : 1;
4858 unsigned S : 1;
4859 unsigned P : 1;
4860 unsigned D_NOT_A : 1;
4861 unsigned CKE : 1;
4862 unsigned SMP : 1;
4865 struct
4867 unsigned : 1;
4868 unsigned : 1;
4869 unsigned R : 1;
4870 unsigned I2C_START : 1;
4871 unsigned I2C_STOP : 1;
4872 unsigned D : 1;
4873 unsigned : 1;
4874 unsigned : 1;
4877 struct
4879 unsigned : 1;
4880 unsigned : 1;
4881 unsigned R_W : 1;
4882 unsigned : 1;
4883 unsigned : 1;
4884 unsigned D_A : 1;
4885 unsigned : 1;
4886 unsigned : 1;
4889 struct
4891 unsigned : 1;
4892 unsigned : 1;
4893 unsigned NOT_W : 1;
4894 unsigned : 1;
4895 unsigned : 1;
4896 unsigned NOT_A : 1;
4897 unsigned : 1;
4898 unsigned : 1;
4901 struct
4903 unsigned : 1;
4904 unsigned : 1;
4905 unsigned NOT_WRITE : 1;
4906 unsigned : 1;
4907 unsigned : 1;
4908 unsigned NOT_ADDRESS : 1;
4909 unsigned : 1;
4910 unsigned : 1;
4913 struct
4915 unsigned : 1;
4916 unsigned : 1;
4917 unsigned READ_WRITE : 1;
4918 unsigned : 1;
4919 unsigned : 1;
4920 unsigned DATA_ADDRESS : 1;
4921 unsigned : 1;
4922 unsigned : 1;
4925 struct
4927 unsigned : 1;
4928 unsigned : 1;
4929 unsigned I2C_READ : 1;
4930 unsigned : 1;
4931 unsigned : 1;
4932 unsigned I2C_DAT : 1;
4933 unsigned : 1;
4934 unsigned : 1;
4936 } __SSP1STATbits_t;
4938 extern __at(0x0FC7) volatile __SSP1STATbits_t SSP1STATbits;
4940 #define _BF 0x01
4941 #define _UA 0x02
4942 #define _R_NOT_W 0x04
4943 #define _R 0x04
4944 #define _R_W 0x04
4945 #define _NOT_W 0x04
4946 #define _NOT_WRITE 0x04
4947 #define _READ_WRITE 0x04
4948 #define _I2C_READ 0x04
4949 #define _S 0x08
4950 #define _I2C_START 0x08
4951 #define _P 0x10
4952 #define _I2C_STOP 0x10
4953 #define _D_NOT_A 0x20
4954 #define _D 0x20
4955 #define _D_A 0x20
4956 #define _NOT_A 0x20
4957 #define _NOT_ADDRESS 0x20
4958 #define _DATA_ADDRESS 0x20
4959 #define _I2C_DAT 0x20
4960 #define _CKE 0x40
4961 #define _SMP 0x80
4963 //==============================================================================
4966 //==============================================================================
4967 // SSPSTAT Bits
4969 extern __at(0x0FC7) __sfr SSPSTAT;
4971 typedef union
4973 struct
4975 unsigned BF : 1;
4976 unsigned UA : 1;
4977 unsigned R_NOT_W : 1;
4978 unsigned S : 1;
4979 unsigned P : 1;
4980 unsigned D_NOT_A : 1;
4981 unsigned CKE : 1;
4982 unsigned SMP : 1;
4985 struct
4987 unsigned : 1;
4988 unsigned : 1;
4989 unsigned R : 1;
4990 unsigned I2C_START : 1;
4991 unsigned I2C_STOP : 1;
4992 unsigned D : 1;
4993 unsigned : 1;
4994 unsigned : 1;
4997 struct
4999 unsigned : 1;
5000 unsigned : 1;
5001 unsigned R_W : 1;
5002 unsigned : 1;
5003 unsigned : 1;
5004 unsigned D_A : 1;
5005 unsigned : 1;
5006 unsigned : 1;
5009 struct
5011 unsigned : 1;
5012 unsigned : 1;
5013 unsigned NOT_W : 1;
5014 unsigned : 1;
5015 unsigned : 1;
5016 unsigned NOT_A : 1;
5017 unsigned : 1;
5018 unsigned : 1;
5021 struct
5023 unsigned : 1;
5024 unsigned : 1;
5025 unsigned NOT_WRITE : 1;
5026 unsigned : 1;
5027 unsigned : 1;
5028 unsigned NOT_ADDRESS : 1;
5029 unsigned : 1;
5030 unsigned : 1;
5033 struct
5035 unsigned : 1;
5036 unsigned : 1;
5037 unsigned READ_WRITE : 1;
5038 unsigned : 1;
5039 unsigned : 1;
5040 unsigned DATA_ADDRESS : 1;
5041 unsigned : 1;
5042 unsigned : 1;
5045 struct
5047 unsigned : 1;
5048 unsigned : 1;
5049 unsigned I2C_READ : 1;
5050 unsigned : 1;
5051 unsigned : 1;
5052 unsigned I2C_DAT : 1;
5053 unsigned : 1;
5054 unsigned : 1;
5056 } __SSPSTATbits_t;
5058 extern __at(0x0FC7) volatile __SSPSTATbits_t SSPSTATbits;
5060 #define _SSPSTAT_BF 0x01
5061 #define _SSPSTAT_UA 0x02
5062 #define _SSPSTAT_R_NOT_W 0x04
5063 #define _SSPSTAT_R 0x04
5064 #define _SSPSTAT_R_W 0x04
5065 #define _SSPSTAT_NOT_W 0x04
5066 #define _SSPSTAT_NOT_WRITE 0x04
5067 #define _SSPSTAT_READ_WRITE 0x04
5068 #define _SSPSTAT_I2C_READ 0x04
5069 #define _SSPSTAT_S 0x08
5070 #define _SSPSTAT_I2C_START 0x08
5071 #define _SSPSTAT_P 0x10
5072 #define _SSPSTAT_I2C_STOP 0x10
5073 #define _SSPSTAT_D_NOT_A 0x20
5074 #define _SSPSTAT_D 0x20
5075 #define _SSPSTAT_D_A 0x20
5076 #define _SSPSTAT_NOT_A 0x20
5077 #define _SSPSTAT_NOT_ADDRESS 0x20
5078 #define _SSPSTAT_DATA_ADDRESS 0x20
5079 #define _SSPSTAT_I2C_DAT 0x20
5080 #define _SSPSTAT_CKE 0x40
5081 #define _SSPSTAT_SMP 0x80
5083 //==============================================================================
5086 //==============================================================================
5087 // SSP1ADD Bits
5089 extern __at(0x0FC8) __sfr SSP1ADD;
5091 typedef struct
5093 unsigned MSK0 : 1;
5094 unsigned MSK1 : 1;
5095 unsigned MSK2 : 1;
5096 unsigned MSK3 : 1;
5097 unsigned MSK4 : 1;
5098 unsigned MSK5 : 1;
5099 unsigned MSK6 : 1;
5100 unsigned MSK7 : 1;
5101 } __SSP1ADDbits_t;
5103 extern __at(0x0FC8) volatile __SSP1ADDbits_t SSP1ADDbits;
5105 #define _MSK0 0x01
5106 #define _MSK1 0x02
5107 #define _MSK2 0x04
5108 #define _MSK3 0x08
5109 #define _MSK4 0x10
5110 #define _MSK5 0x20
5111 #define _MSK6 0x40
5112 #define _MSK7 0x80
5114 //==============================================================================
5117 //==============================================================================
5118 // SSPADD Bits
5120 extern __at(0x0FC8) __sfr SSPADD;
5122 typedef struct
5124 unsigned MSK0 : 1;
5125 unsigned MSK1 : 1;
5126 unsigned MSK2 : 1;
5127 unsigned MSK3 : 1;
5128 unsigned MSK4 : 1;
5129 unsigned MSK5 : 1;
5130 unsigned MSK6 : 1;
5131 unsigned MSK7 : 1;
5132 } __SSPADDbits_t;
5134 extern __at(0x0FC8) volatile __SSPADDbits_t SSPADDbits;
5136 #define _SSPADD_MSK0 0x01
5137 #define _SSPADD_MSK1 0x02
5138 #define _SSPADD_MSK2 0x04
5139 #define _SSPADD_MSK3 0x08
5140 #define _SSPADD_MSK4 0x10
5141 #define _SSPADD_MSK5 0x20
5142 #define _SSPADD_MSK6 0x40
5143 #define _SSPADD_MSK7 0x80
5145 //==============================================================================
5147 extern __at(0x0FC9) __sfr SSP1BUF;
5148 extern __at(0x0FC9) __sfr SSPBUF;
5150 //==============================================================================
5151 // T2CON Bits
5153 extern __at(0x0FCA) __sfr T2CON;
5155 typedef union
5157 struct
5159 unsigned T2CKPS0 : 1;
5160 unsigned T2CKPS1 : 1;
5161 unsigned TMR2ON : 1;
5162 unsigned T2OUTPS0 : 1;
5163 unsigned T2OUTPS1 : 1;
5164 unsigned T2OUTPS2 : 1;
5165 unsigned T2OUTPS3 : 1;
5166 unsigned : 1;
5169 struct
5171 unsigned T2CKPS : 2;
5172 unsigned : 6;
5175 struct
5177 unsigned : 3;
5178 unsigned T2OUTPS : 4;
5179 unsigned : 1;
5181 } __T2CONbits_t;
5183 extern __at(0x0FCA) volatile __T2CONbits_t T2CONbits;
5185 #define _T2CKPS0 0x01
5186 #define _T2CKPS1 0x02
5187 #define _TMR2ON 0x04
5188 #define _T2OUTPS0 0x08
5189 #define _T2OUTPS1 0x10
5190 #define _T2OUTPS2 0x20
5191 #define _T2OUTPS3 0x40
5193 //==============================================================================
5195 extern __at(0x0FCB) __sfr PR2;
5196 extern __at(0x0FCC) __sfr TMR2;
5198 //==============================================================================
5199 // T1CON Bits
5201 extern __at(0x0FCD) __sfr T1CON;
5203 typedef union
5205 struct
5207 unsigned TMR1ON : 1;
5208 unsigned TMR1CS : 1;
5209 unsigned NOT_T1SYNC : 1;
5210 unsigned T1OSCEN : 1;
5211 unsigned T1CKPS0 : 1;
5212 unsigned T1CKPS1 : 1;
5213 unsigned T1RUN : 1;
5214 unsigned RD16 : 1;
5217 struct
5219 unsigned : 1;
5220 unsigned : 1;
5221 unsigned T1INSYNC : 1;
5222 unsigned : 1;
5223 unsigned : 1;
5224 unsigned : 1;
5225 unsigned : 1;
5226 unsigned : 1;
5229 struct
5231 unsigned : 1;
5232 unsigned : 1;
5233 unsigned T1SYNC : 1;
5234 unsigned : 1;
5235 unsigned : 1;
5236 unsigned : 1;
5237 unsigned : 1;
5238 unsigned : 1;
5241 struct
5243 unsigned : 4;
5244 unsigned T1CKPS : 2;
5245 unsigned : 2;
5247 } __T1CONbits_t;
5249 extern __at(0x0FCD) volatile __T1CONbits_t T1CONbits;
5251 #define _TMR1ON 0x01
5252 #define _TMR1CS 0x02
5253 #define _NOT_T1SYNC 0x04
5254 #define _T1INSYNC 0x04
5255 #define _T1SYNC 0x04
5256 #define _T1OSCEN 0x08
5257 #define _T1CKPS0 0x10
5258 #define _T1CKPS1 0x20
5259 #define _T1RUN 0x40
5260 #define _RD16 0x80
5262 //==============================================================================
5264 extern __at(0x0FCE) __sfr TMR1;
5265 extern __at(0x0FCE) __sfr TMR1L;
5266 extern __at(0x0FCF) __sfr TMR1H;
5268 //==============================================================================
5269 // RCON Bits
5271 extern __at(0x0FD0) __sfr RCON;
5273 typedef union
5275 struct
5277 unsigned NOT_BOR : 1;
5278 unsigned NOT_POR : 1;
5279 unsigned NOT_PD : 1;
5280 unsigned NOT_TO : 1;
5281 unsigned NOT_RI : 1;
5282 unsigned NOT_CM : 1;
5283 unsigned : 1;
5284 unsigned IPEN : 1;
5287 struct
5289 unsigned BOR : 1;
5290 unsigned POR : 1;
5291 unsigned PD : 1;
5292 unsigned TO : 1;
5293 unsigned RI : 1;
5294 unsigned CM : 1;
5295 unsigned : 1;
5296 unsigned : 1;
5298 } __RCONbits_t;
5300 extern __at(0x0FD0) volatile __RCONbits_t RCONbits;
5302 #define _NOT_BOR 0x01
5303 #define _BOR 0x01
5304 #define _NOT_POR 0x02
5305 #define _POR 0x02
5306 #define _NOT_PD 0x04
5307 #define _PD 0x04
5308 #define _NOT_TO 0x08
5309 #define _TO 0x08
5310 #define _NOT_RI 0x10
5311 #define _RI 0x10
5312 #define _NOT_CM 0x20
5313 #define _CM 0x20
5314 #define _IPEN 0x80
5316 //==============================================================================
5319 //==============================================================================
5320 // WDTCON Bits
5322 extern __at(0x0FD1) __sfr WDTCON;
5324 typedef union
5326 struct
5328 unsigned SWDTEN : 1;
5329 unsigned : 1;
5330 unsigned : 1;
5331 unsigned : 1;
5332 unsigned : 1;
5333 unsigned : 1;
5334 unsigned : 1;
5335 unsigned REGSLP : 1;
5338 struct
5340 unsigned SWDTE : 1;
5341 unsigned : 1;
5342 unsigned : 1;
5343 unsigned : 1;
5344 unsigned : 1;
5345 unsigned : 1;
5346 unsigned : 1;
5347 unsigned : 1;
5349 } __WDTCONbits_t;
5351 extern __at(0x0FD1) volatile __WDTCONbits_t WDTCONbits;
5353 #define _SWDTEN 0x01
5354 #define _SWDTE 0x01
5355 #define _REGSLP 0x80
5357 //==============================================================================
5360 //==============================================================================
5361 // LCDREG Bits
5363 extern __at(0x0FD2) __sfr LCDREG;
5365 typedef union
5367 struct
5369 unsigned CKSEL0 : 1;
5370 unsigned CKSEL1 : 1;
5371 unsigned MODE13 : 1;
5372 unsigned BIAS0 : 1;
5373 unsigned BIAS1 : 1;
5374 unsigned BIAS2 : 1;
5375 unsigned CPEN : 1;
5376 unsigned : 1;
5379 struct
5381 unsigned CKSEL : 2;
5382 unsigned : 6;
5385 struct
5387 unsigned : 3;
5388 unsigned BIAS : 3;
5389 unsigned : 2;
5391 } __LCDREGbits_t;
5393 extern __at(0x0FD2) volatile __LCDREGbits_t LCDREGbits;
5395 #define _CKSEL0 0x01
5396 #define _CKSEL1 0x02
5397 #define _MODE13 0x04
5398 #define _BIAS0 0x08
5399 #define _BIAS1 0x10
5400 #define _BIAS2 0x20
5401 #define _CPEN 0x40
5403 //==============================================================================
5406 //==============================================================================
5407 // OSCCON Bits
5409 extern __at(0x0FD3) __sfr OSCCON;
5411 typedef union
5413 struct
5415 unsigned SCS0 : 1;
5416 unsigned SCS1 : 1;
5417 unsigned IOFS : 1;
5418 unsigned OSTS : 1;
5419 unsigned IRCF0 : 1;
5420 unsigned IRCF1 : 1;
5421 unsigned IRCF2 : 1;
5422 unsigned IDLEN : 1;
5425 struct
5427 unsigned SCS : 2;
5428 unsigned : 6;
5431 struct
5433 unsigned : 4;
5434 unsigned IRCF : 3;
5435 unsigned : 1;
5437 } __OSCCONbits_t;
5439 extern __at(0x0FD3) volatile __OSCCONbits_t OSCCONbits;
5441 #define _SCS0 0x01
5442 #define _SCS1 0x02
5443 #define _IOFS 0x04
5444 #define _OSTS 0x08
5445 #define _IRCF0 0x10
5446 #define _IRCF1 0x20
5447 #define _IRCF2 0x40
5448 #define _IDLEN 0x80
5450 //==============================================================================
5453 //==============================================================================
5454 // T0CON Bits
5456 extern __at(0x0FD5) __sfr T0CON;
5458 typedef union
5460 struct
5462 unsigned T0PS0 : 1;
5463 unsigned T0PS1 : 1;
5464 unsigned T0PS2 : 1;
5465 unsigned PSA : 1;
5466 unsigned T0SE : 1;
5467 unsigned T0CS : 1;
5468 unsigned T08BIT : 1;
5469 unsigned TMR0ON : 1;
5472 struct
5474 unsigned T0PS : 3;
5475 unsigned : 5;
5477 } __T0CONbits_t;
5479 extern __at(0x0FD5) volatile __T0CONbits_t T0CONbits;
5481 #define _T0PS0 0x01
5482 #define _T0PS1 0x02
5483 #define _T0PS2 0x04
5484 #define _PSA 0x08
5485 #define _T0SE 0x10
5486 #define _T0CS 0x20
5487 #define _T08BIT 0x40
5488 #define _TMR0ON 0x80
5490 //==============================================================================
5492 extern __at(0x0FD6) __sfr TMR0;
5493 extern __at(0x0FD6) __sfr TMR0L;
5494 extern __at(0x0FD7) __sfr TMR0H;
5496 //==============================================================================
5497 // STATUS Bits
5499 extern __at(0x0FD8) __sfr STATUS;
5501 typedef struct
5503 unsigned C : 1;
5504 unsigned DC : 1;
5505 unsigned Z : 1;
5506 unsigned OV : 1;
5507 unsigned N : 1;
5508 unsigned : 1;
5509 unsigned : 1;
5510 unsigned : 1;
5511 } __STATUSbits_t;
5513 extern __at(0x0FD8) volatile __STATUSbits_t STATUSbits;
5515 #define _C 0x01
5516 #define _DC 0x02
5517 #define _Z 0x04
5518 #define _OV 0x08
5519 #define _N 0x10
5521 //==============================================================================
5523 extern __at(0x0FD9) __sfr FSR2L;
5524 extern __at(0x0FDA) __sfr FSR2H;
5525 extern __at(0x0FDB) __sfr PLUSW2;
5526 extern __at(0x0FDC) __sfr PREINC2;
5527 extern __at(0x0FDD) __sfr POSTDEC2;
5528 extern __at(0x0FDE) __sfr POSTINC2;
5529 extern __at(0x0FDF) __sfr INDF2;
5530 extern __at(0x0FE0) __sfr BSR;
5531 extern __at(0x0FE1) __sfr FSR1L;
5532 extern __at(0x0FE2) __sfr FSR1H;
5533 extern __at(0x0FE3) __sfr PLUSW1;
5534 extern __at(0x0FE4) __sfr PREINC1;
5535 extern __at(0x0FE5) __sfr POSTDEC1;
5536 extern __at(0x0FE6) __sfr POSTINC1;
5537 extern __at(0x0FE7) __sfr INDF1;
5538 extern __at(0x0FE8) __sfr WREG;
5539 extern __at(0x0FE9) __sfr FSR0L;
5540 extern __at(0x0FEA) __sfr FSR0H;
5541 extern __at(0x0FEB) __sfr PLUSW0;
5542 extern __at(0x0FEC) __sfr PREINC0;
5543 extern __at(0x0FED) __sfr POSTDEC0;
5544 extern __at(0x0FEE) __sfr POSTINC0;
5545 extern __at(0x0FEF) __sfr INDF0;
5547 //==============================================================================
5548 // INTCON3 Bits
5550 extern __at(0x0FF0) __sfr INTCON3;
5552 typedef union
5554 struct
5556 unsigned INT1IF : 1;
5557 unsigned INT2IF : 1;
5558 unsigned INT3IF : 1;
5559 unsigned INT1IE : 1;
5560 unsigned INT2IE : 1;
5561 unsigned INT3IE : 1;
5562 unsigned INT1IP : 1;
5563 unsigned INT2IP : 1;
5566 struct
5568 unsigned INT1F : 1;
5569 unsigned INT2F : 1;
5570 unsigned INT3F : 1;
5571 unsigned INT1E : 1;
5572 unsigned INT2E : 1;
5573 unsigned INT3E : 1;
5574 unsigned INT1P : 1;
5575 unsigned INT2P : 1;
5577 } __INTCON3bits_t;
5579 extern __at(0x0FF0) volatile __INTCON3bits_t INTCON3bits;
5581 #define _INT1IF 0x01
5582 #define _INT1F 0x01
5583 #define _INT2IF 0x02
5584 #define _INT2F 0x02
5585 #define _INT3IF 0x04
5586 #define _INT3F 0x04
5587 #define _INT1IE 0x08
5588 #define _INT1E 0x08
5589 #define _INT2IE 0x10
5590 #define _INT2E 0x10
5591 #define _INT3IE 0x20
5592 #define _INT3E 0x20
5593 #define _INT1IP 0x40
5594 #define _INT1P 0x40
5595 #define _INT2IP 0x80
5596 #define _INT2P 0x80
5598 //==============================================================================
5601 //==============================================================================
5602 // INTCON2 Bits
5604 extern __at(0x0FF1) __sfr INTCON2;
5606 typedef union
5608 struct
5610 unsigned RBIP : 1;
5611 unsigned INT3IP : 1;
5612 unsigned TMR0IP : 1;
5613 unsigned INTEDG3 : 1;
5614 unsigned INTEDG2 : 1;
5615 unsigned INTEDG1 : 1;
5616 unsigned INTEDG0 : 1;
5617 unsigned NOT_RBPU : 1;
5620 struct
5622 unsigned : 1;
5623 unsigned INT3P : 1;
5624 unsigned T0IP : 1;
5625 unsigned : 1;
5626 unsigned : 1;
5627 unsigned : 1;
5628 unsigned : 1;
5629 unsigned RBPU : 1;
5631 } __INTCON2bits_t;
5633 extern __at(0x0FF1) volatile __INTCON2bits_t INTCON2bits;
5635 #define _RBIP 0x01
5636 #define _INT3IP 0x02
5637 #define _INT3P 0x02
5638 #define _TMR0IP 0x04
5639 #define _T0IP 0x04
5640 #define _INTEDG3 0x08
5641 #define _INTEDG2 0x10
5642 #define _INTEDG1 0x20
5643 #define _INTEDG0 0x40
5644 #define _NOT_RBPU 0x80
5645 #define _RBPU 0x80
5647 //==============================================================================
5650 //==============================================================================
5651 // INTCON Bits
5653 extern __at(0x0FF2) __sfr INTCON;
5655 typedef union
5657 struct
5659 unsigned RBIF : 1;
5660 unsigned INT0IF : 1;
5661 unsigned TMR0IF : 1;
5662 unsigned RBIE : 1;
5663 unsigned INT0IE : 1;
5664 unsigned TMR0IE : 1;
5665 unsigned PEIE_GIEL : 1;
5666 unsigned GIE_GIEH : 1;
5669 struct
5671 unsigned : 1;
5672 unsigned INT0F : 1;
5673 unsigned T0IF : 1;
5674 unsigned : 1;
5675 unsigned INT0E : 1;
5676 unsigned T0IE : 1;
5677 unsigned PEIE : 1;
5678 unsigned GIE : 1;
5681 struct
5683 unsigned : 1;
5684 unsigned : 1;
5685 unsigned : 1;
5686 unsigned : 1;
5687 unsigned : 1;
5688 unsigned : 1;
5689 unsigned GIEL : 1;
5690 unsigned GIEH : 1;
5692 } __INTCONbits_t;
5694 extern __at(0x0FF2) volatile __INTCONbits_t INTCONbits;
5696 #define _RBIF 0x01
5697 #define _INT0IF 0x02
5698 #define _INT0F 0x02
5699 #define _TMR0IF 0x04
5700 #define _T0IF 0x04
5701 #define _RBIE 0x08
5702 #define _INT0IE 0x10
5703 #define _INT0E 0x10
5704 #define _TMR0IE 0x20
5705 #define _T0IE 0x20
5706 #define _PEIE_GIEL 0x40
5707 #define _PEIE 0x40
5708 #define _GIEL 0x40
5709 #define _GIE_GIEH 0x80
5710 #define _GIE 0x80
5711 #define _GIEH 0x80
5713 //==============================================================================
5715 extern __at(0x0FF3) __sfr PROD;
5716 extern __at(0x0FF3) __sfr PRODL;
5717 extern __at(0x0FF4) __sfr PRODH;
5718 extern __at(0x0FF5) __sfr TABLAT;
5719 extern __at(0x0FF6) __sfr TBLPTR;
5720 extern __at(0x0FF6) __sfr TBLPTRL;
5721 extern __at(0x0FF7) __sfr TBLPTRH;
5722 extern __at(0x0FF8) __sfr TBLPTRU;
5723 extern __at(0x0FF9) __sfr PC;
5724 extern __at(0x0FF9) __sfr PCL;
5725 extern __at(0x0FFA) __sfr PCLATH;
5726 extern __at(0x0FFB) __sfr PCLATU;
5728 //==============================================================================
5729 // STKPTR Bits
5731 extern __at(0x0FFC) __sfr STKPTR;
5733 typedef union
5735 struct
5737 unsigned SP0 : 1;
5738 unsigned SP1 : 1;
5739 unsigned SP2 : 1;
5740 unsigned SP3 : 1;
5741 unsigned SP4 : 1;
5742 unsigned : 1;
5743 unsigned STKUNF : 1;
5744 unsigned STKFUL : 1;
5747 struct
5749 unsigned STKPTR0 : 1;
5750 unsigned STKPTR1 : 1;
5751 unsigned STKPTR2 : 1;
5752 unsigned STKPTR3 : 1;
5753 unsigned STKPTR4 : 1;
5754 unsigned : 1;
5755 unsigned : 1;
5756 unsigned STKOVF : 1;
5759 struct
5761 unsigned SP : 5;
5762 unsigned : 3;
5765 struct
5767 unsigned STKPTR : 5;
5768 unsigned : 3;
5770 } __STKPTRbits_t;
5772 extern __at(0x0FFC) volatile __STKPTRbits_t STKPTRbits;
5774 #define _SP0 0x01
5775 #define _STKPTR0 0x01
5776 #define _SP1 0x02
5777 #define _STKPTR1 0x02
5778 #define _SP2 0x04
5779 #define _STKPTR2 0x04
5780 #define _SP3 0x08
5781 #define _STKPTR3 0x08
5782 #define _SP4 0x10
5783 #define _STKPTR4 0x10
5784 #define _STKUNF 0x40
5785 #define _STKFUL 0x80
5786 #define _STKOVF 0x80
5788 //==============================================================================
5790 extern __at(0x0FFD) __sfr TOS;
5791 extern __at(0x0FFD) __sfr TOSL;
5792 extern __at(0x0FFE) __sfr TOSH;
5793 extern __at(0x0FFF) __sfr TOSU;
5795 //==============================================================================
5797 // Configuration Addresses
5799 //==============================================================================
5801 #define __CONFIG1L 0x01FFF8
5802 #define __CONFIG1H 0x01FFF9
5803 #define __CONFIG2L 0x01FFFA
5804 #define __CONFIG2H 0x01FFFB
5805 #define __CONFIG3L 0x01FFFC
5806 #define __CONFIG3H 0x01FFFD
5807 #define __CONFIG4L 0x01FFFE
5808 #define __CONFIG4H 0x01FFFF
5810 //==============================================================================
5812 #endif // #ifndef __PIC18F67J93_H__