' Definition File for the Crownhill Associates Ltd Proton+ BASIC Compiler.
' Always make a backup of this file if modifications are carried out.
' Modifications to this file may affect the performance of the compiler
'
' Device 18F2525
' File Author Les Johnson.
' Creation Date 31/03/2009
'
$ifndef _18F2525_
$define _18F2525_

' Device Information
$define _device _18F2525
$define _core 16
$define _ram 3968     ' Amount of RAM
$define _code 49152     ' Amount of Flash Memory
$define _eeprom 1024     ' Amount of Eeprom Memory
$define _ports 3     ' Amount of Ports
$define _debug      ' Whether the device has Debug capabilities
$define _block 64     ' Size of the Code Memory Write Segment (in Bytes)
$define _mssp 2     ' 0 = None, 1 = Single MSSP, 2 = Dual MSSP, 3 = SSP Only
$define _flash 1     ' Whether the device has Self Modifying support. 0 = No, 1 = Read and Write, 2 = Read no Write
$define _usb 0     ' Amount of USBs
$define _uart 1     ' Amount of UARTs
$define _adcres 10     ' Resolution of ADC (in bits)
$define _adc 10     ' Amount of ADC channels
$define _bankAend 127
$define _rambanks 15

' Special Function Registers (SFRs)
$define _LATA 3977
$define _LATB 3978
$define _LATC 3979
$define _OSCTUNE 3995
$define _PIE1 3997
$define _PIR1 3998
$define _IPR1 3999
$define _PIE2 4000
$define _PIR2 4001
$define _IPR2 4002
$define _EECON1 4006
$define _EECON2 4007
$define _EEDATA 4008
$define _EEADR 4009
$define _EEADRH 4010
$define _RCSTA 4011
$define _TXSTA 4012
$define _TXREG 4013
$define _RCREG 4014
$define _SPBRG 4015
$define _SPBRGH 4016
$define _T3CON 4017
$define _TMR3L 4018
$define _TMR3H 4019
$define _CMCON 4020
$define _CVRCON 4021
$define _BAUDCON 4024
$define _BAUDCTL 4024
$define _CCP2CON 4026
$define _CCPR2 4027
$define _CCPR2L 4027
$define _CCPR2H 4028
$define _CCP1CON 4029
$define _CCPR1 4030
$define _CCPR1L 4030
$define _CCPR1H 4031
$define _ADCON2 4032
$define _ADCON1 4033
$define _ADCON0 4034
'$define _ADRES 4035
$define _ADRESL 4035
$define _ADRESH 4036
$define _SSPCON2 4037
$define _SSPCON1 4038
$define _SSPSTAT 4039
$define _SSPADD 4040
$define _SSPBUF 4041
$define _T2CON 4042
$define _PR2 4043
$define _TMR2 4044
$define _T1CON 4045
$define _TMR1L 4046
$define _TMR1H 4047
$define _RCON 4048
$define _WDTCON 4049
$define _HLVDCON 4050
$define _LVDCON 4050
$define _OSCCON 4051
$define _DEBUG 4052
$define _T0CON 4053
$define _TMR0L 4054
$define _TMR0H 4055
$define _STATUS 4056
$define _FSR2L 4057
$define _FSR2H 4058
$define _PLUSW2 4059
$define _PREINC2 4060
$define _POSTDEC2 4061
$define _POSTINC2 4062
$define _INDF2 4063
$define _BSR 4064
$define _FSR1L 4065
$define _FSR1H 4066
$define _PLUSW1 4067
$define _PREINC1 4068
$define _POSTDEC1 4069
$define _POSTINC1 4070
$define _INDF1 4071
$define _WREG 4072
$define _FSR0L 4073
$define _FSR0H 4074
$define _PLUSW0 4075
$define _PREINC0 4076
$define _POSTDEC0 4077
$define _POSTINC0 4078
$define _INDF0 4079
$define _INTCON3 4080
$define _INTCON2 4081
$define _INTCON 4082
'$define _PROD 4083
$define _PRODL 4083
$define _PRODH 4084
$define _TABLAT 4085
'$define _TBLPTR 4086
$define _TBLPTRL 4086
$define _TBLPTRH 4087
$define _TBLPTRU 4088
$define _PC 4089
$define _PCL 4089
$define _PCLATH 4090
$define _PCLATU 4091
$define _STKPTR 4092
'$define _TOS 4093
$define _TOSL 4093
$define _TOSH 4094
$define _TOSU 4095
$define _PORTA 3968
$define _PORTB 3969
$define _PORTC 3970
$define _PORTE 3972
$define _TRISA 3986
$define _TRISB 3987
$define _TRISC 3988
$define _ECCPAS1 4022
$define _PWM1CON 4023


