struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16lf722.h
blobf55f253d1d8e194683d8865dab72d93c87459823
1 /*
2 * This declarations of the PIC16LF722 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:22:58 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 __PIC16LF722_H__
26 #define __PIC16LF722_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 CCPR2_ADDR 0x001B
65 #define CCPR2L_ADDR 0x001B
66 #define CCPR2H_ADDR 0x001C
67 #define CCP2CON_ADDR 0x001D
68 #define ADRES_ADDR 0x001E
69 #define ADCON0_ADDR 0x001F
70 #define OPTION_REG_ADDR 0x0081
71 #define TRISA_ADDR 0x0085
72 #define TRISB_ADDR 0x0086
73 #define TRISC_ADDR 0x0087
74 #define TRISE_ADDR 0x0089
75 #define PIE1_ADDR 0x008C
76 #define PIE2_ADDR 0x008D
77 #define PCON_ADDR 0x008E
78 #define T1GCON_ADDR 0x008F
79 #define OSCCON_ADDR 0x0090
80 #define OSCTUNE_ADDR 0x0091
81 #define PR2_ADDR 0x0092
82 #define SSPADD_ADDR 0x0093
83 #define SSPMSK_ADDR 0x0093
84 #define SSPSTAT_ADDR 0x0094
85 #define WPU_ADDR 0x0095
86 #define WPUB_ADDR 0x0095
87 #define IOC_ADDR 0x0096
88 #define IOCB_ADDR 0x0096
89 #define TXSTA_ADDR 0x0098
90 #define SPBRG_ADDR 0x0099
91 #define APFCON_ADDR 0x009C
92 #define FVRCON_ADDR 0x009D
93 #define ADCON1_ADDR 0x009F
94 #define CPSCON0_ADDR 0x0108
95 #define CPSCON1_ADDR 0x0109
96 #define PMDATA_ADDR 0x010C
97 #define PMDATL_ADDR 0x010C
98 #define PMADR_ADDR 0x010D
99 #define PMADRL_ADDR 0x010D
100 #define PMDATH_ADDR 0x010E
101 #define PMADRH_ADDR 0x010F
102 #define ANSELA_ADDR 0x0185
103 #define ANSELB_ADDR 0x0186
104 #define PMCON1_ADDR 0x018C
106 #endif // #ifndef NO_ADDR_DEFINES
108 //==============================================================================
110 // Register Definitions
112 //==============================================================================
114 extern __at(0x0000) __sfr INDF;
115 extern __at(0x0001) __sfr TMR0;
116 extern __at(0x0002) __sfr PCL;
118 //==============================================================================
119 // STATUS Bits
121 extern __at(0x0003) __sfr STATUS;
123 typedef union
125 struct
127 unsigned C : 1;
128 unsigned DC : 1;
129 unsigned Z : 1;
130 unsigned NOT_PD : 1;
131 unsigned NOT_TO : 1;
132 unsigned RP0 : 1;
133 unsigned RP1 : 1;
134 unsigned IRP : 1;
137 struct
139 unsigned : 5;
140 unsigned RP : 2;
141 unsigned : 1;
143 } __STATUSbits_t;
145 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
147 #define _C 0x01
148 #define _DC 0x02
149 #define _Z 0x04
150 #define _NOT_PD 0x08
151 #define _NOT_TO 0x10
152 #define _RP0 0x20
153 #define _RP1 0x40
154 #define _IRP 0x80
156 //==============================================================================
158 extern __at(0x0004) __sfr FSR;
160 //==============================================================================
161 // PORTA Bits
163 extern __at(0x0005) __sfr PORTA;
165 typedef struct
167 unsigned RA0 : 1;
168 unsigned RA1 : 1;
169 unsigned RA2 : 1;
170 unsigned RA3 : 1;
171 unsigned RA4 : 1;
172 unsigned RA5 : 1;
173 unsigned RA6 : 1;
174 unsigned RA7 : 1;
175 } __PORTAbits_t;
177 extern __at(0x0005) volatile __PORTAbits_t PORTAbits;
179 #define _RA0 0x01
180 #define _RA1 0x02
181 #define _RA2 0x04
182 #define _RA3 0x08
183 #define _RA4 0x10
184 #define _RA5 0x20
185 #define _RA6 0x40
186 #define _RA7 0x80
188 //==============================================================================
191 //==============================================================================
192 // PORTB Bits
194 extern __at(0x0006) __sfr PORTB;
196 typedef struct
198 unsigned RB0 : 1;
199 unsigned RB1 : 1;
200 unsigned RB2 : 1;
201 unsigned RB3 : 1;
202 unsigned RB4 : 1;
203 unsigned RB5 : 1;
204 unsigned RB6 : 1;
205 unsigned RB7 : 1;
206 } __PORTBbits_t;
208 extern __at(0x0006) volatile __PORTBbits_t PORTBbits;
210 #define _RB0 0x01
211 #define _RB1 0x02
212 #define _RB2 0x04
213 #define _RB3 0x08
214 #define _RB4 0x10
215 #define _RB5 0x20
216 #define _RB6 0x40
217 #define _RB7 0x80
219 //==============================================================================
222 //==============================================================================
223 // PORTC Bits
225 extern __at(0x0007) __sfr PORTC;
227 typedef struct
229 unsigned RC0 : 1;
230 unsigned RC1 : 1;
231 unsigned RC2 : 1;
232 unsigned RC3 : 1;
233 unsigned RC4 : 1;
234 unsigned RC5 : 1;
235 unsigned RC6 : 1;
236 unsigned RC7 : 1;
237 } __PORTCbits_t;
239 extern __at(0x0007) volatile __PORTCbits_t PORTCbits;
241 #define _RC0 0x01
242 #define _RC1 0x02
243 #define _RC2 0x04
244 #define _RC3 0x08
245 #define _RC4 0x10
246 #define _RC5 0x20
247 #define _RC6 0x40
248 #define _RC7 0x80
250 //==============================================================================
253 //==============================================================================
254 // PORTE Bits
256 extern __at(0x0009) __sfr PORTE;
258 typedef struct
260 unsigned : 1;
261 unsigned : 1;
262 unsigned : 1;
263 unsigned RE3 : 1;
264 unsigned : 1;
265 unsigned : 1;
266 unsigned : 1;
267 unsigned : 1;
268 } __PORTEbits_t;
270 extern __at(0x0009) volatile __PORTEbits_t PORTEbits;
272 #define _RE3 0x08
274 //==============================================================================
276 extern __at(0x000A) __sfr PCLATH;
278 //==============================================================================
279 // INTCON Bits
281 extern __at(0x000B) __sfr INTCON;
283 typedef union
285 struct
287 unsigned RBIF : 1;
288 unsigned INTF : 1;
289 unsigned T0IF : 1;
290 unsigned RBIE : 1;
291 unsigned INTE : 1;
292 unsigned T0IE : 1;
293 unsigned PEIE : 1;
294 unsigned GIE : 1;
297 struct
299 unsigned IOCIF : 1;
300 unsigned : 1;
301 unsigned TMR0IF : 1;
302 unsigned IOCIE : 1;
303 unsigned : 1;
304 unsigned TMR0IE : 1;
305 unsigned : 1;
306 unsigned : 1;
308 } __INTCONbits_t;
310 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
312 #define _RBIF 0x01
313 #define _IOCIF 0x01
314 #define _INTF 0x02
315 #define _T0IF 0x04
316 #define _TMR0IF 0x04
317 #define _RBIE 0x08
318 #define _IOCIE 0x08
319 #define _INTE 0x10
320 #define _T0IE 0x20
321 #define _TMR0IE 0x20
322 #define _PEIE 0x40
323 #define _GIE 0x80
325 //==============================================================================
328 //==============================================================================
329 // PIR1 Bits
331 extern __at(0x000C) __sfr PIR1;
333 typedef struct
335 unsigned TMR1IF : 1;
336 unsigned TMR2IF : 1;
337 unsigned CCP1IF : 1;
338 unsigned SSPIF : 1;
339 unsigned TXIF : 1;
340 unsigned RCIF : 1;
341 unsigned ADIF : 1;
342 unsigned TMR1GIF : 1;
343 } __PIR1bits_t;
345 extern __at(0x000C) volatile __PIR1bits_t PIR1bits;
347 #define _TMR1IF 0x01
348 #define _TMR2IF 0x02
349 #define _CCP1IF 0x04
350 #define _SSPIF 0x08
351 #define _TXIF 0x10
352 #define _RCIF 0x20
353 #define _ADIF 0x40
354 #define _TMR1GIF 0x80
356 //==============================================================================
359 //==============================================================================
360 // PIR2 Bits
362 extern __at(0x000D) __sfr PIR2;
364 typedef struct
366 unsigned CCP2IF : 1;
367 unsigned : 1;
368 unsigned : 1;
369 unsigned : 1;
370 unsigned : 1;
371 unsigned : 1;
372 unsigned : 1;
373 unsigned : 1;
374 } __PIR2bits_t;
376 extern __at(0x000D) volatile __PIR2bits_t PIR2bits;
378 #define _CCP2IF 0x01
380 //==============================================================================
382 extern __at(0x000E) __sfr TMR1;
383 extern __at(0x000E) __sfr TMR1L;
384 extern __at(0x000F) __sfr TMR1H;
386 //==============================================================================
387 // T1CON Bits
389 extern __at(0x0010) __sfr T1CON;
391 typedef union
393 struct
395 unsigned TMR1ON : 1;
396 unsigned : 1;
397 unsigned T1SYNC : 1;
398 unsigned T1OSCEN : 1;
399 unsigned T1CKPS0 : 1;
400 unsigned T1CKPS1 : 1;
401 unsigned TMR1CS0 : 1;
402 unsigned TMR1CS1 : 1;
405 struct
407 unsigned : 1;
408 unsigned : 1;
409 unsigned NOT_T1SYNC : 1;
410 unsigned : 1;
411 unsigned : 1;
412 unsigned : 1;
413 unsigned : 1;
414 unsigned : 1;
417 struct
419 unsigned : 1;
420 unsigned : 1;
421 unsigned T1INSYNC : 1;
422 unsigned : 1;
423 unsigned : 1;
424 unsigned : 1;
425 unsigned : 1;
426 unsigned : 1;
429 struct
431 unsigned : 4;
432 unsigned T1CKPS : 2;
433 unsigned : 2;
436 struct
438 unsigned : 6;
439 unsigned TMR1CS : 2;
441 } __T1CONbits_t;
443 extern __at(0x0010) volatile __T1CONbits_t T1CONbits;
445 #define _TMR1ON 0x01
446 #define _T1SYNC 0x04
447 #define _NOT_T1SYNC 0x04
448 #define _T1INSYNC 0x04
449 #define _T1OSCEN 0x08
450 #define _T1CKPS0 0x10
451 #define _T1CKPS1 0x20
452 #define _TMR1CS0 0x40
453 #define _TMR1CS1 0x80
455 //==============================================================================
457 extern __at(0x0011) __sfr TMR2;
459 //==============================================================================
460 // T2CON Bits
462 extern __at(0x0012) __sfr T2CON;
464 typedef union
466 struct
468 unsigned T2CKPS0 : 1;
469 unsigned T2CKPS1 : 1;
470 unsigned TMR2ON : 1;
471 unsigned TOUTPS0 : 1;
472 unsigned TOUTPS1 : 1;
473 unsigned TOUTPS2 : 1;
474 unsigned TOUTPS3 : 1;
475 unsigned : 1;
478 struct
480 unsigned T2CKPS : 2;
481 unsigned : 6;
484 struct
486 unsigned : 3;
487 unsigned TOUTPS : 4;
488 unsigned : 1;
490 } __T2CONbits_t;
492 extern __at(0x0012) volatile __T2CONbits_t T2CONbits;
494 #define _T2CKPS0 0x01
495 #define _T2CKPS1 0x02
496 #define _TMR2ON 0x04
497 #define _TOUTPS0 0x08
498 #define _TOUTPS1 0x10
499 #define _TOUTPS2 0x20
500 #define _TOUTPS3 0x40
502 //==============================================================================
504 extern __at(0x0013) __sfr SSPBUF;
506 //==============================================================================
507 // SSPCON Bits
509 extern __at(0x0014) __sfr SSPCON;
511 typedef union
513 struct
515 unsigned SSPM0 : 1;
516 unsigned SSPM1 : 1;
517 unsigned SSPM2 : 1;
518 unsigned SSPM3 : 1;
519 unsigned CKP : 1;
520 unsigned SSPEN : 1;
521 unsigned SSPOV : 1;
522 unsigned WCOL : 1;
525 struct
527 unsigned SSPM : 4;
528 unsigned : 4;
530 } __SSPCONbits_t;
532 extern __at(0x0014) volatile __SSPCONbits_t SSPCONbits;
534 #define _SSPM0 0x01
535 #define _SSPM1 0x02
536 #define _SSPM2 0x04
537 #define _SSPM3 0x08
538 #define _CKP 0x10
539 #define _SSPEN 0x20
540 #define _SSPOV 0x40
541 #define _WCOL 0x80
543 //==============================================================================
545 extern __at(0x0015) __sfr CCPR1;
546 extern __at(0x0015) __sfr CCPR1L;
547 extern __at(0x0016) __sfr CCPR1H;
549 //==============================================================================
550 // CCP1CON Bits
552 extern __at(0x0017) __sfr CCP1CON;
554 typedef union
556 struct
558 unsigned CCP1M0 : 1;
559 unsigned CCP1M1 : 1;
560 unsigned CCP1M2 : 1;
561 unsigned CCP1M3 : 1;
562 unsigned DC1B0 : 1;
563 unsigned DC1B1 : 1;
564 unsigned : 1;
565 unsigned : 1;
568 struct
570 unsigned : 1;
571 unsigned : 1;
572 unsigned : 1;
573 unsigned : 1;
574 unsigned CCP1Y : 1;
575 unsigned CCP1X : 1;
576 unsigned : 1;
577 unsigned : 1;
580 struct
582 unsigned CCP1M : 4;
583 unsigned : 4;
586 struct
588 unsigned : 4;
589 unsigned DC1B : 2;
590 unsigned : 2;
592 } __CCP1CONbits_t;
594 extern __at(0x0017) volatile __CCP1CONbits_t CCP1CONbits;
596 #define _CCP1M0 0x01
597 #define _CCP1M1 0x02
598 #define _CCP1M2 0x04
599 #define _CCP1M3 0x08
600 #define _DC1B0 0x10
601 #define _CCP1Y 0x10
602 #define _DC1B1 0x20
603 #define _CCP1X 0x20
605 //==============================================================================
608 //==============================================================================
609 // RCSTA Bits
611 extern __at(0x0018) __sfr RCSTA;
613 typedef union
615 struct
617 unsigned RX9D : 1;
618 unsigned OERR : 1;
619 unsigned FERR : 1;
620 unsigned ADDEN : 1;
621 unsigned CREN : 1;
622 unsigned SREN : 1;
623 unsigned RX9 : 1;
624 unsigned SPEN : 1;
627 struct
629 unsigned RCD8 : 1;
630 unsigned : 1;
631 unsigned : 1;
632 unsigned : 1;
633 unsigned : 1;
634 unsigned : 1;
635 unsigned RC9 : 1;
636 unsigned : 1;
639 struct
641 unsigned : 1;
642 unsigned : 1;
643 unsigned : 1;
644 unsigned : 1;
645 unsigned : 1;
646 unsigned : 1;
647 unsigned NOT_RC8 : 1;
648 unsigned : 1;
651 struct
653 unsigned : 1;
654 unsigned : 1;
655 unsigned : 1;
656 unsigned : 1;
657 unsigned : 1;
658 unsigned : 1;
659 unsigned RC8_9 : 1;
660 unsigned : 1;
662 } __RCSTAbits_t;
664 extern __at(0x0018) volatile __RCSTAbits_t RCSTAbits;
666 #define _RX9D 0x01
667 #define _RCD8 0x01
668 #define _OERR 0x02
669 #define _FERR 0x04
670 #define _ADDEN 0x08
671 #define _CREN 0x10
672 #define _SREN 0x20
673 #define _RX9 0x40
674 #define _RC9 0x40
675 #define _NOT_RC8 0x40
676 #define _RC8_9 0x40
677 #define _SPEN 0x80
679 //==============================================================================
681 extern __at(0x0019) __sfr TXREG;
682 extern __at(0x001A) __sfr RCREG;
683 extern __at(0x001B) __sfr CCPR2;
684 extern __at(0x001B) __sfr CCPR2L;
685 extern __at(0x001C) __sfr CCPR2H;
687 //==============================================================================
688 // CCP2CON Bits
690 extern __at(0x001D) __sfr CCP2CON;
692 typedef union
694 struct
696 unsigned CCP2M0 : 1;
697 unsigned CCP2M1 : 1;
698 unsigned CCP2M2 : 1;
699 unsigned CCP2M3 : 1;
700 unsigned DC2B0 : 1;
701 unsigned DC2B1 : 1;
702 unsigned : 1;
703 unsigned : 1;
706 struct
708 unsigned : 1;
709 unsigned : 1;
710 unsigned : 1;
711 unsigned : 1;
712 unsigned CCP2Y : 1;
713 unsigned CCP2X : 1;
714 unsigned : 1;
715 unsigned : 1;
718 struct
720 unsigned CCP2M : 4;
721 unsigned : 4;
724 struct
726 unsigned : 4;
727 unsigned DC2B : 2;
728 unsigned : 2;
730 } __CCP2CONbits_t;
732 extern __at(0x001D) volatile __CCP2CONbits_t CCP2CONbits;
734 #define _CCP2M0 0x01
735 #define _CCP2M1 0x02
736 #define _CCP2M2 0x04
737 #define _CCP2M3 0x08
738 #define _DC2B0 0x10
739 #define _CCP2Y 0x10
740 #define _DC2B1 0x20
741 #define _CCP2X 0x20
743 //==============================================================================
745 extern __at(0x001E) __sfr ADRES;
747 //==============================================================================
748 // ADCON0 Bits
750 extern __at(0x001F) __sfr ADCON0;
752 typedef union
754 struct
756 unsigned ADON : 1;
757 unsigned GO_NOT_DONE : 1;
758 unsigned CHS0 : 1;
759 unsigned CHS1 : 1;
760 unsigned CHS2 : 1;
761 unsigned CHS3 : 1;
762 unsigned : 1;
763 unsigned : 1;
766 struct
768 unsigned : 1;
769 unsigned GO : 1;
770 unsigned : 1;
771 unsigned : 1;
772 unsigned : 1;
773 unsigned : 1;
774 unsigned : 1;
775 unsigned : 1;
778 struct
780 unsigned : 1;
781 unsigned NOT_DONE : 1;
782 unsigned : 1;
783 unsigned : 1;
784 unsigned : 1;
785 unsigned : 1;
786 unsigned : 1;
787 unsigned : 1;
790 struct
792 unsigned : 1;
793 unsigned GO_DONE : 1;
794 unsigned : 1;
795 unsigned : 1;
796 unsigned : 1;
797 unsigned : 1;
798 unsigned : 1;
799 unsigned : 1;
802 struct
804 unsigned : 2;
805 unsigned CHS : 4;
806 unsigned : 2;
808 } __ADCON0bits_t;
810 extern __at(0x001F) volatile __ADCON0bits_t ADCON0bits;
812 #define _ADON 0x01
813 #define _GO_NOT_DONE 0x02
814 #define _GO 0x02
815 #define _NOT_DONE 0x02
816 #define _GO_DONE 0x02
817 #define _CHS0 0x04
818 #define _CHS1 0x08
819 #define _CHS2 0x10
820 #define _CHS3 0x20
822 //==============================================================================
825 //==============================================================================
826 // OPTION_REG Bits
828 extern __at(0x0081) __sfr OPTION_REG;
830 typedef union
832 struct
834 unsigned PS0 : 1;
835 unsigned PS1 : 1;
836 unsigned PS2 : 1;
837 unsigned PSA : 1;
838 unsigned T0SE : 1;
839 unsigned T0CS : 1;
840 unsigned INTEDG : 1;
841 unsigned NOT_RBPU : 1;
844 struct
846 unsigned PS : 3;
847 unsigned : 5;
849 } __OPTION_REGbits_t;
851 extern __at(0x0081) volatile __OPTION_REGbits_t OPTION_REGbits;
853 #define _PS0 0x01
854 #define _PS1 0x02
855 #define _PS2 0x04
856 #define _PSA 0x08
857 #define _T0SE 0x10
858 #define _T0CS 0x20
859 #define _INTEDG 0x40
860 #define _NOT_RBPU 0x80
862 //==============================================================================
865 //==============================================================================
866 // TRISA Bits
868 extern __at(0x0085) __sfr TRISA;
870 typedef struct
872 unsigned TRISA0 : 1;
873 unsigned TRISA1 : 1;
874 unsigned TRISA2 : 1;
875 unsigned TRISA3 : 1;
876 unsigned TRISA4 : 1;
877 unsigned TRISA5 : 1;
878 unsigned TRISA6 : 1;
879 unsigned TRISA7 : 1;
880 } __TRISAbits_t;
882 extern __at(0x0085) volatile __TRISAbits_t TRISAbits;
884 #define _TRISA0 0x01
885 #define _TRISA1 0x02
886 #define _TRISA2 0x04
887 #define _TRISA3 0x08
888 #define _TRISA4 0x10
889 #define _TRISA5 0x20
890 #define _TRISA6 0x40
891 #define _TRISA7 0x80
893 //==============================================================================
896 //==============================================================================
897 // TRISB Bits
899 extern __at(0x0086) __sfr TRISB;
901 typedef struct
903 unsigned TRISB0 : 1;
904 unsigned TRISB1 : 1;
905 unsigned TRISB2 : 1;
906 unsigned TRISB3 : 1;
907 unsigned TRISB4 : 1;
908 unsigned TRISB5 : 1;
909 unsigned TRISB6 : 1;
910 unsigned TRISB7 : 1;
911 } __TRISBbits_t;
913 extern __at(0x0086) volatile __TRISBbits_t TRISBbits;
915 #define _TRISB0 0x01
916 #define _TRISB1 0x02
917 #define _TRISB2 0x04
918 #define _TRISB3 0x08
919 #define _TRISB4 0x10
920 #define _TRISB5 0x20
921 #define _TRISB6 0x40
922 #define _TRISB7 0x80
924 //==============================================================================
927 //==============================================================================
928 // TRISC Bits
930 extern __at(0x0087) __sfr TRISC;
932 typedef struct
934 unsigned TRISC0 : 1;
935 unsigned TRISC1 : 1;
936 unsigned TRISC2 : 1;
937 unsigned TRISC3 : 1;
938 unsigned TRISC4 : 1;
939 unsigned TRISC5 : 1;
940 unsigned TRISC6 : 1;
941 unsigned TRISC7 : 1;
942 } __TRISCbits_t;
944 extern __at(0x0087) volatile __TRISCbits_t TRISCbits;
946 #define _TRISC0 0x01
947 #define _TRISC1 0x02
948 #define _TRISC2 0x04
949 #define _TRISC3 0x08
950 #define _TRISC4 0x10
951 #define _TRISC5 0x20
952 #define _TRISC6 0x40
953 #define _TRISC7 0x80
955 //==============================================================================
958 //==============================================================================
959 // TRISE Bits
961 extern __at(0x0089) __sfr TRISE;
963 typedef struct
965 unsigned : 1;
966 unsigned : 1;
967 unsigned : 1;
968 unsigned TRISE3 : 1;
969 unsigned : 1;
970 unsigned : 1;
971 unsigned : 1;
972 unsigned : 1;
973 } __TRISEbits_t;
975 extern __at(0x0089) volatile __TRISEbits_t TRISEbits;
977 #define _TRISE3 0x08
979 //==============================================================================
982 //==============================================================================
983 // PIE1 Bits
985 extern __at(0x008C) __sfr PIE1;
987 typedef struct
989 unsigned TMR1IE : 1;
990 unsigned TMR2IE : 1;
991 unsigned CCP1IE : 1;
992 unsigned SSPIE : 1;
993 unsigned TXIE : 1;
994 unsigned RCIE : 1;
995 unsigned ADIE : 1;
996 unsigned TMR1GIE : 1;
997 } __PIE1bits_t;
999 extern __at(0x008C) volatile __PIE1bits_t PIE1bits;
1001 #define _TMR1IE 0x01
1002 #define _TMR2IE 0x02
1003 #define _CCP1IE 0x04
1004 #define _SSPIE 0x08
1005 #define _TXIE 0x10
1006 #define _RCIE 0x20
1007 #define _ADIE 0x40
1008 #define _TMR1GIE 0x80
1010 //==============================================================================
1013 //==============================================================================
1014 // PIE2 Bits
1016 extern __at(0x008D) __sfr PIE2;
1018 typedef struct
1020 unsigned CCP2IE : 1;
1021 unsigned : 1;
1022 unsigned : 1;
1023 unsigned : 1;
1024 unsigned : 1;
1025 unsigned : 1;
1026 unsigned : 1;
1027 unsigned : 1;
1028 } __PIE2bits_t;
1030 extern __at(0x008D) volatile __PIE2bits_t PIE2bits;
1032 #define _CCP2IE 0x01
1034 //==============================================================================
1037 //==============================================================================
1038 // PCON Bits
1040 extern __at(0x008E) __sfr PCON;
1042 typedef union
1044 struct
1046 unsigned NOT_BOR : 1;
1047 unsigned NOT_POR : 1;
1048 unsigned : 1;
1049 unsigned : 1;
1050 unsigned : 1;
1051 unsigned : 1;
1052 unsigned : 1;
1053 unsigned : 1;
1056 struct
1058 unsigned NOT_BO : 1;
1059 unsigned : 1;
1060 unsigned : 1;
1061 unsigned : 1;
1062 unsigned : 1;
1063 unsigned : 1;
1064 unsigned : 1;
1065 unsigned : 1;
1067 } __PCONbits_t;
1069 extern __at(0x008E) volatile __PCONbits_t PCONbits;
1071 #define _NOT_BOR 0x01
1072 #define _NOT_BO 0x01
1073 #define _NOT_POR 0x02
1075 //==============================================================================
1078 //==============================================================================
1079 // T1GCON Bits
1081 extern __at(0x008F) __sfr T1GCON;
1083 typedef union
1085 struct
1087 unsigned T1GSS0 : 1;
1088 unsigned T1GSS1 : 1;
1089 unsigned T1GVAL : 1;
1090 unsigned T1GGO_NOT_DONE : 1;
1091 unsigned T1GSPM : 1;
1092 unsigned T1GTM : 1;
1093 unsigned T1GPOL : 1;
1094 unsigned TMR1GE : 1;
1097 struct
1099 unsigned : 1;
1100 unsigned : 1;
1101 unsigned : 1;
1102 unsigned T1G_NOT_DONE : 1;
1103 unsigned : 1;
1104 unsigned : 1;
1105 unsigned : 1;
1106 unsigned : 1;
1109 struct
1111 unsigned : 1;
1112 unsigned : 1;
1113 unsigned : 1;
1114 unsigned T1GGO_DONE : 1;
1115 unsigned : 1;
1116 unsigned : 1;
1117 unsigned : 1;
1118 unsigned : 1;
1121 struct
1123 unsigned : 1;
1124 unsigned : 1;
1125 unsigned : 1;
1126 unsigned T1GGO : 1;
1127 unsigned : 1;
1128 unsigned : 1;
1129 unsigned : 1;
1130 unsigned : 1;
1133 struct
1135 unsigned T1GSS : 2;
1136 unsigned : 6;
1138 } __T1GCONbits_t;
1140 extern __at(0x008F) volatile __T1GCONbits_t T1GCONbits;
1142 #define _T1GSS0 0x01
1143 #define _T1GSS1 0x02
1144 #define _T1GVAL 0x04
1145 #define _T1GGO_NOT_DONE 0x08
1146 #define _T1G_NOT_DONE 0x08
1147 #define _T1GGO_DONE 0x08
1148 #define _T1GGO 0x08
1149 #define _T1GSPM 0x10
1150 #define _T1GTM 0x20
1151 #define _T1GPOL 0x40
1152 #define _TMR1GE 0x80
1154 //==============================================================================
1157 //==============================================================================
1158 // OSCCON Bits
1160 extern __at(0x0090) __sfr OSCCON;
1162 typedef union
1164 struct
1166 unsigned : 1;
1167 unsigned : 1;
1168 unsigned ICSS : 1;
1169 unsigned ICSL : 1;
1170 unsigned IRCF0 : 1;
1171 unsigned IRCF1 : 1;
1172 unsigned : 1;
1173 unsigned : 1;
1176 struct
1178 unsigned : 4;
1179 unsigned IRCF : 2;
1180 unsigned : 2;
1182 } __OSCCONbits_t;
1184 extern __at(0x0090) volatile __OSCCONbits_t OSCCONbits;
1186 #define _ICSS 0x04
1187 #define _ICSL 0x08
1188 #define _IRCF0 0x10
1189 #define _IRCF1 0x20
1191 //==============================================================================
1194 //==============================================================================
1195 // OSCTUNE Bits
1197 extern __at(0x0091) __sfr OSCTUNE;
1199 typedef union
1201 struct
1203 unsigned TUN0 : 1;
1204 unsigned TUN1 : 1;
1205 unsigned TUN2 : 1;
1206 unsigned TUN3 : 1;
1207 unsigned TUN4 : 1;
1208 unsigned TUN5 : 1;
1209 unsigned : 1;
1210 unsigned : 1;
1213 struct
1215 unsigned TUN : 6;
1216 unsigned : 2;
1218 } __OSCTUNEbits_t;
1220 extern __at(0x0091) volatile __OSCTUNEbits_t OSCTUNEbits;
1222 #define _TUN0 0x01
1223 #define _TUN1 0x02
1224 #define _TUN2 0x04
1225 #define _TUN3 0x08
1226 #define _TUN4 0x10
1227 #define _TUN5 0x20
1229 //==============================================================================
1231 extern __at(0x0092) __sfr PR2;
1232 extern __at(0x0093) __sfr SSPADD;
1233 extern __at(0x0093) __sfr SSPMSK;
1235 //==============================================================================
1236 // SSPSTAT Bits
1238 extern __at(0x0094) __sfr SSPSTAT;
1240 typedef union
1242 struct
1244 unsigned BF : 1;
1245 unsigned UA : 1;
1246 unsigned R_NOT_W : 1;
1247 unsigned S : 1;
1248 unsigned P : 1;
1249 unsigned D_NOT_A : 1;
1250 unsigned CKE : 1;
1251 unsigned SMP : 1;
1254 struct
1256 unsigned : 1;
1257 unsigned : 1;
1258 unsigned R : 1;
1259 unsigned I2C_START : 1;
1260 unsigned I2C_STOP : 1;
1261 unsigned D : 1;
1262 unsigned : 1;
1263 unsigned : 1;
1266 struct
1268 unsigned : 1;
1269 unsigned : 1;
1270 unsigned I2C_READ : 1;
1271 unsigned : 1;
1272 unsigned : 1;
1273 unsigned I2C_DATA : 1;
1274 unsigned : 1;
1275 unsigned : 1;
1278 struct
1280 unsigned : 1;
1281 unsigned : 1;
1282 unsigned NOT_W : 1;
1283 unsigned : 1;
1284 unsigned : 1;
1285 unsigned NOT_A : 1;
1286 unsigned : 1;
1287 unsigned : 1;
1290 struct
1292 unsigned : 1;
1293 unsigned : 1;
1294 unsigned NOT_WRITE : 1;
1295 unsigned : 1;
1296 unsigned : 1;
1297 unsigned NOT_ADDRESS : 1;
1298 unsigned : 1;
1299 unsigned : 1;
1302 struct
1304 unsigned : 1;
1305 unsigned : 1;
1306 unsigned R_W : 1;
1307 unsigned : 1;
1308 unsigned : 1;
1309 unsigned D_A : 1;
1310 unsigned : 1;
1311 unsigned : 1;
1314 struct
1316 unsigned : 1;
1317 unsigned : 1;
1318 unsigned READ_WRITE : 1;
1319 unsigned : 1;
1320 unsigned : 1;
1321 unsigned DATA_ADDRESS : 1;
1322 unsigned : 1;
1323 unsigned : 1;
1325 } __SSPSTATbits_t;
1327 extern __at(0x0094) volatile __SSPSTATbits_t SSPSTATbits;
1329 #define _BF 0x01
1330 #define _UA 0x02
1331 #define _R_NOT_W 0x04
1332 #define _R 0x04
1333 #define _I2C_READ 0x04
1334 #define _NOT_W 0x04
1335 #define _NOT_WRITE 0x04
1336 #define _R_W 0x04
1337 #define _READ_WRITE 0x04
1338 #define _S 0x08
1339 #define _I2C_START 0x08
1340 #define _P 0x10
1341 #define _I2C_STOP 0x10
1342 #define _D_NOT_A 0x20
1343 #define _D 0x20
1344 #define _I2C_DATA 0x20
1345 #define _NOT_A 0x20
1346 #define _NOT_ADDRESS 0x20
1347 #define _D_A 0x20
1348 #define _DATA_ADDRESS 0x20
1349 #define _CKE 0x40
1350 #define _SMP 0x80
1352 //==============================================================================
1355 //==============================================================================
1356 // WPU Bits
1358 extern __at(0x0095) __sfr WPU;
1360 typedef union
1362 struct
1364 unsigned WPUB0 : 1;
1365 unsigned WPUB1 : 1;
1366 unsigned WPUB2 : 1;
1367 unsigned WPUB3 : 1;
1368 unsigned WPUB4 : 1;
1369 unsigned WPUB5 : 1;
1370 unsigned WPUB6 : 1;
1371 unsigned WPUB7 : 1;
1374 struct
1376 unsigned WPU0 : 1;
1377 unsigned WPU1 : 1;
1378 unsigned WPU2 : 1;
1379 unsigned WPU3 : 1;
1380 unsigned WPU4 : 1;
1381 unsigned WPU5 : 1;
1382 unsigned WPU6 : 1;
1383 unsigned WPU7 : 1;
1385 } __WPUbits_t;
1387 extern __at(0x0095) volatile __WPUbits_t WPUbits;
1389 #define _WPUB0 0x01
1390 #define _WPU0 0x01
1391 #define _WPUB1 0x02
1392 #define _WPU1 0x02
1393 #define _WPUB2 0x04
1394 #define _WPU2 0x04
1395 #define _WPUB3 0x08
1396 #define _WPU3 0x08
1397 #define _WPUB4 0x10
1398 #define _WPU4 0x10
1399 #define _WPUB5 0x20
1400 #define _WPU5 0x20
1401 #define _WPUB6 0x40
1402 #define _WPU6 0x40
1403 #define _WPUB7 0x80
1404 #define _WPU7 0x80
1406 //==============================================================================
1409 //==============================================================================
1410 // WPUB Bits
1412 extern __at(0x0095) __sfr WPUB;
1414 typedef union
1416 struct
1418 unsigned WPUB0 : 1;
1419 unsigned WPUB1 : 1;
1420 unsigned WPUB2 : 1;
1421 unsigned WPUB3 : 1;
1422 unsigned WPUB4 : 1;
1423 unsigned WPUB5 : 1;
1424 unsigned WPUB6 : 1;
1425 unsigned WPUB7 : 1;
1428 struct
1430 unsigned WPU0 : 1;
1431 unsigned WPU1 : 1;
1432 unsigned WPU2 : 1;
1433 unsigned WPU3 : 1;
1434 unsigned WPU4 : 1;
1435 unsigned WPU5 : 1;
1436 unsigned WPU6 : 1;
1437 unsigned WPU7 : 1;
1439 } __WPUBbits_t;
1441 extern __at(0x0095) volatile __WPUBbits_t WPUBbits;
1443 #define _WPUB_WPUB0 0x01
1444 #define _WPUB_WPU0 0x01
1445 #define _WPUB_WPUB1 0x02
1446 #define _WPUB_WPU1 0x02
1447 #define _WPUB_WPUB2 0x04
1448 #define _WPUB_WPU2 0x04
1449 #define _WPUB_WPUB3 0x08
1450 #define _WPUB_WPU3 0x08
1451 #define _WPUB_WPUB4 0x10
1452 #define _WPUB_WPU4 0x10
1453 #define _WPUB_WPUB5 0x20
1454 #define _WPUB_WPU5 0x20
1455 #define _WPUB_WPUB6 0x40
1456 #define _WPUB_WPU6 0x40
1457 #define _WPUB_WPUB7 0x80
1458 #define _WPUB_WPU7 0x80
1460 //==============================================================================
1463 //==============================================================================
1464 // IOC Bits
1466 extern __at(0x0096) __sfr IOC;
1468 typedef union
1470 struct
1472 unsigned IOCB0 : 1;
1473 unsigned IOCB1 : 1;
1474 unsigned IOCB2 : 1;
1475 unsigned IOCB3 : 1;
1476 unsigned IOCB4 : 1;
1477 unsigned IOCB5 : 1;
1478 unsigned IOCB6 : 1;
1479 unsigned IOCB7 : 1;
1482 struct
1484 unsigned IOC0 : 1;
1485 unsigned IOC1 : 1;
1486 unsigned IOC2 : 1;
1487 unsigned IOC3 : 1;
1488 unsigned IOC4 : 1;
1489 unsigned IOC5 : 1;
1490 unsigned IOC6 : 1;
1491 unsigned IOC7 : 1;
1493 } __IOCbits_t;
1495 extern __at(0x0096) volatile __IOCbits_t IOCbits;
1497 #define _IOCB0 0x01
1498 #define _IOC0 0x01
1499 #define _IOCB1 0x02
1500 #define _IOC1 0x02
1501 #define _IOCB2 0x04
1502 #define _IOC2 0x04
1503 #define _IOCB3 0x08
1504 #define _IOC3 0x08
1505 #define _IOCB4 0x10
1506 #define _IOC4 0x10
1507 #define _IOCB5 0x20
1508 #define _IOC5 0x20
1509 #define _IOCB6 0x40
1510 #define _IOC6 0x40
1511 #define _IOCB7 0x80
1512 #define _IOC7 0x80
1514 //==============================================================================
1517 //==============================================================================
1518 // IOCB Bits
1520 extern __at(0x0096) __sfr IOCB;
1522 typedef union
1524 struct
1526 unsigned IOCB0 : 1;
1527 unsigned IOCB1 : 1;
1528 unsigned IOCB2 : 1;
1529 unsigned IOCB3 : 1;
1530 unsigned IOCB4 : 1;
1531 unsigned IOCB5 : 1;
1532 unsigned IOCB6 : 1;
1533 unsigned IOCB7 : 1;
1536 struct
1538 unsigned IOC0 : 1;
1539 unsigned IOC1 : 1;
1540 unsigned IOC2 : 1;
1541 unsigned IOC3 : 1;
1542 unsigned IOC4 : 1;
1543 unsigned IOC5 : 1;
1544 unsigned IOC6 : 1;
1545 unsigned IOC7 : 1;
1547 } __IOCBbits_t;
1549 extern __at(0x0096) volatile __IOCBbits_t IOCBbits;
1551 #define _IOCB_IOCB0 0x01
1552 #define _IOCB_IOC0 0x01
1553 #define _IOCB_IOCB1 0x02
1554 #define _IOCB_IOC1 0x02
1555 #define _IOCB_IOCB2 0x04
1556 #define _IOCB_IOC2 0x04
1557 #define _IOCB_IOCB3 0x08
1558 #define _IOCB_IOC3 0x08
1559 #define _IOCB_IOCB4 0x10
1560 #define _IOCB_IOC4 0x10
1561 #define _IOCB_IOCB5 0x20
1562 #define _IOCB_IOC5 0x20
1563 #define _IOCB_IOCB6 0x40
1564 #define _IOCB_IOC6 0x40
1565 #define _IOCB_IOCB7 0x80
1566 #define _IOCB_IOC7 0x80
1568 //==============================================================================
1571 //==============================================================================
1572 // TXSTA Bits
1574 extern __at(0x0098) __sfr TXSTA;
1576 typedef union
1578 struct
1580 unsigned TX9D : 1;
1581 unsigned TRMT : 1;
1582 unsigned BRGH : 1;
1583 unsigned : 1;
1584 unsigned SYNC : 1;
1585 unsigned TXEN : 1;
1586 unsigned TX9 : 1;
1587 unsigned CSRC : 1;
1590 struct
1592 unsigned TXD8 : 1;
1593 unsigned : 1;
1594 unsigned : 1;
1595 unsigned : 1;
1596 unsigned : 1;
1597 unsigned : 1;
1598 unsigned NOT_TX8 : 1;
1599 unsigned : 1;
1602 struct
1604 unsigned : 1;
1605 unsigned : 1;
1606 unsigned : 1;
1607 unsigned : 1;
1608 unsigned : 1;
1609 unsigned : 1;
1610 unsigned TX8_9 : 1;
1611 unsigned : 1;
1613 } __TXSTAbits_t;
1615 extern __at(0x0098) volatile __TXSTAbits_t TXSTAbits;
1617 #define _TX9D 0x01
1618 #define _TXD8 0x01
1619 #define _TRMT 0x02
1620 #define _BRGH 0x04
1621 #define _SYNC 0x10
1622 #define _TXEN 0x20
1623 #define _TX9 0x40
1624 #define _NOT_TX8 0x40
1625 #define _TX8_9 0x40
1626 #define _CSRC 0x80
1628 //==============================================================================
1630 extern __at(0x0099) __sfr SPBRG;
1632 //==============================================================================
1633 // APFCON Bits
1635 extern __at(0x009C) __sfr APFCON;
1637 typedef struct
1639 unsigned CCP2SEL : 1;
1640 unsigned SSSEL : 1;
1641 unsigned : 1;
1642 unsigned : 1;
1643 unsigned : 1;
1644 unsigned : 1;
1645 unsigned : 1;
1646 unsigned : 1;
1647 } __APFCONbits_t;
1649 extern __at(0x009C) volatile __APFCONbits_t APFCONbits;
1651 #define _CCP2SEL 0x01
1652 #define _SSSEL 0x02
1654 //==============================================================================
1657 //==============================================================================
1658 // FVRCON Bits
1660 extern __at(0x009D) __sfr FVRCON;
1662 typedef union
1664 struct
1666 unsigned ADFVR0 : 1;
1667 unsigned ADFVR1 : 1;
1668 unsigned : 1;
1669 unsigned : 1;
1670 unsigned : 1;
1671 unsigned : 1;
1672 unsigned FVREN : 1;
1673 unsigned FVRRDY : 1;
1676 struct
1678 unsigned : 1;
1679 unsigned : 1;
1680 unsigned : 1;
1681 unsigned : 1;
1682 unsigned : 1;
1683 unsigned : 1;
1684 unsigned : 1;
1685 unsigned FVRST : 1;
1688 struct
1690 unsigned ADFVR : 2;
1691 unsigned : 6;
1693 } __FVRCONbits_t;
1695 extern __at(0x009D) volatile __FVRCONbits_t FVRCONbits;
1697 #define _ADFVR0 0x01
1698 #define _ADFVR1 0x02
1699 #define _FVREN 0x40
1700 #define _FVRRDY 0x80
1701 #define _FVRST 0x80
1703 //==============================================================================
1706 //==============================================================================
1707 // ADCON1 Bits
1709 extern __at(0x009F) __sfr ADCON1;
1711 typedef union
1713 struct
1715 unsigned ADREF0 : 1;
1716 unsigned ADREF1 : 1;
1717 unsigned : 1;
1718 unsigned : 1;
1719 unsigned ADCS0 : 1;
1720 unsigned ADCS1 : 1;
1721 unsigned ADCS2 : 1;
1722 unsigned : 1;
1725 struct
1727 unsigned ADREF : 2;
1728 unsigned : 6;
1731 struct
1733 unsigned : 4;
1734 unsigned ADCS : 3;
1735 unsigned : 1;
1737 } __ADCON1bits_t;
1739 extern __at(0x009F) volatile __ADCON1bits_t ADCON1bits;
1741 #define _ADREF0 0x01
1742 #define _ADREF1 0x02
1743 #define _ADCS0 0x10
1744 #define _ADCS1 0x20
1745 #define _ADCS2 0x40
1747 //==============================================================================
1750 //==============================================================================
1751 // CPSCON0 Bits
1753 extern __at(0x0108) __sfr CPSCON0;
1755 typedef union
1757 struct
1759 unsigned T0XCS : 1;
1760 unsigned CPSOUT : 1;
1761 unsigned CPSRNG0 : 1;
1762 unsigned CPSRNG1 : 1;
1763 unsigned : 1;
1764 unsigned : 1;
1765 unsigned : 1;
1766 unsigned CPSON : 1;
1769 struct
1771 unsigned : 2;
1772 unsigned CPSRNG : 2;
1773 unsigned : 4;
1775 } __CPSCON0bits_t;
1777 extern __at(0x0108) volatile __CPSCON0bits_t CPSCON0bits;
1779 #define _T0XCS 0x01
1780 #define _CPSOUT 0x02
1781 #define _CPSRNG0 0x04
1782 #define _CPSRNG1 0x08
1783 #define _CPSON 0x80
1785 //==============================================================================
1788 //==============================================================================
1789 // CPSCON1 Bits
1791 extern __at(0x0109) __sfr CPSCON1;
1793 typedef union
1795 struct
1797 unsigned CPSCH0 : 1;
1798 unsigned CPSCH1 : 1;
1799 unsigned CPSCH2 : 1;
1800 unsigned CPSCH3 : 1;
1801 unsigned : 1;
1802 unsigned : 1;
1803 unsigned : 1;
1804 unsigned : 1;
1807 struct
1809 unsigned CPSCH : 4;
1810 unsigned : 4;
1812 } __CPSCON1bits_t;
1814 extern __at(0x0109) volatile __CPSCON1bits_t CPSCON1bits;
1816 #define _CPSCH0 0x01
1817 #define _CPSCH1 0x02
1818 #define _CPSCH2 0x04
1819 #define _CPSCH3 0x08
1821 //==============================================================================
1823 extern __at(0x010C) __sfr PMDATA;
1824 extern __at(0x010C) __sfr PMDATL;
1825 extern __at(0x010D) __sfr PMADR;
1826 extern __at(0x010D) __sfr PMADRL;
1827 extern __at(0x010E) __sfr PMDATH;
1828 extern __at(0x010F) __sfr PMADRH;
1830 //==============================================================================
1831 // ANSELA Bits
1833 extern __at(0x0185) __sfr ANSELA;
1835 typedef union
1837 struct
1839 unsigned ANSA0 : 1;
1840 unsigned ANSA1 : 1;
1841 unsigned ANSA2 : 1;
1842 unsigned ANSA3 : 1;
1843 unsigned ANSA4 : 1;
1844 unsigned ANSA5 : 1;
1845 unsigned : 1;
1846 unsigned : 1;
1849 struct
1851 unsigned ANSA : 6;
1852 unsigned : 2;
1854 } __ANSELAbits_t;
1856 extern __at(0x0185) volatile __ANSELAbits_t ANSELAbits;
1858 #define _ANSA0 0x01
1859 #define _ANSA1 0x02
1860 #define _ANSA2 0x04
1861 #define _ANSA3 0x08
1862 #define _ANSA4 0x10
1863 #define _ANSA5 0x20
1865 //==============================================================================
1868 //==============================================================================
1869 // ANSELB Bits
1871 extern __at(0x0186) __sfr ANSELB;
1873 typedef union
1875 struct
1877 unsigned ANSB0 : 1;
1878 unsigned ANSB1 : 1;
1879 unsigned ANSB2 : 1;
1880 unsigned ANSB3 : 1;
1881 unsigned ANSB4 : 1;
1882 unsigned ANSB5 : 1;
1883 unsigned : 1;
1884 unsigned : 1;
1887 struct
1889 unsigned ANSB : 6;
1890 unsigned : 2;
1892 } __ANSELBbits_t;
1894 extern __at(0x0186) volatile __ANSELBbits_t ANSELBbits;
1896 #define _ANSB0 0x01
1897 #define _ANSB1 0x02
1898 #define _ANSB2 0x04
1899 #define _ANSB3 0x08
1900 #define _ANSB4 0x10
1901 #define _ANSB5 0x20
1903 //==============================================================================
1906 //==============================================================================
1907 // PMCON1 Bits
1909 extern __at(0x018C) __sfr PMCON1;
1911 typedef union
1913 struct
1915 unsigned RD : 1;
1916 unsigned : 1;
1917 unsigned : 1;
1918 unsigned : 1;
1919 unsigned : 1;
1920 unsigned : 1;
1921 unsigned : 1;
1922 unsigned : 1;
1925 struct
1927 unsigned PMRD : 1;
1928 unsigned : 1;
1929 unsigned : 1;
1930 unsigned : 1;
1931 unsigned : 1;
1932 unsigned : 1;
1933 unsigned : 1;
1934 unsigned : 1;
1936 } __PMCON1bits_t;
1938 extern __at(0x018C) volatile __PMCON1bits_t PMCON1bits;
1940 #define _RD 0x01
1941 #define _PMRD 0x01
1943 //==============================================================================
1946 //==============================================================================
1948 // Configuration Bits
1950 //==============================================================================
1952 #define _CONFIG1 0x2007
1953 #define _CONFIG2 0x2008
1955 //----------------------------- CONFIG1 Options -------------------------------
1957 #define _FOSC_LP 0x3FF8 // LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN.
1958 #define _LP_OSC 0x3FF8 // LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN.
1959 #define _FOSC_XT 0x3FF9 // XT oscillator: Crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN.
1960 #define _XT_OSC 0x3FF9 // XT oscillator: Crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN.
1961 #define _FOSC_HS 0x3FFA // HS oscillator: High-speed crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN.
1962 #define _HS_OSC 0x3FFA // HS oscillator: High-speed crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN.
1963 #define _FOSC_EC 0x3FFB // EC: I/O function on RA6/OSC2/CLKOUT pin, CLKIN on RA7/OSC1/CLKIN.
1964 #define _EC_OSC 0x3FFB // EC: I/O function on RA6/OSC2/CLKOUT pin, CLKIN on RA7/OSC1/CLKIN.
1965 #define _FOSC_INTOSCIO 0x3FFC // INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN.
1966 #define _INTRC_OSC_NOCLKOUT 0x3FFC // INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN.
1967 #define _INTOSCIO 0x3FFC // INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN.
1968 #define _FOSC_INTOSCCLK 0x3FFD // INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN.
1969 #define _INTRC_OSC_CLKOUT 0x3FFD // INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN.
1970 #define _INTOSC 0x3FFD // INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN.
1971 #define _FOSC_EXTRCIO 0x3FFE // RCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN.
1972 #define _EXTRC_OSC_NOCLKOUT 0x3FFE // RCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN.
1973 #define _EXTRCIO 0x3FFE // RCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN.
1974 #define _FOSC_EXTRCCLK 0x3FFF // RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN.
1975 #define _EXTRC_OSC_CLKOUT 0x3FFF // RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN.
1976 #define _EXTRC 0x3FFF // RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN.
1977 #define _WDTE_OFF 0x3FF7 // WDT disabled and can be enabled by SWDTEN bit of the WDTCON register.
1978 #define _WDT_OFF 0x3FF7 // WDT disabled and can be enabled by SWDTEN bit of the WDTCON register.
1979 #define _WDTE_ON 0x3FFF // WDT enabled.
1980 #define _WDT_ON 0x3FFF // WDT enabled.
1981 #define _PWRTE_ON 0x3FEF // PWRT enabled.
1982 #define _PWRT_EN 0x3FEF // PWRT enabled.
1983 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
1984 #define _PWRT_DIS 0x3FFF // PWRT disabled.
1985 #define _MCLRE_OFF 0x3FDF // RE3/MCLR pin function is digital input, MCLR internally tied to VDD.
1986 #define _MCLR_DIS 0x3FDF // RE3/MCLR pin function is digital input, MCLR internally tied to VDD.
1987 #define _MCLRE_ON 0x3FFF // RE3/MCLR pin function is MCLR.
1988 #define _MCLR_EN 0x3FFF // RE3/MCLR pin function is MCLR.
1989 #define _CP_ON 0x3FBF // Program memory code protection is enabled.
1990 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
1991 #define _BOREN_OFF 0x3CFF // BOR disabled.
1992 #define _BOR_OFF 0x3CFF // BOR disabled.
1993 #define _BOREN_NSLEEP 0x3EFF // BOR enabled during operation and disabled in Sleep.
1994 #define _BOR_NSLEEP 0x3EFF // BOR enabled during operation and disabled in Sleep.
1995 #define _BOREN_ON 0x3FFF // BOR enabled.
1996 #define _BOR_ON 0x3FFF // BOR enabled.
1997 #define _BORV_25 0x3BFF // Brown-out Reset Voltage (VBOR) set to 2.5 V nominal.
1998 #define _BORV_2_5 0x3BFF // Brown-out Reset Voltage (VBOR) set to 2.5 V nominal.
1999 #define _BORV_19 0x3FFF // Brown-out Reset Voltage (VBOR) set to 1.9 V nominal.
2000 #define _BORV_1_9 0x3FFF // Brown-out Reset Voltage (VBOR) set to 1.9 V nominal.
2001 #define _PLLEN_OFF 0x2FFF // INTOSC Frequency is 500 kHz.
2002 #define _PLL_DIS 0x2FFF // INTOSC Frequency is 500 kHz.
2003 #define _PLLEN_ON 0x3FFF // INTOSC Frequency is 16MHz (32x).
2004 #define _PLL_EN 0x3FFF // INTOSC Frequency is 16MHz (32x).
2005 #define _DEBUG_ON 0x1FFF // In-Circuit Debugger enabled, RB6/ICSPCLK and RB7/ICSPDAT are dedicated to the debugger.
2006 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, RB6/ICSPCLK and RB7/ICSPDAT are general purpose I/O pins.
2008 //==============================================================================
2010 #define _DEVID1 0x2006
2012 #define _IDLOC0 0x2000
2013 #define _IDLOC1 0x2001
2014 #define _IDLOC2 0x2002
2015 #define _IDLOC3 0x2003
2017 //==============================================================================
2019 #ifndef NO_BIT_DEFINES
2021 #define ADON ADCON0bits.ADON // bit 0
2022 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
2023 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
2024 #define NOT_DONE ADCON0bits.NOT_DONE // bit 1, shadows bit in ADCON0bits
2025 #define GO_DONE ADCON0bits.GO_DONE // bit 1, shadows bit in ADCON0bits
2026 #define CHS0 ADCON0bits.CHS0 // bit 2
2027 #define CHS1 ADCON0bits.CHS1 // bit 3
2028 #define CHS2 ADCON0bits.CHS2 // bit 4
2029 #define CHS3 ADCON0bits.CHS3 // bit 5
2031 #define ADREF0 ADCON1bits.ADREF0 // bit 0
2032 #define ADREF1 ADCON1bits.ADREF1 // bit 1
2033 #define ADCS0 ADCON1bits.ADCS0 // bit 4
2034 #define ADCS1 ADCON1bits.ADCS1 // bit 5
2035 #define ADCS2 ADCON1bits.ADCS2 // bit 6
2037 #define ANSA0 ANSELAbits.ANSA0 // bit 0
2038 #define ANSA1 ANSELAbits.ANSA1 // bit 1
2039 #define ANSA2 ANSELAbits.ANSA2 // bit 2
2040 #define ANSA3 ANSELAbits.ANSA3 // bit 3
2041 #define ANSA4 ANSELAbits.ANSA4 // bit 4
2042 #define ANSA5 ANSELAbits.ANSA5 // bit 5
2044 #define ANSB0 ANSELBbits.ANSB0 // bit 0
2045 #define ANSB1 ANSELBbits.ANSB1 // bit 1
2046 #define ANSB2 ANSELBbits.ANSB2 // bit 2
2047 #define ANSB3 ANSELBbits.ANSB3 // bit 3
2048 #define ANSB4 ANSELBbits.ANSB4 // bit 4
2049 #define ANSB5 ANSELBbits.ANSB5 // bit 5
2051 #define CCP2SEL APFCONbits.CCP2SEL // bit 0
2052 #define SSSEL APFCONbits.SSSEL // bit 1
2054 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
2055 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
2056 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
2057 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
2058 #define DC1B0 CCP1CONbits.DC1B0 // bit 4, shadows bit in CCP1CONbits
2059 #define CCP1Y CCP1CONbits.CCP1Y // bit 4, shadows bit in CCP1CONbits
2060 #define DC1B1 CCP1CONbits.DC1B1 // bit 5, shadows bit in CCP1CONbits
2061 #define CCP1X CCP1CONbits.CCP1X // bit 5, shadows bit in CCP1CONbits
2063 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
2064 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
2065 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
2066 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
2067 #define DC2B0 CCP2CONbits.DC2B0 // bit 4, shadows bit in CCP2CONbits
2068 #define CCP2Y CCP2CONbits.CCP2Y // bit 4, shadows bit in CCP2CONbits
2069 #define DC2B1 CCP2CONbits.DC2B1 // bit 5, shadows bit in CCP2CONbits
2070 #define CCP2X CCP2CONbits.CCP2X // bit 5, shadows bit in CCP2CONbits
2072 #define T0XCS CPSCON0bits.T0XCS // bit 0
2073 #define CPSOUT CPSCON0bits.CPSOUT // bit 1
2074 #define CPSRNG0 CPSCON0bits.CPSRNG0 // bit 2
2075 #define CPSRNG1 CPSCON0bits.CPSRNG1 // bit 3
2076 #define CPSON CPSCON0bits.CPSON // bit 7
2078 #define CPSCH0 CPSCON1bits.CPSCH0 // bit 0
2079 #define CPSCH1 CPSCON1bits.CPSCH1 // bit 1
2080 #define CPSCH2 CPSCON1bits.CPSCH2 // bit 2
2081 #define CPSCH3 CPSCON1bits.CPSCH3 // bit 3
2083 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
2084 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
2085 #define FVREN FVRCONbits.FVREN // bit 6
2086 #define FVRRDY FVRCONbits.FVRRDY // bit 7, shadows bit in FVRCONbits
2087 #define FVRST FVRCONbits.FVRST // bit 7, shadows bit in FVRCONbits
2089 #define RBIF INTCONbits.RBIF // bit 0, shadows bit in INTCONbits
2090 #define IOCIF INTCONbits.IOCIF // bit 0, shadows bit in INTCONbits
2091 #define INTF INTCONbits.INTF // bit 1
2092 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
2093 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
2094 #define RBIE INTCONbits.RBIE // bit 3, shadows bit in INTCONbits
2095 #define IOCIE INTCONbits.IOCIE // bit 3, shadows bit in INTCONbits
2096 #define INTE INTCONbits.INTE // bit 4
2097 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
2098 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
2099 #define PEIE INTCONbits.PEIE // bit 6
2100 #define GIE INTCONbits.GIE // bit 7
2102 #define IOCB0 IOCbits.IOCB0 // bit 0, shadows bit in IOCbits
2103 #define IOC0 IOCbits.IOC0 // bit 0, shadows bit in IOCbits
2104 #define IOCB1 IOCbits.IOCB1 // bit 1, shadows bit in IOCbits
2105 #define IOC1 IOCbits.IOC1 // bit 1, shadows bit in IOCbits
2106 #define IOCB2 IOCbits.IOCB2 // bit 2, shadows bit in IOCbits
2107 #define IOC2 IOCbits.IOC2 // bit 2, shadows bit in IOCbits
2108 #define IOCB3 IOCbits.IOCB3 // bit 3, shadows bit in IOCbits
2109 #define IOC3 IOCbits.IOC3 // bit 3, shadows bit in IOCbits
2110 #define IOCB4 IOCbits.IOCB4 // bit 4, shadows bit in IOCbits
2111 #define IOC4 IOCbits.IOC4 // bit 4, shadows bit in IOCbits
2112 #define IOCB5 IOCbits.IOCB5 // bit 5, shadows bit in IOCbits
2113 #define IOC5 IOCbits.IOC5 // bit 5, shadows bit in IOCbits
2114 #define IOCB6 IOCbits.IOCB6 // bit 6, shadows bit in IOCbits
2115 #define IOC6 IOCbits.IOC6 // bit 6, shadows bit in IOCbits
2116 #define IOCB7 IOCbits.IOCB7 // bit 7, shadows bit in IOCbits
2117 #define IOC7 IOCbits.IOC7 // bit 7, shadows bit in IOCbits
2119 #define PS0 OPTION_REGbits.PS0 // bit 0
2120 #define PS1 OPTION_REGbits.PS1 // bit 1
2121 #define PS2 OPTION_REGbits.PS2 // bit 2
2122 #define PSA OPTION_REGbits.PSA // bit 3
2123 #define T0SE OPTION_REGbits.T0SE // bit 4
2124 #define T0CS OPTION_REGbits.T0CS // bit 5
2125 #define INTEDG OPTION_REGbits.INTEDG // bit 6
2126 #define NOT_RBPU OPTION_REGbits.NOT_RBPU // bit 7
2128 #define ICSS OSCCONbits.ICSS // bit 2
2129 #define ICSL OSCCONbits.ICSL // bit 3
2130 #define IRCF0 OSCCONbits.IRCF0 // bit 4
2131 #define IRCF1 OSCCONbits.IRCF1 // bit 5
2133 #define TUN0 OSCTUNEbits.TUN0 // bit 0
2134 #define TUN1 OSCTUNEbits.TUN1 // bit 1
2135 #define TUN2 OSCTUNEbits.TUN2 // bit 2
2136 #define TUN3 OSCTUNEbits.TUN3 // bit 3
2137 #define TUN4 OSCTUNEbits.TUN4 // bit 4
2138 #define TUN5 OSCTUNEbits.TUN5 // bit 5
2140 #define NOT_BOR PCONbits.NOT_BOR // bit 0, shadows bit in PCONbits
2141 #define NOT_BO PCONbits.NOT_BO // bit 0, shadows bit in PCONbits
2142 #define NOT_POR PCONbits.NOT_POR // bit 1
2144 #define TMR1IE PIE1bits.TMR1IE // bit 0
2145 #define TMR2IE PIE1bits.TMR2IE // bit 1
2146 #define CCP1IE PIE1bits.CCP1IE // bit 2
2147 #define SSPIE PIE1bits.SSPIE // bit 3
2148 #define TXIE PIE1bits.TXIE // bit 4
2149 #define RCIE PIE1bits.RCIE // bit 5
2150 #define ADIE PIE1bits.ADIE // bit 6
2151 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
2153 #define CCP2IE PIE2bits.CCP2IE // bit 0
2155 #define TMR1IF PIR1bits.TMR1IF // bit 0
2156 #define TMR2IF PIR1bits.TMR2IF // bit 1
2157 #define CCP1IF PIR1bits.CCP1IF // bit 2
2158 #define SSPIF PIR1bits.SSPIF // bit 3
2159 #define TXIF PIR1bits.TXIF // bit 4
2160 #define RCIF PIR1bits.RCIF // bit 5
2161 #define ADIF PIR1bits.ADIF // bit 6
2162 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
2164 #define CCP2IF PIR2bits.CCP2IF // bit 0
2166 #define RD PMCON1bits.RD // bit 0, shadows bit in PMCON1bits
2167 #define PMRD PMCON1bits.PMRD // bit 0, shadows bit in PMCON1bits
2169 #define RA0 PORTAbits.RA0 // bit 0
2170 #define RA1 PORTAbits.RA1 // bit 1
2171 #define RA2 PORTAbits.RA2 // bit 2
2172 #define RA3 PORTAbits.RA3 // bit 3
2173 #define RA4 PORTAbits.RA4 // bit 4
2174 #define RA5 PORTAbits.RA5 // bit 5
2175 #define RA6 PORTAbits.RA6 // bit 6
2176 #define RA7 PORTAbits.RA7 // bit 7
2178 #define RB0 PORTBbits.RB0 // bit 0
2179 #define RB1 PORTBbits.RB1 // bit 1
2180 #define RB2 PORTBbits.RB2 // bit 2
2181 #define RB3 PORTBbits.RB3 // bit 3
2182 #define RB4 PORTBbits.RB4 // bit 4
2183 #define RB5 PORTBbits.RB5 // bit 5
2184 #define RB6 PORTBbits.RB6 // bit 6
2185 #define RB7 PORTBbits.RB7 // bit 7
2187 #define RC0 PORTCbits.RC0 // bit 0
2188 #define RC1 PORTCbits.RC1 // bit 1
2189 #define RC2 PORTCbits.RC2 // bit 2
2190 #define RC3 PORTCbits.RC3 // bit 3
2191 #define RC4 PORTCbits.RC4 // bit 4
2192 #define RC5 PORTCbits.RC5 // bit 5
2193 #define RC6 PORTCbits.RC6 // bit 6
2194 #define RC7 PORTCbits.RC7 // bit 7
2196 #define RE3 PORTEbits.RE3 // bit 3
2198 #define RX9D RCSTAbits.RX9D // bit 0, shadows bit in RCSTAbits
2199 #define RCD8 RCSTAbits.RCD8 // bit 0, shadows bit in RCSTAbits
2200 #define OERR RCSTAbits.OERR // bit 1
2201 #define FERR RCSTAbits.FERR // bit 2
2202 #define ADDEN RCSTAbits.ADDEN // bit 3
2203 #define CREN RCSTAbits.CREN // bit 4
2204 #define SREN RCSTAbits.SREN // bit 5
2205 #define RX9 RCSTAbits.RX9 // bit 6, shadows bit in RCSTAbits
2206 #define RC9 RCSTAbits.RC9 // bit 6, shadows bit in RCSTAbits
2207 #define NOT_RC8 RCSTAbits.NOT_RC8 // bit 6, shadows bit in RCSTAbits
2208 #define RC8_9 RCSTAbits.RC8_9 // bit 6, shadows bit in RCSTAbits
2209 #define SPEN RCSTAbits.SPEN // bit 7
2211 #define SSPM0 SSPCONbits.SSPM0 // bit 0
2212 #define SSPM1 SSPCONbits.SSPM1 // bit 1
2213 #define SSPM2 SSPCONbits.SSPM2 // bit 2
2214 #define SSPM3 SSPCONbits.SSPM3 // bit 3
2215 #define CKP SSPCONbits.CKP // bit 4
2216 #define SSPEN SSPCONbits.SSPEN // bit 5
2217 #define SSPOV SSPCONbits.SSPOV // bit 6
2218 #define WCOL SSPCONbits.WCOL // bit 7
2220 #define BF SSPSTATbits.BF // bit 0
2221 #define UA SSPSTATbits.UA // bit 1
2222 #define R_NOT_W SSPSTATbits.R_NOT_W // bit 2, shadows bit in SSPSTATbits
2223 #define R SSPSTATbits.R // bit 2, shadows bit in SSPSTATbits
2224 #define I2C_READ SSPSTATbits.I2C_READ // bit 2, shadows bit in SSPSTATbits
2225 #define NOT_W SSPSTATbits.NOT_W // bit 2, shadows bit in SSPSTATbits
2226 #define NOT_WRITE SSPSTATbits.NOT_WRITE // bit 2, shadows bit in SSPSTATbits
2227 #define R_W SSPSTATbits.R_W // bit 2, shadows bit in SSPSTATbits
2228 #define READ_WRITE SSPSTATbits.READ_WRITE // bit 2, shadows bit in SSPSTATbits
2229 #define S SSPSTATbits.S // bit 3, shadows bit in SSPSTATbits
2230 #define I2C_START SSPSTATbits.I2C_START // bit 3, shadows bit in SSPSTATbits
2231 #define P SSPSTATbits.P // bit 4, shadows bit in SSPSTATbits
2232 #define I2C_STOP SSPSTATbits.I2C_STOP // bit 4, shadows bit in SSPSTATbits
2233 #define D_NOT_A SSPSTATbits.D_NOT_A // bit 5, shadows bit in SSPSTATbits
2234 #define D SSPSTATbits.D // bit 5, shadows bit in SSPSTATbits
2235 #define I2C_DATA SSPSTATbits.I2C_DATA // bit 5, shadows bit in SSPSTATbits
2236 #define NOT_A SSPSTATbits.NOT_A // bit 5, shadows bit in SSPSTATbits
2237 #define NOT_ADDRESS SSPSTATbits.NOT_ADDRESS // bit 5, shadows bit in SSPSTATbits
2238 #define D_A SSPSTATbits.D_A // bit 5, shadows bit in SSPSTATbits
2239 #define DATA_ADDRESS SSPSTATbits.DATA_ADDRESS // bit 5, shadows bit in SSPSTATbits
2240 #define CKE SSPSTATbits.CKE // bit 6
2241 #define SMP SSPSTATbits.SMP // bit 7
2243 #define C STATUSbits.C // bit 0
2244 #define DC STATUSbits.DC // bit 1
2245 #define Z STATUSbits.Z // bit 2
2246 #define NOT_PD STATUSbits.NOT_PD // bit 3
2247 #define NOT_TO STATUSbits.NOT_TO // bit 4
2248 #define RP0 STATUSbits.RP0 // bit 5
2249 #define RP1 STATUSbits.RP1 // bit 6
2250 #define IRP STATUSbits.IRP // bit 7
2252 #define TMR1ON T1CONbits.TMR1ON // bit 0
2253 #define T1SYNC T1CONbits.T1SYNC // bit 2, shadows bit in T1CONbits
2254 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2, shadows bit in T1CONbits
2255 #define T1INSYNC T1CONbits.T1INSYNC // bit 2, shadows bit in T1CONbits
2256 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
2257 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
2258 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
2259 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6
2260 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7
2262 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
2263 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
2264 #define T1GVAL T1GCONbits.T1GVAL // bit 2
2265 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3, shadows bit in T1GCONbits
2266 #define T1G_NOT_DONE T1GCONbits.T1G_NOT_DONE // bit 3, shadows bit in T1GCONbits
2267 #define T1GGO_DONE T1GCONbits.T1GGO_DONE // bit 3, shadows bit in T1GCONbits
2268 #define T1GGO T1GCONbits.T1GGO // bit 3, shadows bit in T1GCONbits
2269 #define T1GSPM T1GCONbits.T1GSPM // bit 4
2270 #define T1GTM T1GCONbits.T1GTM // bit 5
2271 #define T1GPOL T1GCONbits.T1GPOL // bit 6
2272 #define TMR1GE T1GCONbits.TMR1GE // bit 7
2274 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
2275 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
2276 #define TMR2ON T2CONbits.TMR2ON // bit 2
2277 #define TOUTPS0 T2CONbits.TOUTPS0 // bit 3
2278 #define TOUTPS1 T2CONbits.TOUTPS1 // bit 4
2279 #define TOUTPS2 T2CONbits.TOUTPS2 // bit 5
2280 #define TOUTPS3 T2CONbits.TOUTPS3 // bit 6
2282 #define TRISA0 TRISAbits.TRISA0 // bit 0
2283 #define TRISA1 TRISAbits.TRISA1 // bit 1
2284 #define TRISA2 TRISAbits.TRISA2 // bit 2
2285 #define TRISA3 TRISAbits.TRISA3 // bit 3
2286 #define TRISA4 TRISAbits.TRISA4 // bit 4
2287 #define TRISA5 TRISAbits.TRISA5 // bit 5
2288 #define TRISA6 TRISAbits.TRISA6 // bit 6
2289 #define TRISA7 TRISAbits.TRISA7 // bit 7
2291 #define TRISB0 TRISBbits.TRISB0 // bit 0
2292 #define TRISB1 TRISBbits.TRISB1 // bit 1
2293 #define TRISB2 TRISBbits.TRISB2 // bit 2
2294 #define TRISB3 TRISBbits.TRISB3 // bit 3
2295 #define TRISB4 TRISBbits.TRISB4 // bit 4
2296 #define TRISB5 TRISBbits.TRISB5 // bit 5
2297 #define TRISB6 TRISBbits.TRISB6 // bit 6
2298 #define TRISB7 TRISBbits.TRISB7 // bit 7
2300 #define TRISC0 TRISCbits.TRISC0 // bit 0
2301 #define TRISC1 TRISCbits.TRISC1 // bit 1
2302 #define TRISC2 TRISCbits.TRISC2 // bit 2
2303 #define TRISC3 TRISCbits.TRISC3 // bit 3
2304 #define TRISC4 TRISCbits.TRISC4 // bit 4
2305 #define TRISC5 TRISCbits.TRISC5 // bit 5
2306 #define TRISC6 TRISCbits.TRISC6 // bit 6
2307 #define TRISC7 TRISCbits.TRISC7 // bit 7
2309 #define TRISE3 TRISEbits.TRISE3 // bit 3
2311 #define TX9D TXSTAbits.TX9D // bit 0, shadows bit in TXSTAbits
2312 #define TXD8 TXSTAbits.TXD8 // bit 0, shadows bit in TXSTAbits
2313 #define TRMT TXSTAbits.TRMT // bit 1
2314 #define BRGH TXSTAbits.BRGH // bit 2
2315 #define SYNC TXSTAbits.SYNC // bit 4
2316 #define TXEN TXSTAbits.TXEN // bit 5
2317 #define TX9 TXSTAbits.TX9 // bit 6, shadows bit in TXSTAbits
2318 #define NOT_TX8 TXSTAbits.NOT_TX8 // bit 6, shadows bit in TXSTAbits
2319 #define TX8_9 TXSTAbits.TX8_9 // bit 6, shadows bit in TXSTAbits
2320 #define CSRC TXSTAbits.CSRC // bit 7
2322 #define WPUB0 WPUbits.WPUB0 // bit 0, shadows bit in WPUbits
2323 #define WPU0 WPUbits.WPU0 // bit 0, shadows bit in WPUbits
2324 #define WPUB1 WPUbits.WPUB1 // bit 1, shadows bit in WPUbits
2325 #define WPU1 WPUbits.WPU1 // bit 1, shadows bit in WPUbits
2326 #define WPUB2 WPUbits.WPUB2 // bit 2, shadows bit in WPUbits
2327 #define WPU2 WPUbits.WPU2 // bit 2, shadows bit in WPUbits
2328 #define WPUB3 WPUbits.WPUB3 // bit 3, shadows bit in WPUbits
2329 #define WPU3 WPUbits.WPU3 // bit 3, shadows bit in WPUbits
2330 #define WPUB4 WPUbits.WPUB4 // bit 4, shadows bit in WPUbits
2331 #define WPU4 WPUbits.WPU4 // bit 4, shadows bit in WPUbits
2332 #define WPUB5 WPUbits.WPUB5 // bit 5, shadows bit in WPUbits
2333 #define WPU5 WPUbits.WPU5 // bit 5, shadows bit in WPUbits
2334 #define WPUB6 WPUbits.WPUB6 // bit 6, shadows bit in WPUbits
2335 #define WPU6 WPUbits.WPU6 // bit 6, shadows bit in WPUbits
2336 #define WPUB7 WPUbits.WPUB7 // bit 7, shadows bit in WPUbits
2337 #define WPU7 WPUbits.WPU7 // bit 7, shadows bit in WPUbits
2339 #endif // #ifndef NO_BIT_DEFINES
2341 #endif // #ifndef __PIC16LF722_H__