struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16c773.h
blob1844129b8c2e77865d06b1d9cd7aa56d8e4b9490
1 /*
2 * This declarations of the PIC16C773 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:03 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 __PIC16C773_H__
26 #define __PIC16C773_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 PCLATH_ADDR 0x000A
45 #define INTCON_ADDR 0x000B
46 #define PIR1_ADDR 0x000C
47 #define PIR2_ADDR 0x000D
48 #define TMR1_ADDR 0x000E
49 #define TMR1L_ADDR 0x000E
50 #define TMR1H_ADDR 0x000F
51 #define T1CON_ADDR 0x0010
52 #define TMR2_ADDR 0x0011
53 #define T2CON_ADDR 0x0012
54 #define SSPBUF_ADDR 0x0013
55 #define SSPCON_ADDR 0x0014
56 #define CCPR1_ADDR 0x0015
57 #define CCPR1L_ADDR 0x0015
58 #define CCPR1H_ADDR 0x0016
59 #define CCP1CON_ADDR 0x0017
60 #define RCSTA_ADDR 0x0018
61 #define TXREG_ADDR 0x0019
62 #define RCREG_ADDR 0x001A
63 #define CCPR2_ADDR 0x001B
64 #define CCPR2L_ADDR 0x001B
65 #define CCPR2H_ADDR 0x001C
66 #define CCP2CON_ADDR 0x001D
67 #define ADRESH_ADDR 0x001E
68 #define ADCON0_ADDR 0x001F
69 #define OPTION_REG_ADDR 0x0081
70 #define TRISA_ADDR 0x0085
71 #define TRISB_ADDR 0x0086
72 #define TRISC_ADDR 0x0087
73 #define PIE1_ADDR 0x008C
74 #define PIE2_ADDR 0x008D
75 #define PCON_ADDR 0x008E
76 #define SSPCON2_ADDR 0x0091
77 #define PR2_ADDR 0x0092
78 #define SSPADD_ADDR 0x0093
79 #define SSPSTAT_ADDR 0x0094
80 #define TXSTA_ADDR 0x0098
81 #define SPBRG_ADDR 0x0099
82 #define REFCON_ADDR 0x009B
83 #define LVDCON_ADDR 0x009C
84 #define ADRESL_ADDR 0x009E
85 #define ADCON1_ADDR 0x009F
87 #endif // #ifndef NO_ADDR_DEFINES
89 //==============================================================================
91 // Register Definitions
93 //==============================================================================
95 extern __at(0x0000) __sfr INDF;
96 extern __at(0x0001) __sfr TMR0;
97 extern __at(0x0002) __sfr PCL;
99 //==============================================================================
100 // STATUS Bits
102 extern __at(0x0003) __sfr STATUS;
104 typedef union
106 struct
108 unsigned C : 1;
109 unsigned DC : 1;
110 unsigned Z : 1;
111 unsigned NOT_PD : 1;
112 unsigned NOT_TO : 1;
113 unsigned RP0 : 1;
114 unsigned RP1 : 1;
115 unsigned IRP : 1;
118 struct
120 unsigned : 5;
121 unsigned RP : 2;
122 unsigned : 1;
124 } __STATUSbits_t;
126 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
128 #define _C 0x01
129 #define _DC 0x02
130 #define _Z 0x04
131 #define _NOT_PD 0x08
132 #define _NOT_TO 0x10
133 #define _RP0 0x20
134 #define _RP1 0x40
135 #define _IRP 0x80
137 //==============================================================================
139 extern __at(0x0004) __sfr FSR;
141 //==============================================================================
142 // PORTA Bits
144 extern __at(0x0005) __sfr PORTA;
146 typedef union
148 struct
150 unsigned RA0 : 1;
151 unsigned RA1 : 1;
152 unsigned RA2 : 1;
153 unsigned RA3 : 1;
154 unsigned RA4 : 1;
155 unsigned : 1;
156 unsigned : 1;
157 unsigned : 1;
160 struct
162 unsigned RA : 5;
163 unsigned : 3;
165 } __PORTAbits_t;
167 extern __at(0x0005) volatile __PORTAbits_t PORTAbits;
169 #define _RA0 0x01
170 #define _RA1 0x02
171 #define _RA2 0x04
172 #define _RA3 0x08
173 #define _RA4 0x10
175 //==============================================================================
178 //==============================================================================
179 // PORTB Bits
181 extern __at(0x0006) __sfr PORTB;
183 typedef struct
185 unsigned RB0 : 1;
186 unsigned RB1 : 1;
187 unsigned RB2 : 1;
188 unsigned RB3 : 1;
189 unsigned RB4 : 1;
190 unsigned RB5 : 1;
191 unsigned RB6 : 1;
192 unsigned RB7 : 1;
193 } __PORTBbits_t;
195 extern __at(0x0006) volatile __PORTBbits_t PORTBbits;
197 #define _RB0 0x01
198 #define _RB1 0x02
199 #define _RB2 0x04
200 #define _RB3 0x08
201 #define _RB4 0x10
202 #define _RB5 0x20
203 #define _RB6 0x40
204 #define _RB7 0x80
206 //==============================================================================
209 //==============================================================================
210 // PORTC Bits
212 extern __at(0x0007) __sfr PORTC;
214 typedef struct
216 unsigned RC0 : 1;
217 unsigned RC1 : 1;
218 unsigned RC2 : 1;
219 unsigned RC3 : 1;
220 unsigned RC4 : 1;
221 unsigned RC5 : 1;
222 unsigned RC6 : 1;
223 unsigned RC7 : 1;
224 } __PORTCbits_t;
226 extern __at(0x0007) volatile __PORTCbits_t PORTCbits;
228 #define _RC0 0x01
229 #define _RC1 0x02
230 #define _RC2 0x04
231 #define _RC3 0x08
232 #define _RC4 0x10
233 #define _RC5 0x20
234 #define _RC6 0x40
235 #define _RC7 0x80
237 //==============================================================================
239 extern __at(0x000A) __sfr PCLATH;
241 //==============================================================================
242 // INTCON Bits
244 extern __at(0x000B) __sfr INTCON;
246 typedef struct
248 unsigned RBIF : 1;
249 unsigned INTF : 1;
250 unsigned T0IF : 1;
251 unsigned RBIE : 1;
252 unsigned INTE : 1;
253 unsigned T0IE : 1;
254 unsigned PEIE : 1;
255 unsigned GIE : 1;
256 } __INTCONbits_t;
258 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
260 #define _RBIF 0x01
261 #define _INTF 0x02
262 #define _T0IF 0x04
263 #define _RBIE 0x08
264 #define _INTE 0x10
265 #define _T0IE 0x20
266 #define _PEIE 0x40
267 #define _GIE 0x80
269 //==============================================================================
272 //==============================================================================
273 // PIR1 Bits
275 extern __at(0x000C) __sfr PIR1;
277 typedef struct
279 unsigned TMR1IF : 1;
280 unsigned TMR2IF : 1;
281 unsigned CCP1IF : 1;
282 unsigned SSPIF : 1;
283 unsigned TXIF : 1;
284 unsigned RCIF : 1;
285 unsigned ADIF : 1;
286 unsigned : 1;
287 } __PIR1bits_t;
289 extern __at(0x000C) volatile __PIR1bits_t PIR1bits;
291 #define _TMR1IF 0x01
292 #define _TMR2IF 0x02
293 #define _CCP1IF 0x04
294 #define _SSPIF 0x08
295 #define _TXIF 0x10
296 #define _RCIF 0x20
297 #define _ADIF 0x40
299 //==============================================================================
302 //==============================================================================
303 // PIR2 Bits
305 extern __at(0x000D) __sfr PIR2;
307 typedef struct
309 unsigned CCP2IF : 1;
310 unsigned : 1;
311 unsigned : 1;
312 unsigned BCLIF : 1;
313 unsigned : 1;
314 unsigned : 1;
315 unsigned : 1;
316 unsigned LVDIF : 1;
317 } __PIR2bits_t;
319 extern __at(0x000D) volatile __PIR2bits_t PIR2bits;
321 #define _CCP2IF 0x01
322 #define _BCLIF 0x08
323 #define _LVDIF 0x80
325 //==============================================================================
327 extern __at(0x000E) __sfr TMR1;
328 extern __at(0x000E) __sfr TMR1L;
329 extern __at(0x000F) __sfr TMR1H;
331 //==============================================================================
332 // T1CON Bits
334 extern __at(0x0010) __sfr T1CON;
336 typedef union
338 struct
340 unsigned TMR1ON : 1;
341 unsigned TMR1CS : 1;
342 unsigned NOT_T1SYNC : 1;
343 unsigned T1OSCEN : 1;
344 unsigned T1CKPS0 : 1;
345 unsigned T1CKPS1 : 1;
346 unsigned : 1;
347 unsigned : 1;
350 struct
352 unsigned : 1;
353 unsigned : 1;
354 unsigned T1SYNC : 1;
355 unsigned : 1;
356 unsigned : 1;
357 unsigned : 1;
358 unsigned : 1;
359 unsigned : 1;
362 struct
364 unsigned : 1;
365 unsigned : 1;
366 unsigned T1INSYNC : 1;
367 unsigned : 1;
368 unsigned : 1;
369 unsigned : 1;
370 unsigned : 1;
371 unsigned : 1;
374 struct
376 unsigned : 4;
377 unsigned T1CKPS : 2;
378 unsigned : 2;
380 } __T1CONbits_t;
382 extern __at(0x0010) volatile __T1CONbits_t T1CONbits;
384 #define _TMR1ON 0x01
385 #define _TMR1CS 0x02
386 #define _NOT_T1SYNC 0x04
387 #define _T1SYNC 0x04
388 #define _T1INSYNC 0x04
389 #define _T1OSCEN 0x08
390 #define _T1CKPS0 0x10
391 #define _T1CKPS1 0x20
393 //==============================================================================
395 extern __at(0x0011) __sfr TMR2;
397 //==============================================================================
398 // T2CON Bits
400 extern __at(0x0012) __sfr T2CON;
402 typedef union
404 struct
406 unsigned T2CKPS0 : 1;
407 unsigned T2CKPS1 : 1;
408 unsigned TMR2ON : 1;
409 unsigned TOUTPS0 : 1;
410 unsigned TOUTPS1 : 1;
411 unsigned TOUTPS2 : 1;
412 unsigned TOUTPS3 : 1;
413 unsigned : 1;
416 struct
418 unsigned T2CKPS : 2;
419 unsigned : 6;
422 struct
424 unsigned : 3;
425 unsigned TOUTPS : 4;
426 unsigned : 1;
428 } __T2CONbits_t;
430 extern __at(0x0012) volatile __T2CONbits_t T2CONbits;
432 #define _T2CKPS0 0x01
433 #define _T2CKPS1 0x02
434 #define _TMR2ON 0x04
435 #define _TOUTPS0 0x08
436 #define _TOUTPS1 0x10
437 #define _TOUTPS2 0x20
438 #define _TOUTPS3 0x40
440 //==============================================================================
442 extern __at(0x0013) __sfr SSPBUF;
444 //==============================================================================
445 // SSPCON Bits
447 extern __at(0x0014) __sfr SSPCON;
449 typedef union
451 struct
453 unsigned SSPM0 : 1;
454 unsigned SSPM1 : 1;
455 unsigned SSPM2 : 1;
456 unsigned SSPM3 : 1;
457 unsigned CKP : 1;
458 unsigned SSPEN : 1;
459 unsigned SSPOV : 1;
460 unsigned WCOL : 1;
463 struct
465 unsigned SSPM : 4;
466 unsigned : 4;
468 } __SSPCONbits_t;
470 extern __at(0x0014) volatile __SSPCONbits_t SSPCONbits;
472 #define _SSPM0 0x01
473 #define _SSPM1 0x02
474 #define _SSPM2 0x04
475 #define _SSPM3 0x08
476 #define _CKP 0x10
477 #define _SSPEN 0x20
478 #define _SSPOV 0x40
479 #define _WCOL 0x80
481 //==============================================================================
483 extern __at(0x0015) __sfr CCPR1;
484 extern __at(0x0015) __sfr CCPR1L;
485 extern __at(0x0016) __sfr CCPR1H;
487 //==============================================================================
488 // CCP1CON Bits
490 extern __at(0x0017) __sfr CCP1CON;
492 typedef union
494 struct
496 unsigned CCP1M0 : 1;
497 unsigned CCP1M1 : 1;
498 unsigned CCP1M2 : 1;
499 unsigned CCP1M3 : 1;
500 unsigned DC1B0 : 1;
501 unsigned DC1B1 : 1;
502 unsigned : 1;
503 unsigned : 1;
506 struct
508 unsigned : 1;
509 unsigned : 1;
510 unsigned : 1;
511 unsigned : 1;
512 unsigned CCP1Y : 1;
513 unsigned CCP1X : 1;
514 unsigned : 1;
515 unsigned : 1;
518 struct
520 unsigned CCP1M : 4;
521 unsigned : 4;
524 struct
526 unsigned : 4;
527 unsigned DC1B : 2;
528 unsigned : 2;
530 } __CCP1CONbits_t;
532 extern __at(0x0017) volatile __CCP1CONbits_t CCP1CONbits;
534 #define _CCP1M0 0x01
535 #define _CCP1M1 0x02
536 #define _CCP1M2 0x04
537 #define _CCP1M3 0x08
538 #define _DC1B0 0x10
539 #define _CCP1Y 0x10
540 #define _DC1B1 0x20
541 #define _CCP1X 0x20
543 //==============================================================================
546 //==============================================================================
547 // RCSTA Bits
549 extern __at(0x0018) __sfr RCSTA;
551 typedef union
553 struct
555 unsigned RX9D : 1;
556 unsigned OERR : 1;
557 unsigned FERR : 1;
558 unsigned ADDEN : 1;
559 unsigned CREN : 1;
560 unsigned SREN : 1;
561 unsigned RX9 : 1;
562 unsigned SPEN : 1;
565 struct
567 unsigned RCD8 : 1;
568 unsigned : 1;
569 unsigned : 1;
570 unsigned : 1;
571 unsigned : 1;
572 unsigned : 1;
573 unsigned RC9 : 1;
574 unsigned : 1;
577 struct
579 unsigned : 1;
580 unsigned : 1;
581 unsigned : 1;
582 unsigned : 1;
583 unsigned : 1;
584 unsigned : 1;
585 unsigned NOT_RC8 : 1;
586 unsigned : 1;
589 struct
591 unsigned : 1;
592 unsigned : 1;
593 unsigned : 1;
594 unsigned : 1;
595 unsigned : 1;
596 unsigned : 1;
597 unsigned RC8_9 : 1;
598 unsigned : 1;
600 } __RCSTAbits_t;
602 extern __at(0x0018) volatile __RCSTAbits_t RCSTAbits;
604 #define _RX9D 0x01
605 #define _RCD8 0x01
606 #define _OERR 0x02
607 #define _FERR 0x04
608 #define _ADDEN 0x08
609 #define _CREN 0x10
610 #define _SREN 0x20
611 #define _RX9 0x40
612 #define _RC9 0x40
613 #define _NOT_RC8 0x40
614 #define _RC8_9 0x40
615 #define _SPEN 0x80
617 //==============================================================================
619 extern __at(0x0019) __sfr TXREG;
620 extern __at(0x001A) __sfr RCREG;
621 extern __at(0x001B) __sfr CCPR2;
622 extern __at(0x001B) __sfr CCPR2L;
623 extern __at(0x001C) __sfr CCPR2H;
625 //==============================================================================
626 // CCP2CON Bits
628 extern __at(0x001D) __sfr CCP2CON;
630 typedef union
632 struct
634 unsigned CCP2M0 : 1;
635 unsigned CCP2M1 : 1;
636 unsigned CCP2M2 : 1;
637 unsigned CCP2M3 : 1;
638 unsigned CCP2Y : 1;
639 unsigned CCP2X : 1;
640 unsigned : 1;
641 unsigned : 1;
644 struct
646 unsigned CCP2M : 4;
647 unsigned : 4;
649 } __CCP2CONbits_t;
651 extern __at(0x001D) volatile __CCP2CONbits_t CCP2CONbits;
653 #define _CCP2M0 0x01
654 #define _CCP2M1 0x02
655 #define _CCP2M2 0x04
656 #define _CCP2M3 0x08
657 #define _CCP2Y 0x10
658 #define _CCP2X 0x20
660 //==============================================================================
662 extern __at(0x001E) __sfr ADRESH;
664 //==============================================================================
665 // ADCON0 Bits
667 extern __at(0x001F) __sfr ADCON0;
669 typedef union
671 struct
673 unsigned ADON : 1;
674 unsigned CHS3 : 1;
675 unsigned GO_NOT_DONE : 1;
676 unsigned CHS0 : 1;
677 unsigned CHS1 : 1;
678 unsigned CHS2 : 1;
679 unsigned ADCS0 : 1;
680 unsigned ADCS1 : 1;
683 struct
685 unsigned : 1;
686 unsigned : 1;
687 unsigned GO : 1;
688 unsigned : 1;
689 unsigned : 1;
690 unsigned : 1;
691 unsigned : 1;
692 unsigned : 1;
695 struct
697 unsigned : 1;
698 unsigned : 1;
699 unsigned NOT_DONE : 1;
700 unsigned : 1;
701 unsigned : 1;
702 unsigned : 1;
703 unsigned : 1;
704 unsigned : 1;
707 struct
709 unsigned : 1;
710 unsigned : 1;
711 unsigned GO_DONE : 1;
712 unsigned : 1;
713 unsigned : 1;
714 unsigned : 1;
715 unsigned : 1;
716 unsigned : 1;
719 struct
721 unsigned : 6;
722 unsigned ADCS : 2;
724 } __ADCON0bits_t;
726 extern __at(0x001F) volatile __ADCON0bits_t ADCON0bits;
728 #define _ADON 0x01
729 #define _CHS3 0x02
730 #define _GO_NOT_DONE 0x04
731 #define _GO 0x04
732 #define _NOT_DONE 0x04
733 #define _GO_DONE 0x04
734 #define _CHS0 0x08
735 #define _CHS1 0x10
736 #define _CHS2 0x20
737 #define _ADCS0 0x40
738 #define _ADCS1 0x80
740 //==============================================================================
743 //==============================================================================
744 // OPTION_REG Bits
746 extern __at(0x0081) __sfr OPTION_REG;
748 typedef union
750 struct
752 unsigned PS0 : 1;
753 unsigned PS1 : 1;
754 unsigned PS2 : 1;
755 unsigned PSA : 1;
756 unsigned T0SE : 1;
757 unsigned T0CS : 1;
758 unsigned INTEDG : 1;
759 unsigned NOT_RBPU : 1;
762 struct
764 unsigned PS : 3;
765 unsigned : 5;
767 } __OPTION_REGbits_t;
769 extern __at(0x0081) volatile __OPTION_REGbits_t OPTION_REGbits;
771 #define _PS0 0x01
772 #define _PS1 0x02
773 #define _PS2 0x04
774 #define _PSA 0x08
775 #define _T0SE 0x10
776 #define _T0CS 0x20
777 #define _INTEDG 0x40
778 #define _NOT_RBPU 0x80
780 //==============================================================================
783 //==============================================================================
784 // TRISA Bits
786 extern __at(0x0085) __sfr TRISA;
788 typedef union
790 struct
792 unsigned TRISA0 : 1;
793 unsigned TRISA1 : 1;
794 unsigned TRISA2 : 1;
795 unsigned TRISA3 : 1;
796 unsigned TRISA4 : 1;
797 unsigned : 1;
798 unsigned : 1;
799 unsigned : 1;
802 struct
804 unsigned TRISA : 5;
805 unsigned : 3;
807 } __TRISAbits_t;
809 extern __at(0x0085) volatile __TRISAbits_t TRISAbits;
811 #define _TRISA0 0x01
812 #define _TRISA1 0x02
813 #define _TRISA2 0x04
814 #define _TRISA3 0x08
815 #define _TRISA4 0x10
817 //==============================================================================
820 //==============================================================================
821 // TRISB Bits
823 extern __at(0x0086) __sfr TRISB;
825 typedef struct
827 unsigned TRISB0 : 1;
828 unsigned TRISB1 : 1;
829 unsigned TRISB2 : 1;
830 unsigned TRISB3 : 1;
831 unsigned TRISB4 : 1;
832 unsigned TRISB5 : 1;
833 unsigned TRISB6 : 1;
834 unsigned TRISB7 : 1;
835 } __TRISBbits_t;
837 extern __at(0x0086) volatile __TRISBbits_t TRISBbits;
839 #define _TRISB0 0x01
840 #define _TRISB1 0x02
841 #define _TRISB2 0x04
842 #define _TRISB3 0x08
843 #define _TRISB4 0x10
844 #define _TRISB5 0x20
845 #define _TRISB6 0x40
846 #define _TRISB7 0x80
848 //==============================================================================
851 //==============================================================================
852 // TRISC Bits
854 extern __at(0x0087) __sfr TRISC;
856 typedef struct
858 unsigned TRISC0 : 1;
859 unsigned TRISC1 : 1;
860 unsigned TRISC2 : 1;
861 unsigned TRISC3 : 1;
862 unsigned TRISC4 : 1;
863 unsigned TRISC5 : 1;
864 unsigned TRISC6 : 1;
865 unsigned TRISC7 : 1;
866 } __TRISCbits_t;
868 extern __at(0x0087) volatile __TRISCbits_t TRISCbits;
870 #define _TRISC0 0x01
871 #define _TRISC1 0x02
872 #define _TRISC2 0x04
873 #define _TRISC3 0x08
874 #define _TRISC4 0x10
875 #define _TRISC5 0x20
876 #define _TRISC6 0x40
877 #define _TRISC7 0x80
879 //==============================================================================
882 //==============================================================================
883 // PIE1 Bits
885 extern __at(0x008C) __sfr PIE1;
887 typedef struct
889 unsigned TMR1IE : 1;
890 unsigned TMR2IE : 1;
891 unsigned CCP1IE : 1;
892 unsigned SSPIE : 1;
893 unsigned TXIE : 1;
894 unsigned RCIE : 1;
895 unsigned ADIE : 1;
896 unsigned : 1;
897 } __PIE1bits_t;
899 extern __at(0x008C) volatile __PIE1bits_t PIE1bits;
901 #define _TMR1IE 0x01
902 #define _TMR2IE 0x02
903 #define _CCP1IE 0x04
904 #define _SSPIE 0x08
905 #define _TXIE 0x10
906 #define _RCIE 0x20
907 #define _ADIE 0x40
909 //==============================================================================
912 //==============================================================================
913 // PIE2 Bits
915 extern __at(0x008D) __sfr PIE2;
917 typedef struct
919 unsigned CCP2IE : 1;
920 unsigned : 1;
921 unsigned : 1;
922 unsigned BCLIE : 1;
923 unsigned : 1;
924 unsigned : 1;
925 unsigned : 1;
926 unsigned LVDIE : 1;
927 } __PIE2bits_t;
929 extern __at(0x008D) volatile __PIE2bits_t PIE2bits;
931 #define _CCP2IE 0x01
932 #define _BCLIE 0x08
933 #define _LVDIE 0x80
935 //==============================================================================
938 //==============================================================================
939 // PCON Bits
941 extern __at(0x008E) __sfr PCON;
943 typedef union
945 struct
947 unsigned NOT_BOR : 1;
948 unsigned NOT_POR : 1;
949 unsigned : 1;
950 unsigned : 1;
951 unsigned : 1;
952 unsigned : 1;
953 unsigned : 1;
954 unsigned : 1;
957 struct
959 unsigned NOT_BO : 1;
960 unsigned : 1;
961 unsigned : 1;
962 unsigned : 1;
963 unsigned : 1;
964 unsigned : 1;
965 unsigned : 1;
966 unsigned : 1;
968 } __PCONbits_t;
970 extern __at(0x008E) volatile __PCONbits_t PCONbits;
972 #define _NOT_BOR 0x01
973 #define _NOT_BO 0x01
974 #define _NOT_POR 0x02
976 //==============================================================================
979 //==============================================================================
980 // SSPCON2 Bits
982 extern __at(0x0091) __sfr SSPCON2;
984 typedef struct
986 unsigned SEN : 1;
987 unsigned RSEN : 1;
988 unsigned PEN : 1;
989 unsigned RCEN : 1;
990 unsigned ACKEN : 1;
991 unsigned ACKDT : 1;
992 unsigned ACKSTAT : 1;
993 unsigned GCEN : 1;
994 } __SSPCON2bits_t;
996 extern __at(0x0091) volatile __SSPCON2bits_t SSPCON2bits;
998 #define _SEN 0x01
999 #define _RSEN 0x02
1000 #define _PEN 0x04
1001 #define _RCEN 0x08
1002 #define _ACKEN 0x10
1003 #define _ACKDT 0x20
1004 #define _ACKSTAT 0x40
1005 #define _GCEN 0x80
1007 //==============================================================================
1009 extern __at(0x0092) __sfr PR2;
1010 extern __at(0x0093) __sfr SSPADD;
1012 //==============================================================================
1013 // SSPSTAT Bits
1015 extern __at(0x0094) __sfr SSPSTAT;
1017 typedef union
1019 struct
1021 unsigned BF : 1;
1022 unsigned UA : 1;
1023 unsigned R_NOT_W : 1;
1024 unsigned S : 1;
1025 unsigned P : 1;
1026 unsigned D_NOT_A : 1;
1027 unsigned CKE : 1;
1028 unsigned SMP : 1;
1031 struct
1033 unsigned : 1;
1034 unsigned : 1;
1035 unsigned R : 1;
1036 unsigned I2C_START : 1;
1037 unsigned I2C_STOP : 1;
1038 unsigned D : 1;
1039 unsigned : 1;
1040 unsigned : 1;
1043 struct
1045 unsigned : 1;
1046 unsigned : 1;
1047 unsigned I2C_READ : 1;
1048 unsigned : 1;
1049 unsigned : 1;
1050 unsigned I2C_DATA : 1;
1051 unsigned : 1;
1052 unsigned : 1;
1055 struct
1057 unsigned : 1;
1058 unsigned : 1;
1059 unsigned R_W : 1;
1060 unsigned : 1;
1061 unsigned : 1;
1062 unsigned D_A : 1;
1063 unsigned : 1;
1064 unsigned : 1;
1067 struct
1069 unsigned : 1;
1070 unsigned : 1;
1071 unsigned READ_WRITE : 1;
1072 unsigned : 1;
1073 unsigned : 1;
1074 unsigned DATA_ADDRESS : 1;
1075 unsigned : 1;
1076 unsigned : 1;
1079 struct
1081 unsigned : 1;
1082 unsigned : 1;
1083 unsigned NOT_W : 1;
1084 unsigned : 1;
1085 unsigned : 1;
1086 unsigned NOT_A : 1;
1087 unsigned : 1;
1088 unsigned : 1;
1091 struct
1093 unsigned : 1;
1094 unsigned : 1;
1095 unsigned NOT_WRITE : 1;
1096 unsigned : 1;
1097 unsigned : 1;
1098 unsigned NOT_ADDRESS : 1;
1099 unsigned : 1;
1100 unsigned : 1;
1102 } __SSPSTATbits_t;
1104 extern __at(0x0094) volatile __SSPSTATbits_t SSPSTATbits;
1106 #define _BF 0x01
1107 #define _UA 0x02
1108 #define _R_NOT_W 0x04
1109 #define _R 0x04
1110 #define _I2C_READ 0x04
1111 #define _R_W 0x04
1112 #define _READ_WRITE 0x04
1113 #define _NOT_W 0x04
1114 #define _NOT_WRITE 0x04
1115 #define _S 0x08
1116 #define _I2C_START 0x08
1117 #define _P 0x10
1118 #define _I2C_STOP 0x10
1119 #define _D_NOT_A 0x20
1120 #define _D 0x20
1121 #define _I2C_DATA 0x20
1122 #define _D_A 0x20
1123 #define _DATA_ADDRESS 0x20
1124 #define _NOT_A 0x20
1125 #define _NOT_ADDRESS 0x20
1126 #define _CKE 0x40
1127 #define _SMP 0x80
1129 //==============================================================================
1132 //==============================================================================
1133 // TXSTA Bits
1135 extern __at(0x0098) __sfr TXSTA;
1137 typedef union
1139 struct
1141 unsigned TX9D : 1;
1142 unsigned TRMT : 1;
1143 unsigned BRGH : 1;
1144 unsigned : 1;
1145 unsigned SYNC : 1;
1146 unsigned TXEN : 1;
1147 unsigned TX9 : 1;
1148 unsigned CSRC : 1;
1151 struct
1153 unsigned TXD8 : 1;
1154 unsigned : 1;
1155 unsigned : 1;
1156 unsigned : 1;
1157 unsigned : 1;
1158 unsigned : 1;
1159 unsigned NOT_TX8 : 1;
1160 unsigned : 1;
1163 struct
1165 unsigned : 1;
1166 unsigned : 1;
1167 unsigned : 1;
1168 unsigned : 1;
1169 unsigned : 1;
1170 unsigned : 1;
1171 unsigned TX8_9 : 1;
1172 unsigned : 1;
1174 } __TXSTAbits_t;
1176 extern __at(0x0098) volatile __TXSTAbits_t TXSTAbits;
1178 #define _TX9D 0x01
1179 #define _TXD8 0x01
1180 #define _TRMT 0x02
1181 #define _BRGH 0x04
1182 #define _SYNC 0x10
1183 #define _TXEN 0x20
1184 #define _TX9 0x40
1185 #define _NOT_TX8 0x40
1186 #define _TX8_9 0x40
1187 #define _CSRC 0x80
1189 //==============================================================================
1191 extern __at(0x0099) __sfr SPBRG;
1193 //==============================================================================
1194 // REFCON Bits
1196 extern __at(0x009B) __sfr REFCON;
1198 typedef struct
1200 unsigned : 1;
1201 unsigned : 1;
1202 unsigned : 1;
1203 unsigned : 1;
1204 unsigned VRLOEN : 1;
1205 unsigned VRHOEN : 1;
1206 unsigned VRLEN : 1;
1207 unsigned VRHEN : 1;
1208 } __REFCONbits_t;
1210 extern __at(0x009B) volatile __REFCONbits_t REFCONbits;
1212 #define _VRLOEN 0x10
1213 #define _VRHOEN 0x20
1214 #define _VRLEN 0x40
1215 #define _VRHEN 0x80
1217 //==============================================================================
1220 //==============================================================================
1221 // LVDCON Bits
1223 extern __at(0x009C) __sfr LVDCON;
1225 typedef union
1227 struct
1229 unsigned LV0 : 1;
1230 unsigned LV1 : 1;
1231 unsigned LV2 : 1;
1232 unsigned LV3 : 1;
1233 unsigned LVDEN : 1;
1234 unsigned BGST : 1;
1235 unsigned : 1;
1236 unsigned : 1;
1239 struct
1241 unsigned LV : 4;
1242 unsigned : 4;
1244 } __LVDCONbits_t;
1246 extern __at(0x009C) volatile __LVDCONbits_t LVDCONbits;
1248 #define _LV0 0x01
1249 #define _LV1 0x02
1250 #define _LV2 0x04
1251 #define _LV3 0x08
1252 #define _LVDEN 0x10
1253 #define _BGST 0x20
1255 //==============================================================================
1257 extern __at(0x009E) __sfr ADRESL;
1259 //==============================================================================
1260 // ADCON1 Bits
1262 extern __at(0x009F) __sfr ADCON1;
1264 typedef union
1266 struct
1268 unsigned PCFG0 : 1;
1269 unsigned PCFG1 : 1;
1270 unsigned PCFG2 : 1;
1271 unsigned PCFG3 : 1;
1272 unsigned VCFG0 : 1;
1273 unsigned VCFG1 : 1;
1274 unsigned VCFG2 : 1;
1275 unsigned ADFM : 1;
1278 struct
1280 unsigned PCFG : 4;
1281 unsigned : 4;
1284 struct
1286 unsigned : 4;
1287 unsigned VCFG : 3;
1288 unsigned : 1;
1290 } __ADCON1bits_t;
1292 extern __at(0x009F) volatile __ADCON1bits_t ADCON1bits;
1294 #define _PCFG0 0x01
1295 #define _PCFG1 0x02
1296 #define _PCFG2 0x04
1297 #define _PCFG3 0x08
1298 #define _VCFG0 0x10
1299 #define _VCFG1 0x20
1300 #define _VCFG2 0x40
1301 #define _ADFM 0x80
1303 //==============================================================================
1306 //==============================================================================
1308 // Configuration Bits
1310 //==============================================================================
1312 #define _CONFIG 0x2007
1314 //----------------------------- CONFIG Options -------------------------------
1316 #define _FOSC_LP 0x3FFC // LP oscillator.
1317 #define _LP_OSC 0x3FFC // LP oscillator.
1318 #define _FOSC_XT 0x3FFD // XT oscillator.
1319 #define _XT_OSC 0x3FFD // XT oscillator.
1320 #define _FOSC_HS 0x3FFE // HS oscillator.
1321 #define _HS_OSC 0x3FFE // HS oscillator.
1322 #define _FOSC_RC 0x3FFF // RC oscillator.
1323 #define _RC_OSC 0x3FFF // RC oscillator.
1324 #define _WDTE_OFF 0x3FFB // WDT disabled.
1325 #define _WDT_OFF 0x3FFB // WDT disabled.
1326 #define _WDTE_ON 0x3FFF // WDT enabled.
1327 #define _WDT_ON 0x3FFF // WDT enabled.
1328 #define _PWRTE_ON 0x3FF7 // PWRT enabled.
1329 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
1330 #define _CP_ALL 0x0CCF // All memory is code protected.
1331 #define _CP_75 0x1DDF // 0400h-0FFFh code protected.
1332 #define _CP_50 0x2EEF // 0800h-0FFFh code protected.
1333 #define _CP_OFF 0x3FFF // Code protection off.
1334 #define _BOREN_OFF 0x3FBF // BOR disabled.
1335 #define _BODEN_OFF 0x3FBF // BOR disabled.
1336 #define _BOREN_ON 0x3FFF // BOR enabled.
1337 #define _BODEN_ON 0x3FFF // BOR enabled.
1338 #define _BODENV_45 0x33FF // VBOR set to 4.5V.
1339 #define _VBOR_45 0x33FF // VBOR set to 4.5V.
1340 #define _BODENV_42 0x37FF // VBOR set to 4.2V.
1341 #define _VBOR_42 0x37FF // VBOR set to 4.2V.
1342 #define _BODENV_27 0x3BFF // VBOR set to 2.7V.
1343 #define _VBOR_27 0x3BFF // VBOR set to 2.7V.
1344 #define _BODENV_25 0x3FFF // VBOR set to 2.5V.
1345 #define _VBOR_25 0x3FFF // VBOR set to 2.5V.
1347 //==============================================================================
1349 #define _IDLOC0 0x2000
1350 #define _IDLOC1 0x2001
1351 #define _IDLOC2 0x2002
1352 #define _IDLOC3 0x2003
1354 //==============================================================================
1356 #ifndef NO_BIT_DEFINES
1358 #define ADON ADCON0bits.ADON // bit 0
1359 #define CHS3 ADCON0bits.CHS3 // bit 1
1360 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 2, shadows bit in ADCON0bits
1361 #define GO ADCON0bits.GO // bit 2, shadows bit in ADCON0bits
1362 #define NOT_DONE ADCON0bits.NOT_DONE // bit 2, shadows bit in ADCON0bits
1363 #define GO_DONE ADCON0bits.GO_DONE // bit 2, shadows bit in ADCON0bits
1364 #define CHS0 ADCON0bits.CHS0 // bit 3
1365 #define CHS1 ADCON0bits.CHS1 // bit 4
1366 #define CHS2 ADCON0bits.CHS2 // bit 5
1367 #define ADCS0 ADCON0bits.ADCS0 // bit 6
1368 #define ADCS1 ADCON0bits.ADCS1 // bit 7
1370 #define PCFG0 ADCON1bits.PCFG0 // bit 0
1371 #define PCFG1 ADCON1bits.PCFG1 // bit 1
1372 #define PCFG2 ADCON1bits.PCFG2 // bit 2
1373 #define PCFG3 ADCON1bits.PCFG3 // bit 3
1374 #define VCFG0 ADCON1bits.VCFG0 // bit 4
1375 #define VCFG1 ADCON1bits.VCFG1 // bit 5
1376 #define VCFG2 ADCON1bits.VCFG2 // bit 6
1377 #define ADFM ADCON1bits.ADFM // bit 7
1379 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
1380 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
1381 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
1382 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
1383 #define DC1B0 CCP1CONbits.DC1B0 // bit 4, shadows bit in CCP1CONbits
1384 #define CCP1Y CCP1CONbits.CCP1Y // bit 4, shadows bit in CCP1CONbits
1385 #define DC1B1 CCP1CONbits.DC1B1 // bit 5, shadows bit in CCP1CONbits
1386 #define CCP1X CCP1CONbits.CCP1X // bit 5, shadows bit in CCP1CONbits
1388 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
1389 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
1390 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
1391 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
1392 #define CCP2Y CCP2CONbits.CCP2Y // bit 4
1393 #define CCP2X CCP2CONbits.CCP2X // bit 5
1395 #define RBIF INTCONbits.RBIF // bit 0
1396 #define INTF INTCONbits.INTF // bit 1
1397 #define T0IF INTCONbits.T0IF // bit 2
1398 #define RBIE INTCONbits.RBIE // bit 3
1399 #define INTE INTCONbits.INTE // bit 4
1400 #define T0IE INTCONbits.T0IE // bit 5
1401 #define PEIE INTCONbits.PEIE // bit 6
1402 #define GIE INTCONbits.GIE // bit 7
1404 #define LV0 LVDCONbits.LV0 // bit 0
1405 #define LV1 LVDCONbits.LV1 // bit 1
1406 #define LV2 LVDCONbits.LV2 // bit 2
1407 #define LV3 LVDCONbits.LV3 // bit 3
1408 #define LVDEN LVDCONbits.LVDEN // bit 4
1409 #define BGST LVDCONbits.BGST // bit 5
1411 #define PS0 OPTION_REGbits.PS0 // bit 0
1412 #define PS1 OPTION_REGbits.PS1 // bit 1
1413 #define PS2 OPTION_REGbits.PS2 // bit 2
1414 #define PSA OPTION_REGbits.PSA // bit 3
1415 #define T0SE OPTION_REGbits.T0SE // bit 4
1416 #define T0CS OPTION_REGbits.T0CS // bit 5
1417 #define INTEDG OPTION_REGbits.INTEDG // bit 6
1418 #define NOT_RBPU OPTION_REGbits.NOT_RBPU // bit 7
1420 #define NOT_BOR PCONbits.NOT_BOR // bit 0, shadows bit in PCONbits
1421 #define NOT_BO PCONbits.NOT_BO // bit 0, shadows bit in PCONbits
1422 #define NOT_POR PCONbits.NOT_POR // bit 1
1424 #define TMR1IE PIE1bits.TMR1IE // bit 0
1425 #define TMR2IE PIE1bits.TMR2IE // bit 1
1426 #define CCP1IE PIE1bits.CCP1IE // bit 2
1427 #define SSPIE PIE1bits.SSPIE // bit 3
1428 #define TXIE PIE1bits.TXIE // bit 4
1429 #define RCIE PIE1bits.RCIE // bit 5
1430 #define ADIE PIE1bits.ADIE // bit 6
1432 #define CCP2IE PIE2bits.CCP2IE // bit 0
1433 #define BCLIE PIE2bits.BCLIE // bit 3
1434 #define LVDIE PIE2bits.LVDIE // bit 7
1436 #define TMR1IF PIR1bits.TMR1IF // bit 0
1437 #define TMR2IF PIR1bits.TMR2IF // bit 1
1438 #define CCP1IF PIR1bits.CCP1IF // bit 2
1439 #define SSPIF PIR1bits.SSPIF // bit 3
1440 #define TXIF PIR1bits.TXIF // bit 4
1441 #define RCIF PIR1bits.RCIF // bit 5
1442 #define ADIF PIR1bits.ADIF // bit 6
1444 #define CCP2IF PIR2bits.CCP2IF // bit 0
1445 #define BCLIF PIR2bits.BCLIF // bit 3
1446 #define LVDIF PIR2bits.LVDIF // bit 7
1448 #define RA0 PORTAbits.RA0 // bit 0
1449 #define RA1 PORTAbits.RA1 // bit 1
1450 #define RA2 PORTAbits.RA2 // bit 2
1451 #define RA3 PORTAbits.RA3 // bit 3
1452 #define RA4 PORTAbits.RA4 // bit 4
1454 #define RB0 PORTBbits.RB0 // bit 0
1455 #define RB1 PORTBbits.RB1 // bit 1
1456 #define RB2 PORTBbits.RB2 // bit 2
1457 #define RB3 PORTBbits.RB3 // bit 3
1458 #define RB4 PORTBbits.RB4 // bit 4
1459 #define RB5 PORTBbits.RB5 // bit 5
1460 #define RB6 PORTBbits.RB6 // bit 6
1461 #define RB7 PORTBbits.RB7 // bit 7
1463 #define RC0 PORTCbits.RC0 // bit 0
1464 #define RC1 PORTCbits.RC1 // bit 1
1465 #define RC2 PORTCbits.RC2 // bit 2
1466 #define RC3 PORTCbits.RC3 // bit 3
1467 #define RC4 PORTCbits.RC4 // bit 4
1468 #define RC5 PORTCbits.RC5 // bit 5
1469 #define RC6 PORTCbits.RC6 // bit 6
1470 #define RC7 PORTCbits.RC7 // bit 7
1472 #define RX9D RCSTAbits.RX9D // bit 0, shadows bit in RCSTAbits
1473 #define RCD8 RCSTAbits.RCD8 // bit 0, shadows bit in RCSTAbits
1474 #define OERR RCSTAbits.OERR // bit 1
1475 #define FERR RCSTAbits.FERR // bit 2
1476 #define ADDEN RCSTAbits.ADDEN // bit 3
1477 #define CREN RCSTAbits.CREN // bit 4
1478 #define SREN RCSTAbits.SREN // bit 5
1479 #define RX9 RCSTAbits.RX9 // bit 6, shadows bit in RCSTAbits
1480 #define RC9 RCSTAbits.RC9 // bit 6, shadows bit in RCSTAbits
1481 #define NOT_RC8 RCSTAbits.NOT_RC8 // bit 6, shadows bit in RCSTAbits
1482 #define RC8_9 RCSTAbits.RC8_9 // bit 6, shadows bit in RCSTAbits
1483 #define SPEN RCSTAbits.SPEN // bit 7
1485 #define VRLOEN REFCONbits.VRLOEN // bit 4
1486 #define VRHOEN REFCONbits.VRHOEN // bit 5
1487 #define VRLEN REFCONbits.VRLEN // bit 6
1488 #define VRHEN REFCONbits.VRHEN // bit 7
1490 #define SSPM0 SSPCONbits.SSPM0 // bit 0
1491 #define SSPM1 SSPCONbits.SSPM1 // bit 1
1492 #define SSPM2 SSPCONbits.SSPM2 // bit 2
1493 #define SSPM3 SSPCONbits.SSPM3 // bit 3
1494 #define CKP SSPCONbits.CKP // bit 4
1495 #define SSPEN SSPCONbits.SSPEN // bit 5
1496 #define SSPOV SSPCONbits.SSPOV // bit 6
1497 #define WCOL SSPCONbits.WCOL // bit 7
1499 #define SEN SSPCON2bits.SEN // bit 0
1500 #define RSEN SSPCON2bits.RSEN // bit 1
1501 #define PEN SSPCON2bits.PEN // bit 2
1502 #define RCEN SSPCON2bits.RCEN // bit 3
1503 #define ACKEN SSPCON2bits.ACKEN // bit 4
1504 #define ACKDT SSPCON2bits.ACKDT // bit 5
1505 #define ACKSTAT SSPCON2bits.ACKSTAT // bit 6
1506 #define GCEN SSPCON2bits.GCEN // bit 7
1508 #define BF SSPSTATbits.BF // bit 0
1509 #define UA SSPSTATbits.UA // bit 1
1510 #define R_NOT_W SSPSTATbits.R_NOT_W // bit 2, shadows bit in SSPSTATbits
1511 #define R SSPSTATbits.R // bit 2, shadows bit in SSPSTATbits
1512 #define I2C_READ SSPSTATbits.I2C_READ // bit 2, shadows bit in SSPSTATbits
1513 #define R_W SSPSTATbits.R_W // bit 2, shadows bit in SSPSTATbits
1514 #define READ_WRITE SSPSTATbits.READ_WRITE // bit 2, shadows bit in SSPSTATbits
1515 #define NOT_W SSPSTATbits.NOT_W // bit 2, shadows bit in SSPSTATbits
1516 #define NOT_WRITE SSPSTATbits.NOT_WRITE // bit 2, shadows bit in SSPSTATbits
1517 #define S SSPSTATbits.S // bit 3, shadows bit in SSPSTATbits
1518 #define I2C_START SSPSTATbits.I2C_START // bit 3, shadows bit in SSPSTATbits
1519 #define P SSPSTATbits.P // bit 4, shadows bit in SSPSTATbits
1520 #define I2C_STOP SSPSTATbits.I2C_STOP // bit 4, shadows bit in SSPSTATbits
1521 #define D_NOT_A SSPSTATbits.D_NOT_A // bit 5, shadows bit in SSPSTATbits
1522 #define D SSPSTATbits.D // bit 5, shadows bit in SSPSTATbits
1523 #define I2C_DATA SSPSTATbits.I2C_DATA // bit 5, shadows bit in SSPSTATbits
1524 #define D_A SSPSTATbits.D_A // bit 5, shadows bit in SSPSTATbits
1525 #define DATA_ADDRESS SSPSTATbits.DATA_ADDRESS // bit 5, shadows bit in SSPSTATbits
1526 #define NOT_A SSPSTATbits.NOT_A // bit 5, shadows bit in SSPSTATbits
1527 #define NOT_ADDRESS SSPSTATbits.NOT_ADDRESS // bit 5, shadows bit in SSPSTATbits
1528 #define CKE SSPSTATbits.CKE // bit 6
1529 #define SMP SSPSTATbits.SMP // bit 7
1531 #define C STATUSbits.C // bit 0
1532 #define DC STATUSbits.DC // bit 1
1533 #define Z STATUSbits.Z // bit 2
1534 #define NOT_PD STATUSbits.NOT_PD // bit 3
1535 #define NOT_TO STATUSbits.NOT_TO // bit 4
1536 #define RP0 STATUSbits.RP0 // bit 5
1537 #define RP1 STATUSbits.RP1 // bit 6
1538 #define IRP STATUSbits.IRP // bit 7
1540 #define TMR1ON T1CONbits.TMR1ON // bit 0
1541 #define TMR1CS T1CONbits.TMR1CS // bit 1
1542 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2, shadows bit in T1CONbits
1543 #define T1SYNC T1CONbits.T1SYNC // bit 2, shadows bit in T1CONbits
1544 #define T1INSYNC T1CONbits.T1INSYNC // bit 2, shadows bit in T1CONbits
1545 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
1546 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
1547 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
1549 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
1550 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
1551 #define TMR2ON T2CONbits.TMR2ON // bit 2
1552 #define TOUTPS0 T2CONbits.TOUTPS0 // bit 3
1553 #define TOUTPS1 T2CONbits.TOUTPS1 // bit 4
1554 #define TOUTPS2 T2CONbits.TOUTPS2 // bit 5
1555 #define TOUTPS3 T2CONbits.TOUTPS3 // bit 6
1557 #define TRISA0 TRISAbits.TRISA0 // bit 0
1558 #define TRISA1 TRISAbits.TRISA1 // bit 1
1559 #define TRISA2 TRISAbits.TRISA2 // bit 2
1560 #define TRISA3 TRISAbits.TRISA3 // bit 3
1561 #define TRISA4 TRISAbits.TRISA4 // bit 4
1563 #define TRISB0 TRISBbits.TRISB0 // bit 0
1564 #define TRISB1 TRISBbits.TRISB1 // bit 1
1565 #define TRISB2 TRISBbits.TRISB2 // bit 2
1566 #define TRISB3 TRISBbits.TRISB3 // bit 3
1567 #define TRISB4 TRISBbits.TRISB4 // bit 4
1568 #define TRISB5 TRISBbits.TRISB5 // bit 5
1569 #define TRISB6 TRISBbits.TRISB6 // bit 6
1570 #define TRISB7 TRISBbits.TRISB7 // bit 7
1572 #define TRISC0 TRISCbits.TRISC0 // bit 0
1573 #define TRISC1 TRISCbits.TRISC1 // bit 1
1574 #define TRISC2 TRISCbits.TRISC2 // bit 2
1575 #define TRISC3 TRISCbits.TRISC3 // bit 3
1576 #define TRISC4 TRISCbits.TRISC4 // bit 4
1577 #define TRISC5 TRISCbits.TRISC5 // bit 5
1578 #define TRISC6 TRISCbits.TRISC6 // bit 6
1579 #define TRISC7 TRISCbits.TRISC7 // bit 7
1581 #define TX9D TXSTAbits.TX9D // bit 0, shadows bit in TXSTAbits
1582 #define TXD8 TXSTAbits.TXD8 // bit 0, shadows bit in TXSTAbits
1583 #define TRMT TXSTAbits.TRMT // bit 1
1584 #define BRGH TXSTAbits.BRGH // bit 2
1585 #define SYNC TXSTAbits.SYNC // bit 4
1586 #define TXEN TXSTAbits.TXEN // bit 5
1587 #define TX9 TXSTAbits.TX9 // bit 6, shadows bit in TXSTAbits
1588 #define NOT_TX8 TXSTAbits.NOT_TX8 // bit 6, shadows bit in TXSTAbits
1589 #define TX8_9 TXSTAbits.TX8_9 // bit 6, shadows bit in TXSTAbits
1590 #define CSRC TXSTAbits.CSRC // bit 7
1592 #endif // #ifndef NO_BIT_DEFINES
1594 #endif // #ifndef __PIC16C773_H__