' Alternative Bit Operation
$define PORTAbits_T0CKI  PORTA.4

' Alternative Bit Operation
$define PORTAbits_AN4  PORTA.5

' Alternative Bit Operation
$define PORTAbits_SS  PORTA.5

' Alternative Bit Operation
$define PORTAbits_NOT_SS  PORTA.5

' Alternative Bit Operation
$define PORTAbits_LVDIN  PORTA.5

' Alternative Bit Operation
$define PORTAbits_HLVDIN  PORTA.5

' Alternative Bit Operation
$define PORTBbits_INT0  PORTB.0

' Alternative Bit Operation
$define PORTBbits_INT1  PORTB.1

' Alternative Bit Operation
$define PORTBbits_INT2  PORTB.2

' Alternative Bit Operation
$define PORTBbits_CCP2  PORTB.3

' Alternative Bit Operation
$define PORTBbits_KBI0  PORTB.4

' Alternative Bit Operation
$define PORTBbits_KBI1  PORTB.5

' Alternative Bit Operation
$define PORTBbits_KBI2  PORTB.6

' Alternative Bit Operation
$define PORTBbits_KBI3  PORTB.7

' Alternative Bit Operation
$define PORTBbits_AN12  PORTB.0

' Alternative Bit Operation
$define PORTBbits_AN10  PORTB.1

' Alternative Bit Operation
$define PORTBbits_AN8  PORTB.2

' Alternative Bit Operation
$define PORTBbits_AN9  PORTB.3

' Alternative Bit Operation
$define PORTBbits_AN11  PORTB.4

' Alternative Bit Operation
$define PORTBbits_PGM  PORTB.5

' Alternative Bit Operation
$define PORTBbits_PGC  PORTB.6

' Alternative Bit Operation
$define PORTBbits_PGD  PORTB.7

' Alternative Bit Operation
$define PORTCbits_T1OSO  PORTC.0

' Alternative Bit Operation
$define PORTCbits_T1OSI  PORTC.1

' Alternative Bit Operation
$define PORTCbits_CCP1  PORTC.2

' Alternative Bit Operation
$define PORTCbits_SCK  PORTC.3

' Alternative Bit Operation
$define PORTCbits_SDI  PORTC.4

' Alternative Bit Operation
$define PORTCbits_SDO  PORTC.5

' Alternative Bit Operation
$define PORTCbits_TX  PORTC.6

' Alternative Bit Operation
$define PORTCbits_RX_  PORTC.7

' Alternative Bit Operation
$define PORTCbits_T13CKI  PORTC.0

' Alternative Bit Operation
$define PORTCbits_CCP2  PORTC.1

' Alternative Bit Operation
$define PORTCbits_SCL  PORTC.3

' Alternative Bit Operation
$define PORTCbits_SDA  PORTC.4

' Alternative Bit Operation
$define PORTCbits_CK  PORTC.6

' Alternative Bit Operation
$define PORTCbits_T1CKI  PORTC.0

' Alternative Bit Operation
$define PORTEbits_MCLR  PORTE.3

' Alternative Bit Operation
$define PORTEbits_NOT_MCLR  PORTE.3

' Alternative Bit Operation
$define PORTEbits_VPP  PORTE.3

' LATA bits
$define LATAbits_LATA0  LATA.0
$define LATAbits_LATA1  LATA.1
$define LATAbits_LATA2  LATA.2
$define LATAbits_LATA3  LATA.3
$define LATAbits_LATA4  LATA.4
$define LATAbits_LATA5  LATA.5
$define LATAbits_LATA6  LATA.6
$define LATAbits_LATA7  LATA.7

