2 * This declarations of the PIC16F87 MCU.
4 * This file is part of the GNU PIC library for SDCC, originally
5 * created by Molnar Karoly <molnarkaroly@users.sf.net> 2016.
7 * This file is generated automatically by the cinc2h.pl, 2016-04-13 17:22:55 UTC.
9 * SDCC is licensed under the GNU Public license (GPL) v2. Note that
10 * this license covers the code to the compiler and other executables,
11 * but explicitly does not cover any code or objects generated by sdcc.
13 * For pic device libraries and header files which are derived from
14 * Microchip header (.inc) and linker script (.lkr) files Microchip
15 * requires that "The header files should state that they are only to be
16 * used with authentic Microchip devices" which makes them incompatible
17 * with the GPL. Pic device libraries and header files are located at
18 * non-free/lib and non-free/include directories respectively.
19 * Sdcc should be run with the --use-non-free command line option in
20 * order to include non-free header files and libraries.
22 * See http://sdcc.sourceforge.net/ for the latest information on sdcc.
25 #ifndef __PIC16F87_H__
26 #define __PIC16F87_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 PCLATH_ADDR 0x000A
44 #define INTCON_ADDR 0x000B
45 #define PIR1_ADDR 0x000C
46 #define PIR2_ADDR 0x000D
47 #define TMR1_ADDR 0x000E
48 #define TMR1L_ADDR 0x000E
49 #define TMR1H_ADDR 0x000F
50 #define T1CON_ADDR 0x0010
51 #define TMR2_ADDR 0x0011
52 #define T2CON_ADDR 0x0012
53 #define SSPBUF_ADDR 0x0013
54 #define SSPCON_ADDR 0x0014
55 #define CCPR1_ADDR 0x0015
56 #define CCPR1L_ADDR 0x0015
57 #define CCPR1H_ADDR 0x0016
58 #define CCP1CON_ADDR 0x0017
59 #define RCSTA_ADDR 0x0018
60 #define TXREG_ADDR 0x0019
61 #define RCREG_ADDR 0x001A
62 #define OPTION_REG_ADDR 0x0081
63 #define TRISA_ADDR 0x0085
64 #define TRISB_ADDR 0x0086
65 #define PIE1_ADDR 0x008C
66 #define PIE2_ADDR 0x008D
67 #define PCON_ADDR 0x008E
68 #define OSCCON_ADDR 0x008F
69 #define OSCTUNE_ADDR 0x0090
70 #define PR2_ADDR 0x0092
71 #define SSPADD_ADDR 0x0093
72 #define SSPSTAT_ADDR 0x0094
73 #define TXSTA_ADDR 0x0098
74 #define SPBRG_ADDR 0x0099
75 #define CMCON_ADDR 0x009C
76 #define CVRCON_ADDR 0x009D
77 #define WDTCON_ADDR 0x0105
78 #define EEDATA_ADDR 0x010C
79 #define EEADR_ADDR 0x010D
80 #define EEDATH_ADDR 0x010E
81 #define EEADRH_ADDR 0x010F
82 #define EECON1_ADDR 0x018C
83 #define EECON2_ADDR 0x018D
85 #endif // #ifndef NO_ADDR_DEFINES
87 //==============================================================================
89 // Register Definitions
91 //==============================================================================
93 extern __at(0x0000) __sfr INDF
;
94 extern __at(0x0001) __sfr TMR0
;
95 extern __at(0x0002) __sfr PCL
;
97 //==============================================================================
100 extern __at(0x0003) __sfr STATUS
;
124 extern __at(0x0003) volatile __STATUSbits_t STATUSbits
;
135 //==============================================================================
137 extern __at(0x0004) __sfr FSR
;
139 //==============================================================================
142 extern __at(0x0005) __sfr PORTA
;
156 extern __at(0x0005) volatile __PORTAbits_t PORTAbits
;
167 //==============================================================================
170 //==============================================================================
173 extern __at(0x0006) __sfr PORTB
;
187 extern __at(0x0006) volatile __PORTBbits_t PORTBbits
;
198 //==============================================================================
200 extern __at(0x000A) __sfr PCLATH
;
202 //==============================================================================
205 extern __at(0x000B) __sfr INTCON
;
234 extern __at(0x000B) volatile __INTCONbits_t INTCONbits
;
247 //==============================================================================
250 //==============================================================================
253 extern __at(0x000C) __sfr PIR1
;
267 extern __at(0x000C) volatile __PIR1bits_t PIR1bits
;
276 //==============================================================================
279 //==============================================================================
282 extern __at(0x000D) __sfr PIR2
;
296 extern __at(0x000D) volatile __PIR2bits_t PIR2bits
;
302 //==============================================================================
304 extern __at(0x000E) __sfr TMR1
;
305 extern __at(0x000E) __sfr TMR1L
;
306 extern __at(0x000F) __sfr TMR1H
;
308 //==============================================================================
311 extern __at(0x0010) __sfr T1CON
;
319 unsigned NOT_T1SYNC
: 1;
320 unsigned T1OSCEN
: 1;
321 unsigned T1CKPS0
: 1;
322 unsigned T1CKPS1
: 1;
331 unsigned T1INSYNC
: 1;
347 extern __at(0x0010) volatile __T1CONbits_t T1CONbits
;
351 #define _NOT_T1SYNC 0x04
352 #define _T1INSYNC 0x04
353 #define _T1OSCEN 0x08
354 #define _T1CKPS0 0x10
355 #define _T1CKPS1 0x20
358 //==============================================================================
360 extern __at(0x0011) __sfr TMR2
;
362 //==============================================================================
365 extern __at(0x0012) __sfr T2CON
;
371 unsigned T2CKPS0
: 1;
372 unsigned T2CKPS1
: 1;
374 unsigned TOUTPS0
: 1;
375 unsigned TOUTPS1
: 1;
376 unsigned TOUTPS2
: 1;
377 unsigned TOUTPS3
: 1;
395 extern __at(0x0012) volatile __T2CONbits_t T2CONbits
;
397 #define _T2CKPS0 0x01
398 #define _T2CKPS1 0x02
400 #define _TOUTPS0 0x08
401 #define _TOUTPS1 0x10
402 #define _TOUTPS2 0x20
403 #define _TOUTPS3 0x40
405 //==============================================================================
407 extern __at(0x0013) __sfr SSPBUF
;
409 //==============================================================================
412 extern __at(0x0014) __sfr SSPCON
;
435 extern __at(0x0014) volatile __SSPCONbits_t SSPCONbits
;
446 //==============================================================================
448 extern __at(0x0015) __sfr CCPR1
;
449 extern __at(0x0015) __sfr CCPR1L
;
450 extern __at(0x0016) __sfr CCPR1H
;
452 //==============================================================================
455 extern __at(0x0017) __sfr CCP1CON
;
478 extern __at(0x0017) volatile __CCP1CONbits_t CCP1CONbits
;
487 //==============================================================================
490 //==============================================================================
493 extern __at(0x0018) __sfr RCSTA
;
529 unsigned NOT_RC8
: 1;
546 extern __at(0x0018) volatile __RCSTAbits_t RCSTAbits
;
557 #define _NOT_RC8 0x40
561 //==============================================================================
563 extern __at(0x0019) __sfr TXREG
;
564 extern __at(0x001A) __sfr RCREG
;
566 //==============================================================================
569 extern __at(0x0081) __sfr OPTION_REG
;
582 unsigned NOT_RBPU
: 1;
590 } __OPTION_REGbits_t
;
592 extern __at(0x0081) volatile __OPTION_REGbits_t OPTION_REGbits
;
601 #define _NOT_RBPU 0x80
603 //==============================================================================
606 //==============================================================================
609 extern __at(0x0085) __sfr TRISA
;
623 extern __at(0x0085) volatile __TRISAbits_t TRISAbits
;
634 //==============================================================================
637 //==============================================================================
640 extern __at(0x0086) __sfr TRISB
;
654 extern __at(0x0086) volatile __TRISBbits_t TRISBbits
;
665 //==============================================================================
668 //==============================================================================
671 extern __at(0x008C) __sfr PIE1
;
685 extern __at(0x008C) volatile __PIE1bits_t PIE1bits
;
694 //==============================================================================
697 //==============================================================================
700 extern __at(0x008D) __sfr PIE2
;
714 extern __at(0x008D) volatile __PIE2bits_t PIE2bits
;
720 //==============================================================================
723 //==============================================================================
726 extern __at(0x008E) __sfr PCON
;
732 unsigned NOT_BOR
: 1;
733 unsigned NOT_POR
: 1;
755 extern __at(0x008E) volatile __PCONbits_t PCONbits
;
757 #define _NOT_BOR 0x01
759 #define _NOT_POR 0x02
761 //==============================================================================
764 //==============================================================================
767 extern __at(0x008F) __sfr OSCCON
;
797 extern __at(0x008F) volatile __OSCCONbits_t OSCCONbits
;
807 //==============================================================================
810 //==============================================================================
813 extern __at(0x0090) __sfr OSCTUNE
;
836 extern __at(0x0090) volatile __OSCTUNEbits_t OSCTUNEbits
;
845 //==============================================================================
847 extern __at(0x0092) __sfr PR2
;
848 extern __at(0x0093) __sfr SSPADD
;
850 //==============================================================================
853 extern __at(0x0094) __sfr SSPSTAT
;
861 unsigned R_NOT_W
: 1;
864 unsigned D_NOT_A
: 1;
874 unsigned I2C_START
: 1;
875 unsigned I2C_STOP
: 1;
885 unsigned I2C_READ
: 1;
888 unsigned I2C_DATA
: 1;
909 unsigned NOT_WRITE
: 1;
912 unsigned NOT_ADDRESS
: 1;
933 unsigned READ_WRITE
: 1;
936 unsigned DATA_ADDRESS
: 1;
942 extern __at(0x0094) volatile __SSPSTATbits_t SSPSTATbits
;
946 #define _R_NOT_W 0x04
948 #define _I2C_READ 0x04
950 #define _NOT_WRITE 0x04
952 #define _READ_WRITE 0x04
954 #define _I2C_START 0x08
956 #define _I2C_STOP 0x10
957 #define _D_NOT_A 0x20
959 #define _I2C_DATA 0x20
961 #define _NOT_ADDRESS 0x20
963 #define _DATA_ADDRESS 0x20
967 //==============================================================================
970 //==============================================================================
973 extern __at(0x0098) __sfr TXSTA
;
997 unsigned NOT_TX8
: 1;
1014 extern __at(0x0098) volatile __TXSTAbits_t TXSTAbits
;
1023 #define _NOT_TX8 0x40
1027 //==============================================================================
1029 extern __at(0x0099) __sfr SPBRG
;
1031 //==============================================================================
1034 extern __at(0x009C) __sfr CMCON
;
1057 extern __at(0x009C) volatile __CMCONbits_t CMCONbits
;
1068 //==============================================================================
1071 //==============================================================================
1074 extern __at(0x009D) __sfr CVRCON
;
1097 extern __at(0x009D) volatile __CVRCONbits_t CVRCONbits
;
1107 //==============================================================================
1110 //==============================================================================
1113 extern __at(0x0105) __sfr WDTCON
;
1119 unsigned SWDTEN
: 1;
1120 unsigned WDTPS0
: 1;
1121 unsigned WDTPS1
: 1;
1122 unsigned WDTPS2
: 1;
1123 unsigned WDTPS3
: 1;
1149 extern __at(0x0105) volatile __WDTCONbits_t WDTCONbits
;
1151 #define _SWDTEN 0x01
1153 #define _WDTPS0 0x02
1154 #define _WDTPS1 0x04
1155 #define _WDTPS2 0x08
1156 #define _WDTPS3 0x10
1158 //==============================================================================
1160 extern __at(0x010C) __sfr EEDATA
;
1161 extern __at(0x010D) __sfr EEADR
;
1162 extern __at(0x010E) __sfr EEDATH
;
1163 extern __at(0x010F) __sfr EEADRH
;
1165 //==============================================================================
1168 extern __at(0x018C) __sfr EECON1
;
1182 extern __at(0x018C) volatile __EECON1bits_t EECON1bits
;
1191 //==============================================================================
1193 extern __at(0x018D) __sfr EECON2
;
1195 //==============================================================================
1197 // Configuration Bits
1199 //==============================================================================
1201 #define _CONFIG1 0x2007
1202 #define _CONFIG2 0x2008
1204 //----------------------------- CONFIG1 Options -------------------------------
1206 #define _FOSC_LP 0x3FEC // LP oscillator.
1207 #define _LP_OSC 0x3FEC // LP oscillator.
1208 #define _FOSC_XT 0x3FED // XT oscillator.
1209 #define _XT_OSC 0x3FED // XT oscillator.
1210 #define _FOSC_HS 0x3FEE // HS oscillator.
1211 #define _HS_OSC 0x3FEE // HS oscillator.
1212 #define _FOSC_EC 0x3FEF // ECIO; port I/O function on RA6/OSC2/CLKO.
1213 #define _EXTCLK 0x3FEF // ECIO; port I/O function on RA6/OSC2/CLKO.
1214 #define _FOSC_INTOSCIO 0x3FFC // INTRC oscillator; port I/O function on both RA6/OSC2/CLKO pin and RA7/OSC1/CLKI pin.
1215 #define _INTRC_IO 0x3FFC // INTRC oscillator; port I/O function on both RA6/OSC2/CLKO pin and RA7/OSC1/CLKI pin.
1216 #define _FOSC_INTOSCCLK 0x3FFD // INTRC oscillator; CLKO function on RA6/OSC2/CLKO pin and port I/O function on RA7/OSC1/CLKI pin.
1217 #define _INTRC_CLKOUT 0x3FFD // INTRC oscillator; CLKO function on RA6/OSC2/CLKO pin and port I/O function on RA7/OSC1/CLKI pin.
1218 #define _FOSC_EXTRCIO 0x3FFE // EXTRC oscillator; port I/O function on RA6/OSC2/CLKO.
1219 #define _EXTRC_IO 0x3FFE // EXTRC oscillator; port I/O function on RA6/OSC2/CLKO.
1220 #define _FOSC_EXTRCCLK 0x3FFF // EXTRC oscillator; CLKO function on RA6/OSC2/CLKO.
1221 #define _EXTRC_CLKOUT 0x3FFF // EXTRC oscillator; CLKO function on RA6/OSC2/CLKO.
1222 #define _WDTE_OFF 0x3FFB // WDT disabled.
1223 #define _WDT_OFF 0x3FFB // WDT disabled.
1224 #define _WDTE_ON 0x3FFF // WDT enabled.
1225 #define _WDT_ON 0x3FFF // WDT enabled.
1226 #define _PWRTE_ON 0x3FF7 // PWRT enabled.
1227 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
1228 #define _MCLRE_OFF 0x3FDF // RA5/MCLR/VPP pin function is digital I/O, MCLR internally tied to VDD.
1229 #define _MCLR_OFF 0x3FDF // RA5/MCLR/VPP pin function is digital I/O, MCLR internally tied to VDD.
1230 #define _MCLRE_ON 0x3FFF // RA5/MCLR/VPP pin function is MCLR.
1231 #define _MCLR_ON 0x3FFF // RA5/MCLR/VPP pin function is MCLR.
1232 #define _BOREN_OFF 0x3FBF // BOR disabled.
1233 #define _BODEN_OFF 0x3FBF // BOR disabled.
1234 #define _BOREN_ON 0x3FFF // BOR enabled.
1235 #define _BODEN_ON 0x3FFF // BOR enabled.
1236 #define _LVP_OFF 0x3F7F // RB3 is digital I/O, HV on MCLR must be used for programming.
1237 #define _LVP_ON 0x3FFF // RB3/PGM pin has PGM function, Low-Voltage Programming enabled.
1238 #define _CPD_ON 0x3EFF // Data EE memory code-protected.
1239 #define _CPD_OFF 0x3FFF // Code protection off.
1240 #define _WRT_ALL 0x39FF // 0000h to 0FFFh write-protected.
1241 #define _WRT_PROTECT_ALL 0x39FF // 0000h to 0FFFh write-protected.
1242 #define _WRT_2048 0x3BFF // 0000h to 07FFh write-protected, 0800h to 0FFFh may be modified by EECON control.
1243 #define _WRT_PROTECT_2048 0x3BFF // 0000h to 07FFh write-protected, 0800h to 0FFFh may be modified by EECON control.
1244 #define _WRT_256 0x3DFF // 0000h to 00FFh write-protected, 0100h to 0FFFh may be modified by EECON control.
1245 #define _WRT_PROTECT_256 0x3DFF // 0000h to 00FFh write-protected, 0100h to 0FFFh may be modified by EECON control.
1246 #define _WRT_OFF 0x3FFF // Write protection off.
1247 #define _WRT_PROTECT_OFF 0x3FFF // Write protection off.
1248 #define _DEBUG_ON 0x37FF // In-Circuit Debugger enabled, RB6 and RB7 are dedicated to the debugger.
1249 #define _DEBUG_OFF 0x3FFF // In-Circuit Debugger disabled, RB6 and RB7 are general purpose I/O pins.
1250 #define _CCPMX_RB3 0x2FFF // CCP1 function on RB3.
1251 #define _CCP1_RB3 0x2FFF // CCP1 function on RB3.
1252 #define _CCPMX_RB0 0x3FFF // CCP1 function on RB0.
1253 #define _CCP1_RB0 0x3FFF // CCP1 function on RB0.
1254 #define _CP_ON 0x1FFF // 0000h to 0FFFh code-protected (all protected).
1255 #define _CP_ALL 0x1FFF // 0000h to 0FFFh code-protected (all protected).
1256 #define _CP_OFF 0x3FFF // Code protection off.
1258 //----------------------------- CONFIG2 Options -------------------------------
1260 #define _FCMEN_OFF 0x3FFE // Fail-Safe Clock Monitor disabled.
1261 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor enabled.
1262 #define _IESO_OFF 0x3FFD // Internal External Switchover mode disabled.
1263 #define _IESO_ON 0x3FFF // Internal External Switchover mode enabled.
1265 //==============================================================================
1267 #define _DEVID1 0x2006
1269 #define _IDLOC0 0x2000
1270 #define _IDLOC1 0x2001
1271 #define _IDLOC2 0x2002
1272 #define _IDLOC3 0x2003
1274 //==============================================================================
1276 #ifndef NO_BIT_DEFINES
1278 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
1279 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
1280 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
1281 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
1282 #define CCP1Y CCP1CONbits.CCP1Y // bit 4
1283 #define CCP1X CCP1CONbits.CCP1X // bit 5
1285 #define CM0 CMCONbits.CM0 // bit 0
1286 #define CM1 CMCONbits.CM1 // bit 1
1287 #define CM2 CMCONbits.CM2 // bit 2
1288 #define CIS CMCONbits.CIS // bit 3
1289 #define C1INV CMCONbits.C1INV // bit 4
1290 #define C2INV CMCONbits.C2INV // bit 5
1291 #define C1OUT CMCONbits.C1OUT // bit 6
1292 #define C2OUT CMCONbits.C2OUT // bit 7
1294 #define CVR0 CVRCONbits.CVR0 // bit 0
1295 #define CVR1 CVRCONbits.CVR1 // bit 1
1296 #define CVR2 CVRCONbits.CVR2 // bit 2
1297 #define CVR3 CVRCONbits.CVR3 // bit 3
1298 #define CVRR CVRCONbits.CVRR // bit 5
1299 #define CVROE CVRCONbits.CVROE // bit 6
1300 #define CVREN CVRCONbits.CVREN // bit 7
1302 #define RD EECON1bits.RD // bit 0
1303 #define WR EECON1bits.WR // bit 1
1304 #define WREN EECON1bits.WREN // bit 2
1305 #define WRERR EECON1bits.WRERR // bit 3
1306 #define FREE EECON1bits.FREE // bit 4
1307 #define EEPGD EECON1bits.EEPGD // bit 7
1309 #define RBIF INTCONbits.RBIF // bit 0
1310 #define INT0IF INTCONbits.INT0IF // bit 1, shadows bit in INTCONbits
1311 #define INTF INTCONbits.INTF // bit 1, shadows bit in INTCONbits
1312 #define TMR0IF INTCONbits.TMR0IF // bit 2
1313 #define RBIE INTCONbits.RBIE // bit 3
1314 #define INT0IE INTCONbits.INT0IE // bit 4, shadows bit in INTCONbits
1315 #define INTE INTCONbits.INTE // bit 4, shadows bit in INTCONbits
1316 #define TMR0IE INTCONbits.TMR0IE // bit 5
1317 #define PEIE INTCONbits.PEIE // bit 6
1318 #define GIE INTCONbits.GIE // bit 7
1320 #define PS0 OPTION_REGbits.PS0 // bit 0
1321 #define PS1 OPTION_REGbits.PS1 // bit 1
1322 #define PS2 OPTION_REGbits.PS2 // bit 2
1323 #define PSA OPTION_REGbits.PSA // bit 3
1324 #define T0SE OPTION_REGbits.T0SE // bit 4
1325 #define T0CS OPTION_REGbits.T0CS // bit 5
1326 #define INTEDG OPTION_REGbits.INTEDG // bit 6
1327 #define NOT_RBPU OPTION_REGbits.NOT_RBPU // bit 7
1329 #define SCS0 OSCCONbits.SCS0 // bit 0
1330 #define SCS1 OSCCONbits.SCS1 // bit 1
1331 #define IOFS OSCCONbits.IOFS // bit 2
1332 #define OSTS OSCCONbits.OSTS // bit 3
1333 #define IRCF0 OSCCONbits.IRCF0 // bit 4
1334 #define IRCF1 OSCCONbits.IRCF1 // bit 5
1335 #define IRCF2 OSCCONbits.IRCF2 // bit 6
1337 #define TUN0 OSCTUNEbits.TUN0 // bit 0
1338 #define TUN1 OSCTUNEbits.TUN1 // bit 1
1339 #define TUN2 OSCTUNEbits.TUN2 // bit 2
1340 #define TUN3 OSCTUNEbits.TUN3 // bit 3
1341 #define TUN4 OSCTUNEbits.TUN4 // bit 4
1342 #define TUN5 OSCTUNEbits.TUN5 // bit 5
1344 #define NOT_BOR PCONbits.NOT_BOR // bit 0, shadows bit in PCONbits
1345 #define NOT_BO PCONbits.NOT_BO // bit 0, shadows bit in PCONbits
1346 #define NOT_POR PCONbits.NOT_POR // bit 1
1348 #define TMR1IE PIE1bits.TMR1IE // bit 0
1349 #define TMR2IE PIE1bits.TMR2IE // bit 1
1350 #define CCP1IE PIE1bits.CCP1IE // bit 2
1351 #define SSPIE PIE1bits.SSPIE // bit 3
1352 #define TXIE PIE1bits.TXIE // bit 4
1353 #define RCIE PIE1bits.RCIE // bit 5
1355 #define EEIE PIE2bits.EEIE // bit 4
1356 #define CMIE PIE2bits.CMIE // bit 6
1357 #define OSFIE PIE2bits.OSFIE // bit 7
1359 #define TMR1IF PIR1bits.TMR1IF // bit 0
1360 #define TMR2IF PIR1bits.TMR2IF // bit 1
1361 #define CCP1IF PIR1bits.CCP1IF // bit 2
1362 #define SSPIF PIR1bits.SSPIF // bit 3
1363 #define TXIF PIR1bits.TXIF // bit 4
1364 #define RCIF PIR1bits.RCIF // bit 5
1366 #define EEIF PIR2bits.EEIF // bit 4
1367 #define CMIF PIR2bits.CMIF // bit 6
1368 #define OSFIF PIR2bits.OSFIF // bit 7
1370 #define RA0 PORTAbits.RA0 // bit 0
1371 #define RA1 PORTAbits.RA1 // bit 1
1372 #define RA2 PORTAbits.RA2 // bit 2
1373 #define RA3 PORTAbits.RA3 // bit 3
1374 #define RA4 PORTAbits.RA4 // bit 4
1375 #define RA5 PORTAbits.RA5 // bit 5
1376 #define RA6 PORTAbits.RA6 // bit 6
1377 #define RA7 PORTAbits.RA7 // bit 7
1379 #define RB0 PORTBbits.RB0 // bit 0
1380 #define RB1 PORTBbits.RB1 // bit 1
1381 #define RB2 PORTBbits.RB2 // bit 2
1382 #define RB3 PORTBbits.RB3 // bit 3
1383 #define RB4 PORTBbits.RB4 // bit 4
1384 #define RB5 PORTBbits.RB5 // bit 5
1385 #define RB6 PORTBbits.RB6 // bit 6
1386 #define RB7 PORTBbits.RB7 // bit 7
1388 #define RX9D RCSTAbits.RX9D // bit 0, shadows bit in RCSTAbits
1389 #define RCD8 RCSTAbits.RCD8 // bit 0, shadows bit in RCSTAbits
1390 #define OERR RCSTAbits.OERR // bit 1
1391 #define FERR RCSTAbits.FERR // bit 2
1392 #define ADDEN RCSTAbits.ADDEN // bit 3
1393 #define CREN RCSTAbits.CREN // bit 4
1394 #define SREN RCSTAbits.SREN // bit 5
1395 #define RX9 RCSTAbits.RX9 // bit 6, shadows bit in RCSTAbits
1396 #define RC9 RCSTAbits.RC9 // bit 6, shadows bit in RCSTAbits
1397 #define NOT_RC8 RCSTAbits.NOT_RC8 // bit 6, shadows bit in RCSTAbits
1398 #define RC8_9 RCSTAbits.RC8_9 // bit 6, shadows bit in RCSTAbits
1399 #define SPEN RCSTAbits.SPEN // bit 7
1401 #define SSPM0 SSPCONbits.SSPM0 // bit 0
1402 #define SSPM1 SSPCONbits.SSPM1 // bit 1
1403 #define SSPM2 SSPCONbits.SSPM2 // bit 2
1404 #define SSPM3 SSPCONbits.SSPM3 // bit 3
1405 #define CKP SSPCONbits.CKP // bit 4
1406 #define SSPEN SSPCONbits.SSPEN // bit 5
1407 #define SSPOV SSPCONbits.SSPOV // bit 6
1408 #define WCOL SSPCONbits.WCOL // bit 7
1410 #define BF SSPSTATbits.BF // bit 0
1411 #define UA SSPSTATbits.UA // bit 1
1412 #define R_NOT_W SSPSTATbits.R_NOT_W // bit 2, shadows bit in SSPSTATbits
1413 #define R SSPSTATbits.R // bit 2, shadows bit in SSPSTATbits
1414 #define I2C_READ SSPSTATbits.I2C_READ // bit 2, shadows bit in SSPSTATbits
1415 #define NOT_W SSPSTATbits.NOT_W // bit 2, shadows bit in SSPSTATbits
1416 #define NOT_WRITE SSPSTATbits.NOT_WRITE // bit 2, shadows bit in SSPSTATbits
1417 #define R_W SSPSTATbits.R_W // bit 2, shadows bit in SSPSTATbits
1418 #define READ_WRITE SSPSTATbits.READ_WRITE // bit 2, shadows bit in SSPSTATbits
1419 #define S SSPSTATbits.S // bit 3, shadows bit in SSPSTATbits
1420 #define I2C_START SSPSTATbits.I2C_START // bit 3, shadows bit in SSPSTATbits
1421 #define P SSPSTATbits.P // bit 4, shadows bit in SSPSTATbits
1422 #define I2C_STOP SSPSTATbits.I2C_STOP // bit 4, shadows bit in SSPSTATbits
1423 #define D_NOT_A SSPSTATbits.D_NOT_A // bit 5, shadows bit in SSPSTATbits
1424 #define D SSPSTATbits.D // bit 5, shadows bit in SSPSTATbits
1425 #define I2C_DATA SSPSTATbits.I2C_DATA // bit 5, shadows bit in SSPSTATbits
1426 #define NOT_A SSPSTATbits.NOT_A // bit 5, shadows bit in SSPSTATbits
1427 #define NOT_ADDRESS SSPSTATbits.NOT_ADDRESS // bit 5, shadows bit in SSPSTATbits
1428 #define D_A SSPSTATbits.D_A // bit 5, shadows bit in SSPSTATbits
1429 #define DATA_ADDRESS SSPSTATbits.DATA_ADDRESS // bit 5, shadows bit in SSPSTATbits
1430 #define CKE SSPSTATbits.CKE // bit 6
1431 #define SMP SSPSTATbits.SMP // bit 7
1433 #define C STATUSbits.C // bit 0
1434 #define DC STATUSbits.DC // bit 1
1435 #define Z STATUSbits.Z // bit 2
1436 #define NOT_PD STATUSbits.NOT_PD // bit 3
1437 #define NOT_TO STATUSbits.NOT_TO // bit 4
1438 #define RP0 STATUSbits.RP0 // bit 5
1439 #define RP1 STATUSbits.RP1 // bit 6
1440 #define IRP STATUSbits.IRP // bit 7
1442 #define TMR1ON T1CONbits.TMR1ON // bit 0
1443 #define TMR1CS T1CONbits.TMR1CS // bit 1
1444 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2, shadows bit in T1CONbits
1445 #define T1INSYNC T1CONbits.T1INSYNC // bit 2, shadows bit in T1CONbits
1446 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
1447 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
1448 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
1449 #define T1RUN T1CONbits.T1RUN // bit 6
1451 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
1452 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
1453 #define TMR2ON T2CONbits.TMR2ON // bit 2
1454 #define TOUTPS0 T2CONbits.TOUTPS0 // bit 3
1455 #define TOUTPS1 T2CONbits.TOUTPS1 // bit 4
1456 #define TOUTPS2 T2CONbits.TOUTPS2 // bit 5
1457 #define TOUTPS3 T2CONbits.TOUTPS3 // bit 6
1459 #define TRISA0 TRISAbits.TRISA0 // bit 0
1460 #define TRISA1 TRISAbits.TRISA1 // bit 1
1461 #define TRISA2 TRISAbits.TRISA2 // bit 2
1462 #define TRISA3 TRISAbits.TRISA3 // bit 3
1463 #define TRISA4 TRISAbits.TRISA4 // bit 4
1464 #define TRISA5 TRISAbits.TRISA5 // bit 5
1465 #define TRISA6 TRISAbits.TRISA6 // bit 6
1466 #define TRISA7 TRISAbits.TRISA7 // bit 7
1468 #define TRISB0 TRISBbits.TRISB0 // bit 0
1469 #define TRISB1 TRISBbits.TRISB1 // bit 1
1470 #define TRISB2 TRISBbits.TRISB2 // bit 2
1471 #define TRISB3 TRISBbits.TRISB3 // bit 3
1472 #define TRISB4 TRISBbits.TRISB4 // bit 4
1473 #define TRISB5 TRISBbits.TRISB5 // bit 5
1474 #define TRISB6 TRISBbits.TRISB6 // bit 6
1475 #define TRISB7 TRISBbits.TRISB7 // bit 7
1477 #define TX9D TXSTAbits.TX9D // bit 0, shadows bit in TXSTAbits
1478 #define TXD8 TXSTAbits.TXD8 // bit 0, shadows bit in TXSTAbits
1479 #define TRMT TXSTAbits.TRMT // bit 1
1480 #define BRGH TXSTAbits.BRGH // bit 2
1481 #define SYNC TXSTAbits.SYNC // bit 4
1482 #define TXEN TXSTAbits.TXEN // bit 5
1483 #define TX9 TXSTAbits.TX9 // bit 6, shadows bit in TXSTAbits
1484 #define NOT_TX8 TXSTAbits.NOT_TX8 // bit 6, shadows bit in TXSTAbits
1485 #define TX8_9 TXSTAbits.TX8_9 // bit 6, shadows bit in TXSTAbits
1486 #define CSRC TXSTAbits.CSRC // bit 7
1488 #define SWDTEN WDTCONbits.SWDTEN // bit 0, shadows bit in WDTCONbits
1489 #define SWDTE WDTCONbits.SWDTE // bit 0, shadows bit in WDTCONbits
1490 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
1491 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
1492 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
1493 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
1495 #endif // #ifndef NO_BIT_DEFINES
1497 #endif // #ifndef __PIC16F87_H__