2 * This declarations of the PIC16F684 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 __PIC16F684_H__
26 #define __PIC16F684_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 PORTC_ADDR 0x0007
43 #define PCLATH_ADDR 0x000A
44 #define INTCON_ADDR 0x000B
45 #define PIR1_ADDR 0x000C
46 #define TMR1_ADDR 0x000E
47 #define TMR1L_ADDR 0x000E
48 #define TMR1H_ADDR 0x000F
49 #define T1CON_ADDR 0x0010
50 #define TMR2_ADDR 0x0011
51 #define T2CON_ADDR 0x0012
52 #define CCPR1_ADDR 0x0013
53 #define CCPR1L_ADDR 0x0013
54 #define CCPR1H_ADDR 0x0014
55 #define CCP1CON_ADDR 0x0015
56 #define PWM1CON_ADDR 0x0016
57 #define ECCPAS_ADDR 0x0017
58 #define WDTCON_ADDR 0x0018
59 #define CMCON0_ADDR 0x0019
60 #define CMCON1_ADDR 0x001A
61 #define ADRESH_ADDR 0x001E
62 #define ADCON0_ADDR 0x001F
63 #define OPTION_REG_ADDR 0x0081
64 #define TRISA_ADDR 0x0085
65 #define TRISC_ADDR 0x0087
66 #define PIE1_ADDR 0x008C
67 #define PCON_ADDR 0x008E
68 #define OSCCON_ADDR 0x008F
69 #define OSCTUNE_ADDR 0x0090
70 #define ANSEL_ADDR 0x0091
71 #define PR2_ADDR 0x0092
72 #define WPU_ADDR 0x0095
73 #define WPUA_ADDR 0x0095
74 #define IOC_ADDR 0x0096
75 #define IOCA_ADDR 0x0096
76 #define VRCON_ADDR 0x0099
77 #define EEDAT_ADDR 0x009A
78 #define EEDATA_ADDR 0x009A
79 #define EEADR_ADDR 0x009B
80 #define EECON1_ADDR 0x009C
81 #define EECON2_ADDR 0x009D
82 #define ADRESL_ADDR 0x009E
83 #define ADCON1_ADDR 0x009F
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
;
165 extern __at(0x0005) volatile __PORTAbits_t PORTAbits
;
174 //==============================================================================
177 //==============================================================================
180 extern __at(0x0007) __sfr PORTC
;
203 extern __at(0x0007) volatile __PORTCbits_t PORTCbits
;
212 //==============================================================================
214 extern __at(0x000A) __sfr PCLATH
;
216 //==============================================================================
219 extern __at(0x000B) __sfr INTCON
;
248 extern __at(0x000B) volatile __INTCONbits_t INTCONbits
;
261 //==============================================================================
264 //==============================================================================
267 extern __at(0x000C) __sfr PIR1
;
296 extern __at(0x000C) volatile __PIR1bits_t PIR1bits
;
310 //==============================================================================
312 extern __at(0x000E) __sfr TMR1
;
313 extern __at(0x000E) __sfr TMR1L
;
314 extern __at(0x000F) __sfr TMR1H
;
316 //==============================================================================
319 extern __at(0x0010) __sfr T1CON
;
327 unsigned NOT_T1SYNC
: 1;
328 unsigned T1OSCEN
: 1;
329 unsigned T1CKPS0
: 1;
330 unsigned T1CKPS1
: 1;
343 extern __at(0x0010) volatile __T1CONbits_t T1CONbits
;
347 #define _NOT_T1SYNC 0x04
348 #define _T1OSCEN 0x08
349 #define _T1CKPS0 0x10
350 #define _T1CKPS1 0x20
354 //==============================================================================
356 extern __at(0x0011) __sfr TMR2
;
358 //==============================================================================
361 extern __at(0x0012) __sfr T2CON
;
367 unsigned T2CKPS0
: 1;
368 unsigned T2CKPS1
: 1;
370 unsigned TOUTPS0
: 1;
371 unsigned TOUTPS1
: 1;
372 unsigned TOUTPS2
: 1;
373 unsigned TOUTPS3
: 1;
391 extern __at(0x0012) volatile __T2CONbits_t T2CONbits
;
393 #define _T2CKPS0 0x01
394 #define _T2CKPS1 0x02
396 #define _TOUTPS0 0x08
397 #define _TOUTPS1 0x10
398 #define _TOUTPS2 0x20
399 #define _TOUTPS3 0x40
401 //==============================================================================
403 extern __at(0x0013) __sfr CCPR1
;
404 extern __at(0x0013) __sfr CCPR1L
;
405 extern __at(0x0014) __sfr CCPR1H
;
407 //==============================================================================
410 extern __at(0x0015) __sfr CCP1CON
;
446 extern __at(0x0015) volatile __CCP1CONbits_t CCP1CONbits
;
457 //==============================================================================
460 //==============================================================================
463 extern __at(0x0016) __sfr PWM1CON
;
486 extern __at(0x0016) volatile __PWM1CONbits_t PWM1CONbits
;
497 //==============================================================================
500 //==============================================================================
503 extern __at(0x0017) __sfr ECCPAS
;
513 unsigned ECCPAS0
: 1;
514 unsigned ECCPAS1
: 1;
515 unsigned ECCPAS2
: 1;
516 unsigned ECCPASE
: 1;
540 extern __at(0x0017) volatile __ECCPASbits_t ECCPASbits
;
546 #define _ECCPAS0 0x10
547 #define _ECCPAS1 0x20
548 #define _ECCPAS2 0x40
549 #define _ECCPASE 0x80
551 //==============================================================================
554 //==============================================================================
557 extern __at(0x0018) __sfr WDTCON
;
581 extern __at(0x0018) volatile __WDTCONbits_t WDTCONbits
;
589 //==============================================================================
592 //==============================================================================
595 extern __at(0x0019) __sfr CMCON0
;
618 extern __at(0x0019) volatile __CMCON0bits_t CMCON0bits
;
629 //==============================================================================
632 //==============================================================================
635 extern __at(0x001A) __sfr CMCON1
;
649 extern __at(0x001A) volatile __CMCON1bits_t CMCON1bits
;
654 //==============================================================================
656 extern __at(0x001E) __sfr ADRESH
;
658 //==============================================================================
661 extern __at(0x001F) __sfr ADCON0
;
668 unsigned GO_NOT_DONE
: 1;
692 unsigned NOT_DONE
: 1;
704 unsigned GO_DONE
: 1;
721 extern __at(0x001F) volatile __ADCON0bits_t ADCON0bits
;
724 #define _GO_NOT_DONE 0x02
726 #define _NOT_DONE 0x02
727 #define _GO_DONE 0x02
734 //==============================================================================
737 //==============================================================================
740 extern __at(0x0081) __sfr OPTION_REG
;
753 unsigned NOT_RAPU
: 1;
761 } __OPTION_REGbits_t
;
763 extern __at(0x0081) volatile __OPTION_REGbits_t OPTION_REGbits
;
772 #define _NOT_RAPU 0x80
774 //==============================================================================
777 //==============================================================================
780 extern __at(0x0085) __sfr TRISA
;
803 extern __at(0x0085) volatile __TRISAbits_t TRISAbits
;
812 //==============================================================================
815 //==============================================================================
818 extern __at(0x0087) __sfr TRISC
;
841 extern __at(0x0087) volatile __TRISCbits_t TRISCbits
;
850 //==============================================================================
853 //==============================================================================
856 extern __at(0x008C) __sfr PIE1
;
885 extern __at(0x008C) volatile __PIE1bits_t PIE1bits
;
899 //==============================================================================
902 //==============================================================================
905 extern __at(0x008E) __sfr PCON
;
911 unsigned NOT_BOR
: 1;
912 unsigned NOT_POR
: 1;
923 unsigned NOT_BOD
: 1;
934 extern __at(0x008E) volatile __PCONbits_t PCONbits
;
936 #define _NOT_BOR 0x01
937 #define _NOT_BOD 0x01
938 #define _NOT_POR 0x02
943 //==============================================================================
946 //==============================================================================
949 extern __at(0x008F) __sfr OSCCON
;
973 extern __at(0x008F) volatile __OSCCONbits_t OSCCONbits
;
983 //==============================================================================
986 //==============================================================================
989 extern __at(0x0090) __sfr OSCTUNE
;
1012 extern __at(0x0090) volatile __OSCTUNEbits_t OSCTUNEbits
;
1020 //==============================================================================
1023 //==============================================================================
1026 extern __at(0x0091) __sfr ANSEL
;
1040 extern __at(0x0091) volatile __ANSELbits_t ANSELbits
;
1051 //==============================================================================
1053 extern __at(0x0092) __sfr PR2
;
1055 //==============================================================================
1058 extern __at(0x0095) __sfr WPU
;
1087 extern __at(0x0095) volatile __WPUbits_t WPUbits
;
1100 //==============================================================================
1103 //==============================================================================
1106 extern __at(0x0095) __sfr WPUA
;
1135 extern __at(0x0095) volatile __WPUAbits_t WPUAbits
;
1137 #define _WPUA_WPUA0 0x01
1138 #define _WPUA_WPU0 0x01
1139 #define _WPUA_WPUA1 0x02
1140 #define _WPUA_WPU1 0x02
1141 #define _WPUA_WPUA2 0x04
1142 #define _WPUA_WPU2 0x04
1143 #define _WPUA_WPUA4 0x10
1144 #define _WPUA_WPU4 0x10
1145 #define _WPUA_WPUA5 0x20
1146 #define _WPUA_WPU5 0x20
1148 //==============================================================================
1151 //==============================================================================
1154 extern __at(0x0096) __sfr IOC
;
1195 extern __at(0x0096) volatile __IOCbits_t IOCbits
;
1210 //==============================================================================
1213 //==============================================================================
1216 extern __at(0x0096) __sfr IOCA
;
1257 extern __at(0x0096) volatile __IOCAbits_t IOCAbits
;
1259 #define _IOCA_IOCA0 0x01
1260 #define _IOCA_IOC0 0x01
1261 #define _IOCA_IOCA1 0x02
1262 #define _IOCA_IOC1 0x02
1263 #define _IOCA_IOCA2 0x04
1264 #define _IOCA_IOC2 0x04
1265 #define _IOCA_IOCA3 0x08
1266 #define _IOCA_IOC3 0x08
1267 #define _IOCA_IOCA4 0x10
1268 #define _IOCA_IOC4 0x10
1269 #define _IOCA_IOCA5 0x20
1270 #define _IOCA_IOC5 0x20
1272 //==============================================================================
1275 //==============================================================================
1278 extern __at(0x0099) __sfr VRCON
;
1301 extern __at(0x0099) volatile __VRCONbits_t VRCONbits
;
1310 //==============================================================================
1312 extern __at(0x009A) __sfr EEDAT
;
1313 extern __at(0x009A) __sfr EEDATA
;
1314 extern __at(0x009B) __sfr EEADR
;
1316 //==============================================================================
1319 extern __at(0x009C) __sfr EECON1
;
1333 extern __at(0x009C) volatile __EECON1bits_t EECON1bits
;
1340 //==============================================================================
1342 extern __at(0x009D) __sfr EECON2
;
1343 extern __at(0x009E) __sfr ADRESL
;
1345 //==============================================================================
1348 extern __at(0x009F) __sfr ADCON1
;
1372 extern __at(0x009F) volatile __ADCON1bits_t ADCON1bits
;
1378 //==============================================================================
1381 //==============================================================================
1383 // Configuration Bits
1385 //==============================================================================
1387 #define _CONFIG 0x2007
1389 //----------------------------- CONFIG Options -------------------------------
1391 #define _FOSC_LP 0x3FF8 // LP oscillator: Low-power crystal on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
1392 #define _LP_OSC 0x3FF8 // LP oscillator: Low-power crystal on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
1393 #define _FOSC_XT 0x3FF9 // XT oscillator: Crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKINT.
1394 #define _XT_OSC 0x3FF9 // XT oscillator: Crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKINT.
1395 #define _FOSC_HS 0x3FFA // HS oscillator: High-speed crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
1396 #define _HS_OSC 0x3FFA // HS oscillator: High-speed crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN.
1397 #define _FOSC_EC 0x3FFB // EC: I/O function on RA4/OSC2/CLKOUT pin, CLKIN on RA5/OSC1/CLKIN.
1398 #define _EC_OSC 0x3FFB // EC: I/O function on RA4/OSC2/CLKOUT pin, CLKIN on RA5/OSC1/CLKIN.
1399 #define _FOSC_INTOSCIO 0x3FFC // INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
1400 #define _INTOSCIO 0x3FFC // INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
1401 #define _INTRC_OSC_NOCLKOUT 0x3FFC // INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
1402 #define _FOSC_INTOSCCLK 0x3FFD // INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
1403 #define _INTOSC 0x3FFD // INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
1404 #define _INTRC_OSC_CLKOUT 0x3FFD // INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN.
1405 #define _FOSC_EXTRCIO 0x3FFE // EXTRCIO oscillator: External RC on RA5/OSC1/CLKIN, I/O function on RA4/OSC2/CLKOUT pin.
1406 #define _EXTRCIO 0x3FFE // EXTRCIO oscillator: External RC on RA5/OSC1/CLKIN, I/O function on RA4/OSC2/CLKOUT pin.
1407 #define _EXTRC_OSC_NOCLKOUT 0x3FFE // EXTRCIO oscillator: External RC on RA5/OSC1/CLKIN, I/O function on RA4/OSC2/CLKOUT pin.
1408 #define _FOSC_EXTRCCLK 0x3FFF // EXTRC oscillator: External RC on RA5/OSC1/CLKIN, CLKOUT function on RA4/OSC2/CLKOUT pin.
1409 #define _EXTRC 0x3FFF // EXTRC oscillator: External RC on RA5/OSC1/CLKIN, CLKOUT function on RA4/OSC2/CLKOUT pin.
1410 #define _EXTRC_OSC_CLKOUT 0x3FFF // EXTRC oscillator: External RC on RA5/OSC1/CLKIN, CLKOUT function on RA4/OSC2/CLKOUT pin.
1411 #define _WDTE_OFF 0x3FF7 // WDT disabled.
1412 #define _WDT_OFF 0x3FF7 // WDT disabled.
1413 #define _WDTE_ON 0x3FFF // WDT enabled.
1414 #define _WDT_ON 0x3FFF // WDT enabled.
1415 #define _PWRTE_ON 0x3FEF // PWRT enabled.
1416 #define _PWRTE_OFF 0x3FFF // PWRT disabled.
1417 #define _MCLRE_OFF 0x3FDF // MCLR pin function is digital input, MCLR internally tied to VDD.
1418 #define _MCLRE_ON 0x3FFF // MCLR pin function is MCLR.
1419 #define _CP_ON 0x3FBF // Program memory code protection is enabled.
1420 #define _CP_OFF 0x3FFF // Program memory code protection is disabled.
1421 #define _CPD_ON 0x3F7F // Data memory code protection is enabled.
1422 #define _CPD_OFF 0x3FFF // Data memory code protection is disabled.
1423 #define _BOREN_OFF 0x3CFF // BOR disabled.
1424 #define _BOD_OFF 0x3CFF // BOR disabled.
1425 #define _BOREN_SBODEN 0x3DFF // BOR controlled by SBOREN bit of the PCON register.
1426 #define _BOD_SBODEN 0x3DFF // BOR controlled by SBOREN bit of the PCON register.
1427 #define _BOREN_NSLEEP 0x3EFF // BOR enabled during operation and disabled in Sleep.
1428 #define _BOD_NSLEEP 0x3EFF // BOR enabled during operation and disabled in Sleep.
1429 #define _BOREN_ON 0x3FFF // BOR enabled.
1430 #define _BOD_ON 0x3FFF // BOR enabled.
1431 #define _IESO_OFF 0x3BFF // Internal External Switchover mode is disabled.
1432 #define _IESO_ON 0x3FFF // Internal External Switchover mode is enabled.
1433 #define _FCMEN_OFF 0x37FF // Fail-Safe Clock Monitor is disabled.
1434 #define _FCMEN_ON 0x3FFF // Fail-Safe Clock Monitor is enabled.
1436 //==============================================================================
1438 #define _DEVID1 0x2006
1440 #define _IDLOC0 0x2000
1441 #define _IDLOC1 0x2001
1442 #define _IDLOC2 0x2002
1443 #define _IDLOC3 0x2003
1445 //==============================================================================
1447 #ifndef NO_BIT_DEFINES
1449 #define ADON ADCON0bits.ADON // bit 0
1450 #define GO_NOT_DONE ADCON0bits.GO_NOT_DONE // bit 1, shadows bit in ADCON0bits
1451 #define GO ADCON0bits.GO // bit 1, shadows bit in ADCON0bits
1452 #define NOT_DONE ADCON0bits.NOT_DONE // bit 1, shadows bit in ADCON0bits
1453 #define GO_DONE ADCON0bits.GO_DONE // bit 1, shadows bit in ADCON0bits
1454 #define CHS0 ADCON0bits.CHS0 // bit 2
1455 #define CHS1 ADCON0bits.CHS1 // bit 3
1456 #define CHS2 ADCON0bits.CHS2 // bit 4
1457 #define VCFG ADCON0bits.VCFG // bit 6
1458 #define ADFM ADCON0bits.ADFM // bit 7
1460 #define ADCS0 ADCON1bits.ADCS0 // bit 4
1461 #define ADCS1 ADCON1bits.ADCS1 // bit 5
1462 #define ADCS2 ADCON1bits.ADCS2 // bit 6
1464 #define ANS0 ANSELbits.ANS0 // bit 0
1465 #define ANS1 ANSELbits.ANS1 // bit 1
1466 #define ANS2 ANSELbits.ANS2 // bit 2
1467 #define ANS3 ANSELbits.ANS3 // bit 3
1468 #define ANS4 ANSELbits.ANS4 // bit 4
1469 #define ANS5 ANSELbits.ANS5 // bit 5
1470 #define ANS6 ANSELbits.ANS6 // bit 6
1471 #define ANS7 ANSELbits.ANS7 // bit 7
1473 #define CCP1M0 CCP1CONbits.CCP1M0 // bit 0
1474 #define CCP1M1 CCP1CONbits.CCP1M1 // bit 1
1475 #define CCP1M2 CCP1CONbits.CCP1M2 // bit 2
1476 #define CCP1M3 CCP1CONbits.CCP1M3 // bit 3
1477 #define DC1B0 CCP1CONbits.DC1B0 // bit 4
1478 #define DC1B1 CCP1CONbits.DC1B1 // bit 5
1479 #define P1M0 CCP1CONbits.P1M0 // bit 6
1480 #define P1M1 CCP1CONbits.P1M1 // bit 7
1482 #define CM0 CMCON0bits.CM0 // bit 0
1483 #define CM1 CMCON0bits.CM1 // bit 1
1484 #define CM2 CMCON0bits.CM2 // bit 2
1485 #define CIS CMCON0bits.CIS // bit 3
1486 #define C1INV CMCON0bits.C1INV // bit 4
1487 #define C2INV CMCON0bits.C2INV // bit 5
1488 #define C1OUT CMCON0bits.C1OUT // bit 6
1489 #define C2OUT CMCON0bits.C2OUT // bit 7
1491 #define C2SYNC CMCON1bits.C2SYNC // bit 0
1492 #define T1GSS CMCON1bits.T1GSS // bit 1
1494 #define PSSBD0 ECCPASbits.PSSBD0 // bit 0
1495 #define PSSBD1 ECCPASbits.PSSBD1 // bit 1
1496 #define PSSAC0 ECCPASbits.PSSAC0 // bit 2
1497 #define PSSAC1 ECCPASbits.PSSAC1 // bit 3
1498 #define ECCPAS0 ECCPASbits.ECCPAS0 // bit 4
1499 #define ECCPAS1 ECCPASbits.ECCPAS1 // bit 5
1500 #define ECCPAS2 ECCPASbits.ECCPAS2 // bit 6
1501 #define ECCPASE ECCPASbits.ECCPASE // bit 7
1503 #define RD EECON1bits.RD // bit 0
1504 #define WR EECON1bits.WR // bit 1
1505 #define WREN EECON1bits.WREN // bit 2
1506 #define WRERR EECON1bits.WRERR // bit 3
1508 #define RAIF INTCONbits.RAIF // bit 0
1509 #define INTF INTCONbits.INTF // bit 1
1510 #define T0IF INTCONbits.T0IF // bit 2, shadows bit in INTCONbits
1511 #define TMR0IF INTCONbits.TMR0IF // bit 2, shadows bit in INTCONbits
1512 #define RAIE INTCONbits.RAIE // bit 3
1513 #define INTE INTCONbits.INTE // bit 4
1514 #define T0IE INTCONbits.T0IE // bit 5, shadows bit in INTCONbits
1515 #define TMR0IE INTCONbits.TMR0IE // bit 5, shadows bit in INTCONbits
1516 #define PEIE INTCONbits.PEIE // bit 6
1517 #define GIE INTCONbits.GIE // bit 7
1519 #define IOCA0 IOCbits.IOCA0 // bit 0, shadows bit in IOCbits
1520 #define IOC0 IOCbits.IOC0 // bit 0, shadows bit in IOCbits
1521 #define IOCA1 IOCbits.IOCA1 // bit 1, shadows bit in IOCbits
1522 #define IOC1 IOCbits.IOC1 // bit 1, shadows bit in IOCbits
1523 #define IOCA2 IOCbits.IOCA2 // bit 2, shadows bit in IOCbits
1524 #define IOC2 IOCbits.IOC2 // bit 2, shadows bit in IOCbits
1525 #define IOCA3 IOCbits.IOCA3 // bit 3, shadows bit in IOCbits
1526 #define IOC3 IOCbits.IOC3 // bit 3, shadows bit in IOCbits
1527 #define IOCA4 IOCbits.IOCA4 // bit 4, shadows bit in IOCbits
1528 #define IOC4 IOCbits.IOC4 // bit 4, shadows bit in IOCbits
1529 #define IOCA5 IOCbits.IOCA5 // bit 5, shadows bit in IOCbits
1530 #define IOC5 IOCbits.IOC5 // bit 5, shadows bit in IOCbits
1532 #define PS0 OPTION_REGbits.PS0 // bit 0
1533 #define PS1 OPTION_REGbits.PS1 // bit 1
1534 #define PS2 OPTION_REGbits.PS2 // bit 2
1535 #define PSA OPTION_REGbits.PSA // bit 3
1536 #define T0SE OPTION_REGbits.T0SE // bit 4
1537 #define T0CS OPTION_REGbits.T0CS // bit 5
1538 #define INTEDG OPTION_REGbits.INTEDG // bit 6
1539 #define NOT_RAPU OPTION_REGbits.NOT_RAPU // bit 7
1541 #define SCS OSCCONbits.SCS // bit 0
1542 #define LTS OSCCONbits.LTS // bit 1
1543 #define HTS OSCCONbits.HTS // bit 2
1544 #define OSTS OSCCONbits.OSTS // bit 3
1545 #define IRCF0 OSCCONbits.IRCF0 // bit 4
1546 #define IRCF1 OSCCONbits.IRCF1 // bit 5
1547 #define IRCF2 OSCCONbits.IRCF2 // bit 6
1549 #define TUN0 OSCTUNEbits.TUN0 // bit 0
1550 #define TUN1 OSCTUNEbits.TUN1 // bit 1
1551 #define TUN2 OSCTUNEbits.TUN2 // bit 2
1552 #define TUN3 OSCTUNEbits.TUN3 // bit 3
1553 #define TUN4 OSCTUNEbits.TUN4 // bit 4
1555 #define NOT_BOR PCONbits.NOT_BOR // bit 0, shadows bit in PCONbits
1556 #define NOT_BOD PCONbits.NOT_BOD // bit 0, shadows bit in PCONbits
1557 #define NOT_POR PCONbits.NOT_POR // bit 1
1558 #define SBOREN PCONbits.SBOREN // bit 4, shadows bit in PCONbits
1559 #define SBODEN PCONbits.SBODEN // bit 4, shadows bit in PCONbits
1560 #define ULPWUE PCONbits.ULPWUE // bit 5
1562 #define TMR1IE PIE1bits.TMR1IE // bit 0, shadows bit in PIE1bits
1563 #define T1IE PIE1bits.T1IE // bit 0, shadows bit in PIE1bits
1564 #define TMR2IE PIE1bits.TMR2IE // bit 1, shadows bit in PIE1bits
1565 #define T2IE PIE1bits.T2IE // bit 1, shadows bit in PIE1bits
1566 #define OSFIE PIE1bits.OSFIE // bit 2
1567 #define C1IE PIE1bits.C1IE // bit 3
1568 #define C2IE PIE1bits.C2IE // bit 4
1569 #define CCP1IE PIE1bits.CCP1IE // bit 5, shadows bit in PIE1bits
1570 #define ECCPIE PIE1bits.ECCPIE // bit 5, shadows bit in PIE1bits
1571 #define ADIE PIE1bits.ADIE // bit 6
1572 #define EEIE PIE1bits.EEIE // bit 7
1574 #define TMR1IF PIR1bits.TMR1IF // bit 0, shadows bit in PIR1bits
1575 #define T1IF PIR1bits.T1IF // bit 0, shadows bit in PIR1bits
1576 #define TMR2IF PIR1bits.TMR2IF // bit 1, shadows bit in PIR1bits
1577 #define T2IF PIR1bits.T2IF // bit 1, shadows bit in PIR1bits
1578 #define OSFIF PIR1bits.OSFIF // bit 2
1579 #define C1IF PIR1bits.C1IF // bit 3
1580 #define C2IF PIR1bits.C2IF // bit 4
1581 #define CCP1IF PIR1bits.CCP1IF // bit 5, shadows bit in PIR1bits
1582 #define ECCPIF PIR1bits.ECCPIF // bit 5, shadows bit in PIR1bits
1583 #define ADIF PIR1bits.ADIF // bit 6
1584 #define EEIF PIR1bits.EEIF // bit 7
1586 #define RA0 PORTAbits.RA0 // bit 0
1587 #define RA1 PORTAbits.RA1 // bit 1
1588 #define RA2 PORTAbits.RA2 // bit 2
1589 #define RA3 PORTAbits.RA3 // bit 3
1590 #define RA4 PORTAbits.RA4 // bit 4
1591 #define RA5 PORTAbits.RA5 // bit 5
1593 #define RC0 PORTCbits.RC0 // bit 0
1594 #define RC1 PORTCbits.RC1 // bit 1
1595 #define RC2 PORTCbits.RC2 // bit 2
1596 #define RC3 PORTCbits.RC3 // bit 3
1597 #define RC4 PORTCbits.RC4 // bit 4
1598 #define RC5 PORTCbits.RC5 // bit 5
1600 #define PDC0 PWM1CONbits.PDC0 // bit 0
1601 #define PDC1 PWM1CONbits.PDC1 // bit 1
1602 #define PDC2 PWM1CONbits.PDC2 // bit 2
1603 #define PDC3 PWM1CONbits.PDC3 // bit 3
1604 #define PDC4 PWM1CONbits.PDC4 // bit 4
1605 #define PDC5 PWM1CONbits.PDC5 // bit 5
1606 #define PDC6 PWM1CONbits.PDC6 // bit 6
1607 #define PRSEN PWM1CONbits.PRSEN // bit 7
1609 #define C STATUSbits.C // bit 0
1610 #define DC STATUSbits.DC // bit 1
1611 #define Z STATUSbits.Z // bit 2
1612 #define NOT_PD STATUSbits.NOT_PD // bit 3
1613 #define NOT_TO STATUSbits.NOT_TO // bit 4
1614 #define RP0 STATUSbits.RP0 // bit 5
1615 #define RP1 STATUSbits.RP1 // bit 6
1616 #define IRP STATUSbits.IRP // bit 7
1618 #define TMR1ON T1CONbits.TMR1ON // bit 0
1619 #define TMR1CS T1CONbits.TMR1CS // bit 1
1620 #define NOT_T1SYNC T1CONbits.NOT_T1SYNC // bit 2
1621 #define T1OSCEN T1CONbits.T1OSCEN // bit 3
1622 #define T1CKPS0 T1CONbits.T1CKPS0 // bit 4
1623 #define T1CKPS1 T1CONbits.T1CKPS1 // bit 5
1624 #define TMR1GE T1CONbits.TMR1GE // bit 6
1625 #define T1GINV T1CONbits.T1GINV // bit 7
1627 #define T2CKPS0 T2CONbits.T2CKPS0 // bit 0
1628 #define T2CKPS1 T2CONbits.T2CKPS1 // bit 1
1629 #define TMR2ON T2CONbits.TMR2ON // bit 2
1630 #define TOUTPS0 T2CONbits.TOUTPS0 // bit 3
1631 #define TOUTPS1 T2CONbits.TOUTPS1 // bit 4
1632 #define TOUTPS2 T2CONbits.TOUTPS2 // bit 5
1633 #define TOUTPS3 T2CONbits.TOUTPS3 // bit 6
1635 #define TRISA0 TRISAbits.TRISA0 // bit 0
1636 #define TRISA1 TRISAbits.TRISA1 // bit 1
1637 #define TRISA2 TRISAbits.TRISA2 // bit 2
1638 #define TRISA3 TRISAbits.TRISA3 // bit 3
1639 #define TRISA4 TRISAbits.TRISA4 // bit 4
1640 #define TRISA5 TRISAbits.TRISA5 // bit 5
1642 #define TRISC0 TRISCbits.TRISC0 // bit 0
1643 #define TRISC1 TRISCbits.TRISC1 // bit 1
1644 #define TRISC2 TRISCbits.TRISC2 // bit 2
1645 #define TRISC3 TRISCbits.TRISC3 // bit 3
1646 #define TRISC4 TRISCbits.TRISC4 // bit 4
1647 #define TRISC5 TRISCbits.TRISC5 // bit 5
1649 #define VR0 VRCONbits.VR0 // bit 0
1650 #define VR1 VRCONbits.VR1 // bit 1
1651 #define VR2 VRCONbits.VR2 // bit 2
1652 #define VR3 VRCONbits.VR3 // bit 3
1653 #define VRR VRCONbits.VRR // bit 5
1654 #define VREN VRCONbits.VREN // bit 7
1656 #define SWDTEN WDTCONbits.SWDTEN // bit 0
1657 #define WDTPS0 WDTCONbits.WDTPS0 // bit 1
1658 #define WDTPS1 WDTCONbits.WDTPS1 // bit 2
1659 #define WDTPS2 WDTCONbits.WDTPS2 // bit 3
1660 #define WDTPS3 WDTCONbits.WDTPS3 // bit 4
1662 #define WPUA0 WPUbits.WPUA0 // bit 0, shadows bit in WPUbits
1663 #define WPU0 WPUbits.WPU0 // bit 0, shadows bit in WPUbits
1664 #define WPUA1 WPUbits.WPUA1 // bit 1, shadows bit in WPUbits
1665 #define WPU1 WPUbits.WPU1 // bit 1, shadows bit in WPUbits
1666 #define WPUA2 WPUbits.WPUA2 // bit 2, shadows bit in WPUbits
1667 #define WPU2 WPUbits.WPU2 // bit 2, shadows bit in WPUbits
1668 #define WPUA4 WPUbits.WPUA4 // bit 4, shadows bit in WPUbits
1669 #define WPU4 WPUbits.WPU4 // bit 4, shadows bit in WPUbits
1670 #define WPUA5 WPUbits.WPUA5 // bit 5, shadows bit in WPUbits
1671 #define WPU5 WPUbits.WPU5 // bit 5, shadows bit in WPUbits
1673 #endif // #ifndef NO_BIT_DEFINES
1675 #endif // #ifndef __PIC16F684_H__