' LATB bits
$define LATBbits_LATB0  LATB.0
$define LATBbits_LATB1  LATB.1
$define LATBbits_LATB2  LATB.2
$define LATBbits_LATB3  LATB.3
$define LATBbits_LATB4  LATB.4
$define LATBbits_LATB5  LATB.5
$define LATBbits_LATB6  LATB.6
$define LATBbits_LATB7  LATB.7

' LATC bits
$define LATCbits_LATC0  LATC.0
$define LATCbits_LATC1  LATC.1
$define LATCbits_LATC2  LATC.2
$define LATCbits_LATC3  LATC.3
$define LATCbits_LATC4  LATC.4
$define LATCbits_LATC5  LATC.5
$define LATCbits_LATC6  LATC.6
$define LATCbits_LATC7  LATC.7

' OSCTUNE bits
$define OSCTUNEbits_TUN0  OSCTUNE.0
$define OSCTUNEbits_TUN1  OSCTUNE.1
$define OSCTUNEbits_TUN2  OSCTUNE.2
$define OSCTUNEbits_TUN3  OSCTUNE.3
$define OSCTUNEbits_TUN4  OSCTUNE.4
$define OSCTUNEbits_PLLEN  OSCTUNE.6
$define OSCTUNEbits_INTSRC  OSCTUNE.7

' PIE1 bits
$define PIE1bits_TMR1IE  PIE1.0
$define PIE1bits_TMR2IE  PIE1.1
$define PIE1bits_CCP1IE  PIE1.2
$define PIE1bits_SSPIE  PIE1.3
$define PIE1bits_TXIE  PIE1.4
$define PIE1bits_RCIE  PIE1.5
$define PIE1bits_ADIE  PIE1.6

' PIR1 bits
$define PIR1bits_TMR1IF  PIR1.0
$define PIR1bits_TMR2IF  PIR1.1
$define PIR1bits_CCP1IF  PIR1.2
$define PIR1bits_SSPIF  PIR1.3
$define PIR1bits_TXIF  PIR1.4
$define PIR1bits_RCIF  PIR1.5
$define PIR1bits_ADIF  PIR1.6

' IPR1 bits
$define IPR1bits_TMR1IP  IPR1.0
$define IPR1bits_TMR2IP  IPR1.1
$define IPR1bits_CCP1IP  IPR1.2
$define IPR1bits_SSPIP  IPR1.3
$define IPR1bits_TXIP  IPR1.4
$define IPR1bits_RCIP  IPR1.5
$define IPR1bits_ADIP  IPR1.6

' PIE2 bits
$define PIE2bits_CCP2IE  PIE2.0
$define PIE2bits_TMR3IE  PIE2.1
$define PIE2bits_LVDIE  PIE2.2
$define PIE2bits_BCLIE  PIE2.3
$define PIE2bits_EEIE  PIE2.4
$define PIE2bits_CMIE  PIE2.6
$define PIE2bits_OSCFIE  PIE2.7
$define PIE2bits_HLVDIE  PIE2.2

' PIR2 bits
$define PIR2bits_CCP2IF  PIR2.0
$define PIR2bits_TMR3IF  PIR2.1
$define PIR2bits_LVDIF  PIR2.2
$define PIR2bits_BCLIF  PIR2.3
$define PIR2bits_EEIF  PIR2.4
$define PIR2bits_CMIF  PIR2.6
$define PIR2bits_OSCFIF  PIR2.7
$define PIR2bits_HLVDIF  PIR2.2

' IPR2 bits
$define IPR2bits_CCP2IP  IPR2.0
$define IPR2bits_TMR3IP  IPR2.1
$define IPR2bits_LVDIP  IPR2.2
$define IPR2bits_BCLIP  IPR2.3
$define IPR2bits_EEIP  IPR2.4
$define IPR2bits_CMIP  IPR2.6
$define IPR2bits_OSCFIP  IPR2.7
$define IPR2bits_HLVDIP  IPR2.2

' EECON1 bits
$define EECON1bits_RD  EECON1.0
$define EECON1bits_WR  EECON1.1
$define EECON1bits_WREN  EECON1.2
$define EECON1bits_WRERR  EECON1.3
$define EECON1bits_FREE  EECON1.4
$define EECON1bits_CFGS  EECON1.6
$define EECON1bits_EEPGD  EECON1.7

