struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / device / non-free / include / pic14 / pic16f74.h
blob3a06549650867b93da1020f7a5f7a2cea6ebdbb6
1 /*
2 * This declarations of the PIC16F74 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:55 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 __PIC16F74_H__
26 #define __PIC16F74_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 PORTD_ADDR 0x0008
45 #define PORTE_ADDR 0x0009
46 #define PCLATH_ADDR 0x000A
47 #define INTCON_ADDR 0x000B
48 #define PIR1_ADDR 0x000C
49 #define PIR2_ADDR 0x000D
50 #define TMR1_ADDR 0x000E
51 #define TMR1L_ADDR 0x000E
52 #define TMR1H_ADDR 0x000F
53 #define T1CON_ADDR 0x0010
54 #define TMR2_ADDR 0x0011
55 #define T2CON_ADDR 0x0012
56 #define SSPBUF_ADDR 0x0013
57 #define SSPCON_ADDR 0x0014
58 #define CCPR1_ADDR 0x0015
59 #define CCPR1L_ADDR 0x0015
60 #define CCPR1H_ADDR 0x0016
61 #define CCP1CON_ADDR 0x0017
62 #define RCSTA_ADDR 0x0018
63 #define TXREG_ADDR 0x0019
64 #define RCREG_ADDR 0x001A
65 #define CCPR2_ADDR 0x001B
66 #define CCPR2L_ADDR 0x001B
67 #define CCPR2H_ADDR 0x001C
68 #define CCP2CON_ADDR 0x001D
69 #define ADRES_ADDR 0x001E
70 #define ADCON0_ADDR 0x001F
71 #define OPTION_REG_ADDR 0x0081
72 #define TRISA_ADDR 0x0085
73 #define TRISB_ADDR 0x0086
74 #define TRISC_ADDR 0x0087
75 #define TRISD_ADDR 0x0088
76 #define TRISE_ADDR 0x0089
77 #define PIE1_ADDR 0x008C
78 #define PIE2_ADDR 0x008D
79 #define PCON_ADDR 0x008E
80 #define PR2_ADDR 0x0092
81 #define SSPADD_ADDR 0x0093
82 #define SSPSTAT_ADDR 0x0094
83 #define TXSTA_ADDR 0x0098
84 #define SPBRG_ADDR 0x0099
85 #define ADCON1_ADDR 0x009F
86 #define PMDATA_ADDR 0x010C
87 #define PMADR_ADDR 0x010D
88 #define PMDATH_ADDR 0x010E
89 #define PMADRH_ADDR 0x010F
90 #define PMCON1_ADDR 0x018C
92 #endif // #ifndef NO_ADDR_DEFINES
94 //==============================================================================
96 // Register Definitions
98 //==============================================================================
100 extern __at(0x0000) __sfr INDF;
101 extern __at(0x0001) __sfr TMR0;
102 extern __at(0x0002) __sfr PCL;
104 //==============================================================================
105 // STATUS Bits
107 extern __at(0x0003) __sfr STATUS;
109 typedef union
111 struct
113 unsigned C : 1;
114 unsigned DC : 1;
115 unsigned Z : 1;
116 unsigned NOT_PD : 1;
117 unsigned NOT_TO : 1;
118 unsigned RP0 : 1;
119 unsigned RP1 : 1;
120 unsigned IRP : 1;
123 struct
125 unsigned : 5;
126 unsigned RP : 2;
127 unsigned : 1;
129 } __STATUSbits_t;
131 extern __at(0x0003) volatile __STATUSbits_t STATUSbits;
133 #define _C 0x01
134 #define _DC 0x02
135 #define _Z 0x04
136 #define _NOT_PD 0x08
137 #define _NOT_TO 0x10
138 #define _RP0 0x20
139 #define _RP1 0x40
140 #define _IRP 0x80
142 //==============================================================================
144 extern __at(0x0004) __sfr FSR;
146 //==============================================================================
147 // PORTA Bits
149 extern __at(0x0005) __sfr PORTA;
151 typedef union
153 struct
155 unsigned RA0 : 1;
156 unsigned RA1 : 1;
157 unsigned RA2 : 1;
158 unsigned RA3 : 1;
159 unsigned RA4 : 1;
160 unsigned RA5 : 1;
161 unsigned : 1;
162 unsigned : 1;
165 struct
167 unsigned RA : 6;
168 unsigned : 2;
170 } __PORTAbits_t;
172 extern __at(0x0005) volatile __PORTAbits_t PORTAbits;
174 #define _RA0 0x01
175 #define _RA1 0x02
176 #define _RA2 0x04
177 #define _RA3 0x08
178 #define _RA4 0x10
179 #define _RA5 0x20
181 //==============================================================================
184 //==============================================================================
185 // PORTB Bits
187 extern __at(0x0006) __sfr PORTB;
189 typedef struct
191 unsigned RB0 : 1;
192 unsigned RB1 : 1;
193 unsigned RB2 : 1;
194 unsigned RB3 : 1;
195 unsigned RB4 : 1;
196 unsigned RB5 : 1;
197 unsigned RB6 : 1;
198 unsigned RB7 : 1;
199 } __PORTBbits_t;
201 extern __at(0x0006) volatile __PORTBbits_t PORTBbits;
203 #define _RB0 0x01
204 #define _RB1 0x02
205 #define _RB2 0x04
206 #define _RB3 0x08
207 #define _RB4 0x10
208 #define _RB5 0x20
209 #define _RB6 0x40
210 #define _RB7 0x80
212 //==============================================================================
215 //==============================================================================
216 // PORTC Bits
218 extern __at(0x0007) __sfr PORTC;
220 typedef struct
222 unsigned RC0 : 1;
223 unsigned RC1 : 1;
224 unsigned RC2 : 1;
225 unsigned RC3 : 1;
226 unsigned RC4 : 1;
227 unsigned RC5 : 1;
228 unsigned RC6 : 1;
229 unsigned RC7 : 1;
230 } __PORTCbits_t;
232 extern __at(0x0007) volatile __PORTCbits_t PORTCbits;
234 #define _RC0 0x01
235 #define _RC1 0x02
236 #define _RC2 0x04
237 #define _RC3 0x08
238 #define _RC4 0x10
239 #define _RC5 0x20
240 #define _RC6 0x40
241 #define _RC7 0x80
243 //==============================================================================
246 //==============================================================================
247 // PORTD Bits
249 extern __at(0x0008) __sfr PORTD;
251 typedef struct
253 unsigned RD0 : 1;
254 unsigned RD1 : 1;
255 unsigned RD2 : 1;
256 unsigned RD3 : 1;
257 unsigned RD4 : 1;
258 unsigned RD5 : 1;
259 unsigned RD6 : 1;
260 unsigned RD7 : 1;
261 } __PORTDbits_t;
263 extern __at(0x0008) volatile __PORTDbits_t PORTDbits;
265 #define _RD0 0x01
266 #define _RD1 0x02
267 #define _RD2 0x04
268 #define _RD3 0x08
269 #define _RD4 0x10
270 #define _RD5 0x20
271 #define _RD6 0x40
272 #define _RD7 0x80
274 //==============================================================================
277 //==============================================================================
278 // PORTE Bits
280 extern __at(0x0009) __sfr PORTE;
282 typedef union
284 struct
286 unsigned RE0 : 1;
287 unsigned RE1 : 1;
288 unsigned RE2 : 1;
289 unsigned : 1;
290 unsigned : 1;
291 unsigned : 1;
292 unsigned : 1;
293 unsigned : 1;
296 struct
298 unsigned RE : 3;
299 unsigned : 5;
301 } __PORTEbits_t;
303 extern __at(0x0009) volatile __PORTEbits_t PORTEbits;
305 #define _RE0 0x01
306 #define _RE1 0x02
307 #define _RE2 0x04
309 //==============================================================================
311 extern __at(0x000A) __sfr PCLATH;
313 //==============================================================================
314 // INTCON Bits
316 extern __at(0x000B) __sfr INTCON;
318 typedef union
320 struct
322 unsigned RBIF : 1;
323 unsigned INTF : 1;
324 unsigned TMR0IF : 1;
325 unsigned RBIE : 1;
326 unsigned INTE : 1;
327 unsigned TMR0IE : 1;
328 unsigned PEIE : 1;
329 unsigned GIE : 1;
332 struct
334 unsigned : 1;
335 unsigned : 1;
336 unsigned T0IF : 1;
337 unsigned : 1;
338 unsigned : 1;
339 unsigned T0IE : 1;
340 unsigned : 1;
341 unsigned : 1;
343 } __INTCONbits_t;
345 extern __at(0x000B) volatile __INTCONbits_t INTCONbits;
347 #define _RBIF 0x01
348 #define _INTF 0x02
349 #define _TMR0IF 0x04
350 #define _T0IF 0x04
351 #define _RBIE 0x08
352 #define _INTE 0x10
353 #define _TMR0IE 0x20
354 #define _T0IE 0x20
355 #define _PEIE 0x40
356 #define _GIE 0x80
358 //==============================================================================
361 //==============================================================================
362 // PIR1 Bits
364 extern __at(0x000C) __sfr PIR1;
366 typedef struct
368 unsigned TMR1IF : 1;
369 unsigned TMR2IF : 1;
370 unsigned CCP1IF : 1;
371 unsigned SSPIF : 1;
372 unsigned TXIF : 1;
373 unsigned RCIF : 1;
374 unsigned ADIF : 1;
375 unsigned PSPIF : 1;
376 } __PIR1bits_t;
378 extern __at(0x000C) volatile __PIR1bits_t PIR1bits;
380 #define _TMR1IF 0x01
381 #define _TMR2IF 0x02
382 #define _CCP1IF 0x04
383 #define _SSPIF 0x08
384 #define _TXIF 0x10
385 #define _RCIF 0x20
386 #define _ADIF 0x40
387 #define _PSPIF 0x80
389 //==============================================================================
392 //==============================================================================
393 // PIR2 Bits
395 extern __at(0x000D) __sfr PIR2;
397 typedef struct
399 unsigned CCP2IF : 1;
400 unsigned : 1;
401 unsigned : 1;
402 unsigned : 1;
403 unsigned : 1;
404 unsigned : 1;
405 unsigned : 1;
406 unsigned : 1;
407 } __PIR2bits_t;
409 extern __at(0x000D) volatile __PIR2bits_t PIR2bits;
411 #define _CCP2IF 0x01
413 //==============================================================================
415 extern __at(0x000E) __sfr TMR1;
416 extern __at(0x000E) __sfr TMR1L;
417 extern __at(0x000F) __sfr TMR1H;
419 //==============================================================================
420 // T1CON Bits
422 extern __at(0x0010) __sfr T1CON;
424 typedef union
426 struct
428 unsigned TMR1ON : 1;
429 unsigned TMR1CS : 1;
430 unsigned NOT_T1SYNC : 1;
431 unsigned T1OSCEN : 1;
432 unsigned T1CKPS0 : 1;
433 unsigned T1CKPS1 : 1;
434 unsigned : 1;
435 unsigned : 1;
438 struct
440 unsigned : 1;
441 unsigned : 1;
442 unsigned T1INSYNC : 1;
443 unsigned : 1;
444 unsigned : 1;
445 unsigned : 1;
446 unsigned : 1;
447 unsigned : 1;
450 struct
452 unsigned : 4;
453 unsigned T1CKPS : 2;
454 unsigned : 2;
456 } __T1CONbits_t;
458 extern __at(0x0010) volatile __T1CONbits_t T1CONbits;
460 #define _TMR1ON 0x01
461 #define _TMR1CS 0x02
462 #define _NOT_T1SYNC 0x04
463 #define _T1INSYNC 0x04
464 #define _T1OSCEN 0x08
465 #define _T1CKPS0 0x10
466 #define _T1CKPS1 0x20
468 //==============================================================================
470 extern __at(0x0011) __sfr TMR2;
472 //==============================================================================
473 // T2CON Bits
475 extern __at(0x0012) __sfr T2CON;
477 typedef union
479 struct
481 unsigned T2CKPS0 : 1;
482 unsigned T2CKPS1 : 1;
483 unsigned TMR2ON : 1;
484 unsigned TOUTPS0 : 1;
485 unsigned TOUTPS1 : 1;
486 unsigned TOUTPS2 : 1;
487 unsigned TOUTPS3 : 1;
488 unsigned : 1;
491 struct
493 unsigned T2CKPS : 2;
494 unsigned : 6;
497 struct
499 unsigned : 3;
500 unsigned TOUTPS : 4;
501 unsigned : 1;
503 } __T2CONbits_t;
505 extern __at(0x0012) volatile __T2CONbits_t T2CONbits;
507 #define _T2CKPS0 0x01
508 #define _T2CKPS1 0x02
509 #define _TMR2ON 0x04
510 #define _TOUTPS0 0x08
511 #define _TOUTPS1 0x10
512 #define _TOUTPS2 0x20
513 #define _TOUTPS3 0x40
515 //==============================================================================
517 extern __at(0x0013) __sfr SSPBUF;
519 //==============================================================================
520 // SSPCON Bits
522 extern __at(0x0014) __sfr SSPCON;
524 typedef union
526 struct
528 unsigned SSPM0 : 1;
529 unsigned SSPM1 : 1;
530 unsigned SSPM2 : 1;
531 unsigned SSPM3 : 1;
532 unsigned CKP : 1;
533 unsigned SSPEN : 1;
534 unsigned SSPOV : 1;
535 unsigned WCOL : 1;
538 struct
540 unsigned SSPM : 4;
541 unsigned : 4;
543 } __SSPCONbits_t;
545 extern __at(0x0014) volatile __SSPCONbits_t SSPCONbits;
547 #define _SSPM0 0x01
548 #define _SSPM1 0x02
549 #define _SSPM2 0x04
550 #define _SSPM3 0x08
551 #define _CKP 0x10
552 #define _SSPEN 0x20
553 #define _SSPOV 0x40
554 #define _WCOL 0x80
556 //==============================================================================
558 extern __at(0x0015) __sfr CCPR1;
559 extern __at(0x0015) __sfr CCPR1L;
560 extern __at(0x0016) __sfr CCPR1H;
562 //==============================================================================
563 // CCP1CON Bits
565 extern __at(0x0017) __sfr CCP1CON;
567 typedef union
569 struct
571 unsigned CCP1M0 : 1;
572 unsigned CCP1M1 : 1;
573 unsigned CCP1M2 : 1;
574 unsigned CCP1M3 : 1;
575 unsigned CCP1Y : 1;
576 unsigned CCP1X : 1;
577 unsigned : 1;
578 unsigned : 1;
581 struct
583 unsigned CCP1M : 4;
584 unsigned : 4;
586 } __CCP1CONbits_t;
588 extern __at(0x0017) volatile __CCP1CONbits_t CCP1CONbits;
590 #define _CCP1M0 0x01
591 #define _CCP1M1 0x02
592 #define _CCP1M2 0x04
593 #define _CCP1M3 0x08
594 #define _CCP1Y 0x10
595 #define _CCP1X 0x20
597 //==============================================================================
600 //==============================================================================
601 // RCSTA Bits
603 extern __at(0x0018) __sfr RCSTA;
605 typedef union
607 struct
609 unsigned RX9D : 1;
610 unsigned OERR : 1;
611 unsigned FERR : 1;
612 unsigned : 1;
613 unsigned CREN : 1;
614 unsigned SREN : 1;
615 unsigned RX9 : 1;
616 unsigned SPEN : 1;
619 struct
621 unsigned RCD8 : 1;
622 unsigned : 1;
623 unsigned : 1;
624 unsigned : 1;
625 unsigned : 1;
626 unsigned : 1;
627 unsigned RC9 : 1;
628 unsigned : 1;
631 struct
633 unsigned : 1;
634 unsigned : 1;
635 unsigned : 1;
636 unsigned : 1;
637 unsigned : 1;
638 unsigned : 1;
639 unsigned NOT_RC8 : 1;
640 unsigned : 1;
643 struct
645 unsigned : 1;
646 unsigned : 1;
647 unsigned : 1;
648 unsigned : 1;
649 unsigned : 1;
650 unsigned : 1;
651 unsigned RC8_9 : 1;
652 unsigned : 1;
654 } __RCSTAbits_t;
656 extern __at(0x0018) volatile __RCSTAbits_t RCSTAbits;
658 #define _RX9D 0x01
659 #define _RCD8 0x01
660 #define _OERR 0x02
661 #define _FERR 0x04
662 #define _CREN 0x10
663 #define _SREN 0x20
664 #define _RX9 0x40
665 #define _RC9 0x40
666 #define _NOT_RC8 0x40
667 #define _RC8_9 0x40
668 #define _SPEN 0x80
670 //==============================================================================
672 extern __at(0x0019) __sfr TXREG;
673 extern __at(0x001A) __sfr RCREG;
674 extern __at(0x001B) __sfr CCPR2;
675 extern __at(0x001B) __sfr CCPR2L;
676 extern __at(0x001C) __sfr CCPR2H;
678 //==============================================================================
679 // CCP2CON Bits
681 extern __at(0x001D) __sfr CCP2CON;
683 typedef union
685 struct
687 unsigned CCP2M0 : 1;
688 unsigned CCP2M1 : 1;
689 unsigned CCP2M2 : 1;
690 unsigned CCP2M3 : 1;
691 unsigned CCP2Y : 1;
692 unsigned CCP2X : 1;
693 unsigned : 1;
694 unsigned : 1;
697 struct
699 unsigned CCP2M : 4;
700 unsigned : 4;
702 } __CCP2CONbits_t;
704 extern __at(0x001D) volatile __CCP2CONbits_t CCP2CONbits;
706 #define _CCP2M0 0x01
707 #define _CCP2M1 0x02
708 #define _CCP2M2 0x04
709 #define _CCP2M3 0x08
710 #define _CCP2Y 0x10
711 #define _CCP2X 0x20
713 //==============================================================================
715 extern __at(0x001E) __sfr ADRES;
717 //==============================================================================
718 // ADCON0 Bits
720 extern __at(0x001F) __sfr ADCON0;
722 typedef union
724 struct
726 unsigned ADON : 1;
727 unsigned : 1;
728 unsigned GO_NOT_DONE : 1;
729 unsigned CHS0 : 1;
730 unsigned CHS1 : 1;
731 unsigned CHS2 : 1;
732 unsigned ADCS0 : 1;
733 unsigned ADCS1 : 1;
736 struct
738 unsigned : 1;
739 unsigned : 1;
740 unsigned GO : 1;
741 unsigned : 1;
742 unsigned : 1;
743 unsigned : 1;
744 unsigned : 1;
745 unsigned : 1;
748 struct
750 unsigned : 1;
751 unsigned : 1;
752 unsigned NOT_DONE : 1;
753 unsigned : 1;
754 unsigned : 1;
755 unsigned : 1;
756 unsigned : 1;
757 unsigned : 1;
760 struct
762 unsigned : 1;
763 unsigned : 1;
764 unsigned GO_DONE : 1;
765 unsigned : 1;
766 unsigned : 1;
767 unsigned : 1;
768 unsigned : 1;
769 unsigned : 1;
772 struct
774 unsigned : 3;
775 unsigned CHS : 3;
776 unsigned : 2;
779 struct
781 unsigned : 6;
782 unsigned ADCS : 2;
784 } __ADCON0bits_t;
786 extern __at(0x001F) volatile __ADCON0bits_t ADCON0bits;
788 #define _ADON 0x01
789 #define _GO_NOT_DONE 0x04
790 #define _GO 0x04
791 #define _NOT_DONE 0x04
792 #define _GO_DONE 0x04
793 #define _CHS0 0x08
794 #define _CHS1 0x10
795 #define _CHS2 0x20
796 #define _ADCS0 0x40
797 #define _ADCS1 0x80
799 //==============================================================================
802 //==============================================================================
803 // OPTION_REG Bits
805 extern __at(0x0081) __sfr OPTION_REG;
807 typedef union
809 struct
811 unsigned PS0 : 1;
812 unsigned PS1 : 1;
813 unsigned PS2 : 1;
814 unsigned PSA : 1;
815 unsigned T0SE : 1;
816 unsigned T0CS : 1;
817 unsigned INTEDG : 1;
818 unsigned NOT_RBPU : 1;
821 struct
823 unsigned PS : 3;
824 unsigned : 5;
826 } __OPTION_REGbits_t;
828 extern __at(0x0081) volatile __OPTION_REGbits_t OPTION_REGbits;
830 #define _PS0 0x01
831 #define _PS1 0x02
832 #define _PS2 0x04
833 #define _PSA 0x08
834 #define _T0SE 0x10
835 #define _T0CS 0x20
836 #define _INTEDG 0x40
837 #define _NOT_RBPU 0x80
839 //==============================================================================
842 //==============================================================================
843 // TRISA Bits
845 extern __at(0x0085) __sfr TRISA;
847 typedef union
849 struct
851 unsigned TRISA0 : 1;
852 unsigned TRISA1 : 1;
853 unsigned TRISA2 : 1;
854 unsigned TRISA3 : 1;
855 unsigned TRISA4 : 1;
856 unsigned TRISA5 : 1;
857 unsigned : 1;
858 unsigned : 1;
861 struct
863 unsigned TRISA : 6;
864 unsigned : 2;
866 } __TRISAbits_t;
868 extern __at(0x0085) volatile __TRISAbits_t TRISAbits;
870 #define _TRISA0 0x01
871 #define _TRISA1 0x02
872 #define _TRISA2 0x04
873 #define _TRISA3 0x08
874 #define _TRISA4 0x10
875 #define _TRISA5 0x20
877 //==============================================================================
880 //==============================================================================
881 // TRISB Bits
883 extern __at(0x0086) __sfr TRISB;
885 typedef struct
887 unsigned TRISB0 : 1;
888 unsigned TRISB1 : 1;
889 unsigned TRISB2 : 1;
890 unsigned TRISB3 : 1;
891 unsigned TRISB4 : 1;
892 unsigned TRISB5 : 1;
893 unsigned TRISB6 : 1;
894 unsigned TRISB7 : 1;
895 } __TRISBbits_t;
897 extern __at(0x0086) volatile __TRISBbits_t TRISBbits;
899 #define _TRISB0 0x01
900 #define _TRISB1 0x02
901 #define _TRISB2 0x04
902 #define _TRISB3 0x08
903 #define _TRISB4 0x10
904 #define _TRISB5 0x20
905 #define _TRISB6 0x40
906 #define _TRISB7 0x80
908 //==============================================================================
911 //==============================================================================
912 // TRISC Bits
914 extern __at(0x0087) __sfr TRISC;
916 typedef struct
918 unsigned TRISC0 : 1;
919 unsigned TRISC1 : 1;
920 unsigned TRISC2 : 1;
921 unsigned TRISC3 : 1;
922 unsigned TRISC4 : 1;
923 unsigned TRISC5 : 1;
924 unsigned TRISC6 : 1;
925 unsigned TRISC7 : 1;
926 } __TRISCbits_t;
928 extern __at(0x0087) volatile __TRISCbits_t TRISCbits;
930 #define _TRISC0 0x01
931 #define _TRISC1 0x02
932 #define _TRISC2 0x04
933 #define _TRISC3 0x08
934 #define _TRISC4 0x10
935 #define _TRISC5 0x20
936 #define _TRISC6 0x40
937 #define _TRISC7 0x80
939 //==============================================================================
942 //==============================================================================
943 // TRISD Bits
945 extern __at(0x0088) __sfr TRISD;
947 typedef struct
949 unsigned TRISD0 : 1;
950 unsigned TRISD1 : 1;
951 unsigned TRISD2 : 1;
952 unsigned TRISD3 : 1;
953 unsigned TRISD4 : 1;
954 unsigned TRISD5 : 1;
955 unsigned TRISD6 : 1;
956 unsigned TRISD7 : 1;
957 } __TRISDbits_t;
959 extern __at(0x0088) volatile __TRISDbits_t TRISDbits;
961 #define _TRISD0 0x01
962 #define _TRISD1 0x02
963 #define _TRISD2 0x04
964 #define _TRISD3 0x08
965 #define _TRISD4 0x10
966 #define _TRISD5 0x20
967 #define _TRISD6 0x40
968 #define _TRISD7 0x80
970 //==============================================================================
973 //==============================================================================
974 // TRISE Bits
976 extern __at(0x0089) __sfr TRISE;
978 typedef union
980 struct
982 unsigned TRISE0 : 1;
983 unsigned TRISE1 : 1;
984 unsigned TRISE2 : 1;
985 unsigned : 1;
986 unsigned PSPMODE : 1;
987 unsigned IBOV : 1;
988 unsigned OBF : 1;
989 unsigned IBF : 1;
992 struct
994 unsigned TRISE : 3;
995 unsigned : 5;
997 } __TRISEbits_t;
999 extern __at(0x0089) volatile __TRISEbits_t TRISEbits;
1001 #define _TRISE0 0x01
1002 #define _TRISE1 0x02
1003 #define _TRISE2 0x04
1004 #define _PSPMODE 0x10
1005 #define _IBOV 0x20
1006 #define _OBF 0x40
1007 #define _IBF 0x80
1009 //==============================================================================
1012 //==============================================================================
1013 // PIE1 Bits
1015 extern __at(0x008C) __sfr PIE1;
1017 typedef struct
1019 unsigned TMR1IE : 1;
1020 unsigned TMR2IE : 1;
1021 unsigned CCP1IE : 1;
1022 unsigned SSPIE : 1;
1023 unsigned TXIE : 1;
1024 unsigned RCIE : 1;
1025 unsigned ADIE : 1;
1026 unsigned PSPIE : 1;
1027 } __PIE1bits_t;
1029 extern __at(0x008C) volatile __PIE1bits_t PIE1bits;
1031 #define _TMR1IE 0x01
1032 #define _TMR2IE 0x02
1033 #define _CCP1IE 0x04
1034 #define _SSPIE 0x08
1035 #define _TXIE 0x10
1036 #define _RCIE 0x20
1037 #define _ADIE 0x40
1038 #define _PSPIE 0x80
1040 //==============================================================================
1043 //==============================================================================
1044 // PIE2 Bits
1046 extern __at(0x008D) __sfr PIE2;
1048 typedef struct
1050 unsigned CCP2IE : 1;
1051 unsigned : 1;
1052 unsigned : 1;
1053 unsigned : 1;
1054 unsigned : 1;
1055 unsigned : 1;
1056 unsigned : 1;
1057 unsigned : 1;
1058 } __PIE2bits_t;
1060 extern __at(0x008D) volatile __PIE2bits_t PIE2bits;
1062 #define _CCP2IE 0x01
1064 //==============================================================================
1067 //==============================================================================
1068 // PCON Bits
1070 extern __at(0x008E) __sfr PCON;
1072 typedef union
1074 struct
1076 unsigned NOT_BOR : 1;
1077 unsigned NOT_POR : 1;
1078 unsigned : 1;
1079 unsigned : 1;
1080 unsigned : 1;
1081 unsigned : 1;
1082 unsigned : 1;
1083 unsigned : 1;
1086 struct
1088 unsigned NOT_BO : 1;
1089 unsigned : 1;
1090 unsigned : 1;
1091 unsigned : 1;
1092 unsigned : 1;
1093 unsigned : 1;
1094 unsigned : 1;
1095 unsigned : 1;
1097 } __PCONbits_t;
1099 extern __at(0x008E) volatile __PCONbits_t PCONbits;
1101 #define _NOT_BOR 0x01
1102 #define _NOT_BO 0x01
1103 #define _NOT_POR 0x02
1105 //==============================================================================
1107 extern __at(0x0092) __sfr PR2;
1108 extern __at(0x0093) __sfr SSPADD;
1110 //==============================================================================
1111 // SSPSTAT Bits
1113 extern __at(0x0094) __sfr SSPSTAT;
1115 typedef union
1117 struct
1119 unsigned BF : 1;
1120 unsigned UA : 1;
1121 unsigned R_NOT_W : 1;
1122 unsigned S : 1;
1123 unsigned P : 1;
1124 unsigned D_NOT_A : 1;
1125 unsigned CKE : 1;
1126 unsigned SMP : 1;
1129 struct
1131 unsigned : 1;
1132 unsigned : 1;
1133 unsigned R : 1;
1134 unsigned I2C_START : 1;
1135 unsigned I2C_STOP : 1;
1136 unsigned D : 1;
1137 unsigned : 1;
1138 unsigned : 1;
1141 struct
1143 unsigned : 1;
1144 unsigned : 1;
1145 unsigned I2C_READ : 1;
1146 unsigned : 1;
1147 unsigned : 1;
1148 unsigned I2C_DATA : 1;
1149 unsigned : 1;
1150 unsigned : 1;
1153 struct
1155 unsigned : 1;
1156 unsigned : 1;
1157 unsigned NOT_W : 1;
1158 unsigned : 1;
1159 unsigned : 1;
1160 unsigned NOT_A : 1;
1161 unsigned : 1;
1162 unsigned : 1;
1165 struct
1167 unsigned : 1;
1168 unsigned : 1;
1169 unsigned NOT_WRITE : 1;
1170 unsigned : 1;
1171 unsigned : 1;
1172 unsigned NOT_ADDRESS : 1;
1173 unsigned : 1;
1174 unsigned : 1;
1177 struct
1179 unsigned : 1;
1180 unsigned : 1;
1181 unsigned R_W : 1;
1182 unsigned : 1;
1183 unsigned : 1;
1184 unsigned D_A : 1;
1185 unsigned : 1;
1186 unsigned : 1;
1189 struct
1191 unsigned : 1;
1192 unsigned : 1;
1193 unsigned READ_WRITE : 1;
1194 unsigned : 1;
1195 unsigned : 1;
1196 unsigned DATA_ADDRESS : 1;
1197 unsigned : 1;
1198 unsigned : 1;
1200 } __SSPSTATbits_t;
1202 extern __at(0x0094) volatile __SSPSTATbits_t SSPSTATbits;
1204 #define _BF 0x01
1205 #define _UA 0x02
1206 #define _R_NOT_W 0x04
1207 #define _R 0x04
1208 #define _I2C_READ 0x04
1209 #define _NOT_W 0x04
1210 #define _NOT_WRITE 0x04
1211 #define _R_W 0x04
1212 #define _READ_WRITE 0x04
1213 #define _S 0x08
1214 #define _I2C_START 0x08
1215 #define _P 0x10
1216 #define _I2C_STOP 0x10
1217 #define _D_NOT_A 0x20
1218 #define _D 0x20
1219 #define _I2C_DATA 0x20
1220 #define _NOT_A 0x20
1221 #define _NOT_ADDRESS 0x20
1222 #define _D_A 0x20
1223 #define _DATA_ADDRESS 0x20
1224 #define _CKE 0x40
1225 #define _SMP 0x80
1227 //==============================================================================
1230 //==============================================================================
1231 // TXSTA Bits
1233 extern __at(0x0098) __sfr TXSTA;
1235 typedef union
1237 struct
1239 unsigned TX9D : 1;
1240 unsigned TRMT : 1;
1241 unsigned BRGH : 1;
1242 unsigned : 1;
1243 unsigned SYNC : 1;
1244 unsigned TXEN : 1;
1245 unsigned TX9 : 1;
1246 unsigned CSRC : 1;
1249 struct
1251 unsigned TXD8 : 1;
1252 unsigned : 1;
1253 unsigned : 1;
1254 unsigned : 1;
1255 unsigned : 1;
1256 unsigned : 1;
1257 unsigned NOT_TX8 : 1;
1258 unsigned : 1;
1261 struct
1263 unsigned : 1;
1264 unsigned : 1;
1265 unsigned : 1;
1266 unsigned : 1;
1267 unsigned : 1;
1268 unsigned : 1;
1269 unsigned TX8_9 : 1;
1270 unsigned : 1;
1272 } __TXSTAbits_t;
1274 extern __at(0x0098) volatile __TXSTAbits_t TXSTAbits;
1276 #define _TX9D 0x01
1277 #define _TXD8 0x01
1278 #define _TRMT 0x02
1279 #define _BRGH 0x04
1280 #define _SYNC 0x10
1281 #define _TXEN 0x20
1282 #define _TX9 0x40
1283 #define _NOT_TX8 0x40
1284 #define _TX8_9 0x40
1285 #define _CSRC 0x80
1287 //==============================================================================
1289 extern __at(0x0099) __sfr SPBRG;
1291 //==============================================================================
1292 // ADCON1 Bits
1294 extern __at(0x009F) __sfr ADCON1;
1296 typedef union
1298 struct
1300 unsigned PCFG0 : 1;
1301 unsigned PCFG1 : 1;
1302 unsigned PCFG2 : 1;
1303 unsigned : 1;
1304 unsigned : 1;
1305 unsigned : 1;
1306 unsigned : 1;
1307 unsigned : 1;
1310 struct
1312 unsigned PCFG : 3;
1313 unsigned : 5;
1315 } __ADCON1bits_t;
1317 extern __at(0x009F) volatile __ADCON1bits_t ADCON1bits;
1319 #define _PCFG0 0x01
1320 #define _PCFG1 0x02
1321 #define _PCFG2 0x04
1323 //==============================================================================
1325 extern __at(0x010C) __sfr PMDATA;
1326 extern __at(0x010D) __sfr PMADR;
1327 extern __at(0x010E) __sfr PMDATH;
1328 extern __at(0x010F) __sfr PMADRH;
1330 //==============================================================================
1331 // PMCON1 Bits
1333 extern __at(0x018C) __sfr PMCON1;
1335 typedef struct
1337 unsigned RD : 1;
1338 unsigned : 1;
1339 unsigned : 1;
1340 unsigned : 1;
1341 unsigned : 1;
1342 unsigned : 1;
1343 unsigned : 1;
1344 unsigned : 1;
1345 } __PMCON1bits_t;
1347 extern __at(0x018C) volatile __PMCON1bits_t PMCON1bits;
1349 #define _RD 0x01
1351 //==============================================================================
1354 //==============================================================================
1356 // Configuration Bits
1358 //==============================================================================
1360 #define _CONFIG 0x2007
1362 //----------------------------- CONFIG Options -------------------------------
1364 #define _FOSC_LP 0x3FFC // LP oscillator.
1365 #define _LP_OSC 0x3FFC // LP oscillator.
1366 #define _FOSC_XT 0x3FFD // XT oscillator.
1367 #define _XT_OSC 0x3FFD // XT oscillator.
1368 #define _FOSC_HS 0x3FFE // HS oscillator.
1369 #define _HS_OSC 0x3FFE // HS oscillator.
1370 #define _FOSC_RC 0x3FFF // RC oscillator.
1371 #define _RC_OSC 0x3FFF // RC oscillator.
1372 #define _WDTE_OFF 0x3FFB // WDT disabled.
1373 #define _WDT_OFF 0x3FFB // WDT disabled.
1374 #define _WDTE_ON 0x3FFF // WDT enabled.
1375 #define _WDT_ON 0x3FFF // WDT enabled.
1376 #define _PWRTE_ON 0x3FF7 // PWRT enabled.
1377 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
1378 #define _CP_ON 0x3FEF // All Memory locations code protected.
1379 #define _CP_ALL 0x3FEF // All Memory locations code protected.
1380 #define _CP_OFF 0x3FFF // Code protection off.
1381 #define _BOREN_OFF 0x3FBF // BOR disabled.
1382 #define _BODEN_OFF 0x3FBF // BOR disabled.
1383 #define _BOREN_ON 0x3FFF // BOR enabled.
1384 #define _BODEN_ON 0x3FFF // BOR enabled.
1386 //==============================================================================
1388 #define _DEVID1 0x2006
1390 #define _IDLOC0 0x2000
1391 #define _IDLOC1 0x2001
1392 #define _IDLOC2 0x2002
1393 #define _IDLOC3 0x2003
1395 //==============================================================================
1397 #ifndef NO_BIT_DEFINES
1399 #define ADON ADCON0bits.ADON // bit 0
1400 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 2, shadows bit in ADCON0bits
1401 #define GO ADCON0bits.GO // bit 2, shadows bit in ADCON0bits
1402 #define NOT_DONE ADCON0bits.NOT_DONE // bit 2, shadows bit in ADCON0bits
1403 #define GO_DONE ADCON0bits.GO_DONE // bit 2, shadows bit in ADCON0bits
1404 #define CHS0 ADCON0bits.CHS0 // bit 3
1405 #define CHS1 ADCON0bits.CHS1 // bit 4
1406 #define CHS2 ADCON0bits.CHS2 // bit 5
1407 #define ADCS0 ADCON0bits.ADCS0 // bit 6
1408 #define ADCS1 ADCON0bits.ADCS1 // bit 7
1410 #define PCFG0 ADCON1bits.PCFG0 // bit 0
1411 #define PCFG1 ADCON1bits.PCFG1 // bit 1
1412 #define PCFG2 ADCON1bits.PCFG2 // bit 2
1414 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
1415 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
1416 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
1417 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
1418 #define CCP1Y CCP1CONbits.CCP1Y // bit 4
1419 #define CCP1X CCP1CONbits.CCP1X // bit 5
1421 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
1422 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
1423 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
1424 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
1425 #define CCP2Y CCP2CONbits.CCP2Y // bit 4
1426 #define CCP2X CCP2CONbits.CCP2X // bit 5
1428 #define RBIF INTCONbits.RBIF // bit 0
1429 #define INTF INTCONbits.INTF // bit 1
1430 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
1431 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
1432 #define RBIE INTCONbits.RBIE // bit 3
1433 #define INTE INTCONbits.INTE // bit 4
1434 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
1435 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
1436 #define PEIE INTCONbits.PEIE // bit 6
1437 #define GIE INTCONbits.GIE // bit 7
1439 #define PS0 OPTION_REGbits.PS0 // bit 0
1440 #define PS1 OPTION_REGbits.PS1 // bit 1
1441 #define PS2 OPTION_REGbits.PS2 // bit 2
1442 #define PSA OPTION_REGbits.PSA // bit 3
1443 #define T0SE OPTION_REGbits.T0SE // bit 4
1444 #define T0CS OPTION_REGbits.T0CS // bit 5
1445 #define INTEDG OPTION_REGbits.INTEDG // bit 6
1446 #define NOT_RBPU OPTION_REGbits.NOT_RBPU // bit 7
1448 #define NOT_BOR PCONbits.NOT_BOR // bit 0, shadows bit in PCONbits
1449 #define NOT_BO PCONbits.NOT_BO // bit 0, shadows bit in PCONbits
1450 #define NOT_POR PCONbits.NOT_POR // bit 1
1452 #define TMR1IE PIE1bits.TMR1IE // bit 0
1453 #define TMR2IE PIE1bits.TMR2IE // bit 1
1454 #define CCP1IE PIE1bits.CCP1IE // bit 2
1455 #define SSPIE PIE1bits.SSPIE // bit 3
1456 #define TXIE PIE1bits.TXIE // bit 4
1457 #define RCIE PIE1bits.RCIE // bit 5
1458 #define ADIE PIE1bits.ADIE // bit 6
1459 #define PSPIE PIE1bits.PSPIE // bit 7
1461 #define CCP2IE PIE2bits.CCP2IE // bit 0
1463 #define TMR1IF PIR1bits.TMR1IF // bit 0
1464 #define TMR2IF PIR1bits.TMR2IF // bit 1
1465 #define CCP1IF PIR1bits.CCP1IF // bit 2
1466 #define SSPIF PIR1bits.SSPIF // bit 3
1467 #define TXIF PIR1bits.TXIF // bit 4
1468 #define RCIF PIR1bits.RCIF // bit 5
1469 #define ADIF PIR1bits.ADIF // bit 6
1470 #define PSPIF PIR1bits.PSPIF // bit 7
1472 #define CCP2IF PIR2bits.CCP2IF // bit 0
1474 #define RD PMCON1bits.RD // bit 0
1476 #define RA0 PORTAbits.RA0 // bit 0
1477 #define RA1 PORTAbits.RA1 // bit 1
1478 #define RA2 PORTAbits.RA2 // bit 2
1479 #define RA3 PORTAbits.RA3 // bit 3
1480 #define RA4 PORTAbits.RA4 // bit 4
1481 #define RA5 PORTAbits.RA5 // bit 5
1483 #define RB0 PORTBbits.RB0 // bit 0
1484 #define RB1 PORTBbits.RB1 // bit 1
1485 #define RB2 PORTBbits.RB2 // bit 2
1486 #define RB3 PORTBbits.RB3 // bit 3
1487 #define RB4 PORTBbits.RB4 // bit 4
1488 #define RB5 PORTBbits.RB5 // bit 5
1489 #define RB6 PORTBbits.RB6 // bit 6
1490 #define RB7 PORTBbits.RB7 // bit 7
1492 #define RC0 PORTCbits.RC0 // bit 0
1493 #define RC1 PORTCbits.RC1 // bit 1
1494 #define RC2 PORTCbits.RC2 // bit 2
1495 #define RC3 PORTCbits.RC3 // bit 3
1496 #define RC4 PORTCbits.RC4 // bit 4
1497 #define RC5 PORTCbits.RC5 // bit 5
1498 #define RC6 PORTCbits.RC6 // bit 6
1499 #define RC7 PORTCbits.RC7 // bit 7
1501 #define RD0 PORTDbits.RD0 // bit 0
1502 #define RD1 PORTDbits.RD1 // bit 1
1503 #define RD2 PORTDbits.RD2 // bit 2
1504 #define RD3 PORTDbits.RD3 // bit 3
1505 #define RD4 PORTDbits.RD4 // bit 4
1506 #define RD5 PORTDbits.RD5 // bit 5
1507 #define RD6 PORTDbits.RD6 // bit 6
1508 #define RD7 PORTDbits.RD7 // bit 7
1510 #define RE0 PORTEbits.RE0 // bit 0
1511 #define RE1 PORTEbits.RE1 // bit 1
1512 #define RE2 PORTEbits.RE2 // bit 2
1514 #define RX9D RCSTAbits.RX9D // bit 0, shadows bit in RCSTAbits
1515 #define RCD8 RCSTAbits.RCD8 // bit 0, shadows bit in RCSTAbits
1516 #define OERR RCSTAbits.OERR // bit 1
1517 #define FERR RCSTAbits.FERR // bit 2
1518 #define CREN RCSTAbits.CREN // bit 4
1519 #define SREN RCSTAbits.SREN // bit 5
1520 #define RX9 RCSTAbits.RX9 // bit 6, shadows bit in RCSTAbits
1521 #define RC9 RCSTAbits.RC9 // bit 6, shadows bit in RCSTAbits
1522 #define NOT_RC8 RCSTAbits.NOT_RC8 // bit 6, shadows bit in RCSTAbits
1523 #define RC8_9 RCSTAbits.RC8_9 // bit 6, shadows bit in RCSTAbits
1524 #define SPEN RCSTAbits.SPEN // bit 7
1526 #define SSPM0 SSPCONbits.SSPM0 // bit 0
1527 #define SSPM1 SSPCONbits.SSPM1 // bit 1
1528 #define SSPM2 SSPCONbits.SSPM2 // bit 2
1529 #define SSPM3 SSPCONbits.SSPM3 // bit 3
1530 #define CKP SSPCONbits.CKP // bit 4
1531 #define SSPEN SSPCONbits.SSPEN // bit 5
1532 #define SSPOV SSPCONbits.SSPOV // bit 6
1533 #define WCOL SSPCONbits.WCOL // bit 7
1535 #define BF SSPSTATbits.BF // bit 0
1536 #define UA SSPSTATbits.UA // bit 1
1537 #define R_NOT_W SSPSTATbits.R_NOT_W // bit 2, shadows bit in SSPSTATbits
1538 #define R SSPSTATbits.R // bit 2, shadows bit in SSPSTATbits
1539 #define I2C_READ SSPSTATbits.I2C_READ // bit 2, shadows bit in SSPSTATbits
1540 #define NOT_W SSPSTATbits.NOT_W // bit 2, shadows bit in SSPSTATbits
1541 #define NOT_WRITE SSPSTATbits.NOT_WRITE // bit 2, shadows bit in SSPSTATbits
1542 #define R_W SSPSTATbits.R_W // bit 2, shadows bit in SSPSTATbits
1543 #define READ_WRITE SSPSTATbits.READ_WRITE // bit 2, shadows bit in SSPSTATbits
1544 #define S SSPSTATbits.S // bit 3, shadows bit in SSPSTATbits
1545 #define I2C_START SSPSTATbits.I2C_START // bit 3, shadows bit in SSPSTATbits
1546 #define P SSPSTATbits.P // bit 4, shadows bit in SSPSTATbits
1547 #define I2C_STOP SSPSTATbits.I2C_STOP // bit 4, shadows bit in SSPSTATbits
1548 #define D_NOT_A SSPSTATbits.D_NOT_A // bit 5, shadows bit in SSPSTATbits
1549 #define D SSPSTATbits.D // bit 5, shadows bit in SSPSTATbits
1550 #define I2C_DATA SSPSTATbits.I2C_DATA // bit 5, shadows bit in SSPSTATbits
1551 #define NOT_A SSPSTATbits.NOT_A // bit 5, shadows bit in SSPSTATbits
1552 #define NOT_ADDRESS SSPSTATbits.NOT_ADDRESS // bit 5, shadows bit in SSPSTATbits
1553 #define D_A SSPSTATbits.D_A // bit 5, shadows bit in SSPSTATbits
1554 #define DATA_ADDRESS SSPSTATbits.DATA_ADDRESS // bit 5, shadows bit in SSPSTATbits
1555 #define CKE SSPSTATbits.CKE // bit 6
1556 #define SMP SSPSTATbits.SMP // bit 7
1558 #define C STATUSbits.C // bit 0
1559 #define DC STATUSbits.DC // bit 1
1560 #define Z STATUSbits.Z // bit 2
1561 #define NOT_PD STATUSbits.NOT_PD // bit 3
1562 #define NOT_TO STATUSbits.NOT_TO // bit 4
1563 #define RP0 STATUSbits.RP0 // bit 5
1564 #define RP1 STATUSbits.RP1 // bit 6
1565 #define IRP STATUSbits.IRP // bit 7
1567 #define TMR1ON T1CONbits.TMR1ON // bit 0
1568 #define TMR1CS T1CONbits.TMR1CS // bit 1
1569 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2, shadows bit in T1CONbits
1570 #define T1INSYNC T1CONbits.T1INSYNC // bit 2, shadows bit in T1CONbits
1571 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
1572 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
1573 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
1575 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
1576 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
1577 #define TMR2ON T2CONbits.TMR2ON // bit 2
1578 #define TOUTPS0 T2CONbits.TOUTPS0 // bit 3
1579 #define TOUTPS1 T2CONbits.TOUTPS1 // bit 4
1580 #define TOUTPS2 T2CONbits.TOUTPS2 // bit 5
1581 #define TOUTPS3 T2CONbits.TOUTPS3 // bit 6
1583 #define TRISA0 TRISAbits.TRISA0 // bit 0
1584 #define TRISA1 TRISAbits.TRISA1 // bit 1
1585 #define TRISA2 TRISAbits.TRISA2 // bit 2
1586 #define TRISA3 TRISAbits.TRISA3 // bit 3
1587 #define TRISA4 TRISAbits.TRISA4 // bit 4
1588 #define TRISA5 TRISAbits.TRISA5 // bit 5
1590 #define TRISB0 TRISBbits.TRISB0 // bit 0
1591 #define TRISB1 TRISBbits.TRISB1 // bit 1
1592 #define TRISB2 TRISBbits.TRISB2 // bit 2
1593 #define TRISB3 TRISBbits.TRISB3 // bit 3
1594 #define TRISB4 TRISBbits.TRISB4 // bit 4
1595 #define TRISB5 TRISBbits.TRISB5 // bit 5
1596 #define TRISB6 TRISBbits.TRISB6 // bit 6
1597 #define TRISB7 TRISBbits.TRISB7 // bit 7
1599 #define TRISC0 TRISCbits.TRISC0 // bit 0
1600 #define TRISC1 TRISCbits.TRISC1 // bit 1
1601 #define TRISC2 TRISCbits.TRISC2 // bit 2
1602 #define TRISC3 TRISCbits.TRISC3 // bit 3
1603 #define TRISC4 TRISCbits.TRISC4 // bit 4
1604 #define TRISC5 TRISCbits.TRISC5 // bit 5
1605 #define TRISC6 TRISCbits.TRISC6 // bit 6
1606 #define TRISC7 TRISCbits.TRISC7 // bit 7
1608 #define TRISD0 TRISDbits.TRISD0 // bit 0
1609 #define TRISD1 TRISDbits.TRISD1 // bit 1
1610 #define TRISD2 TRISDbits.TRISD2 // bit 2
1611 #define TRISD3 TRISDbits.TRISD3 // bit 3
1612 #define TRISD4 TRISDbits.TRISD4 // bit 4
1613 #define TRISD5 TRISDbits.TRISD5 // bit 5
1614 #define TRISD6 TRISDbits.TRISD6 // bit 6
1615 #define TRISD7 TRISDbits.TRISD7 // bit 7
1617 #define TRISE0 TRISEbits.TRISE0 // bit 0
1618 #define TRISE1 TRISEbits.TRISE1 // bit 1
1619 #define TRISE2 TRISEbits.TRISE2 // bit 2
1620 #define PSPMODE TRISEbits.PSPMODE // bit 4
1621 #define IBOV TRISEbits.IBOV // bit 5
1622 #define OBF TRISEbits.OBF // bit 6
1623 #define IBF TRISEbits.IBF // bit 7
1625 #define TX9D TXSTAbits.TX9D // bit 0, shadows bit in TXSTAbits
1626 #define TXD8 TXSTAbits.TXD8 // bit 0, shadows bit in TXSTAbits
1627 #define TRMT TXSTAbits.TRMT // bit 1
1628 #define BRGH TXSTAbits.BRGH // bit 2
1629 #define SYNC TXSTAbits.SYNC // bit 4
1630 #define TXEN TXSTAbits.TXEN // bit 5
1631 #define TX9 TXSTAbits.TX9 // bit 6, shadows bit in TXSTAbits
1632 #define NOT_TX8 TXSTAbits.NOT_TX8 // bit 6, shadows bit in TXSTAbits
1633 #define TX8_9 TXSTAbits.TX8_9 // bit 6, shadows bit in TXSTAbits
1634 #define CSRC TXSTAbits.CSRC // bit 7
1636 #endif // #ifndef NO_BIT_DEFINES
1638 #endif // #ifndef __PIC16F74_H__