2 * This declarations of the PIC16F707 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:57 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 __PIC16F707_H__
26 #define __PIC16F707_H__
28 //==============================================================================
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 T1GCON_ADDR 0x008F
81 #define OSCCON_ADDR 0x0090
82 #define OSCTUNE_ADDR 0x0091
83 #define PR2_ADDR 0x0092
84 #define SSPADD_ADDR 0x0093
85 #define SSPMSK_ADDR 0x0093
86 #define SSPSTAT_ADDR 0x0094
87 #define WPUB_ADDR 0x0095
88 #define IOCB_ADDR 0x0096
89 #define T3CON_ADDR 0x0097
90 #define TXSTA_ADDR 0x0098
91 #define SPBRG_ADDR 0x0099
92 #define TMR3_ADDR 0x009A
93 #define TMR3L_ADDR 0x009A
94 #define TMR3H_ADDR 0x009B
95 #define APFCON_ADDR 0x009C
96 #define FVRCON_ADDR 0x009D
97 #define T3GCON_ADDR 0x009E
98 #define ADCON1_ADDR 0x009F
99 #define TACON_ADDR 0x0105
100 #define CPSBCON0_ADDR 0x0106
101 #define CPSBCON1_ADDR 0x0107
102 #define CPSACON0_ADDR 0x0108
103 #define CPSACON1_ADDR 0x0109
104 #define PMDATL_ADDR 0x010C
105 #define PMADRL_ADDR 0x010D
106 #define PMDATH_ADDR 0x010E
107 #define PMADRH_ADDR 0x010F
108 #define TMRA_ADDR 0x0110
109 #define TBCON_ADDR 0x0111
110 #define TMRB_ADDR 0x0112
111 #define DACCON0_ADDR 0x0113
112 #define DACCON1_ADDR 0x0114
113 #define ANSELA_ADDR 0x0185
114 #define ANSELB_ADDR 0x0186
115 #define ANSELC_ADDR 0x0187
116 #define ANSELD_ADDR 0x0188
117 #define ANSELE_ADDR 0x0189
118 #define PMCON1_ADDR 0x018C
120 #endif // #ifndef NO_ADDR_DEFINES
122 //==============================================================================
124 // Register Definitions
126 //==============================================================================
128 extern __at(0x0000) __sfr INDF
;
129 extern __at(0x0001) __sfr TMR0
;
130 extern __at(0x0002) __sfr PCL
;
132 //==============================================================================
135 extern __at(0x0003) __sfr STATUS
;
159 extern __at(0x0003) volatile __STATUSbits_t STATUSbits
;
170 //==============================================================================
172 extern __at(0x0004) __sfr FSR
;
174 //==============================================================================
177 extern __at(0x0005) __sfr PORTA
;
237 extern __at(0x0005) volatile __PORTAbits_t PORTAbits
;
267 //==============================================================================
270 //==============================================================================
273 extern __at(0x0006) __sfr PORTB
;
338 extern __at(0x0006) volatile __PORTBbits_t PORTBbits
;
366 //==============================================================================
369 //==============================================================================
372 extern __at(0x0007) __sfr PORTC
;
425 extern __at(0x0007) volatile __PORTCbits_t PORTCbits
;
427 #define _PORTC_RC0 0x01
428 #define _PORTC_CPSB2 0x01
429 #define _PORTC_T1OSO 0x01
430 #define _PORTC_T1CKI 0x01
431 #define _PORTC_RC1 0x02
432 #define _PORTC_CPSB3 0x02
433 #define _PORTC_T1OSI 0x02
434 #define _PORTC_CCP2 0x02
435 #define _PORTC_RC2 0x04
436 #define _PORTC_CPSB4 0x04
437 #define _PORTC_TBCKI 0x04
438 #define _PORTC_CCP1 0x04
439 #define _PORTC_RC3 0x08
440 #define _PORTC_SCK 0x08
441 #define _PORTC_SCL 0x08
442 #define _PORTC_RC4 0x10
443 #define _PORTC_SDI 0x10
444 #define _PORTC_SDA 0x10
445 #define _PORTC_RC5 0x20
446 #define _PORTC_CPSA9 0x20
447 #define _PORTC_SDO 0x20
448 #define _PORTC_RC6 0x40
449 #define _PORTC_CPSA10 0x40
450 #define _PORTC_TX 0x40
451 #define _PORTC_CK 0x40
452 #define _PORTC_RC7 0x80
453 #define _PORTC_CPSA11 0x80
454 #define _PORTC_RX 0x80
456 //==============================================================================
459 //==============================================================================
462 extern __at(0x0008) __sfr PORTD
;
503 extern __at(0x0008) volatile __PORTDbits_t PORTDbits
;
523 //==============================================================================
526 //==============================================================================
529 extern __at(0x0009) __sfr PORTE
;
550 unsigned NOT_MCLR
: 1;
576 extern __at(0x0009) volatile __PORTEbits_t PORTEbits
;
588 #define _NOT_MCLR 0x08
590 //==============================================================================
592 extern __at(0x000A) __sfr PCLATH
;
594 //==============================================================================
597 extern __at(0x000B) __sfr INTCON
;
626 extern __at(0x000B) volatile __INTCONbits_t INTCONbits
;
639 //==============================================================================
642 //==============================================================================
645 extern __at(0x000C) __sfr PIR1
;
656 unsigned TMR1GIF
: 1;
659 extern __at(0x000C) volatile __PIR1bits_t PIR1bits
;
668 #define _TMR1GIF 0x80
670 //==============================================================================
673 //==============================================================================
676 extern __at(0x000D) __sfr PIR2
;
687 unsigned TMR3GIF
: 1;
690 extern __at(0x000D) volatile __PIR2bits_t PIR2bits
;
696 #define _TMR3GIF 0x80
698 //==============================================================================
700 extern __at(0x000E) __sfr TMR1
;
701 extern __at(0x000E) __sfr TMR1L
;
702 extern __at(0x000F) __sfr TMR1H
;
704 //==============================================================================
707 extern __at(0x0010) __sfr T1CON
;
715 unsigned NOT_T1SYNC
: 1;
716 unsigned T1OSCEN
: 1;
717 unsigned T1CKPS0
: 1;
718 unsigned T1CKPS1
: 1;
731 unsigned TMR1CS0
: 1;
732 unsigned TMR1CS1
: 1;
755 extern __at(0x0010) volatile __T1CONbits_t T1CONbits
;
758 #define _NOT_T1SYNC 0x04
760 #define _T1OSCEN 0x08
761 #define _T1CKPS0 0x10
762 #define _T1CKPS1 0x20
764 #define _TMR1CS0 0x40
766 #define _TMR1CS1 0x80
768 //==============================================================================
770 extern __at(0x0011) __sfr TMR2
;
772 //==============================================================================
775 extern __at(0x0012) __sfr T2CON
;
781 unsigned T2CKPS0
: 1;
782 unsigned T2CKPS1
: 1;
784 unsigned TOUTPS0
: 1;
785 unsigned TOUTPS1
: 1;
786 unsigned TOUTPS2
: 1;
787 unsigned TOUTPS3
: 1;
805 extern __at(0x0012) volatile __T2CONbits_t T2CONbits
;
807 #define _T2CKPS0 0x01
808 #define _T2CKPS1 0x02
810 #define _TOUTPS0 0x08
811 #define _TOUTPS1 0x10
812 #define _TOUTPS2 0x20
813 #define _TOUTPS3 0x40
815 //==============================================================================
817 extern __at(0x0013) __sfr SSPBUF
;
819 //==============================================================================
822 extern __at(0x0014) __sfr SSPCON
;
845 extern __at(0x0014) volatile __SSPCONbits_t SSPCONbits
;
856 //==============================================================================
858 extern __at(0x0015) __sfr CCPR1
;
859 extern __at(0x0015) __sfr CCPR1L
;
860 extern __at(0x0016) __sfr CCPR1H
;
862 //==============================================================================
865 extern __at(0x0017) __sfr CCP1CON
;
895 extern __at(0x0017) volatile __CCP1CONbits_t CCP1CONbits
;
904 //==============================================================================
907 //==============================================================================
910 extern __at(0x0018) __sfr RCSTA
;
924 extern __at(0x0018) volatile __RCSTAbits_t RCSTAbits
;
935 //==============================================================================
937 extern __at(0x0019) __sfr TXREG
;
938 extern __at(0x001A) __sfr RCREG
;
939 extern __at(0x001B) __sfr CCPR2
;
940 extern __at(0x001B) __sfr CCPR2L
;
941 extern __at(0x001C) __sfr CCPR2H
;
943 //==============================================================================
946 extern __at(0x001D) __sfr CCP2CON
;
976 extern __at(0x001D) volatile __CCP2CONbits_t CCP2CONbits
;
985 //==============================================================================
987 extern __at(0x001E) __sfr ADRES
;
989 //==============================================================================
992 extern __at(0x001F) __sfr ADCON0
;
999 unsigned GO_NOT_DONE
: 1;
1016 extern __at(0x001F) volatile __ADCON0bits_t ADCON0bits
;
1019 #define _GO_NOT_DONE 0x02
1025 //==============================================================================
1028 //==============================================================================
1031 extern __at(0x0081) __sfr OPTION_REG
;
1041 unsigned TMR0SE
: 1;
1042 unsigned TMR0CS
: 1;
1043 unsigned INTEDG
: 1;
1044 unsigned NOT_RBPU
: 1;
1064 } __OPTION_REGbits_t
;
1066 extern __at(0x0081) volatile __OPTION_REGbits_t OPTION_REGbits
;
1072 #define _TMR0SE 0x10
1074 #define _TMR0CS 0x20
1076 #define _INTEDG 0x40
1077 #define _NOT_RBPU 0x80
1079 //==============================================================================
1082 //==============================================================================
1085 extern __at(0x0085) __sfr TRISA
;
1089 unsigned TRISA0
: 1;
1090 unsigned TRISA1
: 1;
1091 unsigned TRISA2
: 1;
1092 unsigned TRISA3
: 1;
1093 unsigned TRISA4
: 1;
1094 unsigned TRISA5
: 1;
1095 unsigned TRISA6
: 1;
1096 unsigned TRISA7
: 1;
1099 extern __at(0x0085) volatile __TRISAbits_t TRISAbits
;
1101 #define _TRISA0 0x01
1102 #define _TRISA1 0x02
1103 #define _TRISA2 0x04
1104 #define _TRISA3 0x08
1105 #define _TRISA4 0x10
1106 #define _TRISA5 0x20
1107 #define _TRISA6 0x40
1108 #define _TRISA7 0x80
1110 //==============================================================================
1113 //==============================================================================
1116 extern __at(0x0086) __sfr TRISB
;
1120 unsigned TRISB0
: 1;
1121 unsigned TRISB1
: 1;
1122 unsigned TRISB2
: 1;
1123 unsigned TRISB3
: 1;
1124 unsigned TRISB4
: 1;
1125 unsigned TRISB5
: 1;
1126 unsigned TRISB6
: 1;
1127 unsigned TRISB7
: 1;
1130 extern __at(0x0086) volatile __TRISBbits_t TRISBbits
;
1132 #define _TRISB0 0x01
1133 #define _TRISB1 0x02
1134 #define _TRISB2 0x04
1135 #define _TRISB3 0x08
1136 #define _TRISB4 0x10
1137 #define _TRISB5 0x20
1138 #define _TRISB6 0x40
1139 #define _TRISB7 0x80
1141 //==============================================================================
1144 //==============================================================================
1147 extern __at(0x0087) __sfr TRISC
;
1151 unsigned TRISC0
: 1;
1152 unsigned TRISC1
: 1;
1153 unsigned TRISC2
: 1;
1154 unsigned TRISC3
: 1;
1155 unsigned TRISC4
: 1;
1156 unsigned TRISC5
: 1;
1157 unsigned TRISC6
: 1;
1158 unsigned TRISC7
: 1;
1161 extern __at(0x0087) volatile __TRISCbits_t TRISCbits
;
1163 #define _TRISC0 0x01
1164 #define _TRISC1 0x02
1165 #define _TRISC2 0x04
1166 #define _TRISC3 0x08
1167 #define _TRISC4 0x10
1168 #define _TRISC5 0x20
1169 #define _TRISC6 0x40
1170 #define _TRISC7 0x80
1172 //==============================================================================
1175 //==============================================================================
1178 extern __at(0x0088) __sfr TRISD
;
1182 unsigned TRISD0
: 1;
1183 unsigned TRISD1
: 1;
1184 unsigned TRISD2
: 1;
1185 unsigned TRISD3
: 1;
1186 unsigned TRISD4
: 1;
1187 unsigned TRISD5
: 1;
1188 unsigned TRISD6
: 1;
1189 unsigned TRISD7
: 1;
1192 extern __at(0x0088) volatile __TRISDbits_t TRISDbits
;
1194 #define _TRISD0 0x01
1195 #define _TRISD1 0x02
1196 #define _TRISD2 0x04
1197 #define _TRISD3 0x08
1198 #define _TRISD4 0x10
1199 #define _TRISD5 0x20
1200 #define _TRISD6 0x40
1201 #define _TRISD7 0x80
1203 //==============================================================================
1206 //==============================================================================
1209 extern __at(0x0089) __sfr TRISE
;
1215 unsigned TRISE0
: 1;
1216 unsigned TRISE1
: 1;
1217 unsigned TRISE2
: 1;
1218 unsigned TRISE3
: 1;
1232 extern __at(0x0089) volatile __TRISEbits_t TRISEbits
;
1234 #define _TRISE0 0x01
1235 #define _TRISE1 0x02
1236 #define _TRISE2 0x04
1237 #define _TRISE3 0x08
1239 //==============================================================================
1242 //==============================================================================
1245 extern __at(0x008C) __sfr PIE1
;
1249 unsigned TMR1IE
: 1;
1250 unsigned TMR2IE
: 1;
1251 unsigned CCP1IE
: 1;
1256 unsigned TMR1GIE
: 1;
1259 extern __at(0x008C) volatile __PIE1bits_t PIE1bits
;
1261 #define _TMR1IE 0x01
1262 #define _TMR2IE 0x02
1263 #define _CCP1IE 0x04
1268 #define _TMR1GIE 0x80
1270 //==============================================================================
1273 //==============================================================================
1276 extern __at(0x008D) __sfr PIE2
;
1280 unsigned CCP2IE
: 1;
1284 unsigned TMRAIE
: 1;
1285 unsigned TMRBIE
: 1;
1286 unsigned TMR3IE
: 1;
1287 unsigned TMR3GIE
: 1;
1290 extern __at(0x008D) volatile __PIE2bits_t PIE2bits
;
1292 #define _CCP2IE 0x01
1293 #define _TMRAIE 0x10
1294 #define _TMRBIE 0x20
1295 #define _TMR3IE 0x40
1296 #define _TMR3GIE 0x80
1298 //==============================================================================
1301 //==============================================================================
1304 extern __at(0x008E) __sfr PCON
;
1308 unsigned NOT_BOR
: 1;
1309 unsigned NOT_POR
: 1;
1318 extern __at(0x008E) volatile __PCONbits_t PCONbits
;
1320 #define _NOT_BOR 0x01
1321 #define _NOT_POR 0x02
1323 //==============================================================================
1326 //==============================================================================
1329 extern __at(0x008F) __sfr T1GCON
;
1335 unsigned T1GSS0
: 1;
1336 unsigned T1GSS1
: 1;
1337 unsigned T1GVAL
: 1;
1338 unsigned T1GGO_NOT_DONE
: 1;
1339 unsigned T1GSPM
: 1;
1341 unsigned T1GPOL
: 1;
1342 unsigned TMR1GE
: 1;
1352 extern __at(0x008F) volatile __T1GCONbits_t T1GCONbits
;
1354 #define _T1GSS0 0x01
1355 #define _T1GSS1 0x02
1356 #define _T1GVAL 0x04
1357 #define _T1GGO_NOT_DONE 0x08
1358 #define _T1GSPM 0x10
1360 #define _T1GPOL 0x40
1361 #define _TMR1GE 0x80
1363 //==============================================================================
1366 //==============================================================================
1369 extern __at(0x0090) __sfr OSCCON
;
1393 extern __at(0x0090) volatile __OSCCONbits_t OSCCONbits
;
1400 //==============================================================================
1402 extern __at(0x0091) __sfr OSCTUNE
;
1403 extern __at(0x0092) __sfr PR2
;
1404 extern __at(0x0093) __sfr SSPADD
;
1405 extern __at(0x0093) __sfr SSPMSK
;
1407 //==============================================================================
1410 extern __at(0x0094) __sfr SSPSTAT
;
1416 unsigned R_NOT_W
: 1;
1419 unsigned D_NOT_A
: 1;
1424 extern __at(0x0094) volatile __SSPSTATbits_t SSPSTATbits
;
1428 #define _R_NOT_W 0x04
1431 #define _D_NOT_A 0x20
1435 //==============================================================================
1438 //==============================================================================
1441 extern __at(0x0095) __sfr WPUB
;
1455 extern __at(0x0095) volatile __WPUBbits_t WPUBbits
;
1466 //==============================================================================
1469 //==============================================================================
1472 extern __at(0x0096) __sfr IOCB
;
1486 extern __at(0x0096) volatile __IOCBbits_t IOCBbits
;
1497 //==============================================================================
1500 //==============================================================================
1503 extern __at(0x0097) __sfr T3CON
;
1509 unsigned TMR3ON
: 1;
1511 unsigned T3SYNC
: 1;
1513 unsigned T3CKPS0
: 1;
1514 unsigned T3CKPS1
: 1;
1515 unsigned TMR3CS0
: 1;
1516 unsigned TMR3CS1
: 1;
1522 unsigned T3CKPS
: 2;
1529 unsigned TMR3CS
: 2;
1533 extern __at(0x0097) volatile __T3CONbits_t T3CONbits
;
1535 #define _TMR3ON 0x01
1536 #define _T3SYNC 0x04
1537 #define _T3CKPS0 0x10
1538 #define _T3CKPS1 0x20
1539 #define _TMR3CS0 0x40
1540 #define _TMR3CS1 0x80
1542 //==============================================================================
1545 //==============================================================================
1548 extern __at(0x0098) __sfr TXSTA
;
1562 extern __at(0x0098) volatile __TXSTAbits_t TXSTAbits
;
1572 //==============================================================================
1574 extern __at(0x0099) __sfr SPBRG
;
1575 extern __at(0x009A) __sfr TMR3
;
1576 extern __at(0x009A) __sfr TMR3L
;
1577 extern __at(0x009B) __sfr TMR3H
;
1579 //==============================================================================
1582 extern __at(0x009C) __sfr APFCON
;
1586 unsigned CCP2SEL
: 1;
1596 extern __at(0x009C) volatile __APFCONbits_t APFCONbits
;
1598 #define _CCP2SEL 0x01
1601 //==============================================================================
1604 //==============================================================================
1607 extern __at(0x009D) __sfr FVRCON
;
1613 unsigned ADFVR0
: 1;
1614 unsigned ADFVR1
: 1;
1615 unsigned CDAFVR0
: 1;
1616 unsigned CDAFVR1
: 1;
1620 unsigned FVRRDY
: 1;
1632 unsigned CDAFVR
: 2;
1637 extern __at(0x009D) volatile __FVRCONbits_t FVRCONbits
;
1639 #define _ADFVR0 0x01
1640 #define _ADFVR1 0x02
1641 #define _CDAFVR0 0x04
1642 #define _CDAFVR1 0x08
1644 #define _FVRRDY 0x80
1646 //==============================================================================
1649 //==============================================================================
1652 extern __at(0x009E) __sfr T3GCON
;
1658 unsigned T3GSS0
: 1;
1659 unsigned T3GSS1
: 1;
1660 unsigned T3GVAL
: 1;
1661 unsigned T3GGO_NOT_DONE
: 1;
1662 unsigned T3GSPM
: 1;
1664 unsigned T3GPOL
: 1;
1665 unsigned TMR3GE
: 1;
1675 extern __at(0x009E) volatile __T3GCONbits_t T3GCONbits
;
1677 #define _T3GSS0 0x01
1678 #define _T3GSS1 0x02
1679 #define _T3GVAL 0x04
1680 #define _T3GGO_NOT_DONE 0x08
1681 #define _T3GSPM 0x10
1683 #define _T3GPOL 0x40
1684 #define _TMR3GE 0x80
1686 //==============================================================================
1689 //==============================================================================
1692 extern __at(0x009F) __sfr ADCON1
;
1698 unsigned ADREF0
: 1;
1699 unsigned ADREF1
: 1;
1722 extern __at(0x009F) volatile __ADCON1bits_t ADCON1bits
;
1724 #define _ADREF0 0x01
1725 #define _ADREF1 0x02
1730 //==============================================================================
1733 //==============================================================================
1736 extern __at(0x0105) __sfr TACON
;
1749 unsigned TMRAON
: 1;
1754 unsigned TMRAPS0
: 1;
1755 unsigned TMRAPS1
: 1;
1756 unsigned TMRAPS2
: 1;
1757 unsigned TMRAPSA
: 1;
1758 unsigned TMRASE
: 1;
1759 unsigned TMRACS
: 1;
1772 unsigned TMRAPS
: 3;
1777 extern __at(0x0105) volatile __TACONbits_t TACONbits
;
1780 #define _TMRAPS0 0x01
1782 #define _TMRAPS1 0x02
1784 #define _TMRAPS2 0x04
1786 #define _TMRAPSA 0x08
1788 #define _TMRASE 0x10
1790 #define _TMRACS 0x20
1791 #define _TMRAON 0x80
1793 //==============================================================================
1796 //==============================================================================
1799 extern __at(0x0106) __sfr CPSBCON0
;
1806 unsigned CPSBOUT
: 1;
1807 unsigned CPSBRNG0
: 1;
1808 unsigned CPSBRNG1
: 1;
1811 unsigned CPSBRM
: 1;
1812 unsigned CPSBON
: 1;
1818 unsigned CPSBRNG
: 2;
1823 extern __at(0x0106) volatile __CPSBCON0bits_t CPSBCON0bits
;
1826 #define _CPSBOUT 0x02
1827 #define _CPSBRNG0 0x04
1828 #define _CPSBRNG1 0x08
1829 #define _CPSBRM 0x40
1830 #define _CPSBON 0x80
1832 //==============================================================================
1835 //==============================================================================
1838 extern __at(0x0107) __sfr CPSBCON1
;
1844 unsigned CPSBCH0
: 1;
1845 unsigned CPSBCH1
: 1;
1846 unsigned CPSBCH2
: 1;
1847 unsigned CPSBCH3
: 1;
1856 unsigned CPSBCH
: 4;
1861 extern __at(0x0107) volatile __CPSBCON1bits_t CPSBCON1bits
;
1863 #define _CPSBCH0 0x01
1864 #define _CPSBCH1 0x02
1865 #define _CPSBCH2 0x04
1866 #define _CPSBCH3 0x08
1868 //==============================================================================
1871 //==============================================================================
1874 extern __at(0x0108) __sfr CPSACON0
;
1881 unsigned CPSAOUT
: 1;
1882 unsigned CPSARNG0
: 1;
1883 unsigned CPSARNG1
: 1;
1886 unsigned CPSARM
: 1;
1887 unsigned CPSAON
: 1;
1893 unsigned CPSARNG
: 2;
1898 extern __at(0x0108) volatile __CPSACON0bits_t CPSACON0bits
;
1901 #define _CPSAOUT 0x02
1902 #define _CPSARNG0 0x04
1903 #define _CPSARNG1 0x08
1904 #define _CPSARM 0x40
1905 #define _CPSAON 0x80
1907 //==============================================================================
1910 //==============================================================================
1913 extern __at(0x0109) __sfr CPSACON1
;
1919 unsigned CPSACH0
: 1;
1920 unsigned CPSACH1
: 1;
1921 unsigned CPSACH2
: 1;
1922 unsigned CPSACH3
: 1;
1931 unsigned CPSACH
: 4;
1936 extern __at(0x0109) volatile __CPSACON1bits_t CPSACON1bits
;
1938 #define _CPSACH0 0x01
1939 #define _CPSACH1 0x02
1940 #define _CPSACH2 0x04
1941 #define _CPSACH3 0x08
1943 //==============================================================================
1945 extern __at(0x010C) __sfr PMDATL
;
1946 extern __at(0x010D) __sfr PMADRL
;
1947 extern __at(0x010E) __sfr PMDATH
;
1948 extern __at(0x010F) __sfr PMADRH
;
1949 extern __at(0x0110) __sfr TMRA
;
1951 //==============================================================================
1954 extern __at(0x0111) __sfr TBCON
;
1967 unsigned TMRBON
: 1;
1972 unsigned TMRBPS0
: 1;
1973 unsigned TMRBPS1
: 1;
1974 unsigned TMRBPS2
: 1;
1975 unsigned TMRBPSA
: 1;
1976 unsigned TMRBSE
: 1;
1977 unsigned TMRBCS
: 1;
1984 unsigned TMRBPS
: 3;
1995 extern __at(0x0111) volatile __TBCONbits_t TBCONbits
;
1998 #define _TMRBPS0 0x01
2000 #define _TMRBPS1 0x02
2002 #define _TMRBPS2 0x04
2004 #define _TMRBPSA 0x08
2006 #define _TMRBSE 0x10
2008 #define _TMRBCS 0x20
2009 #define _TMRBON 0x80
2011 //==============================================================================
2013 extern __at(0x0112) __sfr TMRB
;
2015 //==============================================================================
2018 extern __at(0x0113) __sfr DACCON0
;
2026 unsigned DACPSS0
: 1;
2027 unsigned DACPSS1
: 1;
2030 unsigned DACLPS
: 1;
2037 unsigned DACPSS
: 2;
2042 extern __at(0x0113) volatile __DACCON0bits_t DACCON0bits
;
2044 #define _DACPSS0 0x04
2045 #define _DACPSS1 0x08
2047 #define _DACLPS 0x40
2050 //==============================================================================
2053 //==============================================================================
2056 extern __at(0x0114) __sfr DACCON1
;
2079 extern __at(0x0114) volatile __DACCON1bits_t DACCON1bits
;
2087 //==============================================================================
2090 //==============================================================================
2093 extern __at(0x0185) __sfr ANSELA
;
2107 extern __at(0x0185) volatile __ANSELAbits_t ANSELAbits
;
2118 //==============================================================================
2121 //==============================================================================
2124 extern __at(0x0186) __sfr ANSELB
;
2138 extern __at(0x0186) volatile __ANSELBbits_t ANSELBbits
;
2149 //==============================================================================
2152 //==============================================================================
2155 extern __at(0x0187) __sfr ANSELC
;
2169 extern __at(0x0187) volatile __ANSELCbits_t ANSELCbits
;
2178 //==============================================================================
2181 //==============================================================================
2184 extern __at(0x0188) __sfr ANSELD
;
2198 extern __at(0x0188) volatile __ANSELDbits_t ANSELDbits
;
2209 //==============================================================================
2212 //==============================================================================
2215 extern __at(0x0189) __sfr ANSELE
;
2238 extern __at(0x0189) volatile __ANSELEbits_t ANSELEbits
;
2244 //==============================================================================
2247 //==============================================================================
2250 extern __at(0x018C) __sfr PMCON1
;
2264 extern __at(0x018C) volatile __PMCON1bits_t PMCON1bits
;
2268 //==============================================================================
2271 //==============================================================================
2273 // Configuration Bits
2275 //==============================================================================
2277 #define _CONFIG 0x2007
2278 #define _CONFIG2 0x2008
2280 //----------------------------- CONFIG Options -------------------------------
2282 #define _FOSC_LP_OSC 0x3FF8 // LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN.
2283 #define _LP_OSC 0x3FF8 // LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN.
2284 #define _FOSC_XT_OSC 0x3FF9 // XT oscillator: Crystal/resonator on RA6/OSC2/CLKIN and RA7/OSC1/CLKIN.
2285 #define _XT_OSC 0x3FF9 // XT oscillator: Crystal/resonator on RA6/OSC2/CLKIN and RA7/OSC1/CLKIN.
2286 #define _FOSC_HS_OSC 0x3FFA // HS oscillator: High Speed crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN.
2287 #define _HS_OSC 0x3FFA // HS oscillator: High Speed crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN.
2288 #define _FOSC_EC_OSC 0x3FFB // EC oscillator: I/O function on RA6/OSC2/CLKOUT pin, CLKIN on RA7/OSC1/CLKIN.
2289 #define _EC_OSC 0x3FFB // EC oscillator: I/O function on RA6/OSC2/CLKOUT pin, CLKIN on RA7/OSC1/CLKIN.
2290 #define _FOSC_INTOSCIO 0x3FFC // INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN pins.
2291 #define _INTOSCIO 0x3FFC // INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN pins.
2292 #define _FOSC_INTOSC 0x3FFD // INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN.
2293 #define _INTOSC 0x3FFD // INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN.
2294 #define _FOSC_EXTRCIO 0x3FFE // RCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN.
2295 #define _EXTRCIO 0x3FFE // RCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN.
2296 #define _FOSC_EXTRC 0x3FFF // RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN.
2297 #define _EXTRC 0x3FFF // RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN.
2298 #define _WDTE_OFF 0x3FF7 // WDT disabled and can be enabled by SWDTEN bit of the WDTCON register.
2299 #define _WDT_OFF 0x3FF7 // WDT disabled and can be enabled by SWDTEN bit of the WDTCON register.
2300 #define _WDTE_ON 0x3FFF // WDT enabled.
2301 #define _WDT_ON 0x3FFF // WDT enabled.
2302 #define _PWRTE_ON 0x3FEF // PWRT enabled.
2303 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
2304 #define _MCLRE_OFF 0x3FDF // RE3/MCLR pin function is digital input, MCLR internally tied to VDD.
2305 #define _MCLRE_ON 0x3FFF // RE3/MCLR pin function is MCLR.
2306 #define _CP_ON 0x3FBF // Program memory code protection is enabled.
2307 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
2308 #define _BOREN_OFF 0x3CFF // BOR disabled (Preconditioned State).
2309 #define _BOREN_NSLEEP 0x3EFF // BOR enabled during operation and disabled in Sleep.
2310 #define _BOREN_ON 0x3FFF // BOR enabled.
2311 #define _BORV_25 0x3BFF // Brown-out Reset Voltage (VBOR) set to 2.5 V nominal.
2312 #define _BORV_19 0x3FFF // Brown-out Reset Voltage (VBOR) set to 1.9 V nominal.
2313 #define _PLLEN_OFF 0x2FFF // INTOSC Frequency is 500 kHz.
2314 #define _PLLEN_ON 0x3FFF // INTOSC Frequency is 16 MHz (32x).
2316 //----------------------------- CONFIG2 Options -------------------------------
2318 #define _VCAPEN_RA0 0x3FCF // VCAP functionality is enabled on RA0.
2319 #define _VCAPEN_RA5 0x3FDF // VCAP functionality is enabled on RA5.
2320 #define _VCAPEN_RA6 0x3FEF // VCAP functionality is enabled on RA6.
2321 #define _VCAPEN_OFF 0x3FFF // All VCAP pin functions are disabled.
2323 //==============================================================================
2325 #define _DEVID1 0x2006
2327 #define _IDLOC0 0x2000
2328 #define _IDLOC1 0x2001
2329 #define _IDLOC2 0x2002
2330 #define _IDLOC3 0x2003
2332 //==============================================================================
2334 #ifndef NO_BIT_DEFINES
2336 #define ADON ADCON0bits.ADON // bit 0
2337 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1
2338 #define CHS0 ADCON0bits.CHS0 // bit 2
2339 #define CHS1 ADCON0bits.CHS1 // bit 3
2340 #define CHS2 ADCON0bits.CHS2 // bit 4
2341 #define CHS3 ADCON0bits.CHS3 // bit 5
2343 #define ADREF0 ADCON1bits.ADREF0 // bit 0
2344 #define ADREF1 ADCON1bits.ADREF1 // bit 1
2345 #define ADCS0 ADCON1bits.ADCS0 // bit 4
2346 #define ADCS1 ADCON1bits.ADCS1 // bit 5
2347 #define ADCS2 ADCON1bits.ADCS2 // bit 6
2349 #define ANSA0 ANSELAbits.ANSA0 // bit 0
2350 #define ANSA1 ANSELAbits.ANSA1 // bit 1
2351 #define ANSA2 ANSELAbits.ANSA2 // bit 2
2352 #define ANSA3 ANSELAbits.ANSA3 // bit 3
2353 #define ANSA4 ANSELAbits.ANSA4 // bit 4
2354 #define ANSA5 ANSELAbits.ANSA5 // bit 5
2355 #define ANSA6 ANSELAbits.ANSA6 // bit 6
2356 #define ANSA7 ANSELAbits.ANSA7 // bit 7
2358 #define ANSB0 ANSELBbits.ANSB0 // bit 0
2359 #define ANSB1 ANSELBbits.ANSB1 // bit 1
2360 #define ANSB2 ANSELBbits.ANSB2 // bit 2
2361 #define ANSB3 ANSELBbits.ANSB3 // bit 3
2362 #define ANSB4 ANSELBbits.ANSB4 // bit 4
2363 #define ANSB5 ANSELBbits.ANSB5 // bit 5
2364 #define ANSB6 ANSELBbits.ANSB6 // bit 6
2365 #define ANSB7 ANSELBbits.ANSB7 // bit 7
2367 #define ANSC0 ANSELCbits.ANSC0 // bit 0
2368 #define ANSC1 ANSELCbits.ANSC1 // bit 1
2369 #define ANSC2 ANSELCbits.ANSC2 // bit 2
2370 #define ANSC5 ANSELCbits.ANSC5 // bit 5
2371 #define ANSC6 ANSELCbits.ANSC6 // bit 6
2372 #define ANSC7 ANSELCbits.ANSC7 // bit 7
2374 #define ANSD0 ANSELDbits.ANSD0 // bit 0
2375 #define ANSD1 ANSELDbits.ANSD1 // bit 1
2376 #define ANSD2 ANSELDbits.ANSD2 // bit 2
2377 #define ANSD3 ANSELDbits.ANSD3 // bit 3
2378 #define ANSD4 ANSELDbits.ANSD4 // bit 4
2379 #define ANSD5 ANSELDbits.ANSD5 // bit 5
2380 #define ANSD6 ANSELDbits.ANSD6 // bit 6
2381 #define ANSD7 ANSELDbits.ANSD7 // bit 7
2383 #define ANSE0 ANSELEbits.ANSE0 // bit 0
2384 #define ANSE1 ANSELEbits.ANSE1 // bit 1
2385 #define ANSE2 ANSELEbits.ANSE2 // bit 2
2387 #define CCP2SEL APFCONbits.CCP2SEL // bit 0
2388 #define SSSEL APFCONbits.SSSEL // bit 1
2390 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
2391 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
2392 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
2393 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
2394 #define DC1B0 CCP1CONbits.DC1B0 // bit 4
2395 #define DC1B1 CCP1CONbits.DC1B1 // bit 5
2397 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
2398 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
2399 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
2400 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
2401 #define DC2B0 CCP2CONbits.DC2B0 // bit 4
2402 #define DC2B1 CCP2CONbits.DC2B1 // bit 5
2404 #define TAXCS CPSACON0bits.TAXCS // bit 0
2405 #define CPSAOUT CPSACON0bits.CPSAOUT // bit 1
2406 #define CPSARNG0 CPSACON0bits.CPSARNG0 // bit 2
2407 #define CPSARNG1 CPSACON0bits.CPSARNG1 // bit 3
2408 #define CPSARM CPSACON0bits.CPSARM // bit 6
2409 #define CPSAON CPSACON0bits.CPSAON // bit 7
2411 #define CPSACH0 CPSACON1bits.CPSACH0 // bit 0
2412 #define CPSACH1 CPSACON1bits.CPSACH1 // bit 1
2413 #define CPSACH2 CPSACON1bits.CPSACH2 // bit 2
2414 #define CPSACH3 CPSACON1bits.CPSACH3 // bit 3
2416 #define TBXCS CPSBCON0bits.TBXCS // bit 0
2417 #define CPSBOUT CPSBCON0bits.CPSBOUT // bit 1
2418 #define CPSBRNG0 CPSBCON0bits.CPSBRNG0 // bit 2
2419 #define CPSBRNG1 CPSBCON0bits.CPSBRNG1 // bit 3
2420 #define CPSBRM CPSBCON0bits.CPSBRM // bit 6
2421 #define CPSBON CPSBCON0bits.CPSBON // bit 7
2423 #define CPSBCH0 CPSBCON1bits.CPSBCH0 // bit 0
2424 #define CPSBCH1 CPSBCON1bits.CPSBCH1 // bit 1
2425 #define CPSBCH2 CPSBCON1bits.CPSBCH2 // bit 2
2426 #define CPSBCH3 CPSBCON1bits.CPSBCH3 // bit 3
2428 #define DACPSS0 DACCON0bits.DACPSS0 // bit 2
2429 #define DACPSS1 DACCON0bits.DACPSS1 // bit 3
2430 #define DACOE DACCON0bits.DACOE // bit 5
2431 #define DACLPS DACCON0bits.DACLPS // bit 6
2432 #define DACEN DACCON0bits.DACEN // bit 7
2434 #define DACR0 DACCON1bits.DACR0 // bit 0
2435 #define DACR1 DACCON1bits.DACR1 // bit 1
2436 #define DACR2 DACCON1bits.DACR2 // bit 2
2437 #define DACR3 DACCON1bits.DACR3 // bit 3
2438 #define DACR4 DACCON1bits.DACR4 // bit 4
2440 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
2441 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
2442 #define CDAFVR0 FVRCONbits.CDAFVR0 // bit 2
2443 #define CDAFVR1 FVRCONbits.CDAFVR1 // bit 3
2444 #define FVREN FVRCONbits.FVREN // bit 6
2445 #define FVRRDY FVRCONbits.FVRRDY // bit 7
2447 #define RBIF INTCONbits.RBIF // bit 0
2448 #define INTF INTCONbits.INTF // bit 1
2449 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
2450 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
2451 #define RBIE INTCONbits.RBIE // bit 3
2452 #define INTE INTCONbits.INTE // bit 4
2453 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
2454 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
2455 #define PEIE INTCONbits.PEIE // bit 6
2456 #define GIE INTCONbits.GIE // bit 7
2458 #define IOCB0 IOCBbits.IOCB0 // bit 0
2459 #define IOCB1 IOCBbits.IOCB1 // bit 1
2460 #define IOCB2 IOCBbits.IOCB2 // bit 2
2461 #define IOCB3 IOCBbits.IOCB3 // bit 3
2462 #define IOCB4 IOCBbits.IOCB4 // bit 4
2463 #define IOCB5 IOCBbits.IOCB5 // bit 5
2464 #define IOCB6 IOCBbits.IOCB6 // bit 6
2465 #define IOCB7 IOCBbits.IOCB7 // bit 7
2467 #define PS0 OPTION_REGbits.PS0 // bit 0
2468 #define PS1 OPTION_REGbits.PS1 // bit 1
2469 #define PS2 OPTION_REGbits.PS2 // bit 2
2470 #define PSA OPTION_REGbits.PSA // bit 3
2471 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
2472 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
2473 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
2474 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
2475 #define INTEDG OPTION_REGbits.INTEDG // bit 6
2476 #define NOT_RBPU OPTION_REGbits.NOT_RBPU // bit 7
2478 #define ICSS OSCCONbits.ICSS // bit 2
2479 #define ICSL OSCCONbits.ICSL // bit 3
2480 #define IRCF0 OSCCONbits.IRCF0 // bit 4
2481 #define IRCF1 OSCCONbits.IRCF1 // bit 5
2483 #define NOT_BOR PCONbits.NOT_BOR // bit 0
2484 #define NOT_POR PCONbits.NOT_POR // bit 1
2486 #define TMR1IE PIE1bits.TMR1IE // bit 0
2487 #define TMR2IE PIE1bits.TMR2IE // bit 1
2488 #define CCP1IE PIE1bits.CCP1IE // bit 2
2489 #define SSPIE PIE1bits.SSPIE // bit 3
2490 #define TXIE PIE1bits.TXIE // bit 4
2491 #define RCIE PIE1bits.RCIE // bit 5
2492 #define ADIE PIE1bits.ADIE // bit 6
2493 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
2495 #define CCP2IE PIE2bits.CCP2IE // bit 0
2496 #define TMRAIE PIE2bits.TMRAIE // bit 4
2497 #define TMRBIE PIE2bits.TMRBIE // bit 5
2498 #define TMR3IE PIE2bits.TMR3IE // bit 6
2499 #define TMR3GIE PIE2bits.TMR3GIE // bit 7
2501 #define TMR1IF PIR1bits.TMR1IF // bit 0
2502 #define TMR2IF PIR1bits.TMR2IF // bit 1
2503 #define CCP1IF PIR1bits.CCP1IF // bit 2
2504 #define SSPIF PIR1bits.SSPIF // bit 3
2505 #define TXIF PIR1bits.TXIF // bit 4
2506 #define RCIF PIR1bits.RCIF // bit 5
2507 #define ADIF PIR1bits.ADIF // bit 6
2508 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
2510 #define CCP2IF PIR2bits.CCP2IF // bit 0
2511 #define TMRAIF PIR2bits.TMRAIF // bit 4
2512 #define TMRBIF PIR2bits.TMRBIF // bit 5
2513 #define TMR3IF PIR2bits.TMR3IF // bit 6
2514 #define TMR3GIF PIR2bits.TMR3GIF // bit 7
2516 #define RD PMCON1bits.RD // bit 0
2518 #define RA0 PORTAbits.RA0 // bit 0, shadows bit in PORTAbits
2519 #define AN0 PORTAbits.AN0 // bit 0, shadows bit in PORTAbits
2520 #define RA1 PORTAbits.RA1 // bit 1, shadows bit in PORTAbits
2521 #define AN1 PORTAbits.AN1 // bit 1, shadows bit in PORTAbits
2522 #define CPSA0 PORTAbits.CPSA0 // bit 1, shadows bit in PORTAbits
2523 #define RA2 PORTAbits.RA2 // bit 2, shadows bit in PORTAbits
2524 #define AN2 PORTAbits.AN2 // bit 2, shadows bit in PORTAbits
2525 #define CPSA1 PORTAbits.CPSA1 // bit 2, shadows bit in PORTAbits
2526 #define DACOUT PORTAbits.DACOUT // bit 2, shadows bit in PORTAbits
2527 #define RA3 PORTAbits.RA3 // bit 3, shadows bit in PORTAbits
2528 #define AN3 PORTAbits.AN3 // bit 3, shadows bit in PORTAbits
2529 #define CPSA2 PORTAbits.CPSA2 // bit 3, shadows bit in PORTAbits
2530 #define RA4 PORTAbits.RA4 // bit 4, shadows bit in PORTAbits
2531 #define CPSA3 PORTAbits.CPSA3 // bit 4, shadows bit in PORTAbits
2532 #define T0CKI PORTAbits.T0CKI // bit 4, shadows bit in PORTAbits
2533 #define TACKI PORTAbits.TACKI // bit 4, shadows bit in PORTAbits
2534 #define RA5 PORTAbits.RA5 // bit 5, shadows bit in PORTAbits
2535 #define AN4 PORTAbits.AN4 // bit 5, shadows bit in PORTAbits
2536 #define CPSA4 PORTAbits.CPSA4 // bit 5, shadows bit in PORTAbits
2537 #define RA6 PORTAbits.RA6 // bit 6, shadows bit in PORTAbits
2538 #define OSC2 PORTAbits.OSC2 // bit 6, shadows bit in PORTAbits
2539 #define CPSB1 PORTAbits.CPSB1 // bit 6, shadows bit in PORTAbits
2540 #define CLKOUT PORTAbits.CLKOUT // bit 6, shadows bit in PORTAbits
2541 #define RA7 PORTAbits.RA7 // bit 7, shadows bit in PORTAbits
2542 #define OSC1 PORTAbits.OSC1 // bit 7, shadows bit in PORTAbits
2543 #define CPSB0 PORTAbits.CPSB0 // bit 7, shadows bit in PORTAbits
2544 #define CLKIN PORTAbits.CLKIN // bit 7, shadows bit in PORTAbits
2546 #define RB0 PORTBbits.RB0 // bit 0, shadows bit in PORTBbits
2547 #define AN12 PORTBbits.AN12 // bit 0, shadows bit in PORTBbits
2548 #define CPSB8 PORTBbits.CPSB8 // bit 0, shadows bit in PORTBbits
2549 #define RB1 PORTBbits.RB1 // bit 1, shadows bit in PORTBbits
2550 #define AN10 PORTBbits.AN10 // bit 1, shadows bit in PORTBbits
2551 #define CPSB9 PORTBbits.CPSB9 // bit 1, shadows bit in PORTBbits
2552 #define RB2 PORTBbits.RB2 // bit 2, shadows bit in PORTBbits
2553 #define AN8 PORTBbits.AN8 // bit 2, shadows bit in PORTBbits
2554 #define CPSB10 PORTBbits.CPSB10 // bit 2, shadows bit in PORTBbits
2555 #define RB3 PORTBbits.RB3 // bit 3, shadows bit in PORTBbits
2556 #define AN9 PORTBbits.AN9 // bit 3, shadows bit in PORTBbits
2557 #define CPSB11 PORTBbits.CPSB11 // bit 3, shadows bit in PORTBbits
2558 #define CCP2 PORTBbits.CCP2 // bit 3, shadows bit in PORTBbits
2559 #define RB4 PORTBbits.RB4 // bit 4, shadows bit in PORTBbits
2560 #define AN11 PORTBbits.AN11 // bit 4, shadows bit in PORTBbits
2561 #define CPSB12 PORTBbits.CPSB12 // bit 4, shadows bit in PORTBbits
2562 #define RB5 PORTBbits.RB5 // bit 5, shadows bit in PORTBbits
2563 #define AN13 PORTBbits.AN13 // bit 5, shadows bit in PORTBbits
2564 #define CPSB13 PORTBbits.CPSB13 // bit 5, shadows bit in PORTBbits
2565 #define T1G PORTBbits.T1G // bit 5, shadows bit in PORTBbits
2566 #define T3CKI PORTBbits.T3CKI // bit 5, shadows bit in PORTBbits
2567 #define RB6 PORTBbits.RB6 // bit 6, shadows bit in PORTBbits
2568 #define CPSB14 PORTBbits.CPSB14 // bit 6, shadows bit in PORTBbits
2569 #define RB7 PORTBbits.RB7 // bit 7, shadows bit in PORTBbits
2570 #define CPSB15 PORTBbits.CPSB15 // bit 7, shadows bit in PORTBbits
2572 #define RD0 PORTDbits.RD0 // bit 0, shadows bit in PORTDbits
2573 #define CPSB5 PORTDbits.CPSB5 // bit 0, shadows bit in PORTDbits
2574 #define T3G PORTDbits.T3G // bit 0, shadows bit in PORTDbits
2575 #define RD1 PORTDbits.RD1 // bit 1, shadows bit in PORTDbits
2576 #define CPSB6 PORTDbits.CPSB6 // bit 1, shadows bit in PORTDbits
2577 #define RD2 PORTDbits.RD2 // bit 2, shadows bit in PORTDbits
2578 #define CPSB7 PORTDbits.CPSB7 // bit 2, shadows bit in PORTDbits
2579 #define RD3 PORTDbits.RD3 // bit 3, shadows bit in PORTDbits
2580 #define CPSA8 PORTDbits.CPSA8 // bit 3, shadows bit in PORTDbits
2581 #define RD4 PORTDbits.RD4 // bit 4, shadows bit in PORTDbits
2582 #define CPSA12 PORTDbits.CPSA12 // bit 4, shadows bit in PORTDbits
2583 #define RD5 PORTDbits.RD5 // bit 5, shadows bit in PORTDbits
2584 #define CPSA13 PORTDbits.CPSA13 // bit 5, shadows bit in PORTDbits
2585 #define RD6 PORTDbits.RD6 // bit 6, shadows bit in PORTDbits
2586 #define CPSA14 PORTDbits.CPSA14 // bit 6, shadows bit in PORTDbits
2587 #define RD7 PORTDbits.RD7 // bit 7, shadows bit in PORTDbits
2588 #define CPSA15 PORTDbits.CPSA15 // bit 7, shadows bit in PORTDbits
2590 #define RE0 PORTEbits.RE0 // bit 0, shadows bit in PORTEbits
2591 #define AN5 PORTEbits.AN5 // bit 0, shadows bit in PORTEbits
2592 #define CPSA5 PORTEbits.CPSA5 // bit 0, shadows bit in PORTEbits
2593 #define RE1 PORTEbits.RE1 // bit 1, shadows bit in PORTEbits
2594 #define AN6 PORTEbits.AN6 // bit 1, shadows bit in PORTEbits
2595 #define CPSA6 PORTEbits.CPSA6 // bit 1, shadows bit in PORTEbits
2596 #define RE2 PORTEbits.RE2 // bit 2, shadows bit in PORTEbits
2597 #define AN7 PORTEbits.AN7 // bit 2, shadows bit in PORTEbits
2598 #define CPSA7 PORTEbits.CPSA7 // bit 2, shadows bit in PORTEbits
2599 #define RE3 PORTEbits.RE3 // bit 3, shadows bit in PORTEbits
2600 #define NOT_MCLR PORTEbits.NOT_MCLR // bit 3, shadows bit in PORTEbits
2602 #define RX9D RCSTAbits.RX9D // bit 0
2603 #define OERR RCSTAbits.OERR // bit 1
2604 #define FERR RCSTAbits.FERR // bit 2
2605 #define ADDEN RCSTAbits.ADDEN // bit 3
2606 #define CREN RCSTAbits.CREN // bit 4
2607 #define SREN RCSTAbits.SREN // bit 5
2608 #define RX9 RCSTAbits.RX9 // bit 6
2609 #define SPEN RCSTAbits.SPEN // bit 7
2611 #define SSPM0 SSPCONbits.SSPM0 // bit 0
2612 #define SSPM1 SSPCONbits.SSPM1 // bit 1
2613 #define SSPM2 SSPCONbits.SSPM2 // bit 2
2614 #define SSPM3 SSPCONbits.SSPM3 // bit 3
2615 #define CKP SSPCONbits.CKP // bit 4
2616 #define SSPEN SSPCONbits.SSPEN // bit 5
2617 #define SSPOV SSPCONbits.SSPOV // bit 6
2618 #define WCOL SSPCONbits.WCOL // bit 7
2620 #define BF SSPSTATbits.BF // bit 0
2621 #define UA SSPSTATbits.UA // bit 1
2622 #define R_NOT_W SSPSTATbits.R_NOT_W // bit 2
2623 #define S SSPSTATbits.S // bit 3
2624 #define P SSPSTATbits.P // bit 4
2625 #define D_NOT_A SSPSTATbits.D_NOT_A // bit 5
2626 #define CKE SSPSTATbits.CKE // bit 6
2627 #define SMP SSPSTATbits.SMP // bit 7
2629 #define C STATUSbits.C // bit 0
2630 #define DC STATUSbits.DC // bit 1
2631 #define Z STATUSbits.Z // bit 2
2632 #define NOT_PD STATUSbits.NOT_PD // bit 3
2633 #define NOT_TO STATUSbits.NOT_TO // bit 4
2634 #define RP0 STATUSbits.RP0 // bit 5
2635 #define RP1 STATUSbits.RP1 // bit 6
2636 #define IRP STATUSbits.IRP // bit 7
2638 #define TMR1ON T1CONbits.TMR1ON // bit 0
2639 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2, shadows bit in T1CONbits
2640 #define T1SYNC T1CONbits.T1SYNC // bit 2, shadows bit in T1CONbits
2641 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
2642 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
2643 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
2644 #define TMRCS0 T1CONbits.TMRCS0 // bit 6, shadows bit in T1CONbits
2645 #define TMR1CS0 T1CONbits.TMR1CS0 // bit 6, shadows bit in T1CONbits
2646 #define TMRCS1 T1CONbits.TMRCS1 // bit 7, shadows bit in T1CONbits
2647 #define TMR1CS1 T1CONbits.TMR1CS1 // bit 7, shadows bit in T1CONbits
2649 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
2650 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
2651 #define T1GVAL T1GCONbits.T1GVAL // bit 2
2652 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3
2653 #define T1GSPM T1GCONbits.T1GSPM // bit 4
2654 #define T1GTM T1GCONbits.T1GTM // bit 5
2655 #define T1GPOL T1GCONbits.T1GPOL // bit 6
2656 #define TMR1GE T1GCONbits.TMR1GE // bit 7
2658 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
2659 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
2660 #define TMR2ON T2CONbits.TMR2ON // bit 2
2661 #define TOUTPS0 T2CONbits.TOUTPS0 // bit 3
2662 #define TOUTPS1 T2CONbits.TOUTPS1 // bit 4
2663 #define TOUTPS2 T2CONbits.TOUTPS2 // bit 5
2664 #define TOUTPS3 T2CONbits.TOUTPS3 // bit 6
2666 #define TMR3ON T3CONbits.TMR3ON // bit 0
2667 #define T3SYNC T3CONbits.T3SYNC // bit 2
2668 #define T3CKPS0 T3CONbits.T3CKPS0 // bit 4
2669 #define T3CKPS1 T3CONbits.T3CKPS1 // bit 5
2670 #define TMR3CS0 T3CONbits.TMR3CS0 // bit 6
2671 #define TMR3CS1 T3CONbits.TMR3CS1 // bit 7
2673 #define T3GSS0 T3GCONbits.T3GSS0 // bit 0
2674 #define T3GSS1 T3GCONbits.T3GSS1 // bit 1
2675 #define T3GVAL T3GCONbits.T3GVAL // bit 2
2676 #define T3GGO_NOT_DONE T3GCONbits.T3GGO_NOT_DONE // bit 3
2677 #define T3GSPM T3GCONbits.T3GSPM // bit 4
2678 #define T3GTM T3GCONbits.T3GTM // bit 5
2679 #define T3GPOL T3GCONbits.T3GPOL // bit 6
2680 #define TMR3GE T3GCONbits.TMR3GE // bit 7
2682 #define TAPS0 TACONbits.TAPS0 // bit 0, shadows bit in TACONbits
2683 #define TMRAPS0 TACONbits.TMRAPS0 // bit 0, shadows bit in TACONbits
2684 #define TAPS1 TACONbits.TAPS1 // bit 1, shadows bit in TACONbits
2685 #define TMRAPS1 TACONbits.TMRAPS1 // bit 1, shadows bit in TACONbits
2686 #define TAPS2 TACONbits.TAPS2 // bit 2, shadows bit in TACONbits
2687 #define TMRAPS2 TACONbits.TMRAPS2 // bit 2, shadows bit in TACONbits
2688 #define TAPSA TACONbits.TAPSA // bit 3, shadows bit in TACONbits
2689 #define TMRAPSA TACONbits.TMRAPSA // bit 3, shadows bit in TACONbits
2690 #define TASE TACONbits.TASE // bit 4, shadows bit in TACONbits
2691 #define TMRASE TACONbits.TMRASE // bit 4, shadows bit in TACONbits
2692 #define TACS TACONbits.TACS // bit 5, shadows bit in TACONbits
2693 #define TMRACS TACONbits.TMRACS // bit 5, shadows bit in TACONbits
2694 #define TMRAON TACONbits.TMRAON // bit 7
2696 #define TBPS0 TBCONbits.TBPS0 // bit 0, shadows bit in TBCONbits
2697 #define TMRBPS0 TBCONbits.TMRBPS0 // bit 0, shadows bit in TBCONbits
2698 #define TBPS1 TBCONbits.TBPS1 // bit 1, shadows bit in TBCONbits
2699 #define TMRBPS1 TBCONbits.TMRBPS1 // bit 1, shadows bit in TBCONbits
2700 #define TBPS2 TBCONbits.TBPS2 // bit 2, shadows bit in TBCONbits
2701 #define TMRBPS2 TBCONbits.TMRBPS2 // bit 2, shadows bit in TBCONbits
2702 #define TBPSA TBCONbits.TBPSA // bit 3, shadows bit in TBCONbits
2703 #define TMRBPSA TBCONbits.TMRBPSA // bit 3, shadows bit in TBCONbits
2704 #define TBSE TBCONbits.TBSE // bit 4, shadows bit in TBCONbits
2705 #define TMRBSE TBCONbits.TMRBSE // bit 4, shadows bit in TBCONbits
2706 #define TBCS TBCONbits.TBCS // bit 5, shadows bit in TBCONbits
2707 #define TMRBCS TBCONbits.TMRBCS // bit 5, shadows bit in TBCONbits
2708 #define TMRBON TBCONbits.TMRBON // bit 7
2710 #define TRISA0 TRISAbits.TRISA0 // bit 0
2711 #define TRISA1 TRISAbits.TRISA1 // bit 1
2712 #define TRISA2 TRISAbits.TRISA2 // bit 2
2713 #define TRISA3 TRISAbits.TRISA3 // bit 3
2714 #define TRISA4 TRISAbits.TRISA4 // bit 4
2715 #define TRISA5 TRISAbits.TRISA5 // bit 5
2716 #define TRISA6 TRISAbits.TRISA6 // bit 6
2717 #define TRISA7 TRISAbits.TRISA7 // bit 7
2719 #define TRISB0 TRISBbits.TRISB0 // bit 0
2720 #define TRISB1 TRISBbits.TRISB1 // bit 1
2721 #define TRISB2 TRISBbits.TRISB2 // bit 2
2722 #define TRISB3 TRISBbits.TRISB3 // bit 3
2723 #define TRISB4 TRISBbits.TRISB4 // bit 4
2724 #define TRISB5 TRISBbits.TRISB5 // bit 5
2725 #define TRISB6 TRISBbits.TRISB6 // bit 6
2726 #define TRISB7 TRISBbits.TRISB7 // bit 7
2728 #define TRISC0 TRISCbits.TRISC0 // bit 0
2729 #define TRISC1 TRISCbits.TRISC1 // bit 1
2730 #define TRISC2 TRISCbits.TRISC2 // bit 2
2731 #define TRISC3 TRISCbits.TRISC3 // bit 3
2732 #define TRISC4 TRISCbits.TRISC4 // bit 4
2733 #define TRISC5 TRISCbits.TRISC5 // bit 5
2734 #define TRISC6 TRISCbits.TRISC6 // bit 6
2735 #define TRISC7 TRISCbits.TRISC7 // bit 7
2737 #define TRISD0 TRISDbits.TRISD0 // bit 0
2738 #define TRISD1 TRISDbits.TRISD1 // bit 1
2739 #define TRISD2 TRISDbits.TRISD2 // bit 2
2740 #define TRISD3 TRISDbits.TRISD3 // bit 3
2741 #define TRISD4 TRISDbits.TRISD4 // bit 4
2742 #define TRISD5 TRISDbits.TRISD5 // bit 5
2743 #define TRISD6 TRISDbits.TRISD6 // bit 6
2744 #define TRISD7 TRISDbits.TRISD7 // bit 7
2746 #define TRISE0 TRISEbits.TRISE0 // bit 0
2747 #define TRISE1 TRISEbits.TRISE1 // bit 1
2748 #define TRISE2 TRISEbits.TRISE2 // bit 2
2749 #define TRISE3 TRISEbits.TRISE3 // bit 3
2751 #define TX9D TXSTAbits.TX9D // bit 0
2752 #define TRMT TXSTAbits.TRMT // bit 1
2753 #define BRGH TXSTAbits.BRGH // bit 2
2754 #define SYNC TXSTAbits.SYNC // bit 4
2755 #define TXEN TXSTAbits.TXEN // bit 5
2756 #define TX9 TXSTAbits.TX9 // bit 6
2757 #define CSRC TXSTAbits.CSRC // bit 7
2759 #define WPUB0 WPUBbits.WPUB0 // bit 0
2760 #define WPUB1 WPUBbits.WPUB1 // bit 1
2761 #define WPUB2 WPUBbits.WPUB2 // bit 2
2762 #define WPUB3 WPUBbits.WPUB3 // bit 3
2763 #define WPUB4 WPUBbits.WPUB4 // bit 4
2764 #define WPUB5 WPUBbits.WPUB5 // bit 5
2765 #define WPUB6 WPUBbits.WPUB6 // bit 6
2766 #define WPUB7 WPUBbits.WPUB7 // bit 7
2768 #endif // #ifndef NO_BIT_DEFINES
2770 #endif // #ifndef __PIC16F707_H__