' RCSTA bits
$define RCSTAbits_RX9D  RCSTA.0
$define RCSTAbits_OERR  RCSTA.1
$define RCSTAbits_FERR  RCSTA.2
$define RCSTAbits_ADEN  RCSTA.3
$define RCSTAbits_CREN  RCSTA.4
$define RCSTAbits_SREN  RCSTA.5
$define RCSTAbits_RX9  RCSTA.6
$define RCSTAbits_SPEN  RCSTA.7
$define RCSTAbits_ADDEN  RCSTA.3

' TXSTA bits
$define TXSTAbits_TX9D  TXSTA.0
$define TXSTAbits_TRMT  TXSTA.1
$define TXSTAbits_BRGH  TXSTA.2
$define TXSTAbits_SENDB  TXSTA.3
$define TXSTAbits_SYNC  TXSTA.4
$define TXSTAbits_TXEN  TXSTA.5
$define TXSTAbits_TX9  TXSTA.6
$define TXSTAbits_CSRC  TXSTA.7

' T3CON bits
$define T3CONbits_TMR3ON  T3CON.0
$define T3CONbits_TMR3CS  T3CON.1
$define T3CONbits_T3SYNC  T3CON.2
$define T3CONbits_T3CCP1  T3CON.3
$define T3CONbits_T3CKPS0  T3CON.4
$define T3CONbits_T3CKPS1  T3CON.5
$define T3CONbits_T3CCP2  T3CON.6
$define T3CONbits_RD16  T3CON.7
$define T3CONbits_NOT_T3SYNC  T3CON.2

' CMCON bits
$define CMCONbits_CM0  CMCON.0
$define CMCONbits_CM1  CMCON.1
$define CMCONbits_CM2  CMCON.2
$define CMCONbits_CIS  CMCON.3
$define CMCONbits_C1INV  CMCON.4
$define CMCONbits_C2INV  CMCON.5
$define CMCONbits_C1OUT  CMCON.6
$define CMCONbits_C2OUT  CMCON.7

' CVRCON bits
$define CVRCONbits_CVR0  CVRCON.0
$define CVRCONbits_CVR1  CVRCON.1
$define CVRCONbits_CVR2  CVRCON.2
$define CVRCONbits_CVR3  CVRCON.3
$define CVRCONbits_CVRSS  CVRCON.4
$define CVRCONbits_CVRR  CVRCON.5
$define CVRCONbits_CVROE  CVRCON.6
$define CVRCONbits_CVREN  CVRCON.7

' BAUDCON bits
$define BAUDCONbits_ABDEN  BAUDCON.0
$define BAUDCONbits_WUE  BAUDCON.1
$define BAUDCONbits_BRG16  BAUDCON.3
$define BAUDCONbits_SCKP  BAUDCON.4
$define BAUDCONbits_RXDTP  BAUDCON.5
$define BAUDCONbits_RCIDL  BAUDCON.6
$define BAUDCONbits_ABDOVF  BAUDCON.7
$define BAUDCONbits_TXCKP  BAUDCON.4
$define BAUDCONbits_RCMT  BAUDCON.6

' BAUDCTL bits
$define BAUDCTLbits_ABDEN  BAUDCTL.0
$define BAUDCTLbits_WUE  BAUDCTL.1
$define BAUDCTLbits_BRG16  BAUDCTL.3
$define BAUDCTLbits_SCKP  BAUDCTL.4
$define BAUDCTLbits_RXDTP  BAUDCTL.5
$define BAUDCTLbits_RCIDL  BAUDCTL.6
$define BAUDCTLbits_ABDOVF  BAUDCTL.7
$define BAUDCTLbits_TXCKP  BAUDCTL.4
$define BAUDCTLbits_RCMT  BAUDCTL.6

' CCP2CON bits
$define CCP2CONbits_CCP2M0  CCP2CON.0
$define CCP2CONbits_CCP2M1  CCP2CON.1
$define CCP2CONbits_CCP2M2  CCP2CON.2
$define CCP2CONbits_CCP2M3  CCP2CON.3
$define CCP2CONbits_CCP2Y  CCP2CON.4
$define CCP2CONbits_CCP2X  CCP2CON.5
$define CCP2CONbits_DC2B0  CCP2CON.4
$define CCP2CONbits_DC2B1  CCP2CON.5

