struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16f913.h
blob801314037078e6c91337ed9cb8d38060dcc39ee5
1 /*
2 * This declarations of the PIC16F913 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:01 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 __PIC16F913_H__
26 #define __PIC16F913_H__
28 //==============================================================================
30 // Register Addresses
32 //==============================================================================
34 #ifndef NO_ADDR_DEFINES
36 #define INDF_ADDR 0x0000
37 #define TMR0_ADDR 0x0001
38 #define PCL_ADDR 0x0002
39 #define STATUS_ADDR 0x0003
40 #define FSR_ADDR 0x0004
41 #define PORTA_ADDR 0x0005
42 #define PORTB_ADDR 0x0006
43 #define PORTC_ADDR 0x0007
44 #define PORTE_ADDR 0x0009
45 #define PCLATH_ADDR 0x000A
46 #define INTCON_ADDR 0x000B
47 #define PIR1_ADDR 0x000C
48 #define PIR2_ADDR 0x000D
49 #define TMR1_ADDR 0x000E
50 #define TMR1L_ADDR 0x000E
51 #define TMR1H_ADDR 0x000F
52 #define T1CON_ADDR 0x0010
53 #define TMR2_ADDR 0x0011
54 #define T2CON_ADDR 0x0012
55 #define SSPBUF_ADDR 0x0013
56 #define SSPCON_ADDR 0x0014
57 #define CCPR1_ADDR 0x0015
58 #define CCPR1L_ADDR 0x0015
59 #define CCPR1H_ADDR 0x0016
60 #define CCP1CON_ADDR 0x0017
61 #define RCSTA_ADDR 0x0018
62 #define TXREG_ADDR 0x0019
63 #define RCREG_ADDR 0x001A
64 #define ADRESH_ADDR 0x001E
65 #define ADCON0_ADDR 0x001F
66 #define OPTION_REG_ADDR 0x0081
67 #define TRISA_ADDR 0x0085
68 #define TRISB_ADDR 0x0086
69 #define TRISC_ADDR 0x0087
70 #define TRISE_ADDR 0x0089
71 #define PIE1_ADDR 0x008C
72 #define PIE2_ADDR 0x008D
73 #define PCON_ADDR 0x008E
74 #define OSCCON_ADDR 0x008F
75 #define OSCTUNE_ADDR 0x0090
76 #define ANSEL_ADDR 0x0091
77 #define PR2_ADDR 0x0092
78 #define SSPADD_ADDR 0x0093
79 #define SSPSTAT_ADDR 0x0094
80 #define WPU_ADDR 0x0095
81 #define WPUB_ADDR 0x0095
82 #define IOC_ADDR 0x0096
83 #define IOCB_ADDR 0x0096
84 #define CMCON1_ADDR 0x0097
85 #define TXSTA_ADDR 0x0098
86 #define SPBRG_ADDR 0x0099
87 #define CMCON0_ADDR 0x009C
88 #define VRCON_ADDR 0x009D
89 #define ADRESL_ADDR 0x009E
90 #define ADCON1_ADDR 0x009F
91 #define WDTCON_ADDR 0x0105
92 #define LCDCON_ADDR 0x0107
93 #define LCDPS_ADDR 0x0108
94 #define LVDCON_ADDR 0x0109
95 #define EEDATA_ADDR 0x010C
96 #define EEDATL_ADDR 0x010C
97 #define EEADR_ADDR 0x010D
98 #define EEADRL_ADDR 0x010D
99 #define EEDATH_ADDR 0x010E
100 #define EEADRH_ADDR 0x010F
101 #define LCDDATA0_ADDR 0x0110
102 #define LCDDATA1_ADDR 0x0111
103 #define LCDDATA3_ADDR 0x0113
104 #define LCDDATA4_ADDR 0x0114
105 #define LCDDATA6_ADDR 0x0116
106 #define LCDDATA7_ADDR 0x0117
107 #define LCDDATA9_ADDR 0x0119
108 #define LCDDATA10_ADDR 0x011A
109 #define LCDSE0_ADDR 0x011C
110 #define LCDSE1_ADDR 0x011D
111 #define EECON1_ADDR 0x018C
112 #define EECON2_ADDR 0x018D
114 #endif // #ifndef NO_ADDR_DEFINES
116 //==============================================================================
118 // Register Definitions
120 //==============================================================================
122 extern __at(0x0000) __sfr INDF;
123 extern __at(0x0001) __sfr TMR0;
124 extern __at(0x0002) __sfr PCL;
126 //==============================================================================
127 // STATUS Bits
129 extern __at(0x0003) __sfr STATUS;
131 typedef union
133 struct
135 unsigned C : 1;
136 unsigned DC : 1;
137 unsigned Z : 1;
138 unsigned NOT_PD : 1;
139 unsigned NOT_TO : 1;
140 unsigned RP0 : 1;
141 unsigned RP1 : 1;
142 unsigned IRP : 1;
145 struct
147 unsigned : 5;
148 unsigned RP : 2;
149 unsigned : 1;
151 } __STATUSbits_t;
153 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
155 #define _C 0x01
156 #define _DC 0x02
157 #define _Z 0x04
158 #define _NOT_PD 0x08
159 #define _NOT_TO 0x10
160 #define _RP0 0x20
161 #define _RP1 0x40
162 #define _IRP 0x80
164 //==============================================================================
166 extern __at(0x0004) __sfr FSR;
168 //==============================================================================
169 // PORTA Bits
171 extern __at(0x0005) __sfr PORTA;
173 typedef struct
175 unsigned RA0 : 1;
176 unsigned RA1 : 1;
177 unsigned RA2 : 1;
178 unsigned RA3 : 1;
179 unsigned RA4 : 1;
180 unsigned RA5 : 1;
181 unsigned RA6 : 1;
182 unsigned RA7 : 1;
183 } __PORTAbits_t;
185 extern __at(0x0005) volatile __PORTAbits_t PORTAbits;
187 #define _RA0 0x01
188 #define _RA1 0x02
189 #define _RA2 0x04
190 #define _RA3 0x08
191 #define _RA4 0x10
192 #define _RA5 0x20
193 #define _RA6 0x40
194 #define _RA7 0x80
196 //==============================================================================
199 //==============================================================================
200 // PORTB Bits
202 extern __at(0x0006) __sfr PORTB;
204 typedef struct
206 unsigned RB0 : 1;
207 unsigned RB1 : 1;
208 unsigned RB2 : 1;
209 unsigned RB3 : 1;
210 unsigned RB4 : 1;
211 unsigned RB5 : 1;
212 unsigned RB6 : 1;
213 unsigned RB7 : 1;
214 } __PORTBbits_t;
216 extern __at(0x0006) volatile __PORTBbits_t PORTBbits;
218 #define _RB0 0x01
219 #define _RB1 0x02
220 #define _RB2 0x04
221 #define _RB3 0x08
222 #define _RB4 0x10
223 #define _RB5 0x20
224 #define _RB6 0x40
225 #define _RB7 0x80
227 //==============================================================================
230 //==============================================================================
231 // PORTC Bits
233 extern __at(0x0007) __sfr PORTC;
235 typedef struct
237 unsigned RC0 : 1;
238 unsigned RC1 : 1;
239 unsigned RC2 : 1;
240 unsigned RC3 : 1;
241 unsigned RC4 : 1;
242 unsigned RC5 : 1;
243 unsigned RC6 : 1;
244 unsigned RC7 : 1;
245 } __PORTCbits_t;
247 extern __at(0x0007) volatile __PORTCbits_t PORTCbits;
249 #define _RC0 0x01
250 #define _RC1 0x02
251 #define _RC2 0x04
252 #define _RC3 0x08
253 #define _RC4 0x10
254 #define _RC5 0x20
255 #define _RC6 0x40
256 #define _RC7 0x80
258 //==============================================================================
261 //==============================================================================
262 // PORTE Bits
264 extern __at(0x0009) __sfr PORTE;
266 typedef struct
268 unsigned : 1;
269 unsigned : 1;
270 unsigned : 1;
271 unsigned RE3 : 1;
272 unsigned : 1;
273 unsigned : 1;
274 unsigned : 1;
275 unsigned : 1;
276 } __PORTEbits_t;
278 extern __at(0x0009) volatile __PORTEbits_t PORTEbits;
280 #define _RE3 0x08
282 //==============================================================================
284 extern __at(0x000A) __sfr PCLATH;
286 //==============================================================================
287 // INTCON Bits
289 extern __at(0x000B) __sfr INTCON;
291 typedef union
293 struct
295 unsigned RBIF : 1;
296 unsigned INTF : 1;
297 unsigned TMR0IF : 1;
298 unsigned RBIE : 1;
299 unsigned INTE : 1;
300 unsigned TMR0IE : 1;
301 unsigned PEIE : 1;
302 unsigned GIE : 1;
305 struct
307 unsigned : 1;
308 unsigned : 1;
309 unsigned T0IF : 1;
310 unsigned : 1;
311 unsigned : 1;
312 unsigned T0IE : 1;
313 unsigned : 1;
314 unsigned : 1;
316 } __INTCONbits_t;
318 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
320 #define _RBIF 0x01
321 #define _INTF 0x02
322 #define _TMR0IF 0x04
323 #define _T0IF 0x04
324 #define _RBIE 0x08
325 #define _INTE 0x10
326 #define _TMR0IE 0x20
327 #define _T0IE 0x20
328 #define _PEIE 0x40
329 #define _GIE 0x80
331 //==============================================================================
334 //==============================================================================
335 // PIR1 Bits
337 extern __at(0x000C) __sfr PIR1;
339 typedef struct
341 unsigned TMR1IF : 1;
342 unsigned TMR2IF : 1;
343 unsigned CCP1IF : 1;
344 unsigned SSPIF : 1;
345 unsigned TXIF : 1;
346 unsigned RCIF : 1;
347 unsigned ADIF : 1;
348 unsigned EEIF : 1;
349 } __PIR1bits_t;
351 extern __at(0x000C) volatile __PIR1bits_t PIR1bits;
353 #define _TMR1IF 0x01
354 #define _TMR2IF 0x02
355 #define _CCP1IF 0x04
356 #define _SSPIF 0x08
357 #define _TXIF 0x10
358 #define _RCIF 0x20
359 #define _ADIF 0x40
360 #define _EEIF 0x80
362 //==============================================================================
365 //==============================================================================
366 // PIR2 Bits
368 extern __at(0x000D) __sfr PIR2;
370 typedef struct
372 unsigned : 1;
373 unsigned : 1;
374 unsigned LVDIF : 1;
375 unsigned : 1;
376 unsigned LCDIF : 1;
377 unsigned C1IF : 1;
378 unsigned C2IF : 1;
379 unsigned OSFIF : 1;
380 } __PIR2bits_t;
382 extern __at(0x000D) volatile __PIR2bits_t PIR2bits;
384 #define _LVDIF 0x04
385 #define _LCDIF 0x10
386 #define _C1IF 0x20
387 #define _C2IF 0x40
388 #define _OSFIF 0x80
390 //==============================================================================
392 extern __at(0x000E) __sfr TMR1;
393 extern __at(0x000E) __sfr TMR1L;
394 extern __at(0x000F) __sfr TMR1H;
396 //==============================================================================
397 // T1CON Bits
399 extern __at(0x0010) __sfr T1CON;
401 typedef union
403 struct
405 unsigned TMR1ON : 1;
406 unsigned TMR1CS : 1;
407 unsigned NOT_T1SYNC : 1;
408 unsigned T1OSCEN : 1;
409 unsigned T1CKPS0 : 1;
410 unsigned T1CKPS1 : 1;
411 unsigned TMR1GE : 1;
412 unsigned T1GINV : 1;
415 struct
417 unsigned : 1;
418 unsigned : 1;
419 unsigned T1SYNC : 1;
420 unsigned : 1;
421 unsigned : 1;
422 unsigned : 1;
423 unsigned T1GE : 1;
424 unsigned : 1;
427 struct
429 unsigned : 1;
430 unsigned : 1;
431 unsigned T1INSYNC : 1;
432 unsigned : 1;
433 unsigned : 1;
434 unsigned : 1;
435 unsigned : 1;
436 unsigned : 1;
439 struct
441 unsigned : 4;
442 unsigned T1CKPS : 2;
443 unsigned : 2;
445 } __T1CONbits_t;
447 extern __at(0x0010) volatile __T1CONbits_t T1CONbits;
449 #define _TMR1ON 0x01
450 #define _TMR1CS 0x02
451 #define _NOT_T1SYNC 0x04
452 #define _T1SYNC 0x04
453 #define _T1INSYNC 0x04
454 #define _T1OSCEN 0x08
455 #define _T1CKPS0 0x10
456 #define _T1CKPS1 0x20
457 #define _TMR1GE 0x40
458 #define _T1GE 0x40
459 #define _T1GINV 0x80
461 //==============================================================================
463 extern __at(0x0011) __sfr TMR2;
465 //==============================================================================
466 // T2CON Bits
468 extern __at(0x0012) __sfr T2CON;
470 typedef union
472 struct
474 unsigned T2CKPS0 : 1;
475 unsigned T2CKPS1 : 1;
476 unsigned TMR2ON : 1;
477 unsigned TOUTPS0 : 1;
478 unsigned TOUTPS1 : 1;
479 unsigned TOUTPS2 : 1;
480 unsigned TOUTPS3 : 1;
481 unsigned : 1;
484 struct
486 unsigned T2CKPS : 2;
487 unsigned : 6;
490 struct
492 unsigned : 3;
493 unsigned TOUTPS : 4;
494 unsigned : 1;
496 } __T2CONbits_t;
498 extern __at(0x0012) volatile __T2CONbits_t T2CONbits;
500 #define _T2CKPS0 0x01
501 #define _T2CKPS1 0x02
502 #define _TMR2ON 0x04
503 #define _TOUTPS0 0x08
504 #define _TOUTPS1 0x10
505 #define _TOUTPS2 0x20
506 #define _TOUTPS3 0x40
508 //==============================================================================
510 extern __at(0x0013) __sfr SSPBUF;
512 //==============================================================================
513 // SSPCON Bits
515 extern __at(0x0014) __sfr SSPCON;
517 typedef union
519 struct
521 unsigned SSPM0 : 1;
522 unsigned SSPM1 : 1;
523 unsigned SSPM2 : 1;
524 unsigned SSPM3 : 1;
525 unsigned CKP : 1;
526 unsigned SSPEN : 1;
527 unsigned SSPOV : 1;
528 unsigned WCOL : 1;
531 struct
533 unsigned SSPM : 4;
534 unsigned : 4;
536 } __SSPCONbits_t;
538 extern __at(0x0014) volatile __SSPCONbits_t SSPCONbits;
540 #define _SSPM0 0x01
541 #define _SSPM1 0x02
542 #define _SSPM2 0x04
543 #define _SSPM3 0x08
544 #define _CKP 0x10
545 #define _SSPEN 0x20
546 #define _SSPOV 0x40
547 #define _WCOL 0x80
549 //==============================================================================
551 extern __at(0x0015) __sfr CCPR1;
552 extern __at(0x0015) __sfr CCPR1L;
553 extern __at(0x0016) __sfr CCPR1H;
555 //==============================================================================
556 // CCP1CON Bits
558 extern __at(0x0017) __sfr CCP1CON;
560 typedef union
562 struct
564 unsigned CCP1M0 : 1;
565 unsigned CCP1M1 : 1;
566 unsigned CCP1M2 : 1;
567 unsigned CCP1M3 : 1;
568 unsigned CCP1Y : 1;
569 unsigned CCP1X : 1;
570 unsigned : 1;
571 unsigned : 1;
574 struct
576 unsigned CCP1M : 4;
577 unsigned : 4;
579 } __CCP1CONbits_t;
581 extern __at(0x0017) volatile __CCP1CONbits_t CCP1CONbits;
583 #define _CCP1M0 0x01
584 #define _CCP1M1 0x02
585 #define _CCP1M2 0x04
586 #define _CCP1M3 0x08
587 #define _CCP1Y 0x10
588 #define _CCP1X 0x20
590 //==============================================================================
593 //==============================================================================
594 // RCSTA Bits
596 extern __at(0x0018) __sfr RCSTA;
598 typedef union
600 struct
602 unsigned RX9D : 1;
603 unsigned OERR : 1;
604 unsigned FERR : 1;
605 unsigned ADDEN : 1;
606 unsigned CREN : 1;
607 unsigned SREN : 1;
608 unsigned RX9 : 1;
609 unsigned SPEN : 1;
612 struct
614 unsigned RCD8 : 1;
615 unsigned : 1;
616 unsigned : 1;
617 unsigned : 1;
618 unsigned : 1;
619 unsigned : 1;
620 unsigned RC9 : 1;
621 unsigned : 1;
624 struct
626 unsigned : 1;
627 unsigned : 1;
628 unsigned : 1;
629 unsigned : 1;
630 unsigned : 1;
631 unsigned : 1;
632 unsigned NOT_RC8 : 1;
633 unsigned : 1;
636 struct
638 unsigned : 1;
639 unsigned : 1;
640 unsigned : 1;
641 unsigned : 1;
642 unsigned : 1;
643 unsigned : 1;
644 unsigned RC8_9 : 1;
645 unsigned : 1;
647 } __RCSTAbits_t;
649 extern __at(0x0018) volatile __RCSTAbits_t RCSTAbits;
651 #define _RX9D 0x01
652 #define _RCD8 0x01
653 #define _OERR 0x02
654 #define _FERR 0x04
655 #define _ADDEN 0x08
656 #define _CREN 0x10
657 #define _SREN 0x20
658 #define _RX9 0x40
659 #define _RC9 0x40
660 #define _NOT_RC8 0x40
661 #define _RC8_9 0x40
662 #define _SPEN 0x80
664 //==============================================================================
666 extern __at(0x0019) __sfr TXREG;
667 extern __at(0x001A) __sfr RCREG;
668 extern __at(0x001E) __sfr ADRESH;
670 //==============================================================================
671 // ADCON0 Bits
673 extern __at(0x001F) __sfr ADCON0;
675 typedef union
677 struct
679 unsigned ADON : 1;
680 unsigned GO_NOT_DONE : 1;
681 unsigned CHS0 : 1;
682 unsigned CHS1 : 1;
683 unsigned CHS2 : 1;
684 unsigned VCFG0 : 1;
685 unsigned VCFG1 : 1;
686 unsigned ADFM : 1;
689 struct
691 unsigned : 1;
692 unsigned NOT_DONE : 1;
693 unsigned : 1;
694 unsigned : 1;
695 unsigned : 1;
696 unsigned : 1;
697 unsigned : 1;
698 unsigned : 1;
701 struct
703 unsigned : 1;
704 unsigned GO_DONE : 1;
705 unsigned : 1;
706 unsigned : 1;
707 unsigned : 1;
708 unsigned : 1;
709 unsigned : 1;
710 unsigned : 1;
713 struct
715 unsigned : 1;
716 unsigned GO : 1;
717 unsigned : 1;
718 unsigned : 1;
719 unsigned : 1;
720 unsigned : 1;
721 unsigned : 1;
722 unsigned : 1;
725 struct
727 unsigned : 2;
728 unsigned CHS : 3;
729 unsigned : 3;
732 struct
734 unsigned : 5;
735 unsigned VCFG : 2;
736 unsigned : 1;
738 } __ADCON0bits_t;
740 extern __at(0x001F) volatile __ADCON0bits_t ADCON0bits;
742 #define _ADON 0x01
743 #define _GO_NOT_DONE 0x02
744 #define _NOT_DONE 0x02
745 #define _GO_DONE 0x02
746 #define _GO 0x02
747 #define _CHS0 0x04
748 #define _CHS1 0x08
749 #define _CHS2 0x10
750 #define _VCFG0 0x20
751 #define _VCFG1 0x40
752 #define _ADFM 0x80
754 //==============================================================================
757 //==============================================================================
758 // OPTION_REG Bits
760 extern __at(0x0081) __sfr OPTION_REG;
762 typedef union
764 struct
766 unsigned PS0 : 1;
767 unsigned PS1 : 1;
768 unsigned PS2 : 1;
769 unsigned PSA : 1;
770 unsigned T0SE : 1;
771 unsigned T0CS : 1;
772 unsigned INTEDG : 1;
773 unsigned NOT_RBPU : 1;
776 struct
778 unsigned PS : 3;
779 unsigned : 5;
781 } __OPTION_REGbits_t;
783 extern __at(0x0081) volatile __OPTION_REGbits_t OPTION_REGbits;
785 #define _PS0 0x01
786 #define _PS1 0x02
787 #define _PS2 0x04
788 #define _PSA 0x08
789 #define _T0SE 0x10
790 #define _T0CS 0x20
791 #define _INTEDG 0x40
792 #define _NOT_RBPU 0x80
794 //==============================================================================
797 //==============================================================================
798 // TRISA Bits
800 extern __at(0x0085) __sfr TRISA;
802 typedef struct
804 unsigned TRISA0 : 1;
805 unsigned TRISA1 : 1;
806 unsigned TRISA2 : 1;
807 unsigned TRISA3 : 1;
808 unsigned TRISA4 : 1;
809 unsigned TRISA5 : 1;
810 unsigned TRISA6 : 1;
811 unsigned TRISA7 : 1;
812 } __TRISAbits_t;
814 extern __at(0x0085) volatile __TRISAbits_t TRISAbits;
816 #define _TRISA0 0x01
817 #define _TRISA1 0x02
818 #define _TRISA2 0x04
819 #define _TRISA3 0x08
820 #define _TRISA4 0x10
821 #define _TRISA5 0x20
822 #define _TRISA6 0x40
823 #define _TRISA7 0x80
825 //==============================================================================
828 //==============================================================================
829 // TRISB Bits
831 extern __at(0x0086) __sfr TRISB;
833 typedef struct
835 unsigned TRISB0 : 1;
836 unsigned TRISB1 : 1;
837 unsigned TRISB2 : 1;
838 unsigned TRISB3 : 1;
839 unsigned TRISB4 : 1;
840 unsigned TRISB5 : 1;
841 unsigned TRISB6 : 1;
842 unsigned TRISB7 : 1;
843 } __TRISBbits_t;
845 extern __at(0x0086) volatile __TRISBbits_t TRISBbits;
847 #define _TRISB0 0x01
848 #define _TRISB1 0x02
849 #define _TRISB2 0x04
850 #define _TRISB3 0x08
851 #define _TRISB4 0x10
852 #define _TRISB5 0x20
853 #define _TRISB6 0x40
854 #define _TRISB7 0x80
856 //==============================================================================
859 //==============================================================================
860 // TRISC Bits
862 extern __at(0x0087) __sfr TRISC;
864 typedef struct
866 unsigned TRISC0 : 1;
867 unsigned TRISC1 : 1;
868 unsigned TRISC2 : 1;
869 unsigned TRISC3 : 1;
870 unsigned TRISC4 : 1;
871 unsigned TRISC5 : 1;
872 unsigned TRISC6 : 1;
873 unsigned TRISC7 : 1;
874 } __TRISCbits_t;
876 extern __at(0x0087) volatile __TRISCbits_t TRISCbits;
878 #define _TRISC0 0x01
879 #define _TRISC1 0x02
880 #define _TRISC2 0x04
881 #define _TRISC3 0x08
882 #define _TRISC4 0x10
883 #define _TRISC5 0x20
884 #define _TRISC6 0x40
885 #define _TRISC7 0x80
887 //==============================================================================
890 //==============================================================================
891 // TRISE Bits
893 extern __at(0x0089) __sfr TRISE;
895 typedef struct
897 unsigned : 1;
898 unsigned : 1;
899 unsigned : 1;
900 unsigned TRISE3 : 1;
901 unsigned : 1;
902 unsigned : 1;
903 unsigned : 1;
904 unsigned : 1;
905 } __TRISEbits_t;
907 extern __at(0x0089) volatile __TRISEbits_t TRISEbits;
909 #define _TRISE3 0x08
911 //==============================================================================
914 //==============================================================================
915 // PIE1 Bits
917 extern __at(0x008C) __sfr PIE1;
919 typedef struct
921 unsigned TMR1IE : 1;
922 unsigned TMR2IE : 1;
923 unsigned CCP1IE : 1;
924 unsigned SSPIE : 1;
925 unsigned TXIE : 1;
926 unsigned RCIE : 1;
927 unsigned ADIE : 1;
928 unsigned EEIE : 1;
929 } __PIE1bits_t;
931 extern __at(0x008C) volatile __PIE1bits_t PIE1bits;
933 #define _TMR1IE 0x01
934 #define _TMR2IE 0x02
935 #define _CCP1IE 0x04
936 #define _SSPIE 0x08
937 #define _TXIE 0x10
938 #define _RCIE 0x20
939 #define _ADIE 0x40
940 #define _EEIE 0x80
942 //==============================================================================
945 //==============================================================================
946 // PIE2 Bits
948 extern __at(0x008D) __sfr PIE2;
950 typedef struct
952 unsigned : 1;
953 unsigned : 1;
954 unsigned LVDIE : 1;
955 unsigned : 1;
956 unsigned LCDIE : 1;
957 unsigned C1IE : 1;
958 unsigned C2IE : 1;
959 unsigned OSFIE : 1;
960 } __PIE2bits_t;
962 extern __at(0x008D) volatile __PIE2bits_t PIE2bits;
964 #define _LVDIE 0x04
965 #define _LCDIE 0x10
966 #define _C1IE 0x20
967 #define _C2IE 0x40
968 #define _OSFIE 0x80
970 //==============================================================================
973 //==============================================================================
974 // PCON Bits
976 extern __at(0x008E) __sfr PCON;
978 typedef union
980 struct
982 unsigned NOT_BOR : 1;
983 unsigned NOT_POR : 1;
984 unsigned : 1;
985 unsigned : 1;
986 unsigned SBOREN : 1;
987 unsigned : 1;
988 unsigned : 1;
989 unsigned : 1;
992 struct
994 unsigned NOT_BO : 1;
995 unsigned : 1;
996 unsigned : 1;
997 unsigned : 1;
998 unsigned : 1;
999 unsigned : 1;
1000 unsigned : 1;
1001 unsigned : 1;
1003 } __PCONbits_t;
1005 extern __at(0x008E) volatile __PCONbits_t PCONbits;
1007 #define _NOT_BOR 0x01
1008 #define _NOT_BO 0x01
1009 #define _NOT_POR 0x02
1010 #define _SBOREN 0x10
1012 //==============================================================================
1015 //==============================================================================
1016 // OSCCON Bits
1018 extern __at(0x008F) __sfr OSCCON;
1020 typedef union
1022 struct
1024 unsigned SCS : 1;
1025 unsigned LTS : 1;
1026 unsigned HTS : 1;
1027 unsigned OSTS : 1;
1028 unsigned IRCF0 : 1;
1029 unsigned IRCF1 : 1;
1030 unsigned IRCF2 : 1;
1031 unsigned : 1;
1034 struct
1036 unsigned : 4;
1037 unsigned IRCF : 3;
1038 unsigned : 1;
1040 } __OSCCONbits_t;
1042 extern __at(0x008F) volatile __OSCCONbits_t OSCCONbits;
1044 #define _SCS 0x01
1045 #define _LTS 0x02
1046 #define _HTS 0x04
1047 #define _OSTS 0x08
1048 #define _IRCF0 0x10
1049 #define _IRCF1 0x20
1050 #define _IRCF2 0x40
1052 //==============================================================================
1055 //==============================================================================
1056 // OSCTUNE Bits
1058 extern __at(0x0090) __sfr OSCTUNE;
1060 typedef union
1062 struct
1064 unsigned TUN0 : 1;
1065 unsigned TUN1 : 1;
1066 unsigned TUN2 : 1;
1067 unsigned TUN3 : 1;
1068 unsigned TUN4 : 1;
1069 unsigned : 1;
1070 unsigned : 1;
1071 unsigned : 1;
1074 struct
1076 unsigned TUN : 5;
1077 unsigned : 3;
1079 } __OSCTUNEbits_t;
1081 extern __at(0x0090) volatile __OSCTUNEbits_t OSCTUNEbits;
1083 #define _TUN0 0x01
1084 #define _TUN1 0x02
1085 #define _TUN2 0x04
1086 #define _TUN3 0x08
1087 #define _TUN4 0x10
1089 //==============================================================================
1092 //==============================================================================
1093 // ANSEL Bits
1095 extern __at(0x0091) __sfr ANSEL;
1097 typedef union
1099 struct
1101 unsigned ANS0 : 1;
1102 unsigned ANS1 : 1;
1103 unsigned ANS2 : 1;
1104 unsigned ANS3 : 1;
1105 unsigned ANS4 : 1;
1106 unsigned : 1;
1107 unsigned : 1;
1108 unsigned : 1;
1111 struct
1113 unsigned AN0 : 1;
1114 unsigned AN1 : 1;
1115 unsigned AN2 : 1;
1116 unsigned AN3 : 1;
1117 unsigned AN4 : 1;
1118 unsigned : 1;
1119 unsigned : 1;
1120 unsigned : 1;
1123 struct
1125 unsigned AN : 5;
1126 unsigned : 3;
1129 struct
1131 unsigned ANS : 5;
1132 unsigned : 3;
1134 } __ANSELbits_t;
1136 extern __at(0x0091) volatile __ANSELbits_t ANSELbits;
1138 #define _ANS0 0x01
1139 #define _AN0 0x01
1140 #define _ANS1 0x02
1141 #define _AN1 0x02
1142 #define _ANS2 0x04
1143 #define _AN2 0x04
1144 #define _ANS3 0x08
1145 #define _AN3 0x08
1146 #define _ANS4 0x10
1147 #define _AN4 0x10
1149 //==============================================================================
1151 extern __at(0x0092) __sfr PR2;
1152 extern __at(0x0093) __sfr SSPADD;
1154 //==============================================================================
1155 // SSPSTAT Bits
1157 extern __at(0x0094) __sfr SSPSTAT;
1159 typedef union
1161 struct
1163 unsigned BF : 1;
1164 unsigned UA : 1;
1165 unsigned R_NOT_W : 1;
1166 unsigned S : 1;
1167 unsigned P : 1;
1168 unsigned D_NOT_A : 1;
1169 unsigned CKE : 1;
1170 unsigned SMP : 1;
1173 struct
1175 unsigned : 1;
1176 unsigned : 1;
1177 unsigned R : 1;
1178 unsigned I2C_START : 1;
1179 unsigned I2C_STOP : 1;
1180 unsigned D : 1;
1181 unsigned : 1;
1182 unsigned : 1;
1185 struct
1187 unsigned : 1;
1188 unsigned : 1;
1189 unsigned I2C_READ : 1;
1190 unsigned : 1;
1191 unsigned : 1;
1192 unsigned I2C_DATA : 1;
1193 unsigned : 1;
1194 unsigned : 1;
1197 struct
1199 unsigned : 1;
1200 unsigned : 1;
1201 unsigned NOT_W : 1;
1202 unsigned : 1;
1203 unsigned : 1;
1204 unsigned NOT_A : 1;
1205 unsigned : 1;
1206 unsigned : 1;
1209 struct
1211 unsigned : 1;
1212 unsigned : 1;
1213 unsigned NOT_WRITE : 1;
1214 unsigned : 1;
1215 unsigned : 1;
1216 unsigned NOT_ADDRESS : 1;
1217 unsigned : 1;
1218 unsigned : 1;
1221 struct
1223 unsigned : 1;
1224 unsigned : 1;
1225 unsigned R_W : 1;
1226 unsigned : 1;
1227 unsigned : 1;
1228 unsigned D_A : 1;
1229 unsigned : 1;
1230 unsigned : 1;
1233 struct
1235 unsigned : 1;
1236 unsigned : 1;
1237 unsigned READ_WRITE : 1;
1238 unsigned : 1;
1239 unsigned : 1;
1240 unsigned DATA_ADDRESS : 1;
1241 unsigned : 1;
1242 unsigned : 1;
1244 } __SSPSTATbits_t;
1246 extern __at(0x0094) volatile __SSPSTATbits_t SSPSTATbits;
1248 #define _BF 0x01
1249 #define _UA 0x02
1250 #define _R_NOT_W 0x04
1251 #define _R 0x04
1252 #define _I2C_READ 0x04
1253 #define _NOT_W 0x04
1254 #define _NOT_WRITE 0x04
1255 #define _R_W 0x04
1256 #define _READ_WRITE 0x04
1257 #define _S 0x08
1258 #define _I2C_START 0x08
1259 #define _P 0x10
1260 #define _I2C_STOP 0x10
1261 #define _D_NOT_A 0x20
1262 #define _D 0x20
1263 #define _I2C_DATA 0x20
1264 #define _NOT_A 0x20
1265 #define _NOT_ADDRESS 0x20
1266 #define _D_A 0x20
1267 #define _DATA_ADDRESS 0x20
1268 #define _CKE 0x40
1269 #define _SMP 0x80
1271 //==============================================================================
1274 //==============================================================================
1275 // WPU Bits
1277 extern __at(0x0095) __sfr WPU;
1279 typedef union
1281 struct
1283 unsigned WPUB0 : 1;
1284 unsigned WPUB1 : 1;
1285 unsigned WPUB2 : 1;
1286 unsigned WPUB3 : 1;
1287 unsigned WPUB4 : 1;
1288 unsigned WPUB5 : 1;
1289 unsigned WPUB6 : 1;
1290 unsigned WPUB7 : 1;
1293 struct
1295 unsigned WPU0 : 1;
1296 unsigned WPU1 : 1;
1297 unsigned WPU2 : 1;
1298 unsigned WPU3 : 1;
1299 unsigned WPU4 : 1;
1300 unsigned WPU5 : 1;
1301 unsigned WPU6 : 1;
1302 unsigned WPU7 : 1;
1304 } __WPUbits_t;
1306 extern __at(0x0095) volatile __WPUbits_t WPUbits;
1308 #define _WPUB0 0x01
1309 #define _WPU0 0x01
1310 #define _WPUB1 0x02
1311 #define _WPU1 0x02
1312 #define _WPUB2 0x04
1313 #define _WPU2 0x04
1314 #define _WPUB3 0x08
1315 #define _WPU3 0x08
1316 #define _WPUB4 0x10
1317 #define _WPU4 0x10
1318 #define _WPUB5 0x20
1319 #define _WPU5 0x20
1320 #define _WPUB6 0x40
1321 #define _WPU6 0x40
1322 #define _WPUB7 0x80
1323 #define _WPU7 0x80
1325 //==============================================================================
1328 //==============================================================================
1329 // WPUB Bits
1331 extern __at(0x0095) __sfr WPUB;
1333 typedef union
1335 struct
1337 unsigned WPUB0 : 1;
1338 unsigned WPUB1 : 1;
1339 unsigned WPUB2 : 1;
1340 unsigned WPUB3 : 1;
1341 unsigned WPUB4 : 1;
1342 unsigned WPUB5 : 1;
1343 unsigned WPUB6 : 1;
1344 unsigned WPUB7 : 1;
1347 struct
1349 unsigned WPU0 : 1;
1350 unsigned WPU1 : 1;
1351 unsigned WPU2 : 1;
1352 unsigned WPU3 : 1;
1353 unsigned WPU4 : 1;
1354 unsigned WPU5 : 1;
1355 unsigned WPU6 : 1;
1356 unsigned WPU7 : 1;
1358 } __WPUBbits_t;
1360 extern __at(0x0095) volatile __WPUBbits_t WPUBbits;
1362 #define _WPUB_WPUB0 0x01
1363 #define _WPUB_WPU0 0x01
1364 #define _WPUB_WPUB1 0x02
1365 #define _WPUB_WPU1 0x02
1366 #define _WPUB_WPUB2 0x04
1367 #define _WPUB_WPU2 0x04
1368 #define _WPUB_WPUB3 0x08
1369 #define _WPUB_WPU3 0x08
1370 #define _WPUB_WPUB4 0x10
1371 #define _WPUB_WPU4 0x10
1372 #define _WPUB_WPUB5 0x20
1373 #define _WPUB_WPU5 0x20
1374 #define _WPUB_WPUB6 0x40
1375 #define _WPUB_WPU6 0x40
1376 #define _WPUB_WPUB7 0x80
1377 #define _WPUB_WPU7 0x80
1379 //==============================================================================
1382 //==============================================================================
1383 // IOC Bits
1385 extern __at(0x0096) __sfr IOC;
1387 typedef union
1389 struct
1391 unsigned : 1;
1392 unsigned : 1;
1393 unsigned : 1;
1394 unsigned : 1;
1395 unsigned IOCB4 : 1;
1396 unsigned IOCB5 : 1;
1397 unsigned IOCB6 : 1;
1398 unsigned IOCB7 : 1;
1401 struct
1403 unsigned : 1;
1404 unsigned : 1;
1405 unsigned : 1;
1406 unsigned : 1;
1407 unsigned IOC4 : 1;
1408 unsigned IOC5 : 1;
1409 unsigned IOC6 : 1;
1410 unsigned IOC7 : 1;
1412 } __IOCbits_t;
1414 extern __at(0x0096) volatile __IOCbits_t IOCbits;
1416 #define _IOCB4 0x10
1417 #define _IOC4 0x10
1418 #define _IOCB5 0x20
1419 #define _IOC5 0x20
1420 #define _IOCB6 0x40
1421 #define _IOC6 0x40
1422 #define _IOCB7 0x80
1423 #define _IOC7 0x80
1425 //==============================================================================
1428 //==============================================================================
1429 // IOCB Bits
1431 extern __at(0x0096) __sfr IOCB;
1433 typedef union
1435 struct
1437 unsigned : 1;
1438 unsigned : 1;
1439 unsigned : 1;
1440 unsigned : 1;
1441 unsigned IOCB4 : 1;
1442 unsigned IOCB5 : 1;
1443 unsigned IOCB6 : 1;
1444 unsigned IOCB7 : 1;
1447 struct
1449 unsigned : 1;
1450 unsigned : 1;
1451 unsigned : 1;
1452 unsigned : 1;
1453 unsigned IOC4 : 1;
1454 unsigned IOC5 : 1;
1455 unsigned IOC6 : 1;
1456 unsigned IOC7 : 1;
1458 } __IOCBbits_t;
1460 extern __at(0x0096) volatile __IOCBbits_t IOCBbits;
1462 #define _IOCB_IOCB4 0x10
1463 #define _IOCB_IOC4 0x10
1464 #define _IOCB_IOCB5 0x20
1465 #define _IOCB_IOC5 0x20
1466 #define _IOCB_IOCB6 0x40
1467 #define _IOCB_IOC6 0x40
1468 #define _IOCB_IOCB7 0x80
1469 #define _IOCB_IOC7 0x80
1471 //==============================================================================
1474 //==============================================================================
1475 // CMCON1 Bits
1477 extern __at(0x0097) __sfr CMCON1;
1479 typedef struct
1481 unsigned C2SYNC : 1;
1482 unsigned T1GSS : 1;
1483 unsigned : 1;
1484 unsigned : 1;
1485 unsigned : 1;
1486 unsigned : 1;
1487 unsigned : 1;
1488 unsigned : 1;
1489 } __CMCON1bits_t;
1491 extern __at(0x0097) volatile __CMCON1bits_t CMCON1bits;
1493 #define _C2SYNC 0x01
1494 #define _T1GSS 0x02
1496 //==============================================================================
1499 //==============================================================================
1500 // TXSTA Bits
1502 extern __at(0x0098) __sfr TXSTA;
1504 typedef union
1506 struct
1508 unsigned TX9D : 1;
1509 unsigned TRMT : 1;
1510 unsigned BRGH : 1;
1511 unsigned : 1;
1512 unsigned SYNC : 1;
1513 unsigned TXEN : 1;
1514 unsigned TX9 : 1;
1515 unsigned CSRC : 1;
1518 struct
1520 unsigned TXD8 : 1;
1521 unsigned : 1;
1522 unsigned : 1;
1523 unsigned : 1;
1524 unsigned : 1;
1525 unsigned : 1;
1526 unsigned NOT_TX8 : 1;
1527 unsigned : 1;
1530 struct
1532 unsigned : 1;
1533 unsigned : 1;
1534 unsigned : 1;
1535 unsigned : 1;
1536 unsigned : 1;
1537 unsigned : 1;
1538 unsigned TX8_9 : 1;
1539 unsigned : 1;
1541 } __TXSTAbits_t;
1543 extern __at(0x0098) volatile __TXSTAbits_t TXSTAbits;
1545 #define _TX9D 0x01
1546 #define _TXD8 0x01
1547 #define _TRMT 0x02
1548 #define _BRGH 0x04
1549 #define _SYNC 0x10
1550 #define _TXEN 0x20
1551 #define _TX9 0x40
1552 #define _NOT_TX8 0x40
1553 #define _TX8_9 0x40
1554 #define _CSRC 0x80
1556 //==============================================================================
1558 extern __at(0x0099) __sfr SPBRG;
1560 //==============================================================================
1561 // CMCON0 Bits
1563 extern __at(0x009C) __sfr CMCON0;
1565 typedef union
1567 struct
1569 unsigned CM0 : 1;
1570 unsigned CM1 : 1;
1571 unsigned CM2 : 1;
1572 unsigned CIS : 1;
1573 unsigned C1INV : 1;
1574 unsigned C2INV : 1;
1575 unsigned C1OUT : 1;
1576 unsigned C2OUT : 1;
1579 struct
1581 unsigned CM : 3;
1582 unsigned : 5;
1584 } __CMCON0bits_t;
1586 extern __at(0x009C) volatile __CMCON0bits_t CMCON0bits;
1588 #define _CM0 0x01
1589 #define _CM1 0x02
1590 #define _CM2 0x04
1591 #define _CIS 0x08
1592 #define _C1INV 0x10
1593 #define _C2INV 0x20
1594 #define _C1OUT 0x40
1595 #define _C2OUT 0x80
1597 //==============================================================================
1600 //==============================================================================
1601 // VRCON Bits
1603 extern __at(0x009D) __sfr VRCON;
1605 typedef union
1607 struct
1609 unsigned VR0 : 1;
1610 unsigned VR1 : 1;
1611 unsigned VR2 : 1;
1612 unsigned VR3 : 1;
1613 unsigned : 1;
1614 unsigned VRR : 1;
1615 unsigned : 1;
1616 unsigned VREN : 1;
1619 struct
1621 unsigned VR : 4;
1622 unsigned : 4;
1624 } __VRCONbits_t;
1626 extern __at(0x009D) volatile __VRCONbits_t VRCONbits;
1628 #define _VR0 0x01
1629 #define _VR1 0x02
1630 #define _VR2 0x04
1631 #define _VR3 0x08
1632 #define _VRR 0x20
1633 #define _VREN 0x80
1635 //==============================================================================
1637 extern __at(0x009E) __sfr ADRESL;
1639 //==============================================================================
1640 // ADCON1 Bits
1642 extern __at(0x009F) __sfr ADCON1;
1644 typedef union
1646 struct
1648 unsigned : 1;
1649 unsigned : 1;
1650 unsigned : 1;
1651 unsigned : 1;
1652 unsigned ADCS0 : 1;
1653 unsigned ADCS1 : 1;
1654 unsigned ADCS2 : 1;
1655 unsigned : 1;
1658 struct
1660 unsigned : 4;
1661 unsigned ADCS : 3;
1662 unsigned : 1;
1664 } __ADCON1bits_t;
1666 extern __at(0x009F) volatile __ADCON1bits_t ADCON1bits;
1668 #define _ADCS0 0x10
1669 #define _ADCS1 0x20
1670 #define _ADCS2 0x40
1672 //==============================================================================
1675 //==============================================================================
1676 // WDTCON Bits
1678 extern __at(0x0105) __sfr WDTCON;
1680 typedef union
1682 struct
1684 unsigned SWDTEN : 1;
1685 unsigned WDTPS0 : 1;
1686 unsigned WDTPS1 : 1;
1687 unsigned WDTPS2 : 1;
1688 unsigned WDTPS3 : 1;
1689 unsigned : 1;
1690 unsigned : 1;
1691 unsigned : 1;
1694 struct
1696 unsigned SWDTE : 1;
1697 unsigned : 1;
1698 unsigned : 1;
1699 unsigned : 1;
1700 unsigned : 1;
1701 unsigned : 1;
1702 unsigned : 1;
1703 unsigned : 1;
1706 struct
1708 unsigned : 1;
1709 unsigned WDTPS : 4;
1710 unsigned : 3;
1712 } __WDTCONbits_t;
1714 extern __at(0x0105) volatile __WDTCONbits_t WDTCONbits;
1716 #define _SWDTEN 0x01
1717 #define _SWDTE 0x01
1718 #define _WDTPS0 0x02
1719 #define _WDTPS1 0x04
1720 #define _WDTPS2 0x08
1721 #define _WDTPS3 0x10
1723 //==============================================================================
1726 //==============================================================================
1727 // LCDCON Bits
1729 extern __at(0x0107) __sfr LCDCON;
1731 typedef union
1733 struct
1735 unsigned LMUX0 : 1;
1736 unsigned LMUX1 : 1;
1737 unsigned CS0 : 1;
1738 unsigned CS1 : 1;
1739 unsigned VLCDEN : 1;
1740 unsigned WERR : 1;
1741 unsigned SLPEN : 1;
1742 unsigned LCDEN : 1;
1745 struct
1747 unsigned LMUX : 2;
1748 unsigned : 6;
1751 struct
1753 unsigned : 2;
1754 unsigned CS : 2;
1755 unsigned : 4;
1757 } __LCDCONbits_t;
1759 extern __at(0x0107) volatile __LCDCONbits_t LCDCONbits;
1761 #define _LMUX0 0x01
1762 #define _LMUX1 0x02
1763 #define _CS0 0x04
1764 #define _CS1 0x08
1765 #define _VLCDEN 0x10
1766 #define _WERR 0x20
1767 #define _SLPEN 0x40
1768 #define _LCDEN 0x80
1770 //==============================================================================
1773 //==============================================================================
1774 // LCDPS Bits
1776 extern __at(0x0108) __sfr LCDPS;
1778 typedef union
1780 struct
1782 unsigned LP0 : 1;
1783 unsigned LP1 : 1;
1784 unsigned LP2 : 1;
1785 unsigned LP3 : 1;
1786 unsigned WA : 1;
1787 unsigned LCDA : 1;
1788 unsigned BIASMD : 1;
1789 unsigned WFT : 1;
1792 struct
1794 unsigned LP : 4;
1795 unsigned : 4;
1797 } __LCDPSbits_t;
1799 extern __at(0x0108) volatile __LCDPSbits_t LCDPSbits;
1801 #define _LP0 0x01
1802 #define _LP1 0x02
1803 #define _LP2 0x04
1804 #define _LP3 0x08
1805 #define _WA 0x10
1806 #define _LCDA 0x20
1807 #define _BIASMD 0x40
1808 #define _WFT 0x80
1810 //==============================================================================
1813 //==============================================================================
1814 // LVDCON Bits
1816 extern __at(0x0109) __sfr LVDCON;
1818 typedef union
1820 struct
1822 unsigned LVDL0 : 1;
1823 unsigned LVDL1 : 1;
1824 unsigned LVDL2 : 1;
1825 unsigned : 1;
1826 unsigned LVDEN : 1;
1827 unsigned IRVST : 1;
1828 unsigned : 1;
1829 unsigned : 1;
1832 struct
1834 unsigned LVDL : 3;
1835 unsigned : 5;
1837 } __LVDCONbits_t;
1839 extern __at(0x0109) volatile __LVDCONbits_t LVDCONbits;
1841 #define _LVDL0 0x01
1842 #define _LVDL1 0x02
1843 #define _LVDL2 0x04
1844 #define _LVDEN 0x10
1845 #define _IRVST 0x20
1847 //==============================================================================
1850 //==============================================================================
1851 // EEDATA Bits
1853 extern __at(0x010C) __sfr EEDATA;
1855 typedef struct
1857 unsigned EEDATL0 : 1;
1858 unsigned EEDATL1 : 1;
1859 unsigned EEDATL2 : 1;
1860 unsigned EEDATL3 : 1;
1861 unsigned EEDATL4 : 1;
1862 unsigned EEDATL5 : 1;
1863 unsigned EEDATL6 : 1;
1864 unsigned EEDATL7 : 1;
1865 } __EEDATAbits_t;
1867 extern __at(0x010C) volatile __EEDATAbits_t EEDATAbits;
1869 #define _EEDATL0 0x01
1870 #define _EEDATL1 0x02
1871 #define _EEDATL2 0x04
1872 #define _EEDATL3 0x08
1873 #define _EEDATL4 0x10
1874 #define _EEDATL5 0x20
1875 #define _EEDATL6 0x40
1876 #define _EEDATL7 0x80
1878 //==============================================================================
1881 //==============================================================================
1882 // EEDATL Bits
1884 extern __at(0x010C) __sfr EEDATL;
1886 typedef struct
1888 unsigned EEDATL0 : 1;
1889 unsigned EEDATL1 : 1;
1890 unsigned EEDATL2 : 1;
1891 unsigned EEDATL3 : 1;
1892 unsigned EEDATL4 : 1;
1893 unsigned EEDATL5 : 1;
1894 unsigned EEDATL6 : 1;
1895 unsigned EEDATL7 : 1;
1896 } __EEDATLbits_t;
1898 extern __at(0x010C) volatile __EEDATLbits_t EEDATLbits;
1900 #define _EEDATL_EEDATL0 0x01
1901 #define _EEDATL_EEDATL1 0x02
1902 #define _EEDATL_EEDATL2 0x04
1903 #define _EEDATL_EEDATL3 0x08
1904 #define _EEDATL_EEDATL4 0x10
1905 #define _EEDATL_EEDATL5 0x20
1906 #define _EEDATL_EEDATL6 0x40
1907 #define _EEDATL_EEDATL7 0x80
1909 //==============================================================================
1912 //==============================================================================
1913 // EEADR Bits
1915 extern __at(0x010D) __sfr EEADR;
1917 typedef struct
1919 unsigned EEADRL0 : 1;
1920 unsigned EEADRL1 : 1;
1921 unsigned EEADRL2 : 1;
1922 unsigned EEADRL3 : 1;
1923 unsigned EEADRL4 : 1;
1924 unsigned EEADRL5 : 1;
1925 unsigned EEADRL6 : 1;
1926 unsigned EEADRL7 : 1;
1927 } __EEADRbits_t;
1929 extern __at(0x010D) volatile __EEADRbits_t EEADRbits;
1931 #define _EEADRL0 0x01
1932 #define _EEADRL1 0x02
1933 #define _EEADRL2 0x04
1934 #define _EEADRL3 0x08
1935 #define _EEADRL4 0x10
1936 #define _EEADRL5 0x20
1937 #define _EEADRL6 0x40
1938 #define _EEADRL7 0x80
1940 //==============================================================================
1943 //==============================================================================
1944 // EEADRL Bits
1946 extern __at(0x010D) __sfr EEADRL;
1948 typedef struct
1950 unsigned EEADRL0 : 1;
1951 unsigned EEADRL1 : 1;
1952 unsigned EEADRL2 : 1;
1953 unsigned EEADRL3 : 1;
1954 unsigned EEADRL4 : 1;
1955 unsigned EEADRL5 : 1;
1956 unsigned EEADRL6 : 1;
1957 unsigned EEADRL7 : 1;
1958 } __EEADRLbits_t;
1960 extern __at(0x010D) volatile __EEADRLbits_t EEADRLbits;
1962 #define _EEADRL_EEADRL0 0x01
1963 #define _EEADRL_EEADRL1 0x02
1964 #define _EEADRL_EEADRL2 0x04
1965 #define _EEADRL_EEADRL3 0x08
1966 #define _EEADRL_EEADRL4 0x10
1967 #define _EEADRL_EEADRL5 0x20
1968 #define _EEADRL_EEADRL6 0x40
1969 #define _EEADRL_EEADRL7 0x80
1971 //==============================================================================
1974 //==============================================================================
1975 // EEDATH Bits
1977 extern __at(0x010E) __sfr EEDATH;
1979 typedef union
1981 struct
1983 unsigned EEDATH0 : 1;
1984 unsigned EEDATH1 : 1;
1985 unsigned EEDATH2 : 1;
1986 unsigned EEDATH3 : 1;
1987 unsigned EEDATH4 : 1;
1988 unsigned EEDATH5 : 1;
1989 unsigned : 1;
1990 unsigned : 1;
1993 struct
1995 unsigned EEDATH : 6;
1996 unsigned : 2;
1998 } __EEDATHbits_t;
2000 extern __at(0x010E) volatile __EEDATHbits_t EEDATHbits;
2002 #define _EEDATH0 0x01
2003 #define _EEDATH1 0x02
2004 #define _EEDATH2 0x04
2005 #define _EEDATH3 0x08
2006 #define _EEDATH4 0x10
2007 #define _EEDATH5 0x20
2009 //==============================================================================
2012 //==============================================================================
2013 // EEADRH Bits
2015 extern __at(0x010F) __sfr EEADRH;
2017 typedef union
2019 struct
2021 unsigned EEADRH0 : 1;
2022 unsigned EEADRH1 : 1;
2023 unsigned EEADRH2 : 1;
2024 unsigned EEADRH3 : 1;
2025 unsigned EEADRH4 : 1;
2026 unsigned : 1;
2027 unsigned : 1;
2028 unsigned : 1;
2031 struct
2033 unsigned EEADRH : 5;
2034 unsigned : 3;
2036 } __EEADRHbits_t;
2038 extern __at(0x010F) volatile __EEADRHbits_t EEADRHbits;
2040 #define _EEADRH0 0x01
2041 #define _EEADRH1 0x02
2042 #define _EEADRH2 0x04
2043 #define _EEADRH3 0x08
2044 #define _EEADRH4 0x10
2046 //==============================================================================
2049 //==============================================================================
2050 // LCDDATA0 Bits
2052 extern __at(0x0110) __sfr LCDDATA0;
2054 typedef union
2056 struct
2058 unsigned SEG0 : 1;
2059 unsigned SEG1 : 1;
2060 unsigned SEG2 : 1;
2061 unsigned SEG3 : 1;
2062 unsigned SEG4 : 1;
2063 unsigned SEG5 : 1;
2064 unsigned SEG6 : 1;
2065 unsigned SEG7 : 1;
2068 struct
2070 unsigned SEG0COM0 : 1;
2071 unsigned SEG1COM0 : 1;
2072 unsigned SEG2COM0 : 1;
2073 unsigned SEG3COM0 : 1;
2074 unsigned SEG4COM0 : 1;
2075 unsigned SEG5COM0 : 1;
2076 unsigned SEG6COM0 : 1;
2077 unsigned SEG7COM0 : 1;
2080 struct
2082 unsigned S0C0 : 1;
2083 unsigned S1C0 : 1;
2084 unsigned S2C0 : 1;
2085 unsigned S3C0 : 1;
2086 unsigned S4C0 : 1;
2087 unsigned S5C0 : 1;
2088 unsigned S6C0 : 1;
2089 unsigned S7C0 : 1;
2091 } __LCDDATA0bits_t;
2093 extern __at(0x0110) volatile __LCDDATA0bits_t LCDDATA0bits;
2095 #define _SEG0 0x01
2096 #define _SEG0COM0 0x01
2097 #define _S0C0 0x01
2098 #define _SEG1 0x02
2099 #define _SEG1COM0 0x02
2100 #define _S1C0 0x02
2101 #define _SEG2 0x04
2102 #define _SEG2COM0 0x04
2103 #define _S2C0 0x04
2104 #define _SEG3 0x08
2105 #define _SEG3COM0 0x08
2106 #define _S3C0 0x08
2107 #define _SEG4 0x10
2108 #define _SEG4COM0 0x10
2109 #define _S4C0 0x10
2110 #define _SEG5 0x20
2111 #define _SEG5COM0 0x20
2112 #define _S5C0 0x20
2113 #define _SEG6 0x40
2114 #define _SEG6COM0 0x40
2115 #define _S6C0 0x40
2116 #define _SEG7 0x80
2117 #define _SEG7COM0 0x80
2118 #define _S7C0 0x80
2120 //==============================================================================
2123 //==============================================================================
2124 // LCDDATA1 Bits
2126 extern __at(0x0111) __sfr LCDDATA1;
2128 typedef union
2130 struct
2132 unsigned SEG8 : 1;
2133 unsigned SEG9 : 1;
2134 unsigned SEG10 : 1;
2135 unsigned SEG11 : 1;
2136 unsigned SEG12 : 1;
2137 unsigned SEG13 : 1;
2138 unsigned SEG14 : 1;
2139 unsigned SEG15 : 1;
2142 struct
2144 unsigned SEG8COM0 : 1;
2145 unsigned SEG9COM0 : 1;
2146 unsigned SEG10COM0 : 1;
2147 unsigned SEG11COM0 : 1;
2148 unsigned SEG12COM0 : 1;
2149 unsigned SEG13COM0 : 1;
2150 unsigned SEG14COM0 : 1;
2151 unsigned SEG15COM0 : 1;
2154 struct
2156 unsigned S8C0 : 1;
2157 unsigned S9C0 : 1;
2158 unsigned S10C0 : 1;
2159 unsigned S11C0 : 1;
2160 unsigned S12C0 : 1;
2161 unsigned S13C0 : 1;
2162 unsigned S14C0 : 1;
2163 unsigned S15C0 : 1;
2165 } __LCDDATA1bits_t;
2167 extern __at(0x0111) volatile __LCDDATA1bits_t LCDDATA1bits;
2169 #define _SEG8 0x01
2170 #define _SEG8COM0 0x01
2171 #define _S8C0 0x01
2172 #define _SEG9 0x02
2173 #define _SEG9COM0 0x02
2174 #define _S9C0 0x02
2175 #define _SEG10 0x04
2176 #define _SEG10COM0 0x04
2177 #define _S10C0 0x04
2178 #define _SEG11 0x08
2179 #define _SEG11COM0 0x08
2180 #define _S11C0 0x08
2181 #define _SEG12 0x10
2182 #define _SEG12COM0 0x10
2183 #define _S12C0 0x10
2184 #define _SEG13 0x20
2185 #define _SEG13COM0 0x20
2186 #define _S13C0 0x20
2187 #define _SEG14 0x40
2188 #define _SEG14COM0 0x40
2189 #define _S14C0 0x40
2190 #define _SEG15 0x80
2191 #define _SEG15COM0 0x80
2192 #define _S15C0 0x80
2194 //==============================================================================
2197 //==============================================================================
2198 // LCDDATA3 Bits
2200 extern __at(0x0113) __sfr LCDDATA3;
2202 typedef union
2204 struct
2206 unsigned SEG0 : 1;
2207 unsigned SEG1 : 1;
2208 unsigned SEG2 : 1;
2209 unsigned SEG3 : 1;
2210 unsigned SEG4 : 1;
2211 unsigned SEG5 : 1;
2212 unsigned SEG6 : 1;
2213 unsigned SEG7 : 1;
2216 struct
2218 unsigned SEG0COM1 : 1;
2219 unsigned SEG1COM1 : 1;
2220 unsigned SEG2COM1 : 1;
2221 unsigned SEG3COM1 : 1;
2222 unsigned SEG4COM1 : 1;
2223 unsigned SEG5COM1 : 1;
2224 unsigned SEG6COM1 : 1;
2225 unsigned SEG7COM1 : 1;
2228 struct
2230 unsigned S0C1 : 1;
2231 unsigned S1C1 : 1;
2232 unsigned S2C1 : 1;
2233 unsigned S3C1 : 1;
2234 unsigned S4C1 : 1;
2235 unsigned S5C1 : 1;
2236 unsigned S6C1 : 1;
2237 unsigned S7C1 : 1;
2239 } __LCDDATA3bits_t;
2241 extern __at(0x0113) volatile __LCDDATA3bits_t LCDDATA3bits;
2243 #define _LCDDATA3_SEG0 0x01
2244 #define _LCDDATA3_SEG0COM1 0x01
2245 #define _LCDDATA3_S0C1 0x01
2246 #define _LCDDATA3_SEG1 0x02
2247 #define _LCDDATA3_SEG1COM1 0x02
2248 #define _LCDDATA3_S1C1 0x02
2249 #define _LCDDATA3_SEG2 0x04
2250 #define _LCDDATA3_SEG2COM1 0x04
2251 #define _LCDDATA3_S2C1 0x04
2252 #define _LCDDATA3_SEG3 0x08
2253 #define _LCDDATA3_SEG3COM1 0x08
2254 #define _LCDDATA3_S3C1 0x08
2255 #define _LCDDATA3_SEG4 0x10
2256 #define _LCDDATA3_SEG4COM1 0x10
2257 #define _LCDDATA3_S4C1 0x10
2258 #define _LCDDATA3_SEG5 0x20
2259 #define _LCDDATA3_SEG5COM1 0x20
2260 #define _LCDDATA3_S5C1 0x20
2261 #define _LCDDATA3_SEG6 0x40
2262 #define _LCDDATA3_SEG6COM1 0x40
2263 #define _LCDDATA3_S6C1 0x40
2264 #define _LCDDATA3_SEG7 0x80
2265 #define _LCDDATA3_SEG7COM1 0x80
2266 #define _LCDDATA3_S7C1 0x80
2268 //==============================================================================
2271 //==============================================================================
2272 // LCDDATA4 Bits
2274 extern __at(0x0114) __sfr LCDDATA4;
2276 typedef union
2278 struct
2280 unsigned SEG8 : 1;
2281 unsigned SEG9 : 1;
2282 unsigned SEG10 : 1;
2283 unsigned SEG11 : 1;
2284 unsigned SEG12 : 1;
2285 unsigned SEG13 : 1;
2286 unsigned SEG14 : 1;
2287 unsigned SEG15 : 1;
2290 struct
2292 unsigned SEG8COM1 : 1;
2293 unsigned SEG9COM1 : 1;
2294 unsigned SEG10COM1 : 1;
2295 unsigned SEG11COM1 : 1;
2296 unsigned SEG12COM1 : 1;
2297 unsigned SEG13COM1 : 1;
2298 unsigned SEG14COM1 : 1;
2299 unsigned SEG15COM1 : 1;
2302 struct
2304 unsigned S8C1 : 1;
2305 unsigned S9C1 : 1;
2306 unsigned S10C1 : 1;
2307 unsigned S11C1 : 1;
2308 unsigned S12C1 : 1;
2309 unsigned S13C1 : 1;
2310 unsigned S14C1 : 1;
2311 unsigned S15C1 : 1;
2313 } __LCDDATA4bits_t;
2315 extern __at(0x0114) volatile __LCDDATA4bits_t LCDDATA4bits;
2317 #define _LCDDATA4_SEG8 0x01
2318 #define _LCDDATA4_SEG8COM1 0x01
2319 #define _LCDDATA4_S8C1 0x01
2320 #define _LCDDATA4_SEG9 0x02
2321 #define _LCDDATA4_SEG9COM1 0x02
2322 #define _LCDDATA4_S9C1 0x02
2323 #define _LCDDATA4_SEG10 0x04
2324 #define _LCDDATA4_SEG10COM1 0x04
2325 #define _LCDDATA4_S10C1 0x04
2326 #define _LCDDATA4_SEG11 0x08
2327 #define _LCDDATA4_SEG11COM1 0x08
2328 #define _LCDDATA4_S11C1 0x08
2329 #define _LCDDATA4_SEG12 0x10
2330 #define _LCDDATA4_SEG12COM1 0x10
2331 #define _LCDDATA4_S12C1 0x10
2332 #define _LCDDATA4_SEG13 0x20
2333 #define _LCDDATA4_SEG13COM1 0x20
2334 #define _LCDDATA4_S13C1 0x20
2335 #define _LCDDATA4_SEG14 0x40
2336 #define _LCDDATA4_SEG14COM1 0x40
2337 #define _LCDDATA4_S14C1 0x40
2338 #define _LCDDATA4_SEG15 0x80
2339 #define _LCDDATA4_SEG15COM1 0x80
2340 #define _LCDDATA4_S15C1 0x80
2342 //==============================================================================
2345 //==============================================================================
2346 // LCDDATA6 Bits
2348 extern __at(0x0116) __sfr LCDDATA6;
2350 typedef union
2352 struct
2354 unsigned SEG0 : 1;
2355 unsigned SEG1 : 1;
2356 unsigned SEG2 : 1;
2357 unsigned SEG3 : 1;
2358 unsigned SEG4 : 1;
2359 unsigned SEG5 : 1;
2360 unsigned SEG6 : 1;
2361 unsigned SEG7 : 1;
2364 struct
2366 unsigned SEG0COM2 : 1;
2367 unsigned SEG1COM2 : 1;
2368 unsigned SEG2COM2 : 1;
2369 unsigned SEG3COM2 : 1;
2370 unsigned SEG4COM2 : 1;
2371 unsigned SEG5COM2 : 1;
2372 unsigned SEG6COM2 : 1;
2373 unsigned SEG7COM2 : 1;
2376 struct
2378 unsigned S0C2 : 1;
2379 unsigned S1C2 : 1;
2380 unsigned S2C2 : 1;
2381 unsigned S3C2 : 1;
2382 unsigned S4C2 : 1;
2383 unsigned S5C2 : 1;
2384 unsigned S6C2 : 1;
2385 unsigned S7C2 : 1;
2387 } __LCDDATA6bits_t;
2389 extern __at(0x0116) volatile __LCDDATA6bits_t LCDDATA6bits;
2391 #define _LCDDATA6_SEG0 0x01
2392 #define _LCDDATA6_SEG0COM2 0x01
2393 #define _LCDDATA6_S0C2 0x01
2394 #define _LCDDATA6_SEG1 0x02
2395 #define _LCDDATA6_SEG1COM2 0x02
2396 #define _LCDDATA6_S1C2 0x02
2397 #define _LCDDATA6_SEG2 0x04
2398 #define _LCDDATA6_SEG2COM2 0x04
2399 #define _LCDDATA6_S2C2 0x04
2400 #define _LCDDATA6_SEG3 0x08
2401 #define _LCDDATA6_SEG3COM2 0x08
2402 #define _LCDDATA6_S3C2 0x08
2403 #define _LCDDATA6_SEG4 0x10
2404 #define _LCDDATA6_SEG4COM2 0x10
2405 #define _LCDDATA6_S4C2 0x10
2406 #define _LCDDATA6_SEG5 0x20
2407 #define _LCDDATA6_SEG5COM2 0x20
2408 #define _LCDDATA6_S5C2 0x20
2409 #define _LCDDATA6_SEG6 0x40
2410 #define _LCDDATA6_SEG6COM2 0x40
2411 #define _LCDDATA6_S6C2 0x40
2412 #define _LCDDATA6_SEG7 0x80
2413 #define _LCDDATA6_SEG7COM2 0x80
2414 #define _LCDDATA6_S7C2 0x80
2416 //==============================================================================
2419 //==============================================================================
2420 // LCDDATA7 Bits
2422 extern __at(0x0117) __sfr LCDDATA7;
2424 typedef union
2426 struct
2428 unsigned SEG8 : 1;
2429 unsigned SEG9 : 1;
2430 unsigned SEG10 : 1;
2431 unsigned SEG11 : 1;
2432 unsigned SEG12 : 1;
2433 unsigned SEG13 : 1;
2434 unsigned SEG14 : 1;
2435 unsigned SEG15 : 1;
2438 struct
2440 unsigned SEG8COM2 : 1;
2441 unsigned SEG9COM2 : 1;
2442 unsigned SEG10COM2 : 1;
2443 unsigned SEG11COM2 : 1;
2444 unsigned SEG12COM2 : 1;
2445 unsigned SEG13COM2 : 1;
2446 unsigned SEG14COM2 : 1;
2447 unsigned SEG15COM2 : 1;
2450 struct
2452 unsigned S8C2 : 1;
2453 unsigned S9C2 : 1;
2454 unsigned S10C2 : 1;
2455 unsigned S11C2 : 1;
2456 unsigned S12C2 : 1;
2457 unsigned S13C2 : 1;
2458 unsigned S14C2 : 1;
2459 unsigned S15C2 : 1;
2461 } __LCDDATA7bits_t;
2463 extern __at(0x0117) volatile __LCDDATA7bits_t LCDDATA7bits;
2465 #define _LCDDATA7_SEG8 0x01
2466 #define _LCDDATA7_SEG8COM2 0x01
2467 #define _LCDDATA7_S8C2 0x01
2468 #define _LCDDATA7_SEG9 0x02
2469 #define _LCDDATA7_SEG9COM2 0x02
2470 #define _LCDDATA7_S9C2 0x02
2471 #define _LCDDATA7_SEG10 0x04
2472 #define _LCDDATA7_SEG10COM2 0x04
2473 #define _LCDDATA7_S10C2 0x04
2474 #define _LCDDATA7_SEG11 0x08
2475 #define _LCDDATA7_SEG11COM2 0x08
2476 #define _LCDDATA7_S11C2 0x08
2477 #define _LCDDATA7_SEG12 0x10
2478 #define _LCDDATA7_SEG12COM2 0x10
2479 #define _LCDDATA7_S12C2 0x10
2480 #define _LCDDATA7_SEG13 0x20
2481 #define _LCDDATA7_SEG13COM2 0x20
2482 #define _LCDDATA7_S13C2 0x20
2483 #define _LCDDATA7_SEG14 0x40
2484 #define _LCDDATA7_SEG14COM2 0x40
2485 #define _LCDDATA7_S14C2 0x40
2486 #define _LCDDATA7_SEG15 0x80
2487 #define _LCDDATA7_SEG15COM2 0x80
2488 #define _LCDDATA7_S15C2 0x80
2490 //==============================================================================
2493 //==============================================================================
2494 // LCDDATA9 Bits
2496 extern __at(0x0119) __sfr LCDDATA9;
2498 typedef union
2500 struct
2502 unsigned SEG0 : 1;
2503 unsigned SEG1 : 1;
2504 unsigned SEG2 : 1;
2505 unsigned SEG3 : 1;
2506 unsigned SEG4 : 1;
2507 unsigned SEG5 : 1;
2508 unsigned SEG6 : 1;
2509 unsigned SEG7 : 1;
2512 struct
2514 unsigned SEG0COM3 : 1;
2515 unsigned SEG1COM3 : 1;
2516 unsigned SEG2COM3 : 1;
2517 unsigned SEG3COM3 : 1;
2518 unsigned SEG4COM3 : 1;
2519 unsigned SEG5COM3 : 1;
2520 unsigned SEG6COM3 : 1;
2521 unsigned SEG7COM3 : 1;
2524 struct
2526 unsigned S0C3 : 1;
2527 unsigned S1C3 : 1;
2528 unsigned S2C3 : 1;
2529 unsigned S3C3 : 1;
2530 unsigned S4C3 : 1;
2531 unsigned S5C3 : 1;
2532 unsigned S6C3 : 1;
2533 unsigned S7C3 : 1;
2535 } __LCDDATA9bits_t;
2537 extern __at(0x0119) volatile __LCDDATA9bits_t LCDDATA9bits;
2539 #define _LCDDATA9_SEG0 0x01
2540 #define _LCDDATA9_SEG0COM3 0x01
2541 #define _LCDDATA9_S0C3 0x01
2542 #define _LCDDATA9_SEG1 0x02
2543 #define _LCDDATA9_SEG1COM3 0x02
2544 #define _LCDDATA9_S1C3 0x02
2545 #define _LCDDATA9_SEG2 0x04
2546 #define _LCDDATA9_SEG2COM3 0x04
2547 #define _LCDDATA9_S2C3 0x04
2548 #define _LCDDATA9_SEG3 0x08
2549 #define _LCDDATA9_SEG3COM3 0x08
2550 #define _LCDDATA9_S3C3 0x08
2551 #define _LCDDATA9_SEG4 0x10
2552 #define _LCDDATA9_SEG4COM3 0x10
2553 #define _LCDDATA9_S4C3 0x10
2554 #define _LCDDATA9_SEG5 0x20
2555 #define _LCDDATA9_SEG5COM3 0x20
2556 #define _LCDDATA9_S5C3 0x20
2557 #define _LCDDATA9_SEG6 0x40
2558 #define _LCDDATA9_SEG6COM3 0x40
2559 #define _LCDDATA9_S6C3 0x40
2560 #define _LCDDATA9_SEG7 0x80
2561 #define _LCDDATA9_SEG7COM3 0x80
2562 #define _LCDDATA9_S7C3 0x80
2564 //==============================================================================
2567 //==============================================================================
2568 // LCDDATA10 Bits
2570 extern __at(0x011A) __sfr LCDDATA10;
2572 typedef union
2574 struct
2576 unsigned SEG8 : 1;
2577 unsigned SEG9 : 1;
2578 unsigned SEG10 : 1;
2579 unsigned SEG11 : 1;
2580 unsigned SEG12 : 1;
2581 unsigned SEG13 : 1;
2582 unsigned SEG14 : 1;
2583 unsigned SEG15 : 1;
2586 struct
2588 unsigned SEG8COM3 : 1;
2589 unsigned SEG9COM3 : 1;
2590 unsigned SEG10COM3 : 1;
2591 unsigned SEG11COM3 : 1;
2592 unsigned SEG12COM3 : 1;
2593 unsigned SEG13COM3 : 1;
2594 unsigned SEG14COM3 : 1;
2595 unsigned SEG15COM3 : 1;
2598 struct
2600 unsigned S8C3 : 1;
2601 unsigned S9C3 : 1;
2602 unsigned S10C3 : 1;
2603 unsigned S11C3 : 1;
2604 unsigned S12C3 : 1;
2605 unsigned S13C3 : 1;
2606 unsigned S14C3 : 1;
2607 unsigned S15C3 : 1;
2609 } __LCDDATA10bits_t;
2611 extern __at(0x011A) volatile __LCDDATA10bits_t LCDDATA10bits;
2613 #define _LCDDATA10_SEG8 0x01
2614 #define _LCDDATA10_SEG8COM3 0x01
2615 #define _LCDDATA10_S8C3 0x01
2616 #define _LCDDATA10_SEG9 0x02
2617 #define _LCDDATA10_SEG9COM3 0x02
2618 #define _LCDDATA10_S9C3 0x02
2619 #define _LCDDATA10_SEG10 0x04
2620 #define _LCDDATA10_SEG10COM3 0x04
2621 #define _LCDDATA10_S10C3 0x04
2622 #define _LCDDATA10_SEG11 0x08
2623 #define _LCDDATA10_SEG11COM3 0x08
2624 #define _LCDDATA10_S11C3 0x08
2625 #define _LCDDATA10_SEG12 0x10
2626 #define _LCDDATA10_SEG12COM3 0x10
2627 #define _LCDDATA10_S12C3 0x10
2628 #define _LCDDATA10_SEG13 0x20
2629 #define _LCDDATA10_SEG13COM3 0x20
2630 #define _LCDDATA10_S13C3 0x20
2631 #define _LCDDATA10_SEG14 0x40
2632 #define _LCDDATA10_SEG14COM3 0x40
2633 #define _LCDDATA10_S14C3 0x40
2634 #define _LCDDATA10_SEG15 0x80
2635 #define _LCDDATA10_SEG15COM3 0x80
2636 #define _LCDDATA10_S15C3 0x80
2638 //==============================================================================
2641 //==============================================================================
2642 // LCDSE0 Bits
2644 extern __at(0x011C) __sfr LCDSE0;
2646 typedef union
2648 struct
2650 unsigned SEG0 : 1;
2651 unsigned SEG1 : 1;
2652 unsigned SEG2 : 1;
2653 unsigned SEG3 : 1;
2654 unsigned SEG4 : 1;
2655 unsigned SEG5 : 1;
2656 unsigned SEG6 : 1;
2657 unsigned SEG7 : 1;
2660 struct
2662 unsigned SE0 : 1;
2663 unsigned SE1 : 1;
2664 unsigned SE2 : 1;
2665 unsigned SE3 : 1;
2666 unsigned SE4 : 1;
2667 unsigned SE5 : 1;
2668 unsigned SE6 : 1;
2669 unsigned SE7 : 1;
2672 struct
2674 unsigned SEGEN0 : 1;
2675 unsigned SEGEN1 : 1;
2676 unsigned SEGEN2 : 1;
2677 unsigned SEGEN3 : 1;
2678 unsigned SEGEN4 : 1;
2679 unsigned SEGEN5 : 1;
2680 unsigned SEGEN6 : 1;
2681 unsigned SEGEN7 : 1;
2683 } __LCDSE0bits_t;
2685 extern __at(0x011C) volatile __LCDSE0bits_t LCDSE0bits;
2687 #define _LCDSE0_SEG0 0x01
2688 #define _LCDSE0_SE0 0x01
2689 #define _LCDSE0_SEGEN0 0x01
2690 #define _LCDSE0_SEG1 0x02
2691 #define _LCDSE0_SE1 0x02
2692 #define _LCDSE0_SEGEN1 0x02
2693 #define _LCDSE0_SEG2 0x04
2694 #define _LCDSE0_SE2 0x04
2695 #define _LCDSE0_SEGEN2 0x04
2696 #define _LCDSE0_SEG3 0x08
2697 #define _LCDSE0_SE3 0x08
2698 #define _LCDSE0_SEGEN3 0x08
2699 #define _LCDSE0_SEG4 0x10
2700 #define _LCDSE0_SE4 0x10
2701 #define _LCDSE0_SEGEN4 0x10
2702 #define _LCDSE0_SEG5 0x20
2703 #define _LCDSE0_SE5 0x20
2704 #define _LCDSE0_SEGEN5 0x20
2705 #define _LCDSE0_SEG6 0x40
2706 #define _LCDSE0_SE6 0x40
2707 #define _LCDSE0_SEGEN6 0x40
2708 #define _LCDSE0_SEG7 0x80
2709 #define _LCDSE0_SE7 0x80
2710 #define _LCDSE0_SEGEN7 0x80
2712 //==============================================================================
2715 //==============================================================================
2716 // LCDSE1 Bits
2718 extern __at(0x011D) __sfr LCDSE1;
2720 typedef union
2722 struct
2724 unsigned SEG8 : 1;
2725 unsigned SEG9 : 1;
2726 unsigned SEG10 : 1;
2727 unsigned SEG11 : 1;
2728 unsigned SEG12 : 1;
2729 unsigned SEG13 : 1;
2730 unsigned SEG14 : 1;
2731 unsigned SEG15 : 1;
2734 struct
2736 unsigned SE8 : 1;
2737 unsigned SE9 : 1;
2738 unsigned SE10 : 1;
2739 unsigned SE11 : 1;
2740 unsigned SE12 : 1;
2741 unsigned SE13 : 1;
2742 unsigned SE14 : 1;
2743 unsigned SE15 : 1;
2746 struct
2748 unsigned SEGEN8 : 1;
2749 unsigned SEGEN9 : 1;
2750 unsigned SEGEN10 : 1;
2751 unsigned SEGEN11 : 1;
2752 unsigned SEGEN12 : 1;
2753 unsigned SEGEN13 : 1;
2754 unsigned SEGEN14 : 1;
2755 unsigned SEGEN15 : 1;
2757 } __LCDSE1bits_t;
2759 extern __at(0x011D) volatile __LCDSE1bits_t LCDSE1bits;
2761 #define _LCDSE1_SEG8 0x01
2762 #define _LCDSE1_SE8 0x01
2763 #define _LCDSE1_SEGEN8 0x01
2764 #define _LCDSE1_SEG9 0x02
2765 #define _LCDSE1_SE9 0x02
2766 #define _LCDSE1_SEGEN9 0x02
2767 #define _LCDSE1_SEG10 0x04
2768 #define _LCDSE1_SE10 0x04
2769 #define _LCDSE1_SEGEN10 0x04
2770 #define _LCDSE1_SEG11 0x08
2771 #define _LCDSE1_SE11 0x08
2772 #define _LCDSE1_SEGEN11 0x08
2773 #define _LCDSE1_SEG12 0x10
2774 #define _LCDSE1_SE12 0x10
2775 #define _LCDSE1_SEGEN12 0x10
2776 #define _LCDSE1_SEG13 0x20
2777 #define _LCDSE1_SE13 0x20
2778 #define _LCDSE1_SEGEN13 0x20
2779 #define _LCDSE1_SEG14 0x40
2780 #define _LCDSE1_SE14 0x40
2781 #define _LCDSE1_SEGEN14 0x40
2782 #define _LCDSE1_SEG15 0x80
2783 #define _LCDSE1_SE15 0x80
2784 #define _LCDSE1_SEGEN15 0x80
2786 //==============================================================================
2789 //==============================================================================
2790 // EECON1 Bits
2792 extern __at(0x018C) __sfr EECON1;
2794 typedef union
2796 struct
2798 unsigned RD : 1;
2799 unsigned WR : 1;
2800 unsigned WREN : 1;
2801 unsigned WRERR : 1;
2802 unsigned : 1;
2803 unsigned : 1;
2804 unsigned : 1;
2805 unsigned EEPGD : 1;
2808 struct
2810 unsigned EERD : 1;
2811 unsigned EEWR : 1;
2812 unsigned : 1;
2813 unsigned : 1;
2814 unsigned : 1;
2815 unsigned : 1;
2816 unsigned : 1;
2817 unsigned : 1;
2819 } __EECON1bits_t;
2821 extern __at(0x018C) volatile __EECON1bits_t EECON1bits;
2823 #define _RD 0x01
2824 #define _EERD 0x01
2825 #define _WR 0x02
2826 #define _EEWR 0x02
2827 #define _WREN 0x04
2828 #define _WRERR 0x08
2829 #define _EEPGD 0x80
2831 //==============================================================================
2833 extern __at(0x018D) __sfr EECON2;
2835 //==============================================================================
2837 // Configuration Bits
2839 //==============================================================================
2841 #define _CONFIG 0x2007
2843 //----------------------------- CONFIG Options -------------------------------
2845 #define _FOSC_LP 0x3FF8 // LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT/T1OSO and RA7/OSC1/CLKIN/T1OSI.
2846 #define _LP_OSC 0x3FF8 // LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT/T1OSO and RA7/OSC1/CLKIN/T1OSI.
2847 #define _FOSC_XT 0x3FF9 // XT oscillator: Crystal/resonator on RA6/OSC2/CLKOUT/T1OSO and RA7/OSC1/CLKIN/T1OSI.
2848 #define _XT_OSC 0x3FF9 // XT oscillator: Crystal/resonator on RA6/OSC2/CLKOUT/T1OSO and RA7/OSC1/CLKIN/T1OSI.
2849 #define _FOSC_HS 0x3FFA // HS oscillator: High-speed crystal/resonator on RA6/OSC2/CLKOUT/T1OSO and RA7/OSC1/CLKIN/T1OSI.
2850 #define _HS_OSC 0x3FFA // HS oscillator: High-speed crystal/resonator on RA6/OSC2/CLKOUT/T1OSO and RA7/OSC1/CLKIN/T1OSI.
2851 #define _FOSC_EC 0x3FFB // EC: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, CLKIN on RA7/OSC1/CLKIN/T1OSI.
2852 #define _EC_OSC 0x3FFB // EC: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, CLKIN on RA7/OSC1/CLKIN/T1OSI.
2853 #define _FOSC_INTOSCIO 0x3FFC // INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, I/O function on RA7/OSC1/CLKIN/T1OSI.
2854 #define _INTRC_OSC_NOCLKOUT 0x3FFC // INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, I/O function on RA7/OSC1/CLKIN/T1OSI.
2855 #define _INTOSCIO 0x3FFC // INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, I/O function on RA7/OSC1/CLKIN/T1OSI.
2856 #define _FOSC_INTOSCCLK 0x3FFD // INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT/T1OSO pin, I/O function on RA7/OSC1/CLKIN/T1OSI.
2857 #define _INTRC_OSC_CLKOUT 0x3FFD // INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT/T1OSO pin, I/O function on RA7/OSC1/CLKIN/T1OSI.
2858 #define _INTOSC 0x3FFD // INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT/T1OSO pin, I/O function on RA7/OSC1/CLKIN/T1OSI.
2859 #define _FOSC_EXTRCIO 0x3FFE // RCIO oscillator: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, RC on RA7/OSC1/CLKIN/T1OSI.
2860 #define _EXTRC_OSC_NOCLKOUT 0x3FFE // RCIO oscillator: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, RC on RA7/OSC1/CLKIN/T1OSI.
2861 #define _EXTRCIO 0x3FFE // RCIO oscillator: I/O function on RA6/OSC2/CLKOUT/T1OSO pin, RC on RA7/OSC1/CLKIN/T1OSI.
2862 #define _FOSC_EXTRCCLK 0x3FFF // RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT/T1OSO pin, RC on RA7/OSC1/CLKIN/T1OSI.
2863 #define _EXTRC_OSC_CLKOUT 0x3FFF // RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT/T1OSO pin, RC on RA7/OSC1/CLKIN/T1OSI.
2864 #define _EXTRC 0x3FFF // RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT/T1OSO pin, RC on RA7/OSC1/CLKIN/T1OSI.
2865 #define _WDTE_OFF 0x3FF7 // WDT disabled and can be enabled by SWDTEN bit of the WDTCON register.
2866 #define _WDT_OFF 0x3FF7 // WDT disabled and can be enabled by SWDTEN bit of the WDTCON register.
2867 #define _WDTE_ON 0x3FFF // WDT enabled.
2868 #define _WDT_ON 0x3FFF // WDT enabled.
2869 #define _PWRTE_ON 0x3FEF // PWRT enabled.
2870 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
2871 #define _MCLRE_OFF 0x3FDF // RE3/MCLR pin function is digital input, MCLR internally tied to VDD.
2872 #define _MCLRE_ON 0x3FFF // RE3/MCLR pin function is MCLR.
2873 #define _CP_ON 0x3FBF // Program memory code protection is enabled.
2874 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
2875 #define _CPD_ON 0x3F7F // Data memory code protection is enabled.
2876 #define _CPD_OFF 0x3FFF // Data memory code protection is disabled.
2877 #define _BOREN_OFF 0x3CFF // BOR disabled.
2878 #define _BOD_OFF 0x3CFF // BOR disabled.
2879 #define _BOREN_SBODEN 0x3DFF // BOR controlled by SBOREN bit of the PCON register.
2880 #define _BOD_SBODEN 0x3DFF // BOR controlled by SBOREN bit of the PCON register.
2881 #define _BOREN_NSLEEP 0x3EFF // BOR enabled during operation and disabled in Sleep.
2882 #define _BOD_NSLEEP 0x3EFF // BOR enabled during operation and disabled in Sleep.
2883 #define _BOREN_ON 0x3FFF // BOR enabled.
2884 #define _BOD_ON 0x3FFF // BOR enabled.
2885 #define _IESO_OFF 0x3BFF // Internal/External Switchover mode is disabled.
2886 #define _IESO_ON 0x3FFF // Internal/External Switchover mode is enabled.
2887 #define _FCMEN_OFF 0x37FF // Fail-Safe Clock Monitor is disabled.
2888 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor is enabled.
2889 #define _DEBUG_ON 0x2FFF // In-Circuit Debugger enabled, RB6/ICSPCLK and RB7/ICSPDAT are dedicated to the debugger.
2890 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, RB6/ISCPCLK and RB7/ICSPDAT are general purpose I/O pins.
2892 //==============================================================================
2894 #define _DEVID1 0x2006
2896 #define _IDLOC0 0x2000
2897 #define _IDLOC1 0x2001
2898 #define _IDLOC2 0x2002
2899 #define _IDLOC3 0x2003
2901 //==============================================================================
2903 #ifndef NO_BIT_DEFINES
2905 #define ADON ADCON0bits.ADON // bit 0
2906 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
2907 #define NOT_DONE ADCON0bits.NOT_DONE // bit 1, shadows bit in ADCON0bits
2908 #define GO_DONE ADCON0bits.GO_DONE // bit 1, shadows bit in ADCON0bits
2909 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
2910 #define CHS0 ADCON0bits.CHS0 // bit 2
2911 #define CHS1 ADCON0bits.CHS1 // bit 3
2912 #define CHS2 ADCON0bits.CHS2 // bit 4
2913 #define VCFG0 ADCON0bits.VCFG0 // bit 5
2914 #define VCFG1 ADCON0bits.VCFG1 // bit 6
2915 #define ADFM ADCON0bits.ADFM // bit 7
2917 #define ADCS0 ADCON1bits.ADCS0 // bit 4
2918 #define ADCS1 ADCON1bits.ADCS1 // bit 5
2919 #define ADCS2 ADCON1bits.ADCS2 // bit 6
2921 #define ANS0 ANSELbits.ANS0 // bit 0, shadows bit in ANSELbits
2922 #define AN0 ANSELbits.AN0 // bit 0, shadows bit in ANSELbits
2923 #define ANS1 ANSELbits.ANS1 // bit 1, shadows bit in ANSELbits
2924 #define AN1 ANSELbits.AN1 // bit 1, shadows bit in ANSELbits
2925 #define ANS2 ANSELbits.ANS2 // bit 2, shadows bit in ANSELbits
2926 #define AN2 ANSELbits.AN2 // bit 2, shadows bit in ANSELbits
2927 #define ANS3 ANSELbits.ANS3 // bit 3, shadows bit in ANSELbits
2928 #define AN3 ANSELbits.AN3 // bit 3, shadows bit in ANSELbits
2929 #define ANS4 ANSELbits.ANS4 // bit 4, shadows bit in ANSELbits
2930 #define AN4 ANSELbits.AN4 // bit 4, shadows bit in ANSELbits
2932 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
2933 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
2934 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
2935 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
2936 #define CCP1Y CCP1CONbits.CCP1Y // bit 4
2937 #define CCP1X CCP1CONbits.CCP1X // bit 5
2939 #define CM0 CMCON0bits.CM0 // bit 0
2940 #define CM1 CMCON0bits.CM1 // bit 1
2941 #define CM2 CMCON0bits.CM2 // bit 2
2942 #define CIS CMCON0bits.CIS // bit 3
2943 #define C1INV CMCON0bits.C1INV // bit 4
2944 #define C2INV CMCON0bits.C2INV // bit 5
2945 #define C1OUT CMCON0bits.C1OUT // bit 6
2946 #define C2OUT CMCON0bits.C2OUT // bit 7
2948 #define C2SYNC CMCON1bits.C2SYNC // bit 0
2949 #define T1GSS CMCON1bits.T1GSS // bit 1
2951 #define EEADRL0 EEADRbits.EEADRL0 // bit 0
2952 #define EEADRL1 EEADRbits.EEADRL1 // bit 1
2953 #define EEADRL2 EEADRbits.EEADRL2 // bit 2
2954 #define EEADRL3 EEADRbits.EEADRL3 // bit 3
2955 #define EEADRL4 EEADRbits.EEADRL4 // bit 4
2956 #define EEADRL5 EEADRbits.EEADRL5 // bit 5
2957 #define EEADRL6 EEADRbits.EEADRL6 // bit 6
2958 #define EEADRL7 EEADRbits.EEADRL7 // bit 7
2960 #define EEADRH0 EEADRHbits.EEADRH0 // bit 0
2961 #define EEADRH1 EEADRHbits.EEADRH1 // bit 1
2962 #define EEADRH2 EEADRHbits.EEADRH2 // bit 2
2963 #define EEADRH3 EEADRHbits.EEADRH3 // bit 3
2964 #define EEADRH4 EEADRHbits.EEADRH4 // bit 4
2966 #define RD EECON1bits.RD // bit 0, shadows bit in EECON1bits
2967 #define EERD EECON1bits.EERD // bit 0, shadows bit in EECON1bits
2968 #define WR EECON1bits.WR // bit 1, shadows bit in EECON1bits
2969 #define EEWR EECON1bits.EEWR // bit 1, shadows bit in EECON1bits
2970 #define WREN EECON1bits.WREN // bit 2
2971 #define WRERR EECON1bits.WRERR // bit 3
2972 #define EEPGD EECON1bits.EEPGD // bit 7
2974 #define EEDATL0 EEDATAbits.EEDATL0 // bit 0
2975 #define EEDATL1 EEDATAbits.EEDATL1 // bit 1
2976 #define EEDATL2 EEDATAbits.EEDATL2 // bit 2
2977 #define EEDATL3 EEDATAbits.EEDATL3 // bit 3
2978 #define EEDATL4 EEDATAbits.EEDATL4 // bit 4
2979 #define EEDATL5 EEDATAbits.EEDATL5 // bit 5
2980 #define EEDATL6 EEDATAbits.EEDATL6 // bit 6
2981 #define EEDATL7 EEDATAbits.EEDATL7 // bit 7
2983 #define EEDATH0 EEDATHbits.EEDATH0 // bit 0
2984 #define EEDATH1 EEDATHbits.EEDATH1 // bit 1
2985 #define EEDATH2 EEDATHbits.EEDATH2 // bit 2
2986 #define EEDATH3 EEDATHbits.EEDATH3 // bit 3
2987 #define EEDATH4 EEDATHbits.EEDATH4 // bit 4
2988 #define EEDATH5 EEDATHbits.EEDATH5 // bit 5
2990 #define RBIF INTCONbits.RBIF // bit 0
2991 #define INTF INTCONbits.INTF // bit 1
2992 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
2993 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
2994 #define RBIE INTCONbits.RBIE // bit 3
2995 #define INTE INTCONbits.INTE // bit 4
2996 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
2997 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
2998 #define PEIE INTCONbits.PEIE // bit 6
2999 #define GIE INTCONbits.GIE // bit 7
3001 #define IOCB4 IOCbits.IOCB4 // bit 4, shadows bit in IOCbits
3002 #define IOC4 IOCbits.IOC4 // bit 4, shadows bit in IOCbits
3003 #define IOCB5 IOCbits.IOCB5 // bit 5, shadows bit in IOCbits
3004 #define IOC5 IOCbits.IOC5 // bit 5, shadows bit in IOCbits
3005 #define IOCB6 IOCbits.IOCB6 // bit 6, shadows bit in IOCbits
3006 #define IOC6 IOCbits.IOC6 // bit 6, shadows bit in IOCbits
3007 #define IOCB7 IOCbits.IOCB7 // bit 7, shadows bit in IOCbits
3008 #define IOC7 IOCbits.IOC7 // bit 7, shadows bit in IOCbits
3010 #define LMUX0 LCDCONbits.LMUX0 // bit 0
3011 #define LMUX1 LCDCONbits.LMUX1 // bit 1
3012 #define CS0 LCDCONbits.CS0 // bit 2
3013 #define CS1 LCDCONbits.CS1 // bit 3
3014 #define VLCDEN LCDCONbits.VLCDEN // bit 4
3015 #define WERR LCDCONbits.WERR // bit 5
3016 #define SLPEN LCDCONbits.SLPEN // bit 6
3017 #define LCDEN LCDCONbits.LCDEN // bit 7
3019 #define SEG0 LCDDATA0bits.SEG0 // bit 0, shadows bit in LCDDATA0bits
3020 #define SEG0COM0 LCDDATA0bits.SEG0COM0 // bit 0, shadows bit in LCDDATA0bits
3021 #define S0C0 LCDDATA0bits.S0C0 // bit 0, shadows bit in LCDDATA0bits
3022 #define SEG1 LCDDATA0bits.SEG1 // bit 1, shadows bit in LCDDATA0bits
3023 #define SEG1COM0 LCDDATA0bits.SEG1COM0 // bit 1, shadows bit in LCDDATA0bits
3024 #define S1C0 LCDDATA0bits.S1C0 // bit 1, shadows bit in LCDDATA0bits
3025 #define SEG2 LCDDATA0bits.SEG2 // bit 2, shadows bit in LCDDATA0bits
3026 #define SEG2COM0 LCDDATA0bits.SEG2COM0 // bit 2, shadows bit in LCDDATA0bits
3027 #define S2C0 LCDDATA0bits.S2C0 // bit 2, shadows bit in LCDDATA0bits
3028 #define SEG3 LCDDATA0bits.SEG3 // bit 3, shadows bit in LCDDATA0bits
3029 #define SEG3COM0 LCDDATA0bits.SEG3COM0 // bit 3, shadows bit in LCDDATA0bits
3030 #define S3C0 LCDDATA0bits.S3C0 // bit 3, shadows bit in LCDDATA0bits
3031 #define SEG4 LCDDATA0bits.SEG4 // bit 4, shadows bit in LCDDATA0bits
3032 #define SEG4COM0 LCDDATA0bits.SEG4COM0 // bit 4, shadows bit in LCDDATA0bits
3033 #define S4C0 LCDDATA0bits.S4C0 // bit 4, shadows bit in LCDDATA0bits
3034 #define SEG5 LCDDATA0bits.SEG5 // bit 5, shadows bit in LCDDATA0bits
3035 #define SEG5COM0 LCDDATA0bits.SEG5COM0 // bit 5, shadows bit in LCDDATA0bits
3036 #define S5C0 LCDDATA0bits.S5C0 // bit 5, shadows bit in LCDDATA0bits
3037 #define SEG6 LCDDATA0bits.SEG6 // bit 6, shadows bit in LCDDATA0bits
3038 #define SEG6COM0 LCDDATA0bits.SEG6COM0 // bit 6, shadows bit in LCDDATA0bits
3039 #define S6C0 LCDDATA0bits.S6C0 // bit 6, shadows bit in LCDDATA0bits
3040 #define SEG7 LCDDATA0bits.SEG7 // bit 7, shadows bit in LCDDATA0bits
3041 #define SEG7COM0 LCDDATA0bits.SEG7COM0 // bit 7, shadows bit in LCDDATA0bits
3042 #define S7C0 LCDDATA0bits.S7C0 // bit 7, shadows bit in LCDDATA0bits
3044 #define SEG8 LCDDATA1bits.SEG8 // bit 0, shadows bit in LCDDATA1bits
3045 #define SEG8COM0 LCDDATA1bits.SEG8COM0 // bit 0, shadows bit in LCDDATA1bits
3046 #define S8C0 LCDDATA1bits.S8C0 // bit 0, shadows bit in LCDDATA1bits
3047 #define SEG9 LCDDATA1bits.SEG9 // bit 1, shadows bit in LCDDATA1bits
3048 #define SEG9COM0 LCDDATA1bits.SEG9COM0 // bit 1, shadows bit in LCDDATA1bits
3049 #define S9C0 LCDDATA1bits.S9C0 // bit 1, shadows bit in LCDDATA1bits
3050 #define SEG10 LCDDATA1bits.SEG10 // bit 2, shadows bit in LCDDATA1bits
3051 #define SEG10COM0 LCDDATA1bits.SEG10COM0 // bit 2, shadows bit in LCDDATA1bits
3052 #define S10C0 LCDDATA1bits.S10C0 // bit 2, shadows bit in LCDDATA1bits
3053 #define SEG11 LCDDATA1bits.SEG11 // bit 3, shadows bit in LCDDATA1bits
3054 #define SEG11COM0 LCDDATA1bits.SEG11COM0 // bit 3, shadows bit in LCDDATA1bits
3055 #define S11C0 LCDDATA1bits.S11C0 // bit 3, shadows bit in LCDDATA1bits
3056 #define SEG12 LCDDATA1bits.SEG12 // bit 4, shadows bit in LCDDATA1bits
3057 #define SEG12COM0 LCDDATA1bits.SEG12COM0 // bit 4, shadows bit in LCDDATA1bits
3058 #define S12C0 LCDDATA1bits.S12C0 // bit 4, shadows bit in LCDDATA1bits
3059 #define SEG13 LCDDATA1bits.SEG13 // bit 5, shadows bit in LCDDATA1bits
3060 #define SEG13COM0 LCDDATA1bits.SEG13COM0 // bit 5, shadows bit in LCDDATA1bits
3061 #define S13C0 LCDDATA1bits.S13C0 // bit 5, shadows bit in LCDDATA1bits
3062 #define SEG14 LCDDATA1bits.SEG14 // bit 6, shadows bit in LCDDATA1bits
3063 #define SEG14COM0 LCDDATA1bits.SEG14COM0 // bit 6, shadows bit in LCDDATA1bits
3064 #define S14C0 LCDDATA1bits.S14C0 // bit 6, shadows bit in LCDDATA1bits
3065 #define SEG15 LCDDATA1bits.SEG15 // bit 7, shadows bit in LCDDATA1bits
3066 #define SEG15COM0 LCDDATA1bits.SEG15COM0 // bit 7, shadows bit in LCDDATA1bits
3067 #define S15C0 LCDDATA1bits.S15C0 // bit 7, shadows bit in LCDDATA1bits
3069 #define LP0 LCDPSbits.LP0 // bit 0
3070 #define LP1 LCDPSbits.LP1 // bit 1
3071 #define LP2 LCDPSbits.LP2 // bit 2
3072 #define LP3 LCDPSbits.LP3 // bit 3
3073 #define WA LCDPSbits.WA // bit 4
3074 #define LCDA LCDPSbits.LCDA // bit 5
3075 #define BIASMD LCDPSbits.BIASMD // bit 6
3076 #define WFT LCDPSbits.WFT // bit 7
3078 #define LVDL0 LVDCONbits.LVDL0 // bit 0
3079 #define LVDL1 LVDCONbits.LVDL1 // bit 1
3080 #define LVDL2 LVDCONbits.LVDL2 // bit 2
3081 #define LVDEN LVDCONbits.LVDEN // bit 4
3082 #define IRVST LVDCONbits.IRVST // bit 5
3084 #define PS0 OPTION_REGbits.PS0 // bit 0
3085 #define PS1 OPTION_REGbits.PS1 // bit 1
3086 #define PS2 OPTION_REGbits.PS2 // bit 2
3087 #define PSA OPTION_REGbits.PSA // bit 3
3088 #define T0SE OPTION_REGbits.T0SE // bit 4
3089 #define T0CS OPTION_REGbits.T0CS // bit 5
3090 #define INTEDG OPTION_REGbits.INTEDG // bit 6
3091 #define NOT_RBPU OPTION_REGbits.NOT_RBPU // bit 7
3093 #define SCS OSCCONbits.SCS // bit 0
3094 #define LTS OSCCONbits.LTS // bit 1
3095 #define HTS OSCCONbits.HTS // bit 2
3096 #define OSTS OSCCONbits.OSTS // bit 3
3097 #define IRCF0 OSCCONbits.IRCF0 // bit 4
3098 #define IRCF1 OSCCONbits.IRCF1 // bit 5
3099 #define IRCF2 OSCCONbits.IRCF2 // bit 6
3101 #define TUN0 OSCTUNEbits.TUN0 // bit 0
3102 #define TUN1 OSCTUNEbits.TUN1 // bit 1
3103 #define TUN2 OSCTUNEbits.TUN2 // bit 2
3104 #define TUN3 OSCTUNEbits.TUN3 // bit 3
3105 #define TUN4 OSCTUNEbits.TUN4 // bit 4
3107 #define NOT_BOR PCONbits.NOT_BOR // bit 0, shadows bit in PCONbits
3108 #define NOT_BO PCONbits.NOT_BO // bit 0, shadows bit in PCONbits
3109 #define NOT_POR PCONbits.NOT_POR // bit 1
3110 #define SBOREN PCONbits.SBOREN // bit 4
3112 #define TMR1IE PIE1bits.TMR1IE // bit 0
3113 #define TMR2IE PIE1bits.TMR2IE // bit 1
3114 #define CCP1IE PIE1bits.CCP1IE // bit 2
3115 #define SSPIE PIE1bits.SSPIE // bit 3
3116 #define TXIE PIE1bits.TXIE // bit 4
3117 #define RCIE PIE1bits.RCIE // bit 5
3118 #define ADIE PIE1bits.ADIE // bit 6
3119 #define EEIE PIE1bits.EEIE // bit 7
3121 #define LVDIE PIE2bits.LVDIE // bit 2
3122 #define LCDIE PIE2bits.LCDIE // bit 4
3123 #define C1IE PIE2bits.C1IE // bit 5
3124 #define C2IE PIE2bits.C2IE // bit 6
3125 #define OSFIE PIE2bits.OSFIE // bit 7
3127 #define TMR1IF PIR1bits.TMR1IF // bit 0
3128 #define TMR2IF PIR1bits.TMR2IF // bit 1
3129 #define CCP1IF PIR1bits.CCP1IF // bit 2
3130 #define SSPIF PIR1bits.SSPIF // bit 3
3131 #define TXIF PIR1bits.TXIF // bit 4
3132 #define RCIF PIR1bits.RCIF // bit 5
3133 #define ADIF PIR1bits.ADIF // bit 6
3134 #define EEIF PIR1bits.EEIF // bit 7
3136 #define LVDIF PIR2bits.LVDIF // bit 2
3137 #define LCDIF PIR2bits.LCDIF // bit 4
3138 #define C1IF PIR2bits.C1IF // bit 5
3139 #define C2IF PIR2bits.C2IF // bit 6
3140 #define OSFIF PIR2bits.OSFIF // bit 7
3142 #define RA0 PORTAbits.RA0 // bit 0
3143 #define RA1 PORTAbits.RA1 // bit 1
3144 #define RA2 PORTAbits.RA2 // bit 2
3145 #define RA3 PORTAbits.RA3 // bit 3
3146 #define RA4 PORTAbits.RA4 // bit 4
3147 #define RA5 PORTAbits.RA5 // bit 5
3148 #define RA6 PORTAbits.RA6 // bit 6
3149 #define RA7 PORTAbits.RA7 // bit 7
3151 #define RB0 PORTBbits.RB0 // bit 0
3152 #define RB1 PORTBbits.RB1 // bit 1
3153 #define RB2 PORTBbits.RB2 // bit 2
3154 #define RB3 PORTBbits.RB3 // bit 3
3155 #define RB4 PORTBbits.RB4 // bit 4
3156 #define RB5 PORTBbits.RB5 // bit 5
3157 #define RB6 PORTBbits.RB6 // bit 6
3158 #define RB7 PORTBbits.RB7 // bit 7
3160 #define RC0 PORTCbits.RC0 // bit 0
3161 #define RC1 PORTCbits.RC1 // bit 1
3162 #define RC2 PORTCbits.RC2 // bit 2
3163 #define RC3 PORTCbits.RC3 // bit 3
3164 #define RC4 PORTCbits.RC4 // bit 4
3165 #define RC5 PORTCbits.RC5 // bit 5
3166 #define RC6 PORTCbits.RC6 // bit 6
3167 #define RC7 PORTCbits.RC7 // bit 7
3169 #define RE3 PORTEbits.RE3 // bit 3
3171 #define RX9D RCSTAbits.RX9D // bit 0, shadows bit in RCSTAbits
3172 #define RCD8 RCSTAbits.RCD8 // bit 0, shadows bit in RCSTAbits
3173 #define OERR RCSTAbits.OERR // bit 1
3174 #define FERR RCSTAbits.FERR // bit 2
3175 #define ADDEN RCSTAbits.ADDEN // bit 3
3176 #define CREN RCSTAbits.CREN // bit 4
3177 #define SREN RCSTAbits.SREN // bit 5
3178 #define RX9 RCSTAbits.RX9 // bit 6, shadows bit in RCSTAbits
3179 #define RC9 RCSTAbits.RC9 // bit 6, shadows bit in RCSTAbits
3180 #define NOT_RC8 RCSTAbits.NOT_RC8 // bit 6, shadows bit in RCSTAbits
3181 #define RC8_9 RCSTAbits.RC8_9 // bit 6, shadows bit in RCSTAbits
3182 #define SPEN RCSTAbits.SPEN // bit 7
3184 #define SSPM0 SSPCONbits.SSPM0 // bit 0
3185 #define SSPM1 SSPCONbits.SSPM1 // bit 1
3186 #define SSPM2 SSPCONbits.SSPM2 // bit 2
3187 #define SSPM3 SSPCONbits.SSPM3 // bit 3
3188 #define CKP SSPCONbits.CKP // bit 4
3189 #define SSPEN SSPCONbits.SSPEN // bit 5
3190 #define SSPOV SSPCONbits.SSPOV // bit 6
3191 #define WCOL SSPCONbits.WCOL // bit 7
3193 #define BF SSPSTATbits.BF // bit 0
3194 #define UA SSPSTATbits.UA // bit 1
3195 #define R_NOT_W SSPSTATbits.R_NOT_W // bit 2, shadows bit in SSPSTATbits
3196 #define R SSPSTATbits.R // bit 2, shadows bit in SSPSTATbits
3197 #define I2C_READ SSPSTATbits.I2C_READ // bit 2, shadows bit in SSPSTATbits
3198 #define NOT_W SSPSTATbits.NOT_W // bit 2, shadows bit in SSPSTATbits
3199 #define NOT_WRITE SSPSTATbits.NOT_WRITE // bit 2, shadows bit in SSPSTATbits
3200 #define R_W SSPSTATbits.R_W // bit 2, shadows bit in SSPSTATbits
3201 #define READ_WRITE SSPSTATbits.READ_WRITE // bit 2, shadows bit in SSPSTATbits
3202 #define S SSPSTATbits.S // bit 3, shadows bit in SSPSTATbits
3203 #define I2C_START SSPSTATbits.I2C_START // bit 3, shadows bit in SSPSTATbits
3204 #define P SSPSTATbits.P // bit 4, shadows bit in SSPSTATbits
3205 #define I2C_STOP SSPSTATbits.I2C_STOP // bit 4, shadows bit in SSPSTATbits
3206 #define D_NOT_A SSPSTATbits.D_NOT_A // bit 5, shadows bit in SSPSTATbits
3207 #define D SSPSTATbits.D // bit 5, shadows bit in SSPSTATbits
3208 #define I2C_DATA SSPSTATbits.I2C_DATA // bit 5, shadows bit in SSPSTATbits
3209 #define NOT_A SSPSTATbits.NOT_A // bit 5, shadows bit in SSPSTATbits
3210 #define NOT_ADDRESS SSPSTATbits.NOT_ADDRESS // bit 5, shadows bit in SSPSTATbits
3211 #define D_A SSPSTATbits.D_A // bit 5, shadows bit in SSPSTATbits
3212 #define DATA_ADDRESS SSPSTATbits.DATA_ADDRESS // bit 5, shadows bit in SSPSTATbits
3213 #define CKE SSPSTATbits.CKE // bit 6
3214 #define SMP SSPSTATbits.SMP // bit 7
3216 #define C STATUSbits.C // bit 0
3217 #define DC STATUSbits.DC // bit 1
3218 #define Z STATUSbits.Z // bit 2
3219 #define NOT_PD STATUSbits.NOT_PD // bit 3
3220 #define NOT_TO STATUSbits.NOT_TO // bit 4
3221 #define RP0 STATUSbits.RP0 // bit 5
3222 #define RP1 STATUSbits.RP1 // bit 6
3223 #define IRP STATUSbits.IRP // bit 7
3225 #define TMR1ON T1CONbits.TMR1ON // bit 0
3226 #define TMR1CS T1CONbits.TMR1CS // bit 1
3227 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2, shadows bit in T1CONbits
3228 #define T1SYNC T1CONbits.T1SYNC // bit 2, shadows bit in T1CONbits
3229 #define T1INSYNC T1CONbits.T1INSYNC // bit 2, shadows bit in T1CONbits
3230 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
3231 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
3232 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
3233 #define TMR1GE T1CONbits.TMR1GE // bit 6, shadows bit in T1CONbits
3234 #define T1GE T1CONbits.T1GE // bit 6, shadows bit in T1CONbits
3235 #define T1GINV T1CONbits.T1GINV // bit 7
3237 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
3238 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
3239 #define TMR2ON T2CONbits.TMR2ON // bit 2
3240 #define TOUTPS0 T2CONbits.TOUTPS0 // bit 3
3241 #define TOUTPS1 T2CONbits.TOUTPS1 // bit 4
3242 #define TOUTPS2 T2CONbits.TOUTPS2 // bit 5
3243 #define TOUTPS3 T2CONbits.TOUTPS3 // bit 6
3245 #define TRISA0 TRISAbits.TRISA0 // bit 0
3246 #define TRISA1 TRISAbits.TRISA1 // bit 1
3247 #define TRISA2 TRISAbits.TRISA2 // bit 2
3248 #define TRISA3 TRISAbits.TRISA3 // bit 3
3249 #define TRISA4 TRISAbits.TRISA4 // bit 4
3250 #define TRISA5 TRISAbits.TRISA5 // bit 5
3251 #define TRISA6 TRISAbits.TRISA6 // bit 6
3252 #define TRISA7 TRISAbits.TRISA7 // bit 7
3254 #define TRISB0 TRISBbits.TRISB0 // bit 0
3255 #define TRISB1 TRISBbits.TRISB1 // bit 1
3256 #define TRISB2 TRISBbits.TRISB2 // bit 2
3257 #define TRISB3 TRISBbits.TRISB3 // bit 3
3258 #define TRISB4 TRISBbits.TRISB4 // bit 4
3259 #define TRISB5 TRISBbits.TRISB5 // bit 5
3260 #define TRISB6 TRISBbits.TRISB6 // bit 6
3261 #define TRISB7 TRISBbits.TRISB7 // bit 7
3263 #define TRISC0 TRISCbits.TRISC0 // bit 0
3264 #define TRISC1 TRISCbits.TRISC1 // bit 1
3265 #define TRISC2 TRISCbits.TRISC2 // bit 2
3266 #define TRISC3 TRISCbits.TRISC3 // bit 3
3267 #define TRISC4 TRISCbits.TRISC4 // bit 4
3268 #define TRISC5 TRISCbits.TRISC5 // bit 5
3269 #define TRISC6 TRISCbits.TRISC6 // bit 6
3270 #define TRISC7 TRISCbits.TRISC7 // bit 7
3272 #define TRISE3 TRISEbits.TRISE3 // bit 3
3274 #define TX9D TXSTAbits.TX9D // bit 0, shadows bit in TXSTAbits
3275 #define TXD8 TXSTAbits.TXD8 // bit 0, shadows bit in TXSTAbits
3276 #define TRMT TXSTAbits.TRMT // bit 1
3277 #define BRGH TXSTAbits.BRGH // bit 2
3278 #define SYNC TXSTAbits.SYNC // bit 4
3279 #define TXEN TXSTAbits.TXEN // bit 5
3280 #define TX9 TXSTAbits.TX9 // bit 6, shadows bit in TXSTAbits
3281 #define NOT_TX8 TXSTAbits.NOT_TX8 // bit 6, shadows bit in TXSTAbits
3282 #define TX8_9 TXSTAbits.TX8_9 // bit 6, shadows bit in TXSTAbits
3283 #define CSRC TXSTAbits.CSRC // bit 7
3285 #define VR0 VRCONbits.VR0 // bit 0
3286 #define VR1 VRCONbits.VR1 // bit 1
3287 #define VR2 VRCONbits.VR2 // bit 2
3288 #define VR3 VRCONbits.VR3 // bit 3
3289 #define VRR VRCONbits.VRR // bit 5
3290 #define VREN VRCONbits.VREN // bit 7
3292 #define SWDTEN WDTCONbits.SWDTEN // bit 0, shadows bit in WDTCONbits
3293 #define SWDTE WDTCONbits.SWDTE // bit 0, shadows bit in WDTCONbits
3294 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
3295 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
3296 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
3297 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
3299 #define WPUB0 WPUbits.WPUB0 // bit 0, shadows bit in WPUbits
3300 #define WPU0 WPUbits.WPU0 // bit 0, shadows bit in WPUbits
3301 #define WPUB1 WPUbits.WPUB1 // bit 1, shadows bit in WPUbits
3302 #define WPU1 WPUbits.WPU1 // bit 1, shadows bit in WPUbits
3303 #define WPUB2 WPUbits.WPUB2 // bit 2, shadows bit in WPUbits
3304 #define WPU2 WPUbits.WPU2 // bit 2, shadows bit in WPUbits
3305 #define WPUB3 WPUbits.WPUB3 // bit 3, shadows bit in WPUbits
3306 #define WPU3 WPUbits.WPU3 // bit 3, shadows bit in WPUbits
3307 #define WPUB4 WPUbits.WPUB4 // bit 4, shadows bit in WPUbits
3308 #define WPU4 WPUbits.WPU4 // bit 4, shadows bit in WPUbits
3309 #define WPUB5 WPUbits.WPUB5 // bit 5, shadows bit in WPUbits
3310 #define WPU5 WPUbits.WPU5 // bit 5, shadows bit in WPUbits
3311 #define WPUB6 WPUbits.WPUB6 // bit 6, shadows bit in WPUbits
3312 #define WPU6 WPUbits.WPU6 // bit 6, shadows bit in WPUbits
3313 #define WPUB7 WPUbits.WPUB7 // bit 7, shadows bit in WPUbits
3314 #define WPU7 WPUbits.WPU7 // bit 7, shadows bit in WPUbits
3316 #endif // #ifndef NO_BIT_DEFINES
3318 #endif // #ifndef __PIC16F913_H__