2 * This declarations of the PIC16LF707 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 __PIC16LF707_H__
26 #define __PIC16LF707_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;
749 extern __at(0x0010) volatile __T1CONbits_t T1CONbits
;
752 #define _NOT_T1SYNC 0x04
754 #define _T1OSCEN 0x08
755 #define _T1CKPS0 0x10
756 #define _T1CKPS1 0x20
760 //==============================================================================
762 extern __at(0x0011) __sfr TMR2
;
764 //==============================================================================
767 extern __at(0x0012) __sfr T2CON
;
773 unsigned T2CKPS0
: 1;
774 unsigned T2CKPS1
: 1;
776 unsigned TOUTPS0
: 1;
777 unsigned TOUTPS1
: 1;
778 unsigned TOUTPS2
: 1;
779 unsigned TOUTPS3
: 1;
797 extern __at(0x0012) volatile __T2CONbits_t T2CONbits
;
799 #define _T2CKPS0 0x01
800 #define _T2CKPS1 0x02
802 #define _TOUTPS0 0x08
803 #define _TOUTPS1 0x10
804 #define _TOUTPS2 0x20
805 #define _TOUTPS3 0x40
807 //==============================================================================
809 extern __at(0x0013) __sfr SSPBUF
;
811 //==============================================================================
814 extern __at(0x0014) __sfr SSPCON
;
837 extern __at(0x0014) volatile __SSPCONbits_t SSPCONbits
;
848 //==============================================================================
850 extern __at(0x0015) __sfr CCPR1
;
851 extern __at(0x0015) __sfr CCPR1L
;
852 extern __at(0x0016) __sfr CCPR1H
;
854 //==============================================================================
857 extern __at(0x0017) __sfr CCP1CON
;
887 extern __at(0x0017) volatile __CCP1CONbits_t CCP1CONbits
;
896 //==============================================================================
899 //==============================================================================
902 extern __at(0x0018) __sfr RCSTA
;
916 extern __at(0x0018) volatile __RCSTAbits_t RCSTAbits
;
927 //==============================================================================
929 extern __at(0x0019) __sfr TXREG
;
930 extern __at(0x001A) __sfr RCREG
;
931 extern __at(0x001B) __sfr CCPR2
;
932 extern __at(0x001B) __sfr CCPR2L
;
933 extern __at(0x001C) __sfr CCPR2H
;
935 //==============================================================================
938 extern __at(0x001D) __sfr CCP2CON
;
968 extern __at(0x001D) volatile __CCP2CONbits_t CCP2CONbits
;
977 //==============================================================================
979 extern __at(0x001E) __sfr ADRES
;
981 //==============================================================================
984 extern __at(0x001F) __sfr ADCON0
;
991 unsigned GO_NOT_DONE
: 1;
1008 extern __at(0x001F) volatile __ADCON0bits_t ADCON0bits
;
1011 #define _GO_NOT_DONE 0x02
1017 //==============================================================================
1020 //==============================================================================
1023 extern __at(0x0081) __sfr OPTION_REG
;
1033 unsigned TMR0SE
: 1;
1034 unsigned TMR0CS
: 1;
1035 unsigned INTEDG
: 1;
1036 unsigned NOT_RBPU
: 1;
1056 } __OPTION_REGbits_t
;
1058 extern __at(0x0081) volatile __OPTION_REGbits_t OPTION_REGbits
;
1064 #define _TMR0SE 0x10
1066 #define _TMR0CS 0x20
1068 #define _INTEDG 0x40
1069 #define _NOT_RBPU 0x80
1071 //==============================================================================
1074 //==============================================================================
1077 extern __at(0x0085) __sfr TRISA
;
1081 unsigned TRISA0
: 1;
1082 unsigned TRISA1
: 1;
1083 unsigned TRISA2
: 1;
1084 unsigned TRISA3
: 1;
1085 unsigned TRISA4
: 1;
1086 unsigned TRISA5
: 1;
1087 unsigned TRISA6
: 1;
1088 unsigned TRISA7
: 1;
1091 extern __at(0x0085) volatile __TRISAbits_t TRISAbits
;
1093 #define _TRISA0 0x01
1094 #define _TRISA1 0x02
1095 #define _TRISA2 0x04
1096 #define _TRISA3 0x08
1097 #define _TRISA4 0x10
1098 #define _TRISA5 0x20
1099 #define _TRISA6 0x40
1100 #define _TRISA7 0x80
1102 //==============================================================================
1105 //==============================================================================
1108 extern __at(0x0086) __sfr TRISB
;
1112 unsigned TRISB0
: 1;
1113 unsigned TRISB1
: 1;
1114 unsigned TRISB2
: 1;
1115 unsigned TRISB3
: 1;
1116 unsigned TRISB4
: 1;
1117 unsigned TRISB5
: 1;
1118 unsigned TRISB6
: 1;
1119 unsigned TRISB7
: 1;
1122 extern __at(0x0086) volatile __TRISBbits_t TRISBbits
;
1124 #define _TRISB0 0x01
1125 #define _TRISB1 0x02
1126 #define _TRISB2 0x04
1127 #define _TRISB3 0x08
1128 #define _TRISB4 0x10
1129 #define _TRISB5 0x20
1130 #define _TRISB6 0x40
1131 #define _TRISB7 0x80
1133 //==============================================================================
1136 //==============================================================================
1139 extern __at(0x0087) __sfr TRISC
;
1143 unsigned TRISC0
: 1;
1144 unsigned TRISC1
: 1;
1145 unsigned TRISC2
: 1;
1146 unsigned TRISC3
: 1;
1147 unsigned TRISC4
: 1;
1148 unsigned TRISC5
: 1;
1149 unsigned TRISC6
: 1;
1150 unsigned TRISC7
: 1;
1153 extern __at(0x0087) volatile __TRISCbits_t TRISCbits
;
1155 #define _TRISC0 0x01
1156 #define _TRISC1 0x02
1157 #define _TRISC2 0x04
1158 #define _TRISC3 0x08
1159 #define _TRISC4 0x10
1160 #define _TRISC5 0x20
1161 #define _TRISC6 0x40
1162 #define _TRISC7 0x80
1164 //==============================================================================
1167 //==============================================================================
1170 extern __at(0x0088) __sfr TRISD
;
1174 unsigned TRISD0
: 1;
1175 unsigned TRISD1
: 1;
1176 unsigned TRISD2
: 1;
1177 unsigned TRISD3
: 1;
1178 unsigned TRISD4
: 1;
1179 unsigned TRISD5
: 1;
1180 unsigned TRISD6
: 1;
1181 unsigned TRISD7
: 1;
1184 extern __at(0x0088) volatile __TRISDbits_t TRISDbits
;
1186 #define _TRISD0 0x01
1187 #define _TRISD1 0x02
1188 #define _TRISD2 0x04
1189 #define _TRISD3 0x08
1190 #define _TRISD4 0x10
1191 #define _TRISD5 0x20
1192 #define _TRISD6 0x40
1193 #define _TRISD7 0x80
1195 //==============================================================================
1198 //==============================================================================
1201 extern __at(0x0089) __sfr TRISE
;
1207 unsigned TRISE0
: 1;
1208 unsigned TRISE1
: 1;
1209 unsigned TRISE2
: 1;
1210 unsigned TRISE3
: 1;
1224 extern __at(0x0089) volatile __TRISEbits_t TRISEbits
;
1226 #define _TRISE0 0x01
1227 #define _TRISE1 0x02
1228 #define _TRISE2 0x04
1229 #define _TRISE3 0x08
1231 //==============================================================================
1234 //==============================================================================
1237 extern __at(0x008C) __sfr PIE1
;
1241 unsigned TMR1IE
: 1;
1242 unsigned TMR2IE
: 1;
1243 unsigned CCP1IE
: 1;
1248 unsigned TMR1GIE
: 1;
1251 extern __at(0x008C) volatile __PIE1bits_t PIE1bits
;
1253 #define _TMR1IE 0x01
1254 #define _TMR2IE 0x02
1255 #define _CCP1IE 0x04
1260 #define _TMR1GIE 0x80
1262 //==============================================================================
1265 //==============================================================================
1268 extern __at(0x008D) __sfr PIE2
;
1272 unsigned CCP2IE
: 1;
1276 unsigned TMRAIE
: 1;
1277 unsigned TMRBIE
: 1;
1278 unsigned TMR3IE
: 1;
1279 unsigned TMR3GIE
: 1;
1282 extern __at(0x008D) volatile __PIE2bits_t PIE2bits
;
1284 #define _CCP2IE 0x01
1285 #define _TMRAIE 0x10
1286 #define _TMRBIE 0x20
1287 #define _TMR3IE 0x40
1288 #define _TMR3GIE 0x80
1290 //==============================================================================
1293 //==============================================================================
1296 extern __at(0x008E) __sfr PCON
;
1300 unsigned NOT_BOR
: 1;
1301 unsigned NOT_POR
: 1;
1310 extern __at(0x008E) volatile __PCONbits_t PCONbits
;
1312 #define _NOT_BOR 0x01
1313 #define _NOT_POR 0x02
1315 //==============================================================================
1318 //==============================================================================
1321 extern __at(0x008F) __sfr T1GCON
;
1327 unsigned T1GSS0
: 1;
1328 unsigned T1GSS1
: 1;
1329 unsigned T1GVAL
: 1;
1330 unsigned T1GGO_NOT_DONE
: 1;
1331 unsigned T1GSPM
: 1;
1333 unsigned T1GPOL
: 1;
1334 unsigned TMR1GE
: 1;
1344 extern __at(0x008F) volatile __T1GCONbits_t T1GCONbits
;
1346 #define _T1GSS0 0x01
1347 #define _T1GSS1 0x02
1348 #define _T1GVAL 0x04
1349 #define _T1GGO_NOT_DONE 0x08
1350 #define _T1GSPM 0x10
1352 #define _T1GPOL 0x40
1353 #define _TMR1GE 0x80
1355 //==============================================================================
1358 //==============================================================================
1361 extern __at(0x0090) __sfr OSCCON
;
1385 extern __at(0x0090) volatile __OSCCONbits_t OSCCONbits
;
1392 //==============================================================================
1394 extern __at(0x0091) __sfr OSCTUNE
;
1395 extern __at(0x0092) __sfr PR2
;
1396 extern __at(0x0093) __sfr SSPADD
;
1397 extern __at(0x0093) __sfr SSPMSK
;
1399 //==============================================================================
1402 extern __at(0x0094) __sfr SSPSTAT
;
1408 unsigned R_NOT_W
: 1;
1411 unsigned D_NOT_A
: 1;
1416 extern __at(0x0094) volatile __SSPSTATbits_t SSPSTATbits
;
1420 #define _R_NOT_W 0x04
1423 #define _D_NOT_A 0x20
1427 //==============================================================================
1430 //==============================================================================
1433 extern __at(0x0095) __sfr WPUB
;
1447 extern __at(0x0095) volatile __WPUBbits_t WPUBbits
;
1458 //==============================================================================
1461 //==============================================================================
1464 extern __at(0x0096) __sfr IOCB
;
1478 extern __at(0x0096) volatile __IOCBbits_t IOCBbits
;
1489 //==============================================================================
1492 //==============================================================================
1495 extern __at(0x0097) __sfr T3CON
;
1501 unsigned TMR3ON
: 1;
1503 unsigned T3SYNC
: 1;
1505 unsigned T3CKPS0
: 1;
1506 unsigned T3CKPS1
: 1;
1507 unsigned TMR3CS0
: 1;
1508 unsigned TMR3CS1
: 1;
1514 unsigned T3CKPS
: 2;
1521 unsigned TMR3CS
: 2;
1525 extern __at(0x0097) volatile __T3CONbits_t T3CONbits
;
1527 #define _TMR3ON 0x01
1528 #define _T3SYNC 0x04
1529 #define _T3CKPS0 0x10
1530 #define _T3CKPS1 0x20
1531 #define _TMR3CS0 0x40
1532 #define _TMR3CS1 0x80
1534 //==============================================================================
1537 //==============================================================================
1540 extern __at(0x0098) __sfr TXSTA
;
1554 extern __at(0x0098) volatile __TXSTAbits_t TXSTAbits
;
1564 //==============================================================================
1566 extern __at(0x0099) __sfr SPBRG
;
1567 extern __at(0x009A) __sfr TMR3
;
1568 extern __at(0x009A) __sfr TMR3L
;
1569 extern __at(0x009B) __sfr TMR3H
;
1571 //==============================================================================
1574 extern __at(0x009C) __sfr APFCON
;
1578 unsigned CCP2SEL
: 1;
1588 extern __at(0x009C) volatile __APFCONbits_t APFCONbits
;
1590 #define _CCP2SEL 0x01
1593 //==============================================================================
1596 //==============================================================================
1599 extern __at(0x009D) __sfr FVRCON
;
1605 unsigned ADFVR0
: 1;
1606 unsigned ADFVR1
: 1;
1607 unsigned CDAFVR0
: 1;
1608 unsigned CDAFVR1
: 1;
1612 unsigned FVRRDY
: 1;
1624 unsigned CDAFVR
: 2;
1629 extern __at(0x009D) volatile __FVRCONbits_t FVRCONbits
;
1631 #define _ADFVR0 0x01
1632 #define _ADFVR1 0x02
1633 #define _CDAFVR0 0x04
1634 #define _CDAFVR1 0x08
1636 #define _FVRRDY 0x80
1638 //==============================================================================
1641 //==============================================================================
1644 extern __at(0x009E) __sfr T3GCON
;
1650 unsigned T3GSS0
: 1;
1651 unsigned T3GSS1
: 1;
1652 unsigned T3GVAL
: 1;
1653 unsigned T3GGO_NOT_DONE
: 1;
1654 unsigned T3GSPM
: 1;
1656 unsigned T3GPOL
: 1;
1657 unsigned TMR3GE
: 1;
1667 extern __at(0x009E) volatile __T3GCONbits_t T3GCONbits
;
1669 #define _T3GSS0 0x01
1670 #define _T3GSS1 0x02
1671 #define _T3GVAL 0x04
1672 #define _T3GGO_NOT_DONE 0x08
1673 #define _T3GSPM 0x10
1675 #define _T3GPOL 0x40
1676 #define _TMR3GE 0x80
1678 //==============================================================================
1681 //==============================================================================
1684 extern __at(0x009F) __sfr ADCON1
;
1690 unsigned ADREF0
: 1;
1691 unsigned ADREF1
: 1;
1714 extern __at(0x009F) volatile __ADCON1bits_t ADCON1bits
;
1716 #define _ADREF0 0x01
1717 #define _ADREF1 0x02
1722 //==============================================================================
1725 //==============================================================================
1728 extern __at(0x0105) __sfr TACON
;
1741 unsigned TMRAON
: 1;
1746 unsigned TMRAPS0
: 1;
1747 unsigned TMRAPS1
: 1;
1748 unsigned TMRAPS2
: 1;
1749 unsigned TMRAPSA
: 1;
1750 unsigned TMRASE
: 1;
1751 unsigned TMRACS
: 1;
1758 unsigned TMRAPS
: 3;
1769 extern __at(0x0105) volatile __TACONbits_t TACONbits
;
1772 #define _TMRAPS0 0x01
1774 #define _TMRAPS1 0x02
1776 #define _TMRAPS2 0x04
1778 #define _TMRAPSA 0x08
1780 #define _TMRASE 0x10
1782 #define _TMRACS 0x20
1783 #define _TMRAON 0x80
1785 //==============================================================================
1788 //==============================================================================
1791 extern __at(0x0106) __sfr CPSBCON0
;
1798 unsigned CPSBOUT
: 1;
1799 unsigned CPSBRNG0
: 1;
1800 unsigned CPSBRNG1
: 1;
1803 unsigned CPSBRM
: 1;
1804 unsigned CPSBON
: 1;
1810 unsigned CPSBRNG
: 2;
1815 extern __at(0x0106) volatile __CPSBCON0bits_t CPSBCON0bits
;
1818 #define _CPSBOUT 0x02
1819 #define _CPSBRNG0 0x04
1820 #define _CPSBRNG1 0x08
1821 #define _CPSBRM 0x40
1822 #define _CPSBON 0x80
1824 //==============================================================================
1827 //==============================================================================
1830 extern __at(0x0107) __sfr CPSBCON1
;
1836 unsigned CPSBCH0
: 1;
1837 unsigned CPSBCH1
: 1;
1838 unsigned CPSBCH2
: 1;
1839 unsigned CPSBCH3
: 1;
1848 unsigned CPSBCH
: 4;
1853 extern __at(0x0107) volatile __CPSBCON1bits_t CPSBCON1bits
;
1855 #define _CPSBCH0 0x01
1856 #define _CPSBCH1 0x02
1857 #define _CPSBCH2 0x04
1858 #define _CPSBCH3 0x08
1860 //==============================================================================
1863 //==============================================================================
1866 extern __at(0x0108) __sfr CPSACON0
;
1873 unsigned CPSAOUT
: 1;
1874 unsigned CPSARNG0
: 1;
1875 unsigned CPSARNG1
: 1;
1878 unsigned CPSARM
: 1;
1879 unsigned CPSAON
: 1;
1885 unsigned CPSARNG
: 2;
1890 extern __at(0x0108) volatile __CPSACON0bits_t CPSACON0bits
;
1893 #define _CPSAOUT 0x02
1894 #define _CPSARNG0 0x04
1895 #define _CPSARNG1 0x08
1896 #define _CPSARM 0x40
1897 #define _CPSAON 0x80
1899 //==============================================================================
1902 //==============================================================================
1905 extern __at(0x0109) __sfr CPSACON1
;
1911 unsigned CPSACH0
: 1;
1912 unsigned CPSACH1
: 1;
1913 unsigned CPSACH2
: 1;
1914 unsigned CPSACH3
: 1;
1923 unsigned CPSACH
: 4;
1928 extern __at(0x0109) volatile __CPSACON1bits_t CPSACON1bits
;
1930 #define _CPSACH0 0x01
1931 #define _CPSACH1 0x02
1932 #define _CPSACH2 0x04
1933 #define _CPSACH3 0x08
1935 //==============================================================================
1937 extern __at(0x010C) __sfr PMDATL
;
1938 extern __at(0x010D) __sfr PMADRL
;
1939 extern __at(0x010E) __sfr PMDATH
;
1940 extern __at(0x010F) __sfr PMADRH
;
1941 extern __at(0x0110) __sfr TMRA
;
1943 //==============================================================================
1946 extern __at(0x0111) __sfr TBCON
;
1959 unsigned TMRBON
: 1;
1964 unsigned TMRBPS0
: 1;
1965 unsigned TMRBPS1
: 1;
1966 unsigned TMRBPS2
: 1;
1967 unsigned TMRBPSA
: 1;
1968 unsigned TMRBSE
: 1;
1969 unsigned TMRBCS
: 1;
1976 unsigned TMRBPS
: 3;
1987 extern __at(0x0111) volatile __TBCONbits_t TBCONbits
;
1990 #define _TMRBPS0 0x01
1992 #define _TMRBPS1 0x02
1994 #define _TMRBPS2 0x04
1996 #define _TMRBPSA 0x08
1998 #define _TMRBSE 0x10
2000 #define _TMRBCS 0x20
2001 #define _TMRBON 0x80
2003 //==============================================================================
2005 extern __at(0x0112) __sfr TMRB
;
2007 //==============================================================================
2010 extern __at(0x0113) __sfr DACCON0
;
2018 unsigned DACPSS0
: 1;
2019 unsigned DACPSS1
: 1;
2022 unsigned DACLPS
: 1;
2029 unsigned DACPSS
: 2;
2034 extern __at(0x0113) volatile __DACCON0bits_t DACCON0bits
;
2036 #define _DACPSS0 0x04
2037 #define _DACPSS1 0x08
2039 #define _DACLPS 0x40
2042 //==============================================================================
2045 //==============================================================================
2048 extern __at(0x0114) __sfr DACCON1
;
2071 extern __at(0x0114) volatile __DACCON1bits_t DACCON1bits
;
2079 //==============================================================================
2082 //==============================================================================
2085 extern __at(0x0185) __sfr ANSELA
;
2099 extern __at(0x0185) volatile __ANSELAbits_t ANSELAbits
;
2110 //==============================================================================
2113 //==============================================================================
2116 extern __at(0x0186) __sfr ANSELB
;
2130 extern __at(0x0186) volatile __ANSELBbits_t ANSELBbits
;
2141 //==============================================================================
2144 //==============================================================================
2147 extern __at(0x0187) __sfr ANSELC
;
2161 extern __at(0x0187) volatile __ANSELCbits_t ANSELCbits
;
2170 //==============================================================================
2173 //==============================================================================
2176 extern __at(0x0188) __sfr ANSELD
;
2190 extern __at(0x0188) volatile __ANSELDbits_t ANSELDbits
;
2201 //==============================================================================
2204 //==============================================================================
2207 extern __at(0x0189) __sfr ANSELE
;
2230 extern __at(0x0189) volatile __ANSELEbits_t ANSELEbits
;
2236 //==============================================================================
2239 //==============================================================================
2242 extern __at(0x018C) __sfr PMCON1
;
2256 extern __at(0x018C) volatile __PMCON1bits_t PMCON1bits
;
2260 //==============================================================================
2263 //==============================================================================
2265 // Configuration Bits
2267 //==============================================================================
2269 #define _CONFIG 0x2007
2270 #define _CONFIG2 0x2008
2272 //----------------------------- CONFIG Options -------------------------------
2274 #define _FOSC_LP_OSC 0x3FF8 // LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN.
2275 #define _LP_OSC 0x3FF8 // LP oscillator: Low-power crystal on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN.
2276 #define _FOSC_XT_OSC 0x3FF9 // XT oscillator: Crystal/resonator on RA6/OSC2/CLKIN and RA7/OSC1/CLKIN.
2277 #define _XT_OSC 0x3FF9 // XT oscillator: Crystal/resonator on RA6/OSC2/CLKIN and RA7/OSC1/CLKIN.
2278 #define _FOSC_HS_OSC 0x3FFA // HS oscillator: High Speed crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN.
2279 #define _HS_OSC 0x3FFA // HS oscillator: High Speed crystal/resonator on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN.
2280 #define _FOSC_EC_OSC 0x3FFB // EC oscillator: I/O function on RA6/OSC2/CLKOUT pin, CLKIN on RA7/OSC1/CLKIN.
2281 #define _EC_OSC 0x3FFB // EC oscillator: I/O function on RA6/OSC2/CLKOUT pin, CLKIN on RA7/OSC1/CLKIN.
2282 #define _FOSC_INTOSCIO 0x3FFC // INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN pins.
2283 #define _INTOSCIO 0x3FFC // INTOSCIO oscillator: I/O function on RA6/OSC2/CLKOUT and RA7/OSC1/CLKIN pins.
2284 #define _FOSC_INTOSC 0x3FFD // INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN.
2285 #define _INTOSC 0x3FFD // INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN.
2286 #define _FOSC_EXTRCIO 0x3FFE // RCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN.
2287 #define _EXTRCIO 0x3FFE // RCIO oscillator: I/O function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN.
2288 #define _FOSC_EXTRC 0x3FFF // RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN.
2289 #define _EXTRC 0x3FFF // RC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, RC on RA7/OSC1/CLKIN.
2290 #define _WDTE_OFF 0x3FF7 // WDT disabled and can be enabled by SWDTEN bit of the WDTCON register.
2291 #define _WDT_OFF 0x3FF7 // WDT disabled and can be enabled by SWDTEN bit of the WDTCON register.
2292 #define _WDTE_ON 0x3FFF // WDT enabled.
2293 #define _WDT_ON 0x3FFF // WDT enabled.
2294 #define _PWRTE_ON 0x3FEF // PWRT enabled.
2295 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
2296 #define _MCLRE_OFF 0x3FDF // RE3/MCLR pin function is digital input, MCLR internally tied to VDD.
2297 #define _MCLRE_ON 0x3FFF // RE3/MCLR pin function is MCLR.
2298 #define _CP_ON 0x3FBF // Program memory code protection is enabled.
2299 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
2300 #define _BOREN_OFF 0x3CFF // BOR disabled (Preconditioned State).
2301 #define _BOREN_NSLEEP 0x3EFF // BOR enabled during operation and disabled in Sleep.
2302 #define _BOREN_ON 0x3FFF // BOR enabled.
2303 #define _BORV_25 0x3BFF // Brown-out Reset Voltage (VBOR) set to 2.5 V nominal.
2304 #define _BORV_19 0x3FFF // Brown-out Reset Voltage (VBOR) set to 1.9 V nominal.
2305 #define _PLLEN_OFF 0x2FFF // INTOSC Frequency is 500 kHz.
2306 #define _PLLEN_ON 0x3FFF // INTOSC Frequency is 16 MHz (32x).
2308 //==============================================================================
2310 #define _DEVID1 0x2006
2312 #define _IDLOC0 0x2000
2313 #define _IDLOC1 0x2001
2314 #define _IDLOC2 0x2002
2315 #define _IDLOC3 0x2003
2317 //==============================================================================
2319 #ifndef NO_BIT_DEFINES
2321 #define ADON ADCON0bits.ADON // bit 0
2322 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1
2323 #define CHS0 ADCON0bits.CHS0 // bit 2
2324 #define CHS1 ADCON0bits.CHS1 // bit 3
2325 #define CHS2 ADCON0bits.CHS2 // bit 4
2326 #define CHS3 ADCON0bits.CHS3 // bit 5
2328 #define ADREF0 ADCON1bits.ADREF0 // bit 0
2329 #define ADREF1 ADCON1bits.ADREF1 // bit 1
2330 #define ADCS0 ADCON1bits.ADCS0 // bit 4
2331 #define ADCS1 ADCON1bits.ADCS1 // bit 5
2332 #define ADCS2 ADCON1bits.ADCS2 // bit 6
2334 #define ANSA0 ANSELAbits.ANSA0 // bit 0
2335 #define ANSA1 ANSELAbits.ANSA1 // bit 1
2336 #define ANSA2 ANSELAbits.ANSA2 // bit 2
2337 #define ANSA3 ANSELAbits.ANSA3 // bit 3
2338 #define ANSA4 ANSELAbits.ANSA4 // bit 4
2339 #define ANSA5 ANSELAbits.ANSA5 // bit 5
2340 #define ANSA6 ANSELAbits.ANSA6 // bit 6
2341 #define ANSA7 ANSELAbits.ANSA7 // bit 7
2343 #define ANSB0 ANSELBbits.ANSB0 // bit 0
2344 #define ANSB1 ANSELBbits.ANSB1 // bit 1
2345 #define ANSB2 ANSELBbits.ANSB2 // bit 2
2346 #define ANSB3 ANSELBbits.ANSB3 // bit 3
2347 #define ANSB4 ANSELBbits.ANSB4 // bit 4
2348 #define ANSB5 ANSELBbits.ANSB5 // bit 5
2349 #define ANSB6 ANSELBbits.ANSB6 // bit 6
2350 #define ANSB7 ANSELBbits.ANSB7 // bit 7
2352 #define ANSC0 ANSELCbits.ANSC0 // bit 0
2353 #define ANSC1 ANSELCbits.ANSC1 // bit 1
2354 #define ANSC2 ANSELCbits.ANSC2 // bit 2
2355 #define ANSC5 ANSELCbits.ANSC5 // bit 5
2356 #define ANSC6 ANSELCbits.ANSC6 // bit 6
2357 #define ANSC7 ANSELCbits.ANSC7 // bit 7
2359 #define ANSD0 ANSELDbits.ANSD0 // bit 0
2360 #define ANSD1 ANSELDbits.ANSD1 // bit 1
2361 #define ANSD2 ANSELDbits.ANSD2 // bit 2
2362 #define ANSD3 ANSELDbits.ANSD3 // bit 3
2363 #define ANSD4 ANSELDbits.ANSD4 // bit 4
2364 #define ANSD5 ANSELDbits.ANSD5 // bit 5
2365 #define ANSD6 ANSELDbits.ANSD6 // bit 6
2366 #define ANSD7 ANSELDbits.ANSD7 // bit 7
2368 #define ANSE0 ANSELEbits.ANSE0 // bit 0
2369 #define ANSE1 ANSELEbits.ANSE1 // bit 1
2370 #define ANSE2 ANSELEbits.ANSE2 // bit 2
2372 #define CCP2SEL APFCONbits.CCP2SEL // bit 0
2373 #define SSSEL APFCONbits.SSSEL // bit 1
2375 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
2376 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
2377 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
2378 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
2379 #define DC1B0 CCP1CONbits.DC1B0 // bit 4
2380 #define DC1B1 CCP1CONbits.DC1B1 // bit 5
2382 #define CCP2M0 CCP2CONbits.CCP2M0 // bit 0
2383 #define CCP2M1 CCP2CONbits.CCP2M1 // bit 1
2384 #define CCP2M2 CCP2CONbits.CCP2M2 // bit 2
2385 #define CCP2M3 CCP2CONbits.CCP2M3 // bit 3
2386 #define DC2B0 CCP2CONbits.DC2B0 // bit 4
2387 #define DC2B1 CCP2CONbits.DC2B1 // bit 5
2389 #define TAXCS CPSACON0bits.TAXCS // bit 0
2390 #define CPSAOUT CPSACON0bits.CPSAOUT // bit 1
2391 #define CPSARNG0 CPSACON0bits.CPSARNG0 // bit 2
2392 #define CPSARNG1 CPSACON0bits.CPSARNG1 // bit 3
2393 #define CPSARM CPSACON0bits.CPSARM // bit 6
2394 #define CPSAON CPSACON0bits.CPSAON // bit 7
2396 #define CPSACH0 CPSACON1bits.CPSACH0 // bit 0
2397 #define CPSACH1 CPSACON1bits.CPSACH1 // bit 1
2398 #define CPSACH2 CPSACON1bits.CPSACH2 // bit 2
2399 #define CPSACH3 CPSACON1bits.CPSACH3 // bit 3
2401 #define TBXCS CPSBCON0bits.TBXCS // bit 0
2402 #define CPSBOUT CPSBCON0bits.CPSBOUT // bit 1
2403 #define CPSBRNG0 CPSBCON0bits.CPSBRNG0 // bit 2
2404 #define CPSBRNG1 CPSBCON0bits.CPSBRNG1 // bit 3
2405 #define CPSBRM CPSBCON0bits.CPSBRM // bit 6
2406 #define CPSBON CPSBCON0bits.CPSBON // bit 7
2408 #define CPSBCH0 CPSBCON1bits.CPSBCH0 // bit 0
2409 #define CPSBCH1 CPSBCON1bits.CPSBCH1 // bit 1
2410 #define CPSBCH2 CPSBCON1bits.CPSBCH2 // bit 2
2411 #define CPSBCH3 CPSBCON1bits.CPSBCH3 // bit 3
2413 #define DACPSS0 DACCON0bits.DACPSS0 // bit 2
2414 #define DACPSS1 DACCON0bits.DACPSS1 // bit 3
2415 #define DACOE DACCON0bits.DACOE // bit 5
2416 #define DACLPS DACCON0bits.DACLPS // bit 6
2417 #define DACEN DACCON0bits.DACEN // bit 7
2419 #define DACR0 DACCON1bits.DACR0 // bit 0
2420 #define DACR1 DACCON1bits.DACR1 // bit 1
2421 #define DACR2 DACCON1bits.DACR2 // bit 2
2422 #define DACR3 DACCON1bits.DACR3 // bit 3
2423 #define DACR4 DACCON1bits.DACR4 // bit 4
2425 #define ADFVR0 FVRCONbits.ADFVR0 // bit 0
2426 #define ADFVR1 FVRCONbits.ADFVR1 // bit 1
2427 #define CDAFVR0 FVRCONbits.CDAFVR0 // bit 2
2428 #define CDAFVR1 FVRCONbits.CDAFVR1 // bit 3
2429 #define FVREN FVRCONbits.FVREN // bit 6
2430 #define FVRRDY FVRCONbits.FVRRDY // bit 7
2432 #define RBIF INTCONbits.RBIF // bit 0
2433 #define INTF INTCONbits.INTF // bit 1
2434 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
2435 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
2436 #define RBIE INTCONbits.RBIE // bit 3
2437 #define INTE INTCONbits.INTE // bit 4
2438 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
2439 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
2440 #define PEIE INTCONbits.PEIE // bit 6
2441 #define GIE INTCONbits.GIE // bit 7
2443 #define IOCB0 IOCBbits.IOCB0 // bit 0
2444 #define IOCB1 IOCBbits.IOCB1 // bit 1
2445 #define IOCB2 IOCBbits.IOCB2 // bit 2
2446 #define IOCB3 IOCBbits.IOCB3 // bit 3
2447 #define IOCB4 IOCBbits.IOCB4 // bit 4
2448 #define IOCB5 IOCBbits.IOCB5 // bit 5
2449 #define IOCB6 IOCBbits.IOCB6 // bit 6
2450 #define IOCB7 IOCBbits.IOCB7 // bit 7
2452 #define PS0 OPTION_REGbits.PS0 // bit 0
2453 #define PS1 OPTION_REGbits.PS1 // bit 1
2454 #define PS2 OPTION_REGbits.PS2 // bit 2
2455 #define PSA OPTION_REGbits.PSA // bit 3
2456 #define TMR0SE OPTION_REGbits.TMR0SE // bit 4, shadows bit in OPTION_REGbits
2457 #define T0SE OPTION_REGbits.T0SE // bit 4, shadows bit in OPTION_REGbits
2458 #define TMR0CS OPTION_REGbits.TMR0CS // bit 5, shadows bit in OPTION_REGbits
2459 #define T0CS OPTION_REGbits.T0CS // bit 5, shadows bit in OPTION_REGbits
2460 #define INTEDG OPTION_REGbits.INTEDG // bit 6
2461 #define NOT_RBPU OPTION_REGbits.NOT_RBPU // bit 7
2463 #define ICSS OSCCONbits.ICSS // bit 2
2464 #define ICSL OSCCONbits.ICSL // bit 3
2465 #define IRCF0 OSCCONbits.IRCF0 // bit 4
2466 #define IRCF1 OSCCONbits.IRCF1 // bit 5
2468 #define NOT_BOR PCONbits.NOT_BOR // bit 0
2469 #define NOT_POR PCONbits.NOT_POR // bit 1
2471 #define TMR1IE PIE1bits.TMR1IE // bit 0
2472 #define TMR2IE PIE1bits.TMR2IE // bit 1
2473 #define CCP1IE PIE1bits.CCP1IE // bit 2
2474 #define SSPIE PIE1bits.SSPIE // bit 3
2475 #define TXIE PIE1bits.TXIE // bit 4
2476 #define RCIE PIE1bits.RCIE // bit 5
2477 #define ADIE PIE1bits.ADIE // bit 6
2478 #define TMR1GIE PIE1bits.TMR1GIE // bit 7
2480 #define CCP2IE PIE2bits.CCP2IE // bit 0
2481 #define TMRAIE PIE2bits.TMRAIE // bit 4
2482 #define TMRBIE PIE2bits.TMRBIE // bit 5
2483 #define TMR3IE PIE2bits.TMR3IE // bit 6
2484 #define TMR3GIE PIE2bits.TMR3GIE // bit 7
2486 #define TMR1IF PIR1bits.TMR1IF // bit 0
2487 #define TMR2IF PIR1bits.TMR2IF // bit 1
2488 #define CCP1IF PIR1bits.CCP1IF // bit 2
2489 #define SSPIF PIR1bits.SSPIF // bit 3
2490 #define TXIF PIR1bits.TXIF // bit 4
2491 #define RCIF PIR1bits.RCIF // bit 5
2492 #define ADIF PIR1bits.ADIF // bit 6
2493 #define TMR1GIF PIR1bits.TMR1GIF // bit 7
2495 #define CCP2IF PIR2bits.CCP2IF // bit 0
2496 #define TMRAIF PIR2bits.TMRAIF // bit 4
2497 #define TMRBIF PIR2bits.TMRBIF // bit 5
2498 #define TMR3IF PIR2bits.TMR3IF // bit 6
2499 #define TMR3GIF PIR2bits.TMR3GIF // bit 7
2501 #define RD PMCON1bits.RD // bit 0
2503 #define RA0 PORTAbits.RA0 // bit 0, shadows bit in PORTAbits
2504 #define AN0 PORTAbits.AN0 // bit 0, shadows bit in PORTAbits
2505 #define RA1 PORTAbits.RA1 // bit 1, shadows bit in PORTAbits
2506 #define AN1 PORTAbits.AN1 // bit 1, shadows bit in PORTAbits
2507 #define CPSA0 PORTAbits.CPSA0 // bit 1, shadows bit in PORTAbits
2508 #define RA2 PORTAbits.RA2 // bit 2, shadows bit in PORTAbits
2509 #define AN2 PORTAbits.AN2 // bit 2, shadows bit in PORTAbits
2510 #define CPSA1 PORTAbits.CPSA1 // bit 2, shadows bit in PORTAbits
2511 #define DACOUT PORTAbits.DACOUT // bit 2, shadows bit in PORTAbits
2512 #define RA3 PORTAbits.RA3 // bit 3, shadows bit in PORTAbits
2513 #define AN3 PORTAbits.AN3 // bit 3, shadows bit in PORTAbits
2514 #define CPSA2 PORTAbits.CPSA2 // bit 3, shadows bit in PORTAbits
2515 #define RA4 PORTAbits.RA4 // bit 4, shadows bit in PORTAbits
2516 #define CPSA3 PORTAbits.CPSA3 // bit 4, shadows bit in PORTAbits
2517 #define T0CKI PORTAbits.T0CKI // bit 4, shadows bit in PORTAbits
2518 #define TACKI PORTAbits.TACKI // bit 4, shadows bit in PORTAbits
2519 #define RA5 PORTAbits.RA5 // bit 5, shadows bit in PORTAbits
2520 #define AN4 PORTAbits.AN4 // bit 5, shadows bit in PORTAbits
2521 #define CPSA4 PORTAbits.CPSA4 // bit 5, shadows bit in PORTAbits
2522 #define RA6 PORTAbits.RA6 // bit 6, shadows bit in PORTAbits
2523 #define OSC2 PORTAbits.OSC2 // bit 6, shadows bit in PORTAbits
2524 #define CPSB1 PORTAbits.CPSB1 // bit 6, shadows bit in PORTAbits
2525 #define CLKOUT PORTAbits.CLKOUT // bit 6, shadows bit in PORTAbits
2526 #define RA7 PORTAbits.RA7 // bit 7, shadows bit in PORTAbits
2527 #define OSC1 PORTAbits.OSC1 // bit 7, shadows bit in PORTAbits
2528 #define CPSB0 PORTAbits.CPSB0 // bit 7, shadows bit in PORTAbits
2529 #define CLKIN PORTAbits.CLKIN // bit 7, shadows bit in PORTAbits
2531 #define RB0 PORTBbits.RB0 // bit 0, shadows bit in PORTBbits
2532 #define AN12 PORTBbits.AN12 // bit 0, shadows bit in PORTBbits
2533 #define CPSB8 PORTBbits.CPSB8 // bit 0, shadows bit in PORTBbits
2534 #define RB1 PORTBbits.RB1 // bit 1, shadows bit in PORTBbits
2535 #define AN10 PORTBbits.AN10 // bit 1, shadows bit in PORTBbits
2536 #define CPSB9 PORTBbits.CPSB9 // bit 1, shadows bit in PORTBbits
2537 #define RB2 PORTBbits.RB2 // bit 2, shadows bit in PORTBbits
2538 #define AN8 PORTBbits.AN8 // bit 2, shadows bit in PORTBbits
2539 #define CPSB10 PORTBbits.CPSB10 // bit 2, shadows bit in PORTBbits
2540 #define RB3 PORTBbits.RB3 // bit 3, shadows bit in PORTBbits
2541 #define AN9 PORTBbits.AN9 // bit 3, shadows bit in PORTBbits
2542 #define CPSB11 PORTBbits.CPSB11 // bit 3, shadows bit in PORTBbits
2543 #define CCP2 PORTBbits.CCP2 // bit 3, shadows bit in PORTBbits
2544 #define RB4 PORTBbits.RB4 // bit 4, shadows bit in PORTBbits
2545 #define AN11 PORTBbits.AN11 // bit 4, shadows bit in PORTBbits
2546 #define CPSB12 PORTBbits.CPSB12 // bit 4, shadows bit in PORTBbits
2547 #define RB5 PORTBbits.RB5 // bit 5, shadows bit in PORTBbits
2548 #define AN13 PORTBbits.AN13 // bit 5, shadows bit in PORTBbits
2549 #define CPSB13 PORTBbits.CPSB13 // bit 5, shadows bit in PORTBbits
2550 #define T1G PORTBbits.T1G // bit 5, shadows bit in PORTBbits
2551 #define T3CKI PORTBbits.T3CKI // bit 5, shadows bit in PORTBbits
2552 #define RB6 PORTBbits.RB6 // bit 6, shadows bit in PORTBbits
2553 #define CPSB14 PORTBbits.CPSB14 // bit 6, shadows bit in PORTBbits
2554 #define RB7 PORTBbits.RB7 // bit 7, shadows bit in PORTBbits
2555 #define CPSB15 PORTBbits.CPSB15 // bit 7, shadows bit in PORTBbits
2557 #define RD0 PORTDbits.RD0 // bit 0, shadows bit in PORTDbits
2558 #define CPSB5 PORTDbits.CPSB5 // bit 0, shadows bit in PORTDbits
2559 #define T3G PORTDbits.T3G // bit 0, shadows bit in PORTDbits
2560 #define RD1 PORTDbits.RD1 // bit 1, shadows bit in PORTDbits
2561 #define CPSB6 PORTDbits.CPSB6 // bit 1, shadows bit in PORTDbits
2562 #define RD2 PORTDbits.RD2 // bit 2, shadows bit in PORTDbits
2563 #define CPSB7 PORTDbits.CPSB7 // bit 2, shadows bit in PORTDbits
2564 #define RD3 PORTDbits.RD3 // bit 3, shadows bit in PORTDbits
2565 #define CPSA8 PORTDbits.CPSA8 // bit 3, shadows bit in PORTDbits
2566 #define RD4 PORTDbits.RD4 // bit 4, shadows bit in PORTDbits
2567 #define CPSA12 PORTDbits.CPSA12 // bit 4, shadows bit in PORTDbits
2568 #define RD5 PORTDbits.RD5 // bit 5, shadows bit in PORTDbits
2569 #define CPSA13 PORTDbits.CPSA13 // bit 5, shadows bit in PORTDbits
2570 #define RD6 PORTDbits.RD6 // bit 6, shadows bit in PORTDbits
2571 #define CPSA14 PORTDbits.CPSA14 // bit 6, shadows bit in PORTDbits
2572 #define RD7 PORTDbits.RD7 // bit 7, shadows bit in PORTDbits
2573 #define CPSA15 PORTDbits.CPSA15 // bit 7, shadows bit in PORTDbits
2575 #define RE0 PORTEbits.RE0 // bit 0, shadows bit in PORTEbits
2576 #define AN5 PORTEbits.AN5 // bit 0, shadows bit in PORTEbits
2577 #define CPSA5 PORTEbits.CPSA5 // bit 0, shadows bit in PORTEbits
2578 #define RE1 PORTEbits.RE1 // bit 1, shadows bit in PORTEbits
2579 #define AN6 PORTEbits.AN6 // bit 1, shadows bit in PORTEbits
2580 #define CPSA6 PORTEbits.CPSA6 // bit 1, shadows bit in PORTEbits
2581 #define RE2 PORTEbits.RE2 // bit 2, shadows bit in PORTEbits
2582 #define AN7 PORTEbits.AN7 // bit 2, shadows bit in PORTEbits
2583 #define CPSA7 PORTEbits.CPSA7 // bit 2, shadows bit in PORTEbits
2584 #define RE3 PORTEbits.RE3 // bit 3, shadows bit in PORTEbits
2585 #define NOT_MCLR PORTEbits.NOT_MCLR // bit 3, shadows bit in PORTEbits
2587 #define RX9D RCSTAbits.RX9D // bit 0
2588 #define OERR RCSTAbits.OERR // bit 1
2589 #define FERR RCSTAbits.FERR // bit 2
2590 #define ADDEN RCSTAbits.ADDEN // bit 3
2591 #define CREN RCSTAbits.CREN // bit 4
2592 #define SREN RCSTAbits.SREN // bit 5
2593 #define RX9 RCSTAbits.RX9 // bit 6
2594 #define SPEN RCSTAbits.SPEN // bit 7
2596 #define SSPM0 SSPCONbits.SSPM0 // bit 0
2597 #define SSPM1 SSPCONbits.SSPM1 // bit 1
2598 #define SSPM2 SSPCONbits.SSPM2 // bit 2
2599 #define SSPM3 SSPCONbits.SSPM3 // bit 3
2600 #define CKP SSPCONbits.CKP // bit 4
2601 #define SSPEN SSPCONbits.SSPEN // bit 5
2602 #define SSPOV SSPCONbits.SSPOV // bit 6
2603 #define WCOL SSPCONbits.WCOL // bit 7
2605 #define BF SSPSTATbits.BF // bit 0
2606 #define UA SSPSTATbits.UA // bit 1
2607 #define R_NOT_W SSPSTATbits.R_NOT_W // bit 2
2608 #define S SSPSTATbits.S // bit 3
2609 #define P SSPSTATbits.P // bit 4
2610 #define D_NOT_A SSPSTATbits.D_NOT_A // bit 5
2611 #define CKE SSPSTATbits.CKE // bit 6
2612 #define SMP SSPSTATbits.SMP // bit 7
2614 #define C STATUSbits.C // bit 0
2615 #define DC STATUSbits.DC // bit 1
2616 #define Z STATUSbits.Z // bit 2
2617 #define NOT_PD STATUSbits.NOT_PD // bit 3
2618 #define NOT_TO STATUSbits.NOT_TO // bit 4
2619 #define RP0 STATUSbits.RP0 // bit 5
2620 #define RP1 STATUSbits.RP1 // bit 6
2621 #define IRP STATUSbits.IRP // bit 7
2623 #define TMR1ON T1CONbits.TMR1ON // bit 0
2624 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2, shadows bit in T1CONbits
2625 #define T1SYNC T1CONbits.T1SYNC // bit 2, shadows bit in T1CONbits
2626 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
2627 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
2628 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
2629 #define TMRCS0 T1CONbits.TMRCS0 // bit 6
2630 #define TMRCS1 T1CONbits.TMRCS1 // bit 7
2632 #define T1GSS0 T1GCONbits.T1GSS0 // bit 0
2633 #define T1GSS1 T1GCONbits.T1GSS1 // bit 1
2634 #define T1GVAL T1GCONbits.T1GVAL // bit 2
2635 #define T1GGO_NOT_DONE T1GCONbits.T1GGO_NOT_DONE // bit 3
2636 #define T1GSPM T1GCONbits.T1GSPM // bit 4
2637 #define T1GTM T1GCONbits.T1GTM // bit 5
2638 #define T1GPOL T1GCONbits.T1GPOL // bit 6
2639 #define TMR1GE T1GCONbits.TMR1GE // bit 7
2641 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
2642 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
2643 #define TMR2ON T2CONbits.TMR2ON // bit 2
2644 #define TOUTPS0 T2CONbits.TOUTPS0 // bit 3
2645 #define TOUTPS1 T2CONbits.TOUTPS1 // bit 4
2646 #define TOUTPS2 T2CONbits.TOUTPS2 // bit 5
2647 #define TOUTPS3 T2CONbits.TOUTPS3 // bit 6
2649 #define TMR3ON T3CONbits.TMR3ON // bit 0
2650 #define T3SYNC T3CONbits.T3SYNC // bit 2
2651 #define T3CKPS0 T3CONbits.T3CKPS0 // bit 4
2652 #define T3CKPS1 T3CONbits.T3CKPS1 // bit 5
2653 #define TMR3CS0 T3CONbits.TMR3CS0 // bit 6
2654 #define TMR3CS1 T3CONbits.TMR3CS1 // bit 7
2656 #define T3GSS0 T3GCONbits.T3GSS0 // bit 0
2657 #define T3GSS1 T3GCONbits.T3GSS1 // bit 1
2658 #define T3GVAL T3GCONbits.T3GVAL // bit 2
2659 #define T3GGO_NOT_DONE T3GCONbits.T3GGO_NOT_DONE // bit 3
2660 #define T3GSPM T3GCONbits.T3GSPM // bit 4
2661 #define T3GTM T3GCONbits.T3GTM // bit 5
2662 #define T3GPOL T3GCONbits.T3GPOL // bit 6
2663 #define TMR3GE T3GCONbits.TMR3GE // bit 7
2665 #define TAPS0 TACONbits.TAPS0 // bit 0, shadows bit in TACONbits
2666 #define TMRAPS0 TACONbits.TMRAPS0 // bit 0, shadows bit in TACONbits
2667 #define TAPS1 TACONbits.TAPS1 // bit 1, shadows bit in TACONbits
2668 #define TMRAPS1 TACONbits.TMRAPS1 // bit 1, shadows bit in TACONbits
2669 #define TAPS2 TACONbits.TAPS2 // bit 2, shadows bit in TACONbits
2670 #define TMRAPS2 TACONbits.TMRAPS2 // bit 2, shadows bit in TACONbits
2671 #define TAPSA TACONbits.TAPSA // bit 3, shadows bit in TACONbits
2672 #define TMRAPSA TACONbits.TMRAPSA // bit 3, shadows bit in TACONbits
2673 #define TASE TACONbits.TASE // bit 4, shadows bit in TACONbits
2674 #define TMRASE TACONbits.TMRASE // bit 4, shadows bit in TACONbits
2675 #define TACS TACONbits.TACS // bit 5, shadows bit in TACONbits
2676 #define TMRACS TACONbits.TMRACS // bit 5, shadows bit in TACONbits
2677 #define TMRAON TACONbits.TMRAON // bit 7
2679 #define TBPS0 TBCONbits.TBPS0 // bit 0, shadows bit in TBCONbits
2680 #define TMRBPS0 TBCONbits.TMRBPS0 // bit 0, shadows bit in TBCONbits
2681 #define TBPS1 TBCONbits.TBPS1 // bit 1, shadows bit in TBCONbits
2682 #define TMRBPS1 TBCONbits.TMRBPS1 // bit 1, shadows bit in TBCONbits
2683 #define TBPS2 TBCONbits.TBPS2 // bit 2, shadows bit in TBCONbits
2684 #define TMRBPS2 TBCONbits.TMRBPS2 // bit 2, shadows bit in TBCONbits
2685 #define TBPSA TBCONbits.TBPSA // bit 3, shadows bit in TBCONbits
2686 #define TMRBPSA TBCONbits.TMRBPSA // bit 3, shadows bit in TBCONbits
2687 #define TBSE TBCONbits.TBSE // bit 4, shadows bit in TBCONbits
2688 #define TMRBSE TBCONbits.TMRBSE // bit 4, shadows bit in TBCONbits
2689 #define TBCS TBCONbits.TBCS // bit 5, shadows bit in TBCONbits
2690 #define TMRBCS TBCONbits.TMRBCS // bit 5, shadows bit in TBCONbits
2691 #define TMRBON TBCONbits.TMRBON // bit 7
2693 #define TRISA0 TRISAbits.TRISA0 // bit 0
2694 #define TRISA1 TRISAbits.TRISA1 // bit 1
2695 #define TRISA2 TRISAbits.TRISA2 // bit 2
2696 #define TRISA3 TRISAbits.TRISA3 // bit 3
2697 #define TRISA4 TRISAbits.TRISA4 // bit 4
2698 #define TRISA5 TRISAbits.TRISA5 // bit 5
2699 #define TRISA6 TRISAbits.TRISA6 // bit 6
2700 #define TRISA7 TRISAbits.TRISA7 // bit 7
2702 #define TRISB0 TRISBbits.TRISB0 // bit 0
2703 #define TRISB1 TRISBbits.TRISB1 // bit 1
2704 #define TRISB2 TRISBbits.TRISB2 // bit 2
2705 #define TRISB3 TRISBbits.TRISB3 // bit 3
2706 #define TRISB4 TRISBbits.TRISB4 // bit 4
2707 #define TRISB5 TRISBbits.TRISB5 // bit 5
2708 #define TRISB6 TRISBbits.TRISB6 // bit 6
2709 #define TRISB7 TRISBbits.TRISB7 // bit 7
2711 #define TRISC0 TRISCbits.TRISC0 // bit 0
2712 #define TRISC1 TRISCbits.TRISC1 // bit 1
2713 #define TRISC2 TRISCbits.TRISC2 // bit 2
2714 #define TRISC3 TRISCbits.TRISC3 // bit 3
2715 #define TRISC4 TRISCbits.TRISC4 // bit 4
2716 #define TRISC5 TRISCbits.TRISC5 // bit 5
2717 #define TRISC6 TRISCbits.TRISC6 // bit 6
2718 #define TRISC7 TRISCbits.TRISC7 // bit 7
2720 #define TRISD0 TRISDbits.TRISD0 // bit 0
2721 #define TRISD1 TRISDbits.TRISD1 // bit 1
2722 #define TRISD2 TRISDbits.TRISD2 // bit 2
2723 #define TRISD3 TRISDbits.TRISD3 // bit 3
2724 #define TRISD4 TRISDbits.TRISD4 // bit 4
2725 #define TRISD5 TRISDbits.TRISD5 // bit 5
2726 #define TRISD6 TRISDbits.TRISD6 // bit 6
2727 #define TRISD7 TRISDbits.TRISD7 // bit 7
2729 #define TRISE0 TRISEbits.TRISE0 // bit 0
2730 #define TRISE1 TRISEbits.TRISE1 // bit 1
2731 #define TRISE2 TRISEbits.TRISE2 // bit 2
2732 #define TRISE3 TRISEbits.TRISE3 // bit 3
2734 #define TX9D TXSTAbits.TX9D // bit 0
2735 #define TRMT TXSTAbits.TRMT // bit 1
2736 #define BRGH TXSTAbits.BRGH // bit 2
2737 #define SYNC TXSTAbits.SYNC // bit 4
2738 #define TXEN TXSTAbits.TXEN // bit 5
2739 #define TX9 TXSTAbits.TX9 // bit 6
2740 #define CSRC TXSTAbits.CSRC // bit 7
2742 #define WPUB0 WPUBbits.WPUB0 // bit 0
2743 #define WPUB1 WPUBbits.WPUB1 // bit 1
2744 #define WPUB2 WPUBbits.WPUB2 // bit 2
2745 #define WPUB3 WPUBbits.WPUB3 // bit 3
2746 #define WPUB4 WPUBbits.WPUB4 // bit 4
2747 #define WPUB5 WPUBbits.WPUB5 // bit 5
2748 #define WPUB6 WPUBbits.WPUB6 // bit 6
2749 #define WPUB7 WPUBbits.WPUB7 // bit 7
2751 #endif // #ifndef NO_BIT_DEFINES
2753 #endif // #ifndef __PIC16LF707_H__