' CCP1CON bits
$define CCP1CONbits_CCP1M0  CCP1CON.0
$define CCP1CONbits_CCP1M1  CCP1CON.1
$define CCP1CONbits_CCP1M2  CCP1CON.2
$define CCP1CONbits_CCP1M3  CCP1CON.3
$define CCP1CONbits_CCP1Y  CCP1CON.4
$define CCP1CONbits_CCP1X  CCP1CON.5
$define CCP1CONbits_DC1B0  CCP1CON.4
$define CCP1CONbits_DC1B1  CCP1CON.5

' ADCON2 bits
$define ADCON2bits_ADCS0  ADCON2.0
$define ADCON2bits_ADCS1  ADCON2.1
$define ADCON2bits_ADCS2  ADCON2.2
$define ADCON2bits_ACQT0  ADCON2.3
$define ADCON2bits_ACQT1  ADCON2.4
$define ADCON2bits_ACQT2  ADCON2.5
$define ADCON2bits_ADFM  ADCON2.7

' ADCON1 bits
$define ADCON1bits_PCFG0  ADCON1.0
$define ADCON1bits_PCFG1  ADCON1.1
$define ADCON1bits_PCFG2  ADCON1.2
$define ADCON1bits_PCFG3  ADCON1.3
$define ADCON1bits_VCFG0  ADCON1.4
$define ADCON1bits_VCFG1  ADCON1.5

' ADCON0 bits
$define ADCON0bits_ADON  ADCON0.0
$define ADCON0bits_GO  ADCON0.1
$define ADCON0bits_CHS0  ADCON0.2
$define ADCON0bits_CHS1  ADCON0.3
$define ADCON0bits_CHS2  ADCON0.4
$define ADCON0bits_CHS3  ADCON0.5
$define ADCON0bits_DONE  ADCON0.1
$define ADCON0bits_NOT_DONE  ADCON0.1
$define ADCON0bits_GO_DONE  ADCON0.1

' SSPCON2 bits
$define SSPCON2bits_SEN  SSPCON2.0
$define SSPCON2bits_RSEN  SSPCON2.1
$define SSPCON2bits_PEN  SSPCON2.2
$define SSPCON2bits_RCEN  SSPCON2.3
$define SSPCON2bits_ACKEN  SSPCON2.4
$define SSPCON2bits_ACKDT  SSPCON2.5
$define SSPCON2bits_ACKSTAT  SSPCON2.6
$define SSPCON2bits_GCEN  SSPCON2.7

' SSPCON1 bits
$define SSPCON1bits_SSPM0  SSPCON1.0
$define SSPCON1bits_SSPM1  SSPCON1.1
$define SSPCON1bits_SSPM2  SSPCON1.2
$define SSPCON1bits_SSPM3  SSPCON1.3
$define SSPCON1bits_CKP  SSPCON1.4
$define SSPCON1bits_SSPEN  SSPCON1.5
$define SSPCON1bits_SSPOV  SSPCON1.6
$define SSPCON1bits_WCOL  SSPCON1.7

' SSPSTAT bits
$define SSPSTATbits_BF  SSPSTAT.0
$define SSPSTATbits_UA  SSPSTAT.1
$define SSPSTATbits_R  SSPSTAT.2
$define SSPSTATbits_S  SSPSTAT.3
$define SSPSTATbits_P  SSPSTAT.4
$define SSPSTATbits_D  SSPSTAT.5
$define SSPSTATbits_CKE  SSPSTAT.6
$define SSPSTATbits_SMP  SSPSTAT.7
$define SSPSTATbits_NOT_W  SSPSTAT.2
$define SSPSTATbits_NOT_A  SSPSTAT.5
$define SSPSTATbits_RW  SSPSTAT.2
$define SSPSTATbits_DA  SSPSTAT.5
$define SSPSTATbits_NOT_WRITE  SSPSTAT.2
$define SSPSTATbits_NOT_ADDRESS  SSPSTAT.5

' T2CON bits
$define T2CONbits_T2CKPS0  T2CON.0
$define T2CONbits_T2CKPS1  T2CON.1
$define T2CONbits_TMR2ON  T2CON.2
$define T2CONbits_T2OUTPS0  T2CON.3
$define T2CONbits_T2OUTPS1  T2CON.4
$define T2CONbits_T2OUTPS2  T2CON.5
$define T2CONbits_T2OUTPS3  T2CON.6
$define T2CONbits_TOUTPS0  T2CON.3
$define T2CONbits_TOUTPS1  T2CON.4
$define T2CONbits_TOUTPS2  T2CON.5
$define T2CONbits_TOUTPS3  T2CON.6

' T1CON bits
$define T1CONbits_TMR1ON  T1CON.0
$define T1CONbits_TMR1CS  T1CON.1
$define T1CONbits_T1SYNC  T1CON.2
$define T1CONbits_T1OSCEN  T1CON.3
$define T1CONbits_T1CKPS0  T1CON.4
$define T1CONbits_T1CKPS1  T1CON.5
$define T1CONbits_T1RUN  T1CON.6
$define T1CONbits_RD16  T1CON.7
$define T1CONbits_NOT_T1SYNC  T1CON.2

' RCON bits
$define RCONbits_BOR  RCON.0
$define RCONbits_POR  RCON.1
$define RCONbits_PD  RCON.2
$define RCONbits_TO  RCON.3
$define RCONbits_RI  RCON.4
$define RCONbits_SBOREN  RCON.6
$define RCONbits_IPEN  RCON.7
$define RCONbits_NOT_BOR  RCON.0
$define RCONbits_NOT_POR  RCON.1
$define RCONbits_NOT_PD  RCON.2
$define RCONbits_NOT_TO  RCON.3
$define RCONbits_NOT_RI  RCON.4

' WDTCON bits
$define WDTCONbits_SWDTEN  WDTCON.0
$define WDTCONbits_SWDTE  WDTCON.0

' LVDCON bits
$define HLVDCONbits_LVDL0  HLVDCON.0
$define HLVDCONbits_LVDL1  HLVDCON.1
$define HLVDCONbits_LVDL2  HLVDCON.2
$define HLVDCONbits_LVDL3  HLVDCON.3
$define HLVDCONbits_LVDEN  HLVDCON.4
$define HLVDCONbits_IRVST  HLVDCON.5
$define HLVDCONbits_LVV0  HLVDCON.0
$define HLVDCONbits_LVV1  HLVDCON.1
$define HLVDCONbits_LVV2  HLVDCON.2
$define HLVDCONbits_LVV3  HLVDCON.3
$define HLVDCONbits_BGST  HLVDCON.5
$define HLVDCONbits_HLVDL0  HLVDCON.0
$define HLVDCONbits_HLVDL1  HLVDCON.1
$define HLVDCONbits_HLVDL2  HLVDCON.2
$define HLVDCONbits_HLVDL3  HLVDCON.3
$define HLVDCONbits_HLVDEN  HLVDCON.4
$define HLVDCONbits_VDIRMAG  HLVDCON.7
$define HLVDCONbits_IVRST  HLVDCON.5

' HLVDCON bits
$define HLVDCONbits_LVDL0  HLVDCON.0
$define HLVDCONbits_LVDL1  HLVDCON.1
$define HLVDCONbits_LVDL2  HLVDCON.2
$define HLVDCONbits_LVDL3  HLVDCON.3
$define HLVDCONbits_LVDEN  HLVDCON.4
$define HLVDCONbits_IRVST  HLVDCON.5
$define HLVDCONbits_LVV0  HLVDCON.0
$define HLVDCONbits_LVV1  HLVDCON.1
$define HLVDCONbits_LVV2  HLVDCON.2
$define HLVDCONbits_LVV3  HLVDCON.3
$define HLVDCONbits_BGST  HLVDCON.5
$define HLVDCONbits_HLVDL0  HLVDCON.0
$define HLVDCONbits_HLVDL1  HLVDCON.1
$define HLVDCONbits_HLVDL2  HLVDCON.2
$define HLVDCONbits_HLVDL3  HLVDCON.3
$define HLVDCONbits_HLVDEN  HLVDCON.4
$define HLVDCONbits_VDIRMAG  HLVDCON.7
$define HLVDCONbits_IVRST  HLVDCON.5

' OSCCON bits
$define OSCCONbits_SCS0  OSCCON.0
$define OSCCONbits_SCS1  OSCCON.1
$define OSCCONbits_IOFS  OSCCON.2
$define OSCCONbits_OSTS  OSCCON.3
$define OSCCONbits_IRCF0  OSCCON.4
$define OSCCONbits_IRCF1  OSCCON.5
$define OSCCONbits_IRCF2  OSCCON.6
$define OSCCONbits_IDLEN  OSCCON.7
$define OSCCONbits_FLTS  OSCCON.2

' T0CON bits
$define T0CONbits_T0PS0  T0CON.0
$define T0CONbits_T0PS1  T0CON.1
$define T0CONbits_T0PS2  T0CON.2
$define T0CONbits_PSA  T0CON.3
$define T0CONbits_T0SE  T0CON.4
$define T0CONbits_T0CS  T0CON.5
$define T0CONbits_T016BIT  T0CON.6
$define T0CONbits_TMR0ON  T0CON.7
$define T0CONbits_T08BIT  T0CON.6

' STATUS bits
$define STATUSbits_C  STATUS.0
$define STATUSbits_DC  STATUS.1
$define STATUSbits_Z  STATUS.2
$define STATUSbits_OV  STATUS.3
$define STATUSbits_N  STATUS.4

' INTCON3 bits
$define INTCON3bits_INT1F  INTCON3.0
$define INTCON3bits_INT2F  INTCON3.1
$define INTCON3bits_INT1E  INTCON3.3
$define INTCON3bits_INT2E  INTCON3.4
$define INTCON3bits_INT1P  INTCON3.6
$define INTCON3bits_INT2P  INTCON3.7
$define INTCON3bits_INT1IF  INTCON3.0
$define INTCON3bits_INT2IF  INTCON3.1
$define INTCON3bits_INT1IE  INTCON3.3
$define INTCON3bits_INT2IE  INTCON3.4
$define INTCON3bits_INT1IP  INTCON3.6
$define INTCON3bits_INT2IP  INTCON3.7

' INTCON2 bits
$define INTCON2bits_RBIP  INTCON2.0
$define INTCON2bits_TMR0IP  INTCON2.2
$define INTCON2bits_INTEDG2  INTCON2.4
$define INTCON2bits_INTEDG1  INTCON2.5
$define INTCON2bits_INTEDG0  INTCON2.6
$define INTCON2bits_RBPU  INTCON2.7
$define INTCON2bits_NOT_RBPU  INTCON2.7

' INTCON bits
$define INTCONbits_RBIF  INTCON.0
$define INTCONbits_INT0F  INTCON.1
$define INTCONbits_TMR0IF  INTCON.2
$define INTCONbits_RBIE  INTCON.3
$define INTCONbits_INT0E  INTCON.4
$define INTCONbits_TMR0IE  INTCON.5
$define INTCONbits_PEIE  INTCON.6
$define INTCONbits_GIE  INTCON.7
$define INTCONbits_INT0IF  INTCON.1
$define INTCONbits_T0IF  INTCON.2
$define INTCONbits_INT0IE  INTCON.4
$define INTCONbits_T0IE  INTCON.5
$define INTCONbits_GIEL  INTCON.6
$define INTCONbits_GIEH  INTCON.7

' STKPTR bits
$define STKPTRbits_STKPTR0  STKPTR.0
$define STKPTRbits_STKPTR1  STKPTR.1
$define STKPTRbits_STKPTR2  STKPTR.2
$define STKPTRbits_STKPTR3  STKPTR.3
$define STKPTRbits_STKPTR4  STKPTR.4
$define STKPTRbits_STKUNF  STKPTR.6
$define STKPTRbits_STKOVF  STKPTR.7
$define STKPTRbits_SP0  STKPTR.0
$define STKPTRbits_SP1  STKPTR.1
$define STKPTRbits_SP2  STKPTR.2
$define STKPTRbits_SP3  STKPTR.3
$define STKPTRbits_SP4  STKPTR.4
$define STKPTRbits_STKFUL  STKPTR.7

' PORTA bits
$define PORTAbits_RA7  PORTA.7
$define PORTAbits_RA6  PORTA.6
$define PORTAbits_RA5  PORTA.5
$define PORTAbits_RA4  PORTA.4
$define PORTAbits_RA3  PORTA.3
$define PORTAbits_RA2  PORTA.2
$define PORTAbits_RA1  PORTA.1
$define PORTAbits_RA0  PORTA.0

' PORTB bits
$define PORTBbits_RB7  PORTB.7
$define PORTBbits_RB6  PORTB.6
$define PORTBbits_RB5  PORTB.5
$define PORTBbits_RB4  PORTB.4
$define PORTBbits_RB3  PORTB.3
$define PORTBbits_RB2  PORTB.2
$define PORTBbits_RB1  PORTB.1
$define PORTBbits_RB0  PORTB.0

' PORTC bits
$define PORTCbits_RC7  PORTC.7
$define PORTCbits_RC6  PORTC.6
$define PORTCbits_RC5  PORTC.5
$define PORTCbits_RC4  PORTC.4
$define PORTCbits_RC3  PORTC.3
$define PORTCbits_RC2  PORTC.2
$define PORTCbits_RC1  PORTC.1
$define PORTCbits_RC0  PORTC.0

' PORTE bits
$define PORTEbits_RE3  PORTE.3

' TRISA bits
$define TRISAbits_TRISA7  TRISA.7
$define TRISAbits_TRISA6  TRISA.6
$define TRISAbits_TRISA5  TRISA.5
$define TRISAbits_TRISA4  TRISA.4
$define TRISAbits_TRISA3  TRISA.3
$define TRISAbits_TRISA2  TRISA.2
$define TRISAbits_TRISA1  TRISA.1
$define TRISAbits_TRISA0  TRISA.0

' TRISB bits
$define TRISBbits_TRISB7  TRISB.7
$define TRISBbits_TRISB6  TRISB.6
$define TRISBbits_TRISB5  TRISB.5
$define TRISBbits_TRISB4  TRISB.4
$define TRISBbits_TRISB3  TRISB.3
$define TRISBbits_TRISB2  TRISB.2
$define TRISBbits_TRISB1  TRISB.1
$define TRISBbits_TRISB0  TRISB.0

' TRISC bits
$define TRISCbits_TRISC7  TRISC.7
$define TRISCbits_TRISC6  TRISC.6
$define TRISCbits_TRISC5  TRISC.5
$define TRISCbits_TRISC4  TRISC.4
$define TRISCbits_TRISC3  TRISC.3
$define TRISCbits_TRISC2  TRISC.2
$define TRISCbits_TRISC1  TRISC.1
$define TRISCbits_TRISC0  TRISC.0

' ECCPAS1 bits
$define ECCPAS1bits_ECCPASE  ECCPAS1.7
$define ECCPAS1bits_ECCPAS2  ECCPAS1.6
$define ECCPAS1bits_ECCPAS1_  ECCPAS1.5
$define ECCPAS1bits_ECCPAS0  ECCPAS1.4
$define ECCPAS1bits_PSSAC1  ECCPAS1.3
$define ECCPAS1bits_PSSAC0  ECCPAS1.2

' PWM1CON bits
$define PWM1CONbits_PRSEN  PWM1CON.7

' TBLPTRU bits
$define TBLPTRUbits_ACSS  TBLPTRU.5
$define TBLPTRUbits_TBLPTRU4  TBLPTRU.4
$define TBLPTRUbits_TBLPTRU3  TBLPTRU.3
$define TBLPTRUbits_TBLPTRU2  TBLPTRU.2
$define TBLPTRUbits_TBLPTRU1  TBLPTRU.1
$define TBLPTRUbits_TBLPTRU0  TBLPTRU.0

' PCLATU bits
$define PCLATUbits_PCU4  PCLATU.4
$define PCLATUbits_PCU3  PCLATU.3
$define PCLATUbits_PCU2  PCLATU.2
$define PCLATUbits_PCU1  PCLATU.1
$define PCLATUbits_PCU0  PCLATU.0

$endif
