
# 1 "BT_FreqAnalizer.c"

# 44 "C:\Program Files\Microchip\xc8\v1.12\include\pic16f1829.h"
extern volatile unsigned char INDF0 @ 0x000;

asm("INDF0 equ 00h");


typedef union {
struct {
unsigned INDF0 :8;
};
} INDF0bits_t;
extern volatile INDF0bits_t INDF0bits @ 0x000;

# 63
extern volatile unsigned char INDF1 @ 0x001;

asm("INDF1 equ 01h");


typedef union {
struct {
unsigned INDF1 :8;
};
} INDF1bits_t;
extern volatile INDF1bits_t INDF1bits @ 0x001;

# 82
extern volatile unsigned char PCL @ 0x002;

asm("PCL equ 02h");


typedef union {
struct {
unsigned PCL :8;
};
} PCLbits_t;
extern volatile PCLbits_t PCLbits @ 0x002;

# 101
extern volatile unsigned char STATUS @ 0x003;

asm("STATUS equ 03h");


typedef union {
struct {
unsigned C :1;
unsigned DC :1;
unsigned Z :1;
unsigned nPD :1;
unsigned nTO :1;
};
struct {
unsigned CARRY :1;
};
struct {
unsigned :2;
unsigned ZERO :1;
};
} STATUSbits_t;
extern volatile STATUSbits_t STATUSbits @ 0x003;

# 161
extern volatile unsigned short FSR0 @ 0x004;


extern volatile unsigned char FSR0L @ 0x004;

asm("FSR0L equ 04h");


typedef union {
struct {
unsigned FSR0L :8;
};
} FSR0Lbits_t;
extern volatile FSR0Lbits_t FSR0Lbits @ 0x004;

# 183
extern volatile unsigned char FSR0H @ 0x005;

asm("FSR0H equ 05h");


typedef union {
struct {
unsigned FSR0H :8;
};
} FSR0Hbits_t;
extern volatile FSR0Hbits_t FSR0Hbits @ 0x005;

# 202
extern volatile unsigned short FSR1 @ 0x006;


extern volatile unsigned char FSR1L @ 0x006;

asm("FSR1L equ 06h");


typedef union {
struct {
unsigned FSR1L :8;
};
} FSR1Lbits_t;
extern volatile FSR1Lbits_t FSR1Lbits @ 0x006;

# 224
extern volatile unsigned char FSR1H @ 0x007;

asm("FSR1H equ 07h");


typedef union {
struct {
unsigned FSR1H :8;
};
} FSR1Hbits_t;
extern volatile FSR1Hbits_t FSR1Hbits @ 0x007;

# 243
extern volatile unsigned char BSR @ 0x008;

asm("BSR equ 08h");


typedef union {
struct {
unsigned BSR0 :1;
unsigned BSR1 :1;
unsigned BSR2 :1;
unsigned BSR3 :1;
unsigned BSR4 :1;
};
struct {
unsigned BSR :5;
};
} BSRbits_t;
extern volatile BSRbits_t BSRbits @ 0x008;

# 294
extern volatile unsigned char WREG @ 0x009;

asm("WREG equ 09h");


typedef union {
struct {
unsigned WREG0 :8;
};
} WREGbits_t;
extern volatile WREGbits_t WREGbits @ 0x009;

# 313
extern volatile unsigned char PCLATH @ 0x00A;

asm("PCLATH equ 0Ah");


typedef union {
struct {
unsigned PCLATH :7;
};
} PCLATHbits_t;
extern volatile PCLATHbits_t PCLATHbits @ 0x00A;

# 332
extern volatile unsigned char INTCON @ 0x00B;

asm("INTCON equ 0Bh");


typedef union {
struct {
unsigned IOCIF :1;
unsigned INTF :1;
unsigned TMR0IF :1;
unsigned IOCIE :1;
unsigned INTE :1;
unsigned TMR0IE :1;
unsigned PEIE :1;
unsigned GIE :1;
};
struct {
unsigned :2;
unsigned T0IF :1;
unsigned :2;
unsigned T0IE :1;
};
} INTCONbits_t;
extern volatile INTCONbits_t INTCONbits @ 0x00B;

# 409
extern volatile unsigned char PORTA @ 0x00C;

asm("PORTA equ 0Ch");


typedef union {
struct {
unsigned RA0 :1;
unsigned RA1 :1;
unsigned RA2 :1;
unsigned RA3 :1;
unsigned RA4 :1;
unsigned RA5 :1;
};
} PORTAbits_t;
extern volatile PORTAbits_t PORTAbits @ 0x00C;

# 458
extern volatile unsigned char PORTB @ 0x00D;

asm("PORTB equ 0Dh");


typedef union {
struct {
unsigned :4;
unsigned RB4 :1;
unsigned RB5 :1;
unsigned RB6 :1;
unsigned RB7 :1;
};
} PORTBbits_t;
extern volatile PORTBbits_t PORTBbits @ 0x00D;

# 496
extern volatile unsigned char PORTC @ 0x00E;

asm("PORTC equ 0Eh");


typedef union {
struct {
unsigned RC0 :1;
unsigned RC1 :1;
unsigned RC2 :1;
unsigned RC3 :1;
unsigned RC4 :1;
unsigned RC5 :1;
unsigned RC6 :1;
unsigned RC7 :1;
};
} PORTCbits_t;
extern volatile PORTCbits_t PORTCbits @ 0x00E;

# 557
extern volatile unsigned char PIR1 @ 0x011;

asm("PIR1 equ 011h");


typedef union {
struct {
unsigned TMR1IF :1;
unsigned TMR2IF :1;
unsigned CCP1IF :1;
unsigned SSP1IF :1;
unsigned TXIF :1;
unsigned RCIF :1;
unsigned ADIF :1;
unsigned TMR1GIF :1;
};
} PIR1bits_t;
extern volatile PIR1bits_t PIR1bits @ 0x011;

# 618
extern volatile unsigned char PIR2 @ 0x012;

asm("PIR2 equ 012h");


typedef union {
struct {
unsigned CCP2IF :1;
unsigned :2;
unsigned BCL1IF :1;
unsigned EEIF :1;
unsigned C1IF :1;
unsigned C2IF :1;
unsigned OSFIF :1;
};
} PIR2bits_t;
extern volatile PIR2bits_t PIR2bits @ 0x012;

# 668
extern volatile unsigned char PIR3 @ 0x013;

asm("PIR3 equ 013h");


typedef union {
struct {
unsigned :1;
unsigned TMR4IF :1;
unsigned :1;
unsigned TMR6IF :1;
unsigned CCP3IF :1;
unsigned CCP4IF :1;
};
} PIR3bits_t;
extern volatile PIR3bits_t PIR3bits @ 0x013;

# 707
extern volatile unsigned char PIR4 @ 0x014;

asm("PIR4 equ 014h");


typedef union {
struct {
unsigned SSP2IF :1;
unsigned BCL2IF :1;
};
} PIR4bits_t;
extern volatile PIR4bits_t PIR4bits @ 0x014;

# 732
extern volatile unsigned char TMR0 @ 0x015;

asm("TMR0 equ 015h");


typedef union {
struct {
unsigned TMR0 :8;
};
} TMR0bits_t;
extern volatile TMR0bits_t TMR0bits @ 0x015;

# 751
extern volatile unsigned short TMR1 @ 0x016;

asm("TMR1 equ 016h");



extern volatile unsigned char TMR1L @ 0x016;

asm("TMR1L equ 016h");


typedef union {
struct {
unsigned TMR1L :8;
};
} TMR1Lbits_t;
extern volatile TMR1Lbits_t TMR1Lbits @ 0x016;

# 776
extern volatile unsigned char TMR1H @ 0x017;

asm("TMR1H equ 017h");


typedef union {
struct {
unsigned TMR1H :8;
};
} TMR1Hbits_t;
extern volatile TMR1Hbits_t TMR1Hbits @ 0x017;

# 795
extern volatile unsigned char T1CON @ 0x018;

asm("T1CON equ 018h");


typedef union {
struct {
unsigned TMR1ON :1;
unsigned :1;
unsigned nT1SYNC :1;
unsigned T1OSCEN :1;
unsigned T1CKPS0 :1;
unsigned T1CKPS1 :1;
unsigned TMR1CS0 :1;
unsigned TMR1CS1 :1;
};
struct {
unsigned :4;
unsigned T1CKPS :2;
unsigned TMR1CS :2;
};
} T1CONbits_t;
extern volatile T1CONbits_t T1CONbits @ 0x018;

# 866
extern volatile unsigned char T1GCON @ 0x019;

asm("T1GCON equ 019h");


typedef union {
struct {
unsigned T1GSS0 :1;
unsigned T1GSS1 :1;
unsigned T1GVAL :1;
unsigned T1GGO :1;
unsigned T1GSPM :1;
unsigned T1GTM :1;
unsigned T1GPOL :1;
unsigned TMR1GE :1;
};
struct {
unsigned T1GSS :2;
};
} T1GCONbits_t;
extern volatile T1GCONbits_t T1GCONbits @ 0x019;

# 935
extern volatile unsigned char TMR2 @ 0x01A;

asm("TMR2 equ 01Ah");


typedef union {
struct {
unsigned TMR2 :8;
};
} TMR2bits_t;
extern volatile TMR2bits_t TMR2bits @ 0x01A;

# 954
extern volatile unsigned char PR2 @ 0x01B;

asm("PR2 equ 01Bh");


typedef union {
struct {
unsigned PR2 :8;
};
} PR2bits_t;
extern volatile PR2bits_t PR2bits @ 0x01B;

# 973
extern volatile unsigned char T2CON @ 0x01C;

asm("T2CON equ 01Ch");


typedef union {
struct {
unsigned T2CKPS0 :1;
unsigned T2CKPS1 :1;
unsigned TMR2ON :1;
unsigned T2OUTPS0 :1;
unsigned T2OUTPS1 :1;
unsigned T2OUTPS2 :1;
unsigned T2OUTPS3 :1;
};
struct {
unsigned T2CKPS :2;
unsigned :1;
unsigned T2OUTPS :4;
};
} T2CONbits_t;
extern volatile T2CONbits_t T2CONbits @ 0x01C;

# 1043
extern volatile unsigned char CPSCON0 @ 0x01E;

asm("CPSCON0 equ 01Eh");


typedef union {
struct {
unsigned T0XCS :1;
unsigned CPSOUT :1;
unsigned CPSRNG0 :1;
unsigned CPSRNG1 :1;
unsigned :2;
unsigned CPSRM :1;
unsigned CPSON :1;
};
struct {
unsigned :2;
unsigned CPSRNG :2;
};
} CPSCON0bits_t;
extern volatile CPSCON0bits_t CPSCON0bits @ 0x01E;

# 1102
extern volatile unsigned char CPSCON1 @ 0x01F;

asm("CPSCON1 equ 01Fh");


typedef union {
struct {
unsigned CPSCH0 :1;
unsigned CPSCH1 :1;
unsigned CPSCH2 :1;
unsigned CPSCH3 :1;
};
struct {
unsigned CPSCH :3;
};
} CPSCON1bits_t;
extern volatile CPSCON1bits_t CPSCON1bits @ 0x01F;

# 1147
extern volatile unsigned char TRISA @ 0x08C;

asm("TRISA equ 08Ch");


typedef union {
struct {
unsigned TRISA0 :1;
unsigned TRISA1 :1;
unsigned TRISA2 :1;
unsigned TRISA3 :1;
unsigned TRISA4 :1;
unsigned TRISA5 :1;
};
} TRISAbits_t;
extern volatile TRISAbits_t TRISAbits @ 0x08C;

# 1196
extern volatile unsigned char TRISB @ 0x08D;

asm("TRISB equ 08Dh");


typedef union {
struct {
unsigned :4;
unsigned TRISB4 :1;
unsigned TRISB5 :1;
unsigned TRISB6 :1;
unsigned TRISB7 :1;
};
} TRISBbits_t;
extern volatile TRISBbits_t TRISBbits @ 0x08D;

# 1234
extern volatile unsigned char TRISC @ 0x08E;

asm("TRISC equ 08Eh");


typedef union {
struct {
unsigned TRISC0 :1;
unsigned TRISC1 :1;
unsigned TRISC2 :1;
unsigned TRISC3 :1;
unsigned TRISC4 :1;
unsigned TRISC5 :1;
unsigned TRISC6 :1;
unsigned TRISC7 :1;
};
} TRISCbits_t;
extern volatile TRISCbits_t TRISCbits @ 0x08E;

# 1295
extern volatile unsigned char PIE1 @ 0x091;

asm("PIE1 equ 091h");


typedef union {
struct {
unsigned TMR1IE :1;
unsigned TMR2IE :1;
unsigned CCP1IE :1;
unsigned SSP1IE :1;
unsigned TXIE :1;
unsigned RCIE :1;
unsigned ADIE :1;
unsigned TMR1GIE :1;
};
} PIE1bits_t;
extern volatile PIE1bits_t PIE1bits @ 0x091;

# 1356
extern volatile unsigned char PIE2 @ 0x092;

asm("PIE2 equ 092h");


typedef union {
struct {
unsigned CCP2IE :1;
unsigned :2;
unsigned BCL1IE :1;
unsigned EEIE :1;
unsigned C1IE :1;
unsigned C2IE :1;
unsigned OSFIE :1;
};
} PIE2bits_t;
extern volatile PIE2bits_t PIE2bits @ 0x092;

# 1406
extern volatile unsigned char PIE3 @ 0x093;

asm("PIE3 equ 093h");


typedef union {
struct {
unsigned :1;
unsigned TMR4IE :1;
unsigned :1;
unsigned TMR6IE :1;
unsigned CCP3IE :1;
unsigned CCP4IE :1;
};
} PIE3bits_t;
extern volatile PIE3bits_t PIE3bits @ 0x093;

# 1445
extern volatile unsigned char PIE4 @ 0x094;

asm("PIE4 equ 094h");


typedef union {
struct {
unsigned SSP2IE :1;
unsigned BCL2IE :1;
};
} PIE4bits_t;
extern volatile PIE4bits_t PIE4bits @ 0x094;

# 1470
extern volatile unsigned char OPTION_REG @ 0x095;

asm("OPTION_REG equ 095h");


typedef union {
struct {
unsigned PS0 :1;
unsigned PS1 :1;
unsigned PS2 :1;
unsigned PSA :1;
unsigned TMR0SE :1;
unsigned TMR0CS :1;
unsigned INTEDG :1;
unsigned nWPUEN :1;
};
struct {
unsigned PS :3;
unsigned :1;
unsigned T0SE :1;
unsigned T0CS :1;
};
} OPTION_REGbits_t;
extern volatile OPTION_REGbits_t OPTION_REGbits @ 0x095;

# 1552
extern volatile unsigned char PCON @ 0x096;

asm("PCON equ 096h");


typedef union {
struct {
unsigned nBOR :1;
unsigned nPOR :1;
unsigned nRI :1;
unsigned nRMCLR :1;
unsigned :2;
unsigned STKUNF :1;
unsigned STKOVF :1;
};
} PCONbits_t;
extern volatile PCONbits_t PCONbits @ 0x096;

# 1602
extern volatile unsigned char WDTCON @ 0x097;

asm("WDTCON equ 097h");


typedef union {
struct {
unsigned SWDTEN :1;
unsigned WDTPS0 :1;
unsigned WDTPS1 :1;
unsigned WDTPS2 :1;
unsigned WDTPS3 :1;
unsigned WDTPS4 :1;
};
struct {
unsigned :1;
unsigned WDTPS :5;
};
} WDTCONbits_t;
extern volatile WDTCONbits_t WDTCONbits @ 0x097;

# 1660
extern volatile unsigned char OSCTUNE @ 0x098;

asm("OSCTUNE equ 098h");


typedef union {
struct {
unsigned TUN0 :1;
unsigned TUN1 :1;
unsigned TUN2 :1;
unsigned TUN3 :1;
unsigned TUN4 :1;
unsigned TUN5 :1;
};
struct {
unsigned TUN :6;
};
} OSCTUNEbits_t;
extern volatile OSCTUNEbits_t OSCTUNEbits @ 0x098;

# 1717
extern volatile unsigned char OSCCON @ 0x099;

asm("OSCCON equ 099h");


typedef union {
struct {
unsigned SCS0 :1;
unsigned SCS1 :1;
unsigned :1;
unsigned IRCF0 :1;
unsigned IRCF1 :1;
unsigned IRCF2 :1;
unsigned IRCF3 :1;
unsigned SPLLEN :1;
};
struct {
unsigned SCS :2;
unsigned :1;
unsigned IRCF :4;
};
} OSCCONbits_t;
extern volatile OSCCONbits_t OSCCONbits @ 0x099;

# 1788
extern volatile unsigned char OSCSTAT @ 0x09A;

asm("OSCSTAT equ 09Ah");


typedef union {
struct {
unsigned HFIOFS :1;
unsigned LFIOFR :1;
unsigned MFIOFR :1;
unsigned HFIOFL :1;
unsigned HFIOFR :1;
unsigned OSTS :1;
unsigned PLLR :1;
unsigned T1OSCR :1;
};
} OSCSTATbits_t;
extern volatile OSCSTATbits_t OSCSTATbits @ 0x09A;

# 1849
extern volatile unsigned short ADRES @ 0x09B;

asm("ADRES equ 09Bh");



extern volatile unsigned char ADRESL @ 0x09B;

asm("ADRESL equ 09Bh");


typedef union {
struct {
unsigned ADRESL :8;
};
} ADRESLbits_t;
extern volatile ADRESLbits_t ADRESLbits @ 0x09B;

# 1874
extern volatile unsigned char ADRESH @ 0x09C;

asm("ADRESH equ 09Ch");


typedef union {
struct {
unsigned ADRESH :8;
};
} ADRESHbits_t;
extern volatile ADRESHbits_t ADRESHbits @ 0x09C;

# 1893
extern volatile unsigned char ADCON0 @ 0x09D;

asm("ADCON0 equ 09Dh");


typedef union {
struct {
unsigned ADON :1;
unsigned GO_nDONE :1;
unsigned CHS0 :1;
unsigned CHS1 :1;
unsigned CHS2 :1;
unsigned CHS3 :1;
unsigned CHS4 :1;
};
struct {
unsigned :1;
unsigned ADGO :1;
unsigned CHS :5;
};
struct {
unsigned :1;
unsigned GO :1;
};
} ADCON0bits_t;
extern volatile ADCON0bits_t ADCON0bits @ 0x09D;

# 1972
extern volatile unsigned char ADCON1 @ 0x09E;

asm("ADCON1 equ 09Eh");


typedef union {
struct {
unsigned ADPREF0 :1;
unsigned ADPREF1 :1;
unsigned ADNREF :1;
unsigned :1;
unsigned ADCS0 :1;
unsigned ADCS1 :1;
unsigned ADCS2 :1;
unsigned ADFM :1;
};
struct {
unsigned ADPREF :2;
unsigned :2;
unsigned ADCS :3;
};
} ADCON1bits_t;
extern volatile ADCON1bits_t ADCON1bits @ 0x09E;

# 2043
extern volatile unsigned char LATA @ 0x10C;

asm("LATA equ 010Ch");


typedef union {
struct {
unsigned LATA0 :1;
unsigned LATA1 :1;
unsigned LATA2 :1;
unsigned :1;
unsigned LATA4 :1;
unsigned LATA5 :1;
};
} LATAbits_t;
extern volatile LATAbits_t LATAbits @ 0x10C;

# 2087
extern volatile unsigned char LATB @ 0x10D;

asm("LATB equ 010Dh");


typedef union {
struct {
unsigned :4;
unsigned LATB4 :1;
unsigned LATB5 :1;
unsigned LATB6 :1;
unsigned LATB7 :1;
};
} LATBbits_t;
extern volatile LATBbits_t LATBbits @ 0x10D;

# 2125
extern volatile unsigned char LATC @ 0x10E;

asm("LATC equ 010Eh");


typedef union {
struct {
unsigned LATC0 :1;
unsigned LATC1 :1;
unsigned LATC2 :1;
unsigned LATC3 :1;
unsigned LATC4 :1;
unsigned LATC5 :1;
unsigned LATC6 :1;
unsigned LATC7 :1;
};
} LATCbits_t;
extern volatile LATCbits_t LATCbits @ 0x10E;

# 2186
extern volatile unsigned char CM1CON0 @ 0x111;

asm("CM1CON0 equ 0111h");


typedef union {
struct {
unsigned C1SYNC :1;
unsigned C1HYS :1;
unsigned C1SP :1;
unsigned :1;
unsigned C1POL :1;
unsigned C1OE :1;
unsigned C1OUT :1;
unsigned C1ON :1;
};
} CM1CON0bits_t;
extern volatile CM1CON0bits_t CM1CON0bits @ 0x111;

# 2242
extern volatile unsigned char CM1CON1 @ 0x112;

asm("CM1CON1 equ 0112h");


typedef union {
struct {
unsigned C1NCH0 :1;
unsigned C1NCH1 :1;
unsigned :2;
unsigned C1PCH0 :1;
unsigned C1PCH1 :1;
unsigned C1INTN :1;
unsigned C1INTP :1;
};
struct {
unsigned C1NCH :2;
unsigned :2;
unsigned C1PCH :2;
};
} CM1CON1bits_t;
extern volatile CM1CON1bits_t CM1CON1bits @ 0x112;

# 2307
extern volatile unsigned char CM2CON0 @ 0x113;

asm("CM2CON0 equ 0113h");


typedef union {
struct {
unsigned C2SYNC :1;
unsigned C2HYS :1;
unsigned C2SP :1;
unsigned :1;
unsigned C2POL :1;
unsigned C2OE :1;
unsigned C2OUT :1;
unsigned C2ON :1;
};
} CM2CON0bits_t;
extern volatile CM2CON0bits_t CM2CON0bits @ 0x113;

# 2363
extern volatile unsigned char CM2CON1 @ 0x114;

asm("CM2CON1 equ 0114h");


typedef union {
struct {
unsigned C2NCH0 :1;
unsigned C2NCH1 :1;
unsigned :2;
unsigned C2PCH0 :1;
unsigned C2PCH1 :1;
unsigned C2INTN :1;
unsigned C2INTP :1;
};
struct {
unsigned C2NCH :2;
unsigned :2;
unsigned C2PCH :2;
};
} CM2CON1bits_t;
extern volatile CM2CON1bits_t CM2CON1bits @ 0x114;

# 2428
extern volatile unsigned char CMOUT @ 0x115;

asm("CMOUT equ 0115h");


typedef union {
struct {
unsigned MC1OUT :1;
unsigned MC2OUT :1;
};
} CMOUTbits_t;
extern volatile CMOUTbits_t CMOUTbits @ 0x115;

# 2453
extern volatile unsigned char BORCON @ 0x116;

asm("BORCON equ 0116h");


typedef union {
struct {
unsigned BORRDY :1;
unsigned :6;
unsigned SBOREN :1;
};
} BORCONbits_t;
extern volatile BORCONbits_t BORCONbits @ 0x116;

# 2479
extern volatile unsigned char FVRCON @ 0x117;

asm("FVRCON equ 0117h");


typedef union {
struct {
unsigned ADFVR0 :1;
unsigned ADFVR1 :1;
unsigned CDAFVR0 :1;
unsigned CDAFVR1 :1;
unsigned TSRNG :1;
unsigned TSEN :1;
unsigned FVRRDY :1;
unsigned FVREN :1;
};
struct {
unsigned ADFVR :2;
unsigned CDAFVR :2;
};
} FVRCONbits_t;
extern volatile FVRCONbits_t FVRCONbits @ 0x117;

# 2554
extern volatile unsigned char DACCON0 @ 0x118;

asm("DACCON0 equ 0118h");


typedef union {
struct {
unsigned DACNSS :1;
unsigned :1;
unsigned DACPSS0 :1;
unsigned DACPSS1 :1;
unsigned :1;
unsigned DACOE :1;
unsigned DACLPS :1;
unsigned DACEN :1;
};
struct {
unsigned :2;
unsigned DACPSS :2;
};
} DACCON0bits_t;
extern volatile DACCON0bits_t DACCON0bits @ 0x118;

# 2614
extern volatile unsigned char DACCON1 @ 0x119;

asm("DACCON1 equ 0119h");


typedef union {
struct {
unsigned DACR0 :1;
unsigned DACR1 :1;
unsigned DACR2 :1;
unsigned DACR3 :1;
unsigned DACR4 :1;
};
struct {
unsigned DACR :5;
};
} DACCON1bits_t;
extern volatile DACCON1bits_t DACCON1bits @ 0x119;

# 2665
extern volatile unsigned char SRCON0 @ 0x11A;

asm("SRCON0 equ 011Ah");


typedef union {
struct {
unsigned SRPR :1;
unsigned SRPS :1;
unsigned SRNQEN :1;
unsigned SRQEN :1;
unsigned SRCLK0 :1;
unsigned SRCLK1 :1;
unsigned SRCLK2 :1;
unsigned SRLEN :1;
};
struct {
unsigned :4;
unsigned SRCLK :3;
};
} SRCON0bits_t;
extern volatile SRCON0bits_t SRCON0bits @ 0x11A;

# 2735
extern volatile unsigned char SRCON1 @ 0x11B;

asm("SRCON1 equ 011Bh");


typedef union {
struct {
unsigned SRRC1E :1;
unsigned SRRC2E :1;
unsigned SRRCKE :1;
unsigned SRRPE :1;
unsigned SRSC1E :1;
unsigned SRSC2E :1;
unsigned SRSCKE :1;
unsigned SRSPE :1;
};
} SRCON1bits_t;
extern volatile SRCON1bits_t SRCON1bits @ 0x11B;

# 2796
extern volatile unsigned char APFCON0 @ 0x11D;

asm("APFCON0 equ 011Dh");


typedef union {
struct {
unsigned :2;
unsigned TXCKSEL :1;
unsigned T1GSEL :1;
unsigned :3;
unsigned RXDTSEL :1;
};
} APFCON0bits_t;
extern volatile APFCON0bits_t APFCON0bits @ 0x11D;

# 2829
extern volatile unsigned char APFCON1 @ 0x11E;

asm("APFCON1 equ 011Eh");


typedef union {
struct {
unsigned CCP2SEL :1;
unsigned P2BSEL :1;
unsigned P1CSEL :1;
unsigned P1DSEL :1;
unsigned SS2SEL :1;
unsigned SDO2SEL :1;
};
} APFCON1bits_t;
extern volatile APFCON1bits_t APFCON1bits @ 0x11E;

# 2878
extern volatile unsigned char ANSELA @ 0x18C;

asm("ANSELA equ 018Ch");


typedef union {
struct {
unsigned ANSA0 :1;
unsigned ANSA1 :1;
unsigned ANSA2 :1;
unsigned :1;
unsigned ANSA4 :1;
};
struct {
unsigned ANSELA :5;
};
} ANSELAbits_t;
extern volatile ANSELAbits_t ANSELAbits @ 0x18C;

# 2924
extern volatile unsigned char ANSELB @ 0x18D;

asm("ANSELB equ 018Dh");


typedef union {
struct {
unsigned :4;
unsigned ANSB4 :1;
unsigned ANSB5 :1;
unsigned ANSB6 :1;
unsigned ANSB7 :1;
};
struct {
unsigned :4;
unsigned ANSELB :4;
};
} ANSELBbits_t;
extern volatile ANSELBbits_t ANSELBbits @ 0x18D;

# 2971
extern volatile unsigned char ANSELC @ 0x18E;

asm("ANSELC equ 018Eh");


typedef union {
struct {
unsigned ANSC0 :1;
unsigned ANSC1 :1;
unsigned ANSC2 :1;
unsigned ANSC3 :1;
unsigned :2;
unsigned ANSC6 :1;
unsigned ANSC7 :1;
};
struct {
unsigned ANSELC :8;
};
} ANSELCbits_t;
extern volatile ANSELCbits_t ANSELCbits @ 0x18E;

# 3029
extern volatile unsigned short EEADR @ 0x191;

asm("EEADR equ 0191h");



extern volatile unsigned char EEADRL @ 0x191;

asm("EEADRL equ 0191h");


typedef union {
struct {
unsigned EEADRL :8;
};
} EEADRLbits_t;
extern volatile EEADRLbits_t EEADRLbits @ 0x191;

# 3054
extern volatile unsigned char EEADRH @ 0x192;

asm("EEADRH equ 0192h");


typedef union {
struct {
unsigned EEADRH :7;
};
} EEADRHbits_t;
extern volatile EEADRHbits_t EEADRHbits @ 0x192;

# 3073
extern volatile unsigned short EEDAT @ 0x193;

asm("EEDAT equ 0193h");



extern volatile unsigned char EEDATL @ 0x193;

asm("EEDATL equ 0193h");


extern volatile unsigned char EEDATA @ 0x193;

asm("EEDATA equ 0193h");


typedef union {
struct {
unsigned EEDATL :8;
};
} EEDATLbits_t;
extern volatile EEDATLbits_t EEDATLbits @ 0x193;

# 3102
typedef union {
struct {
unsigned EEDATL :8;
};
} EEDATAbits_t;
extern volatile EEDATAbits_t EEDATAbits @ 0x193;

# 3116
extern volatile unsigned char EEDATH @ 0x194;

asm("EEDATH equ 0194h");


typedef union {
struct {
unsigned EEDATH :6;
};
} EEDATHbits_t;
extern volatile EEDATHbits_t EEDATHbits @ 0x194;

# 3135
extern volatile unsigned char EECON1 @ 0x195;

asm("EECON1 equ 0195h");


typedef union {
struct {
unsigned RD :1;
unsigned WR :1;
unsigned WREN :1;
unsigned WRERR :1;
unsigned FREE :1;
unsigned LWLO :1;
unsigned CFGS :1;
unsigned EEPGD :1;
};
} EECON1bits_t;
extern volatile EECON1bits_t EECON1bits @ 0x195;

# 3196
extern volatile unsigned char EECON2 @ 0x196;

asm("EECON2 equ 0196h");


typedef union {
struct {
unsigned EECON2 :8;
};
} EECON2bits_t;
extern volatile EECON2bits_t EECON2bits @ 0x196;

# 3215
extern volatile unsigned char RCREG @ 0x199;

asm("RCREG equ 0199h");


typedef union {
struct {
unsigned RCREG :8;
};
} RCREGbits_t;
extern volatile RCREGbits_t RCREGbits @ 0x199;

# 3234
extern volatile unsigned char TXREG @ 0x19A;

asm("TXREG equ 019Ah");


typedef union {
struct {
unsigned TXREG :8;
};
} TXREGbits_t;
extern volatile TXREGbits_t TXREGbits @ 0x19A;

# 3253
extern volatile unsigned short SPBRG @ 0x19B;

asm("SPBRG equ 019Bh");



extern volatile unsigned char SPBRGL @ 0x19B;

asm("SPBRGL equ 019Bh");


typedef union {
struct {
unsigned SPBRGL :8;
};
} SPBRGLbits_t;
extern volatile SPBRGLbits_t SPBRGLbits @ 0x19B;

# 3278
extern volatile unsigned char SPBRGH @ 0x19C;

asm("SPBRGH equ 019Ch");


typedef union {
struct {
unsigned SPBRGH :8;
};
} SPBRGHbits_t;
extern volatile SPBRGHbits_t SPBRGHbits @ 0x19C;

# 3297
extern volatile unsigned char RCSTA @ 0x19D;

asm("RCSTA equ 019Dh");


typedef union {
struct {
unsigned RX9D :1;
unsigned OERR :1;
unsigned FERR :1;
unsigned ADDEN :1;
unsigned CREN :1;
unsigned SREN :1;
unsigned RX9 :1;
unsigned SPEN :1;
};
} RCSTAbits_t;
extern volatile RCSTAbits_t RCSTAbits @ 0x19D;

# 3358
extern volatile unsigned char TXSTA @ 0x19E;

asm("TXSTA equ 019Eh");


typedef union {
struct {
unsigned TX9D :1;
unsigned TRMT :1;
unsigned BRGH :1;
unsigned SENDB :1;
unsigned SYNC :1;
unsigned TXEN :1;
unsigned TX9 :1;
unsigned CSRC :1;
};
} TXSTAbits_t;
extern volatile TXSTAbits_t TXSTAbits @ 0x19E;

# 3419
extern volatile unsigned char BAUDCON @ 0x19F;

asm("BAUDCON equ 019Fh");


typedef union {
struct {
unsigned ABDEN :1;
unsigned WUE :1;
unsigned :1;
unsigned BRG16 :1;
unsigned SCKP :1;
unsigned :1;
unsigned RCIDL :1;
unsigned ABDOVF :1;
};
} BAUDCONbits_t;
extern volatile BAUDCONbits_t BAUDCONbits @ 0x19F;

# 3470
extern volatile unsigned char WPUA @ 0x20C;

asm("WPUA equ 020Ch");


typedef union {
struct {
unsigned WPUA0 :1;
unsigned WPUA1 :1;
unsigned WPUA2 :1;
unsigned WPUA3 :1;
unsigned WPUA4 :1;
unsigned WPUA5 :1;
};
struct {
unsigned WPUA :6;
};
} WPUAbits_t;
extern volatile WPUAbits_t WPUAbits @ 0x20C;

# 3527
extern volatile unsigned char WPUB @ 0x20D;

asm("WPUB equ 020Dh");


typedef union {
struct {
unsigned :4;
unsigned WPUB4 :1;
unsigned WPUB5 :1;
unsigned WPUB6 :1;
unsigned WPUB7 :1;
};
struct {
unsigned :4;
unsigned WPUB :4;
};
} WPUBbits_t;
extern volatile WPUBbits_t WPUBbits @ 0x20D;

# 3574
extern volatile unsigned char WPUC @ 0x20E;

asm("WPUC equ 020Eh");


typedef union {
struct {
unsigned WPUC0 :1;
unsigned WPUC1 :1;
unsigned WPUC2 :1;
unsigned WPUC3 :1;
unsigned WPUC4 :1;
unsigned WPUC5 :1;
unsigned WPUC6 :1;
unsigned WPUC7 :1;
};
struct {
unsigned WPUC :8;
};
} WPUCbits_t;
extern volatile WPUCbits_t WPUCbits @ 0x20E;

# 3643
extern volatile unsigned char SSP1BUF @ 0x211;

asm("SSP1BUF equ 0211h");


extern volatile unsigned char SSPBUF @ 0x211;

asm("SSPBUF equ 0211h");


typedef union {
struct {
unsigned SSPBUF :8;
};
} SSP1BUFbits_t;
extern volatile SSP1BUFbits_t SSP1BUFbits @ 0x211;

# 3666
typedef union {
struct {
unsigned SSPBUF :8;
};
} SSPBUFbits_t;
extern volatile SSPBUFbits_t SSPBUFbits @ 0x211;

# 3680
extern volatile unsigned char SSP1ADD @ 0x212;

asm("SSP1ADD equ 0212h");


extern volatile unsigned char SSPADD @ 0x212;

asm("SSPADD equ 0212h");


typedef union {
struct {
unsigned SSPADD :8;
};
} SSP1ADDbits_t;
extern volatile SSP1ADDbits_t SSP1ADDbits @ 0x212;

# 3703
typedef union {
struct {
unsigned SSPADD :8;
};
} SSPADDbits_t;
extern volatile SSPADDbits_t SSPADDbits @ 0x212;

# 3717
extern volatile unsigned char SSP1MSK @ 0x213;

asm("SSP1MSK equ 0213h");


extern volatile unsigned char SSPMSK @ 0x213;

asm("SSPMSK equ 0213h");


typedef union {
struct {
unsigned SSPMSK :8;
};
} SSP1MSKbits_t;
extern volatile SSP1MSKbits_t SSP1MSKbits @ 0x213;

# 3740
typedef union {
struct {
unsigned SSPMSK :8;
};
} SSPMSKbits_t;
extern volatile SSPMSKbits_t SSPMSKbits @ 0x213;

# 3754
extern volatile unsigned char SSP1STAT @ 0x214;

asm("SSP1STAT equ 0214h");


extern volatile unsigned char SSPSTAT @ 0x214;

asm("SSPSTAT equ 0214h");


typedef union {
struct {
unsigned BF :1;
unsigned UA :1;
unsigned R_nW :1;
unsigned S :1;
unsigned P :1;
unsigned D_nA :1;
unsigned CKE :1;
unsigned SMP :1;
};
} SSP1STATbits_t;
extern volatile SSP1STATbits_t SSP1STATbits @ 0x214;

# 3819
typedef union {
struct {
unsigned BF :1;
unsigned UA :1;
unsigned R_nW :1;
unsigned S :1;
unsigned P :1;
unsigned D_nA :1;
unsigned CKE :1;
unsigned SMP :1;
};
} SSPSTATbits_t;
extern volatile SSPSTATbits_t SSPSTATbits @ 0x214;

# 3875
extern volatile unsigned char SSP1CON1 @ 0x215;

asm("SSP1CON1 equ 0215h");


extern volatile unsigned char SSPCON1 @ 0x215;

asm("SSPCON1 equ 0215h");

extern volatile unsigned char SSPCON @ 0x215;

asm("SSPCON equ 0215h");


typedef union {
struct {
unsigned SSPM0 :1;
unsigned SSPM1 :1;
unsigned SSPM2 :1;
unsigned SSPM3 :1;
unsigned CKP :1;
unsigned SSPEN :1;
unsigned SSPOV :1;
unsigned WCOL :1;
};
struct {
unsigned SSPM :4;
};
} SSP1CON1bits_t;
extern volatile SSP1CON1bits_t SSP1CON1bits @ 0x215;

# 3952
typedef union {
struct {
unsigned SSPM0 :1;
unsigned SSPM1 :1;
unsigned SSPM2 :1;
unsigned SSPM3 :1;
unsigned CKP :1;
unsigned SSPEN :1;
unsigned SSPOV :1;
unsigned WCOL :1;
};
struct {
unsigned SSPM :4;
};
} SSPCON1bits_t;
extern volatile SSPCON1bits_t SSPCON1bits @ 0x215;

# 4014
typedef union {
struct {
unsigned SSPM0 :1;
unsigned SSPM1 :1;
unsigned SSPM2 :1;
unsigned SSPM3 :1;
unsigned CKP :1;
unsigned SSPEN :1;
unsigned SSPOV :1;
unsigned WCOL :1;
};
struct {
unsigned SSPM :4;
};
} SSPCONbits_t;
extern volatile SSPCONbits_t SSPCONbits @ 0x215;

# 4078
extern volatile unsigned char SSP1CON2 @ 0x216;

asm("SSP1CON2 equ 0216h");


extern volatile unsigned char SSPCON2 @ 0x216;

asm("SSPCON2 equ 0216h");


typedef union {
struct {
unsigned SEN :1;
unsigned RSEN :1;
unsigned PEN :1;
unsigned RCEN :1;
unsigned ACKEN :1;
unsigned ACKDT :1;
unsigned ACKSTAT :1;
unsigned GCEN :1;
};
} SSP1CON2bits_t;
extern volatile SSP1CON2bits_t SSP1CON2bits @ 0x216;

# 4143
typedef union {
struct {
unsigned SEN :1;
unsigned RSEN :1;
unsigned PEN :1;
unsigned RCEN :1;
unsigned ACKEN :1;
unsigned ACKDT :1;
unsigned ACKSTAT :1;
unsigned GCEN :1;
};
} SSPCON2bits_t;
extern volatile SSPCON2bits_t SSPCON2bits @ 0x216;

# 4199
extern volatile unsigned char SSP1CON3 @ 0x217;

asm("SSP1CON3 equ 0217h");


extern volatile unsigned char SSPCON3 @ 0x217;

asm("SSPCON3 equ 0217h");


typedef union {
struct {
unsigned DHEN :1;
unsigned AHEN :1;
unsigned SBCDE :1;
unsigned SDAHT :1;
unsigned BOEN :1;
unsigned SCIE :1;
unsigned PCIE :1;
unsigned ACKTIM :1;
};
} SSP1CON3bits_t;
extern volatile SSP1CON3bits_t SSP1CON3bits @ 0x217;

# 4264
typedef union {
struct {
unsigned DHEN :1;
unsigned AHEN :1;
unsigned SBCDE :1;
unsigned SDAHT :1;
unsigned BOEN :1;
unsigned SCIE :1;
unsigned PCIE :1;
unsigned ACKTIM :1;
};
} SSPCON3bits_t;
extern volatile SSPCON3bits_t SSPCON3bits @ 0x217;

# 4320
extern volatile unsigned char SSP2BUF @ 0x219;

asm("SSP2BUF equ 0219h");


typedef union {
struct {
unsigned SSPBUF :8;
};
} SSP2BUFbits_t;
extern volatile SSP2BUFbits_t SSP2BUFbits @ 0x219;

# 4339
extern volatile unsigned char SSP2ADD @ 0x21A;

asm("SSP2ADD equ 021Ah");


typedef union {
struct {
unsigned SSPADD :8;
};
} SSP2ADDbits_t;
extern volatile SSP2ADDbits_t SSP2ADDbits @ 0x21A;

# 4358
extern volatile unsigned char SSP2MSK @ 0x21B;

asm("SSP2MSK equ 021Bh");


typedef union {
struct {
unsigned SSPMSK :8;
};
} SSP2MSKbits_t;
extern volatile SSP2MSKbits_t SSP2MSKbits @ 0x21B;

# 4377
extern volatile unsigned char SSP2STAT @ 0x21C;

asm("SSP2STAT equ 021Ch");


typedef union {
struct {
unsigned BF :1;
unsigned UA :1;
unsigned R_nW :1;
unsigned S :1;
unsigned P :1;
unsigned D_nA :1;
unsigned CKE :1;
unsigned SMP :1;
};
} SSP2STATbits_t;
extern volatile SSP2STATbits_t SSP2STATbits @ 0x21C;

# 4438
extern volatile unsigned char SSP2CON1 @ 0x21D;

asm("SSP2CON1 equ 021Dh");


typedef union {
struct {
unsigned SSPM0 :1;
unsigned SSPM1 :1;
unsigned SSPM2 :1;
unsigned SSPM3 :1;
unsigned CKP :1;
unsigned SSPEN :1;
unsigned SSPOV :1;
unsigned WCOL :1;
};
struct {
unsigned SSPM :4;
};
} SSP2CON1bits_t;
extern volatile SSP2CON1bits_t SSP2CON1bits @ 0x21D;

# 4507
extern volatile unsigned char SSP2CON2 @ 0x21E;

asm("SSP2CON2 equ 021Eh");


typedef union {
struct {
unsigned SEN :1;
unsigned RSEN :1;
unsigned PEN :1;
unsigned RCEN :1;
unsigned ACKEN :1;
unsigned ACKDT :1;
unsigned ACKSTAT :1;
unsigned GCEN :1;
};
} SSP2CON2bits_t;
extern volatile SSP2CON2bits_t SSP2CON2bits @ 0x21E;

# 4568
extern volatile unsigned char SSP2CON3 @ 0x21F;

asm("SSP2CON3 equ 021Fh");


typedef union {
struct {
unsigned DHEN :1;
unsigned AHEN :1;
unsigned SBCDE :1;
unsigned SDAHT :1;
unsigned BOEN :1;
unsigned SCIE :1;
unsigned PCIE :1;
unsigned ACKTIM :1;
};
} SSP2CON3bits_t;
extern volatile SSP2CON3bits_t SSP2CON3bits @ 0x21F;

# 4629
extern volatile unsigned char CCPR1L @ 0x291;

asm("CCPR1L equ 0291h");


typedef union {
struct {
unsigned CCPR1L :8;
};
} CCPR1Lbits_t;
extern volatile CCPR1Lbits_t CCPR1Lbits @ 0x291;

# 4648
extern volatile unsigned char CCPR1H @ 0x292;

asm("CCPR1H equ 0292h");


typedef union {
struct {
unsigned CCPR1H :8;
};
} CCPR1Hbits_t;
extern volatile CCPR1Hbits_t CCPR1Hbits @ 0x292;

# 4667
extern volatile unsigned char CCP1CON @ 0x293;

asm("CCP1CON equ 0293h");


typedef union {
struct {
unsigned CCP1M0 :1;
unsigned CCP1M1 :1;
unsigned CCP1M2 :1;
unsigned CCP1M3 :1;
unsigned DC1B0 :1;
unsigned DC1B1 :1;
unsigned P1M0 :1;
unsigned P1M1 :1;
};
struct {
unsigned CCP1M :4;
unsigned DC1B :2;
unsigned P1M :2;
};
} CCP1CONbits_t;
extern volatile CCP1CONbits_t CCP1CONbits @ 0x293;

# 4748
extern volatile unsigned char PWM1CON @ 0x294;

asm("PWM1CON equ 0294h");


typedef union {
struct {
unsigned P1DC0 :1;
unsigned P1DC1 :1;
unsigned P1DC2 :1;
unsigned P1DC3 :1;
unsigned P1DC4 :1;
unsigned P1DC5 :1;
unsigned P1DC6 :1;
unsigned P1RSEN :1;
};
struct {
unsigned P1DC :7;
};
} PWM1CONbits_t;
extern volatile PWM1CONbits_t PWM1CONbits @ 0x294;

# 4817
extern volatile unsigned char CCP1AS @ 0x295;

asm("CCP1AS equ 0295h");


extern volatile unsigned char ECCP1AS @ 0x295;

asm("ECCP1AS equ 0295h");


typedef union {
struct {
unsigned PSS1BD0 :1;
unsigned PSS1BD1 :1;
unsigned PSS1AC0 :1;
unsigned PSS1AC1 :1;
unsigned CCP1AS0 :1;
unsigned CCP1AS1 :1;
unsigned CCP1AS2 :1;
unsigned CCP1ASE :1;
};
struct {
unsigned PSS1BD :2;
unsigned PSS1AC :2;
unsigned CCP1AS :3;
};
} CCP1ASbits_t;
extern volatile CCP1ASbits_t CCP1ASbits @ 0x295;

# 4902
typedef union {
struct {
unsigned PSS1BD0 :1;
unsigned PSS1BD1 :1;
unsigned PSS1AC0 :1;
unsigned PSS1AC1 :1;
unsigned CCP1AS0 :1;
unsigned CCP1AS1 :1;
unsigned CCP1AS2 :1;
unsigned CCP1ASE :1;
};
struct {
unsigned PSS1BD :2;
unsigned PSS1AC :2;
unsigned CCP1AS :3;
};
} ECCP1ASbits_t;
extern volatile ECCP1ASbits_t ECCP1ASbits @ 0x295;

# 4978
extern volatile unsigned char PSTR1CON @ 0x296;

asm("PSTR1CON equ 0296h");


typedef union {
struct {
unsigned STR1A :1;
unsigned STR1B :1;
unsigned STR1C :1;
unsigned STR1D :1;
unsigned STR1SYNC :1;
};
} PSTR1CONbits_t;
extern volatile PSTR1CONbits_t PSTR1CONbits @ 0x296;

# 5021
extern volatile unsigned char CCPR2L @ 0x298;

asm("CCPR2L equ 0298h");


typedef union {
struct {
unsigned CCPR2L :8;
};
} CCPR2Lbits_t;
extern volatile CCPR2Lbits_t CCPR2Lbits @ 0x298;

# 5040
extern volatile unsigned char CCPR2H @ 0x299;

asm("CCPR2H equ 0299h");


typedef union {
struct {
unsigned CCP2RH :8;
};
} CCPR2Hbits_t;
extern volatile CCPR2Hbits_t CCPR2Hbits @ 0x299;

# 5059
extern volatile unsigned char CCP2CON @ 0x29A;

asm("CCP2CON equ 029Ah");


typedef union {
struct {
unsigned CCP2M0 :1;
unsigned CCP2M1 :1;
unsigned CCP2M2 :1;
unsigned CCP2M3 :1;
unsigned DC2B0 :1;
unsigned DC2B1 :1;
unsigned P2M0 :1;
unsigned P2M1 :1;
};
struct {
unsigned CCP2M :4;
unsigned DC2B :2;
unsigned P2M :2;
};
} CCP2CONbits_t;
extern volatile CCP2CONbits_t CCP2CONbits @ 0x29A;

# 5140
extern volatile unsigned char PWM2CON @ 0x29B;

asm("PWM2CON equ 029Bh");


typedef union {
struct {
unsigned P2DC0 :1;
unsigned P2DC1 :1;
unsigned P2DC2 :1;
unsigned P2DC3 :1;
unsigned P2DC4 :1;
unsigned P2DC5 :1;
unsigned P2DC6 :1;
unsigned P2RSEN :1;
};
struct {
unsigned P2DC :7;
};
} PWM2CONbits_t;
extern volatile PWM2CONbits_t PWM2CONbits @ 0x29B;

# 5209
extern volatile unsigned char CCP2AS @ 0x29C;

asm("CCP2AS equ 029Ch");


typedef union {
struct {
unsigned PSS2BD0 :1;
unsigned PSS2BD1 :1;
unsigned PSS2AC0 :1;
unsigned PSS2AC1 :1;
unsigned CCP2AS0 :1;
unsigned CCP2AS1 :1;
unsigned CCP2AS2 :1;
unsigned CCP2ASE :1;
};
struct {
unsigned PSS2BD :2;
unsigned PSS2AC :2;
unsigned CCP2AS :3;
};
} CCP2ASbits_t;
extern volatile CCP2ASbits_t CCP2ASbits @ 0x29C;

# 5290
extern volatile unsigned char PSTR2CON @ 0x29D;

asm("PSTR2CON equ 029Dh");


typedef union {
struct {
unsigned STR2A :1;
unsigned STR2B :1;
unsigned STR2C :1;
unsigned STR2D :1;
unsigned STR2SYNC :1;
};
} PSTR2CONbits_t;
extern volatile PSTR2CONbits_t PSTR2CONbits @ 0x29D;

# 5333
extern volatile unsigned char CCPTMRS @ 0x29E;

asm("CCPTMRS equ 029Eh");


typedef union {
struct {
unsigned C1TSEL0 :1;
unsigned C1TSEL1 :1;
unsigned C2TSEL0 :1;
unsigned C2TSEL1 :1;
unsigned C3TSEL0 :1;
unsigned C3TSEL1 :1;
unsigned C4TSEL0 :1;
unsigned C4TSEL1 :1;
};
struct {
unsigned C1TSEL :2;
unsigned C2TSEL :2;
unsigned C3TSEL :2;
unsigned C4TSEL :2;
};
} CCPTMRSbits_t;
extern volatile CCPTMRSbits_t CCPTMRSbits @ 0x29E;

# 5420
extern volatile unsigned char CCPR3L @ 0x311;

asm("CCPR3L equ 0311h");


typedef union {
struct {
unsigned CCPR3L :8;
};
} CCPR3Lbits_t;
extern volatile CCPR3Lbits_t CCPR3Lbits @ 0x311;

# 5439
extern volatile unsigned char CCPR3H @ 0x312;

asm("CCPR3H equ 0312h");


typedef union {
struct {
unsigned CCPR3H :8;
};
} CCPR3Hbits_t;
extern volatile CCPR3Hbits_t CCPR3Hbits @ 0x312;

# 5458
extern volatile unsigned char CCP3CON @ 0x313;

asm("CCP3CON equ 0313h");


typedef union {
struct {
unsigned CCP3M0 :1;
unsigned CCP3M1 :1;
unsigned CCP3M2 :1;
unsigned CCP3M3 :1;
unsigned DC3B0 :1;
unsigned DC3B1 :1;
};
struct {
unsigned CCP3M :4;
unsigned DC3B :2;
};
} CCP3CONbits_t;
extern volatile CCP3CONbits_t CCP3CONbits @ 0x313;

# 5521
extern volatile unsigned char CCPR4L @ 0x318;

asm("CCPR4L equ 0318h");


typedef union {
struct {
unsigned CCPR4L :8;
};
} CCPR4Lbits_t;
extern volatile CCPR4Lbits_t CCPR4Lbits @ 0x318;

# 5540
extern volatile unsigned char CCPR4H @ 0x319;

asm("CCPR4H equ 0319h");


typedef union {
struct {
unsigned CCPR4H :8;
};
} CCPR4Hbits_t;
extern volatile CCPR4Hbits_t CCPR4Hbits @ 0x319;

# 5559
extern volatile unsigned char CCP4CON @ 0x31A;

asm("CCP4CON equ 031Ah");


typedef union {
struct {
unsigned CCP4M0 :1;
unsigned CCP4M1 :1;
unsigned CCP4M2 :1;
unsigned CCP4M3 :1;
unsigned DC4B0 :1;
unsigned DC4B1 :1;
};
struct {
unsigned CCP4M :4;
unsigned DC4B :2;
};
} CCP4CONbits_t;
extern volatile CCP4CONbits_t CCP4CONbits @ 0x31A;

# 5622
extern volatile unsigned char INLVLA @ 0x38C;

asm("INLVLA equ 038Ch");


typedef union {
struct {
unsigned INLVLA0 :1;
unsigned INLVLA1 :1;
unsigned INLVLA2 :1;
unsigned INLVLA3 :1;
unsigned INLVLA4 :1;
unsigned INLVLA5 :1;
};
struct {
unsigned INLVLA :6;
};
} INLVLAbits_t;
extern volatile INLVLAbits_t INLVLAbits @ 0x38C;

# 5679
extern volatile unsigned char INLVLB @ 0x38D;

asm("INLVLB equ 038Dh");


typedef union {
struct {
unsigned :4;
unsigned INLVLB4 :1;
unsigned INLVLB5 :1;
unsigned INLVLB6 :1;
unsigned INLVLB7 :1;
};
struct {
unsigned :4;
unsigned INLVLB :4;
};
} INLVLBbits_t;
extern volatile INLVLBbits_t INLVLBbits @ 0x38D;

# 5726
extern volatile unsigned char INLVLC @ 0x38E;

asm("INLVLC equ 038Eh");


typedef union {
struct {
unsigned INLVLC0 :1;
unsigned INLVLC1 :1;
unsigned INLVLC2 :1;
unsigned INLVLC3 :1;
unsigned INLVLC4 :1;
unsigned INLVLC5 :1;
unsigned INLVLC6 :1;
unsigned INLVLC7 :1;
};
struct {
unsigned INLVLC :8;
};
} INLVLCbits_t;
extern volatile INLVLCbits_t INLVLCbits @ 0x38E;

# 5795
extern volatile unsigned char IOCAP @ 0x391;

asm("IOCAP equ 0391h");


typedef union {
struct {
unsigned IOCAP0 :1;
unsigned IOCAP1 :1;
unsigned IOCAP2 :1;
unsigned IOCAP3 :1;
unsigned IOCAP4 :1;
unsigned IOCAP5 :1;
};
struct {
unsigned IOCAP :6;
};
} IOCAPbits_t;
extern volatile IOCAPbits_t IOCAPbits @ 0x391;

# 5852
extern volatile unsigned char IOCAN @ 0x392;

asm("IOCAN equ 0392h");


typedef union {
struct {
unsigned IOCAN0 :1;
unsigned IOCAN1 :1;
unsigned IOCAN2 :1;
unsigned IOCAN3 :1;
unsigned IOCAN4 :1;
unsigned IOCAN5 :1;
};
struct {
unsigned IOCAN :6;
};
} IOCANbits_t;
extern volatile IOCANbits_t IOCANbits @ 0x392;

# 5909
extern volatile unsigned char IOCAF @ 0x393;

asm("IOCAF equ 0393h");


typedef union {
struct {
unsigned IOCAF0 :1;
unsigned IOCAF1 :1;
unsigned IOCAF2 :1;
unsigned IOCAF3 :1;
unsigned IOCAF4 :1;
unsigned IOCAF5 :1;
};
struct {
unsigned IOCAF :6;
};
} IOCAFbits_t;
extern volatile IOCAFbits_t IOCAFbits @ 0x393;

# 5966
extern volatile unsigned char IOCBP @ 0x394;

asm("IOCBP equ 0394h");


typedef union {
struct {
unsigned :4;
unsigned IOCBP4 :1;
unsigned IOCBP5 :1;
unsigned IOCBP6 :1;
unsigned IOCBP7 :1;
};
struct {
unsigned :4;
unsigned IOCBP :4;
};
} IOCBPbits_t;
extern volatile IOCBPbits_t IOCBPbits @ 0x394;

# 6013
extern volatile unsigned char IOCBN @ 0x395;

asm("IOCBN equ 0395h");


typedef union {
struct {
unsigned :4;
unsigned IOCBN4 :1;
unsigned IOCBN5 :1;
unsigned IOCBN6 :1;
unsigned IOCBN7 :1;
};
struct {
unsigned :4;
unsigned IOCBN :4;
};
} IOCBNbits_t;
extern volatile IOCBNbits_t IOCBNbits @ 0x395;

# 6060
extern volatile unsigned char IOCBF @ 0x396;

asm("IOCBF equ 0396h");


typedef union {
struct {
unsigned :4;
unsigned IOCBF4 :1;
unsigned IOCBF5 :1;
unsigned IOCBF6 :1;
unsigned IOCBF7 :1;
};
struct {
unsigned :4;
unsigned IOCBF :4;
};
} IOCBFbits_t;
extern volatile IOCBFbits_t IOCBFbits @ 0x396;

# 6107
extern volatile unsigned char CLKRCON @ 0x39A;

asm("CLKRCON equ 039Ah");


typedef union {
struct {
unsigned CLKRDIV0 :1;
unsigned CLKRDIV1 :1;
unsigned CLKRDIV2 :1;
unsigned CLKRDC0 :1;
unsigned CLKRDC1 :1;
unsigned CLKRSLR :1;
unsigned CLKROE :1;
unsigned CLKREN :1;
};
struct {
unsigned CLKRDIV :3;
unsigned CLKRDC :2;
};
} CLKRCONbits_t;
extern volatile CLKRCONbits_t CLKRCONbits @ 0x39A;

# 6182
extern volatile unsigned char MDCON @ 0x39C;

asm("MDCON equ 039Ch");


typedef union {
struct {
unsigned MDBIT :1;
unsigned :2;
unsigned MDOUT :1;
unsigned MDOPOL :1;
unsigned MDSLR :1;
unsigned MDOE :1;
unsigned MDEN :1;
};
} MDCONbits_t;
extern volatile MDCONbits_t MDCONbits @ 0x39C;

# 6232
extern volatile unsigned char MDSRC @ 0x39D;

asm("MDSRC equ 039Dh");


typedef union {
struct {
unsigned MDMS0 :1;
unsigned MDMS1 :1;
unsigned MDMS2 :1;
unsigned MDMS3 :1;
unsigned :3;
unsigned MDMSODIS :1;
};
struct {
unsigned MDMS :4;
};
} MDSRCbits_t;
extern volatile MDSRCbits_t MDSRCbits @ 0x39D;

# 6284
extern volatile unsigned char MDCARL @ 0x39E;

asm("MDCARL equ 039Eh");


typedef union {
struct {
unsigned MDCL0 :1;
unsigned MDCL1 :1;
unsigned MDCL2 :1;
unsigned MDCL3 :1;
unsigned :1;
unsigned MDCLSYNC :1;
unsigned MDCLPOL :1;
unsigned MDCLODIS :1;
};
struct {
unsigned MDCL :4;
};
} MDCARLbits_t;
extern volatile MDCARLbits_t MDCARLbits @ 0x39E;

# 6348
extern volatile unsigned char MDCARH @ 0x39F;

asm("MDCARH equ 039Fh");


typedef union {
struct {
unsigned MDCH0 :1;
unsigned MDCH1 :1;
unsigned MDCH2 :1;
unsigned MDCH3 :1;
unsigned :1;
unsigned MDCHSYNC :1;
unsigned MDCHPOL :1;
unsigned MDCHODIS :1;
};
struct {
unsigned MDCH :4;
};
} MDCARHbits_t;
extern volatile MDCARHbits_t MDCARHbits @ 0x39F;

# 6412
extern volatile unsigned char TMR4 @ 0x415;

asm("TMR4 equ 0415h");


typedef union {
struct {
unsigned TMR4 :8;
};
} TMR4bits_t;
extern volatile TMR4bits_t TMR4bits @ 0x415;

# 6431
extern volatile unsigned char PR4 @ 0x416;

asm("PR4 equ 0416h");


typedef union {
struct {
unsigned PR4 :8;
};
} PR4bits_t;
extern volatile PR4bits_t PR4bits @ 0x416;

# 6450
extern volatile unsigned char T4CON @ 0x417;

asm("T4CON equ 0417h");


typedef union {
struct {
unsigned T4CKPS0 :1;
unsigned T4CKPS1 :1;
unsigned TMR4ON :1;
unsigned T4OUTPS0 :1;
unsigned T4OUTPS1 :1;
unsigned T4OUTPS2 :1;
unsigned T4OUTPS3 :1;
};
struct {
unsigned T4CKPS :2;
unsigned :1;
unsigned T4OUTPS :4;
};
} T4CONbits_t;
extern volatile T4CONbits_t T4CONbits @ 0x417;

# 6520
extern volatile unsigned char TMR6 @ 0x41C;

asm("TMR6 equ 041Ch");


typedef union {
struct {
unsigned TMR6 :8;
};
} TMR6bits_t;
extern volatile TMR6bits_t TMR6bits @ 0x41C;

# 6539
extern volatile unsigned char PR6 @ 0x41D;

asm("PR6 equ 041Dh");


typedef union {
struct {
unsigned PR6 :8;
};
} PR6bits_t;
extern volatile PR6bits_t PR6bits @ 0x41D;

# 6558
extern volatile unsigned char T6CON @ 0x41E;

asm("T6CON equ 041Eh");


typedef union {
struct {
unsigned T6CKPS0 :1;
unsigned T6CKPS1 :1;
unsigned TMR6ON :1;
unsigned T6OUTPS0 :1;
unsigned T6OUTPS1 :1;
unsigned T6OUTPS2 :1;
unsigned T6OUTPS3 :1;
};
struct {
unsigned T6CKPS :2;
unsigned :1;
unsigned T6OUTPS :4;
};
} T6CONbits_t;
extern volatile T6CONbits_t T6CONbits @ 0x41E;

# 6628
extern volatile unsigned char STATUS_SHAD @ 0xFE4;

asm("STATUS_SHAD equ 0FE4h");


typedef union {
struct {
unsigned C_SHAD :1;
unsigned DC_SHAD :1;
unsigned Z_SHAD :1;
};
} STATUS_SHADbits_t;
extern volatile STATUS_SHADbits_t STATUS_SHADbits @ 0xFE4;

# 6659
extern volatile unsigned char WREG_SHAD @ 0xFE5;

asm("WREG_SHAD equ 0FE5h");


typedef union {
struct {
unsigned WREG_SHAD :8;
};
} WREG_SHADbits_t;
extern volatile WREG_SHADbits_t WREG_SHADbits @ 0xFE5;

# 6678
extern volatile unsigned char BSR_SHAD @ 0xFE6;

asm("BSR_SHAD equ 0FE6h");


typedef union {
struct {
unsigned BSR_SHAD :5;
};
} BSR_SHADbits_t;
extern volatile BSR_SHADbits_t BSR_SHADbits @ 0xFE6;

# 6697
extern volatile unsigned char PCLATH_SHAD @ 0xFE7;

asm("PCLATH_SHAD equ 0FE7h");


typedef union {
struct {
unsigned PCLATH_SHAD :7;
};
} PCLATH_SHADbits_t;
extern volatile PCLATH_SHADbits_t PCLATH_SHADbits @ 0xFE7;

# 6716
extern volatile unsigned char FSR0L_SHAD @ 0xFE8;

asm("FSR0L_SHAD equ 0FE8h");


typedef union {
struct {
unsigned FSR0L_SHAD :8;
};
} FSR0L_SHADbits_t;
extern volatile FSR0L_SHADbits_t FSR0L_SHADbits @ 0xFE8;

# 6735
extern volatile unsigned char FSR0H_SHAD @ 0xFE9;

asm("FSR0H_SHAD equ 0FE9h");


typedef union {
struct {
unsigned FSR0H_SHAD :8;
};
} FSR0H_SHADbits_t;
extern volatile FSR0H_SHADbits_t FSR0H_SHADbits @ 0xFE9;

# 6754
extern volatile unsigned char FSR1L_SHAD @ 0xFEA;

asm("FSR1L_SHAD equ 0FEAh");


typedef union {
struct {
unsigned FSR1L_SHAD :8;
};
} FSR1L_SHADbits_t;
extern volatile FSR1L_SHADbits_t FSR1L_SHADbits @ 0xFEA;

# 6773
extern volatile unsigned char FSR1H_SHAD @ 0xFEB;

asm("FSR1H_SHAD equ 0FEBh");


typedef union {
struct {
unsigned FSR1H_SHAD :8;
};
} FSR1H_SHADbits_t;
extern volatile FSR1H_SHADbits_t FSR1H_SHADbits @ 0xFEB;

# 6792
extern volatile unsigned char STKPTR @ 0xFED;

asm("STKPTR equ 0FEDh");


typedef union {
struct {
unsigned STKPTR :5;
};
} STKPTRbits_t;
extern volatile STKPTRbits_t STKPTRbits @ 0xFED;

# 6811
extern volatile unsigned char TOSL @ 0xFEE;

asm("TOSL equ 0FEEh");


typedef union {
struct {
unsigned TOSL :8;
};
} TOSLbits_t;
extern volatile TOSLbits_t TOSLbits @ 0xFEE;

# 6830
extern volatile unsigned char TOSH @ 0xFEF;

asm("TOSH equ 0FEFh");


typedef union {
struct {
unsigned TOSH :7;
};
} TOSHbits_t;
extern volatile TOSHbits_t TOSHbits @ 0xFEF;

# 6855
extern volatile __bit ABDEN @ (((unsigned) &BAUDCON)*8) + 0;

extern volatile __bit ABDOVF @ (((unsigned) &BAUDCON)*8) + 7;

extern volatile __bit ADCS0 @ (((unsigned) &ADCON1)*8) + 4;

extern volatile __bit ADCS1 @ (((unsigned) &ADCON1)*8) + 5;

extern volatile __bit ADCS2 @ (((unsigned) &ADCON1)*8) + 6;

extern volatile __bit ADDEN @ (((unsigned) &RCSTA)*8) + 3;

extern volatile __bit ADFM @ (((unsigned) &ADCON1)*8) + 7;

extern volatile __bit ADFVR0 @ (((unsigned) &FVRCON)*8) + 0;

extern volatile __bit ADFVR1 @ (((unsigned) &FVRCON)*8) + 1;

extern volatile __bit ADGO @ (((unsigned) &ADCON0)*8) + 1;

extern volatile __bit ADIE @ (((unsigned) &PIE1)*8) + 6;

extern volatile __bit ADIF @ (((unsigned) &PIR1)*8) + 6;

extern volatile __bit ADNREF @ (((unsigned) &ADCON1)*8) + 2;

extern volatile __bit ADON @ (((unsigned) &ADCON0)*8) + 0;

extern volatile __bit ADPREF0 @ (((unsigned) &ADCON1)*8) + 0;

extern volatile __bit ADPREF1 @ (((unsigned) &ADCON1)*8) + 1;

extern volatile __bit ANSA0 @ (((unsigned) &ANSELA)*8) + 0;

extern volatile __bit ANSA1 @ (((unsigned) &ANSELA)*8) + 1;

extern volatile __bit ANSA2 @ (((unsigned) &ANSELA)*8) + 2;

extern volatile __bit ANSA4 @ (((unsigned) &ANSELA)*8) + 4;

extern volatile __bit ANSB4 @ (((unsigned) &ANSELB)*8) + 4;

extern volatile __bit ANSB5 @ (((unsigned) &ANSELB)*8) + 5;

extern volatile __bit ANSB6 @ (((unsigned) &ANSELB)*8) + 6;

extern volatile __bit ANSB7 @ (((unsigned) &ANSELB)*8) + 7;

extern volatile __bit ANSC0 @ (((unsigned) &ANSELC)*8) + 0;

extern volatile __bit ANSC1 @ (((unsigned) &ANSELC)*8) + 1;

extern volatile __bit ANSC2 @ (((unsigned) &ANSELC)*8) + 2;

extern volatile __bit ANSC3 @ (((unsigned) &ANSELC)*8) + 3;

extern volatile __bit ANSC6 @ (((unsigned) &ANSELC)*8) + 6;

extern volatile __bit ANSC7 @ (((unsigned) &ANSELC)*8) + 7;

extern volatile __bit BCL1IE @ (((unsigned) &PIE2)*8) + 3;

extern volatile __bit BCL1IF @ (((unsigned) &PIR2)*8) + 3;

extern volatile __bit BCL2IE @ (((unsigned) &PIE4)*8) + 1;

extern volatile __bit BCL2IF @ (((unsigned) &PIR4)*8) + 1;

extern volatile __bit BORRDY @ (((unsigned) &BORCON)*8) + 0;

extern volatile __bit BRG16 @ (((unsigned) &BAUDCON)*8) + 3;

extern volatile __bit BRGH @ (((unsigned) &TXSTA)*8) + 2;

extern volatile __bit BSR0 @ (((unsigned) &BSR)*8) + 0;

extern volatile __bit BSR1 @ (((unsigned) &BSR)*8) + 1;

extern volatile __bit BSR2 @ (((unsigned) &BSR)*8) + 2;

extern volatile __bit BSR3 @ (((unsigned) &BSR)*8) + 3;

extern volatile __bit BSR4 @ (((unsigned) &BSR)*8) + 4;

extern volatile __bit C1HYS @ (((unsigned) &CM1CON0)*8) + 1;

extern volatile __bit C1IE @ (((unsigned) &PIE2)*8) + 5;

extern volatile __bit C1IF @ (((unsigned) &PIR2)*8) + 5;

extern volatile __bit C1INTN @ (((unsigned) &CM1CON1)*8) + 6;

extern volatile __bit C1INTP @ (((unsigned) &CM1CON1)*8) + 7;

extern volatile __bit C1NCH0 @ (((unsigned) &CM1CON1)*8) + 0;

extern volatile __bit C1NCH1 @ (((unsigned) &CM1CON1)*8) + 1;

extern volatile __bit C1OE @ (((unsigned) &CM1CON0)*8) + 5;

extern volatile __bit C1ON @ (((unsigned) &CM1CON0)*8) + 7;

extern volatile __bit C1OUT @ (((unsigned) &CM1CON0)*8) + 6;

extern volatile __bit C1PCH0 @ (((unsigned) &CM1CON1)*8) + 4;

extern volatile __bit C1PCH1 @ (((unsigned) &CM1CON1)*8) + 5;

extern volatile __bit C1POL @ (((unsigned) &CM1CON0)*8) + 4;

extern volatile __bit C1SP @ (((unsigned) &CM1CON0)*8) + 2;

extern volatile __bit C1SYNC @ (((unsigned) &CM1CON0)*8) + 0;

extern volatile __bit C1TSEL0 @ (((unsigned) &CCPTMRS)*8) + 0;

extern volatile __bit C1TSEL1 @ (((unsigned) &CCPTMRS)*8) + 1;

extern volatile __bit C2HYS @ (((unsigned) &CM2CON0)*8) + 1;

extern volatile __bit C2IE @ (((unsigned) &PIE2)*8) + 6;

extern volatile __bit C2IF @ (((unsigned) &PIR2)*8) + 6;

extern volatile __bit C2INTN @ (((unsigned) &CM2CON1)*8) + 6;

extern volatile __bit C2INTP @ (((unsigned) &CM2CON1)*8) + 7;

extern volatile __bit C2NCH0 @ (((unsigned) &CM2CON1)*8) + 0;

extern volatile __bit C2NCH1 @ (((unsigned) &CM2CON1)*8) + 1;

extern volatile __bit C2OE @ (((unsigned) &CM2CON0)*8) + 5;

extern volatile __bit C2ON @ (((unsigned) &CM2CON0)*8) + 7;

extern volatile __bit C2OUT @ (((unsigned) &CM2CON0)*8) + 6;

extern volatile __bit C2PCH0 @ (((unsigned) &CM2CON1)*8) + 4;

extern volatile __bit C2PCH1 @ (((unsigned) &CM2CON1)*8) + 5;

extern volatile __bit C2POL @ (((unsigned) &CM2CON0)*8) + 4;

extern volatile __bit C2SP @ (((unsigned) &CM2CON0)*8) + 2;

extern volatile __bit C2SYNC @ (((unsigned) &CM2CON0)*8) + 0;

extern volatile __bit C2TSEL0 @ (((unsigned) &CCPTMRS)*8) + 2;

extern volatile __bit C2TSEL1 @ (((unsigned) &CCPTMRS)*8) + 3;

extern volatile __bit C3TSEL0 @ (((unsigned) &CCPTMRS)*8) + 4;

extern volatile __bit C3TSEL1 @ (((unsigned) &CCPTMRS)*8) + 5;

extern volatile __bit C4TSEL0 @ (((unsigned) &CCPTMRS)*8) + 6;

extern volatile __bit C4TSEL1 @ (((unsigned) &CCPTMRS)*8) + 7;

extern volatile __bit CARRY @ (((unsigned) &STATUS)*8) + 0;

extern volatile __bit CCP1AS0 @ (((unsigned) &CCP1AS)*8) + 4;

extern volatile __bit CCP1AS1 @ (((unsigned) &CCP1AS)*8) + 5;

extern volatile __bit CCP1AS2 @ (((unsigned) &CCP1AS)*8) + 6;

extern volatile __bit CCP1ASE @ (((unsigned) &CCP1AS)*8) + 7;

extern volatile __bit CCP1IE @ (((unsigned) &PIE1)*8) + 2;

extern volatile __bit CCP1IF @ (((unsigned) &PIR1)*8) + 2;

extern volatile __bit CCP1M0 @ (((unsigned) &CCP1CON)*8) + 0;

extern volatile __bit CCP1M1 @ (((unsigned) &CCP1CON)*8) + 1;

extern volatile __bit CCP1M2 @ (((unsigned) &CCP1CON)*8) + 2;

extern volatile __bit CCP1M3 @ (((unsigned) &CCP1CON)*8) + 3;

extern volatile __bit CCP2AS0 @ (((unsigned) &CCP2AS)*8) + 4;

extern volatile __bit CCP2AS1 @ (((unsigned) &CCP2AS)*8) + 5;

extern volatile __bit CCP2AS2 @ (((unsigned) &CCP2AS)*8) + 6;

extern volatile __bit CCP2ASE @ (((unsigned) &CCP2AS)*8) + 7;

extern volatile __bit CCP2IE @ (((unsigned) &PIE2)*8) + 0;

extern volatile __bit CCP2IF @ (((unsigned) &PIR2)*8) + 0;

extern volatile __bit CCP2M0 @ (((unsigned) &CCP2CON)*8) + 0;

extern volatile __bit CCP2M1 @ (((unsigned) &CCP2CON)*8) + 1;

extern volatile __bit CCP2M2 @ (((unsigned) &CCP2CON)*8) + 2;

extern volatile __bit CCP2M3 @ (((unsigned) &CCP2CON)*8) + 3;

extern volatile __bit CCP2SEL @ (((unsigned) &APFCON1)*8) + 0;

extern volatile __bit CCP3IE @ (((unsigned) &PIE3)*8) + 4;

extern volatile __bit CCP3IF @ (((unsigned) &PIR3)*8) + 4;

extern volatile __bit CCP3M0 @ (((unsigned) &CCP3CON)*8) + 0;

extern volatile __bit CCP3M1 @ (((unsigned) &CCP3CON)*8) + 1;

extern volatile __bit CCP3M2 @ (((unsigned) &CCP3CON)*8) + 2;

extern volatile __bit CCP3M3 @ (((unsigned) &CCP3CON)*8) + 3;

extern volatile __bit CCP4IE @ (((unsigned) &PIE3)*8) + 5;

extern volatile __bit CCP4IF @ (((unsigned) &PIR3)*8) + 5;

extern volatile __bit CCP4M0 @ (((unsigned) &CCP4CON)*8) + 0;

extern volatile __bit CCP4M1 @ (((unsigned) &CCP4CON)*8) + 1;

extern volatile __bit CCP4M2 @ (((unsigned) &CCP4CON)*8) + 2;

extern volatile __bit CCP4M3 @ (((unsigned) &CCP4CON)*8) + 3;

extern volatile __bit CDAFVR0 @ (((unsigned) &FVRCON)*8) + 2;

extern volatile __bit CDAFVR1 @ (((unsigned) &FVRCON)*8) + 3;

extern volatile __bit CFGS @ (((unsigned) &EECON1)*8) + 6;

extern volatile __bit CHS0 @ (((unsigned) &ADCON0)*8) + 2;

extern volatile __bit CHS1 @ (((unsigned) &ADCON0)*8) + 3;

extern volatile __bit CHS2 @ (((unsigned) &ADCON0)*8) + 4;

extern volatile __bit CHS3 @ (((unsigned) &ADCON0)*8) + 5;

extern volatile __bit CHS4 @ (((unsigned) &ADCON0)*8) + 6;

extern volatile __bit CLKRDC0 @ (((unsigned) &CLKRCON)*8) + 3;

extern volatile __bit CLKRDC1 @ (((unsigned) &CLKRCON)*8) + 4;

extern volatile __bit CLKRDIV0 @ (((unsigned) &CLKRCON)*8) + 0;

extern volatile __bit CLKRDIV1 @ (((unsigned) &CLKRCON)*8) + 1;

extern volatile __bit CLKRDIV2 @ (((unsigned) &CLKRCON)*8) + 2;

extern volatile __bit CLKREN @ (((unsigned) &CLKRCON)*8) + 7;

extern volatile __bit CLKROE @ (((unsigned) &CLKRCON)*8) + 6;

extern volatile __bit CLKRSLR @ (((unsigned) &CLKRCON)*8) + 5;

extern volatile __bit CPSCH0 @ (((unsigned) &CPSCON1)*8) + 0;

extern volatile __bit CPSCH1 @ (((unsigned) &CPSCON1)*8) + 1;

extern volatile __bit CPSCH2 @ (((unsigned) &CPSCON1)*8) + 2;

extern volatile __bit CPSCH3 @ (((unsigned) &CPSCON1)*8) + 3;

extern volatile __bit CPSON @ (((unsigned) &CPSCON0)*8) + 7;

extern volatile __bit CPSOUT @ (((unsigned) &CPSCON0)*8) + 1;

extern volatile __bit CPSRM @ (((unsigned) &CPSCON0)*8) + 6;

extern volatile __bit CPSRNG0 @ (((unsigned) &CPSCON0)*8) + 2;

extern volatile __bit CPSRNG1 @ (((unsigned) &CPSCON0)*8) + 3;

extern volatile __bit CREN @ (((unsigned) &RCSTA)*8) + 4;

extern volatile __bit CSRC @ (((unsigned) &TXSTA)*8) + 7;

extern volatile __bit C_SHAD @ (((unsigned) &STATUS_SHAD)*8) + 0;

extern volatile __bit DACEN @ (((unsigned) &DACCON0)*8) + 7;

extern volatile __bit DACLPS @ (((unsigned) &DACCON0)*8) + 6;

extern volatile __bit DACNSS @ (((unsigned) &DACCON0)*8) + 0;

extern volatile __bit DACOE @ (((unsigned) &DACCON0)*8) + 5;

extern volatile __bit DACPSS0 @ (((unsigned) &DACCON0)*8) + 2;

extern volatile __bit DACPSS1 @ (((unsigned) &DACCON0)*8) + 3;

extern volatile __bit DACR0 @ (((unsigned) &DACCON1)*8) + 0;

extern volatile __bit DACR1 @ (((unsigned) &DACCON1)*8) + 1;

extern volatile __bit DACR2 @ (((unsigned) &DACCON1)*8) + 2;

extern volatile __bit DACR3 @ (((unsigned) &DACCON1)*8) + 3;

extern volatile __bit DACR4 @ (((unsigned) &DACCON1)*8) + 4;

extern volatile __bit DC @ (((unsigned) &STATUS)*8) + 1;

extern volatile __bit DC1B0 @ (((unsigned) &CCP1CON)*8) + 4;

extern volatile __bit DC1B1 @ (((unsigned) &CCP1CON)*8) + 5;

extern volatile __bit DC2B0 @ (((unsigned) &CCP2CON)*8) + 4;

extern volatile __bit DC2B1 @ (((unsigned) &CCP2CON)*8) + 5;

extern volatile __bit DC3B0 @ (((unsigned) &CCP3CON)*8) + 4;

extern volatile __bit DC3B1 @ (((unsigned) &CCP3CON)*8) + 5;

extern volatile __bit DC4B0 @ (((unsigned) &CCP4CON)*8) + 4;

extern volatile __bit DC4B1 @ (((unsigned) &CCP4CON)*8) + 5;

extern volatile __bit DC_SHAD @ (((unsigned) &STATUS_SHAD)*8) + 1;

extern volatile __bit EEIE @ (((unsigned) &PIE2)*8) + 4;

extern volatile __bit EEIF @ (((unsigned) &PIR2)*8) + 4;

extern volatile __bit EEPGD @ (((unsigned) &EECON1)*8) + 7;

extern volatile __bit FERR @ (((unsigned) &RCSTA)*8) + 2;

extern volatile __bit FREE @ (((unsigned) &EECON1)*8) + 4;

extern volatile __bit FVREN @ (((unsigned) &FVRCON)*8) + 7;

extern volatile __bit FVRRDY @ (((unsigned) &FVRCON)*8) + 6;

extern volatile __bit GIE @ (((unsigned) &INTCON)*8) + 7;

extern volatile __bit GO @ (((unsigned) &ADCON0)*8) + 1;

extern volatile __bit GO_nDONE @ (((unsigned) &ADCON0)*8) + 1;

extern volatile __bit HFIOFL @ (((unsigned) &OSCSTAT)*8) + 3;

extern volatile __bit HFIOFR @ (((unsigned) &OSCSTAT)*8) + 4;

extern volatile __bit HFIOFS @ (((unsigned) &OSCSTAT)*8) + 0;

extern volatile __bit INLVLA0 @ (((unsigned) &INLVLA)*8) + 0;

extern volatile __bit INLVLA1 @ (((unsigned) &INLVLA)*8) + 1;

extern volatile __bit INLVLA2 @ (((unsigned) &INLVLA)*8) + 2;

extern volatile __bit INLVLA3 @ (((unsigned) &INLVLA)*8) + 3;

extern volatile __bit INLVLA4 @ (((unsigned) &INLVLA)*8) + 4;

extern volatile __bit INLVLA5 @ (((unsigned) &INLVLA)*8) + 5;

extern volatile __bit INLVLB4 @ (((unsigned) &INLVLB)*8) + 4;

extern volatile __bit INLVLB5 @ (((unsigned) &INLVLB)*8) + 5;

extern volatile __bit INLVLB6 @ (((unsigned) &INLVLB)*8) + 6;

extern volatile __bit INLVLB7 @ (((unsigned) &INLVLB)*8) + 7;

extern volatile __bit INLVLC0 @ (((unsigned) &INLVLC)*8) + 0;

extern volatile __bit INLVLC1 @ (((unsigned) &INLVLC)*8) + 1;

extern volatile __bit INLVLC2 @ (((unsigned) &INLVLC)*8) + 2;

extern volatile __bit INLVLC3 @ (((unsigned) &INLVLC)*8) + 3;

extern volatile __bit INLVLC4 @ (((unsigned) &INLVLC)*8) + 4;

extern volatile __bit INLVLC5 @ (((unsigned) &INLVLC)*8) + 5;

extern volatile __bit INLVLC6 @ (((unsigned) &INLVLC)*8) + 6;

extern volatile __bit INLVLC7 @ (((unsigned) &INLVLC)*8) + 7;

extern volatile __bit INTE @ (((unsigned) &INTCON)*8) + 4;

extern volatile __bit INTEDG @ (((unsigned) &OPTION_REG)*8) + 6;

extern volatile __bit INTF @ (((unsigned) &INTCON)*8) + 1;

extern volatile __bit IOCAF0 @ (((unsigned) &IOCAF)*8) + 0;

extern volatile __bit IOCAF1 @ (((unsigned) &IOCAF)*8) + 1;

extern volatile __bit IOCAF2 @ (((unsigned) &IOCAF)*8) + 2;

extern volatile __bit IOCAF3 @ (((unsigned) &IOCAF)*8) + 3;

extern volatile __bit IOCAF4 @ (((unsigned) &IOCAF)*8) + 4;

extern volatile __bit IOCAF5 @ (((unsigned) &IOCAF)*8) + 5;

extern volatile __bit IOCAN0 @ (((unsigned) &IOCAN)*8) + 0;

extern volatile __bit IOCAN1 @ (((unsigned) &IOCAN)*8) + 1;

extern volatile __bit IOCAN2 @ (((unsigned) &IOCAN)*8) + 2;

extern volatile __bit IOCAN3 @ (((unsigned) &IOCAN)*8) + 3;

extern volatile __bit IOCAN4 @ (((unsigned) &IOCAN)*8) + 4;

extern volatile __bit IOCAN5 @ (((unsigned) &IOCAN)*8) + 5;

extern volatile __bit IOCAP0 @ (((unsigned) &IOCAP)*8) + 0;

extern volatile __bit IOCAP1 @ (((unsigned) &IOCAP)*8) + 1;

extern volatile __bit IOCAP2 @ (((unsigned) &IOCAP)*8) + 2;

extern volatile __bit IOCAP3 @ (((unsigned) &IOCAP)*8) + 3;

extern volatile __bit IOCAP4 @ (((unsigned) &IOCAP)*8) + 4;

extern volatile __bit IOCAP5 @ (((unsigned) &IOCAP)*8) + 5;

extern volatile __bit IOCBF4 @ (((unsigned) &IOCBF)*8) + 4;

extern volatile __bit IOCBF5 @ (((unsigned) &IOCBF)*8) + 5;

extern volatile __bit IOCBF6 @ (((unsigned) &IOCBF)*8) + 6;

extern volatile __bit IOCBF7 @ (((unsigned) &IOCBF)*8) + 7;

extern volatile __bit IOCBN4 @ (((unsigned) &IOCBN)*8) + 4;

extern volatile __bit IOCBN5 @ (((unsigned) &IOCBN)*8) + 5;

extern volatile __bit IOCBN6 @ (((unsigned) &IOCBN)*8) + 6;

extern volatile __bit IOCBN7 @ (((unsigned) &IOCBN)*8) + 7;

extern volatile __bit IOCBP4 @ (((unsigned) &IOCBP)*8) + 4;

extern volatile __bit IOCBP5 @ (((unsigned) &IOCBP)*8) + 5;

extern volatile __bit IOCBP6 @ (((unsigned) &IOCBP)*8) + 6;

extern volatile __bit IOCBP7 @ (((unsigned) &IOCBP)*8) + 7;

extern volatile __bit IOCIE @ (((unsigned) &INTCON)*8) + 3;

extern volatile __bit IOCIF @ (((unsigned) &INTCON)*8) + 0;

extern volatile __bit IRCF0 @ (((unsigned) &OSCCON)*8) + 3;

extern volatile __bit IRCF1 @ (((unsigned) &OSCCON)*8) + 4;

extern volatile __bit IRCF2 @ (((unsigned) &OSCCON)*8) + 5;

extern volatile __bit IRCF3 @ (((unsigned) &OSCCON)*8) + 6;

extern volatile __bit LATA0 @ (((unsigned) &LATA)*8) + 0;

extern volatile __bit LATA1 @ (((unsigned) &LATA)*8) + 1;

extern volatile __bit LATA2 @ (((unsigned) &LATA)*8) + 2;

extern volatile __bit LATA4 @ (((unsigned) &LATA)*8) + 4;

extern volatile __bit LATA5 @ (((unsigned) &LATA)*8) + 5;

extern volatile __bit LATB4 @ (((unsigned) &LATB)*8) + 4;

extern volatile __bit LATB5 @ (((unsigned) &LATB)*8) + 5;

extern volatile __bit LATB6 @ (((unsigned) &LATB)*8) + 6;

extern volatile __bit LATB7 @ (((unsigned) &LATB)*8) + 7;

extern volatile __bit LATC0 @ (((unsigned) &LATC)*8) + 0;

extern volatile __bit LATC1 @ (((unsigned) &LATC)*8) + 1;

extern volatile __bit LATC2 @ (((unsigned) &LATC)*8) + 2;

extern volatile __bit LATC3 @ (((unsigned) &LATC)*8) + 3;

extern volatile __bit LATC4 @ (((unsigned) &LATC)*8) + 4;

extern volatile __bit LATC5 @ (((unsigned) &LATC)*8) + 5;

extern volatile __bit LATC6 @ (((unsigned) &LATC)*8) + 6;

extern volatile __bit LATC7 @ (((unsigned) &LATC)*8) + 7;

extern volatile __bit LFIOFR @ (((unsigned) &OSCSTAT)*8) + 1;

extern volatile __bit LWLO @ (((unsigned) &EECON1)*8) + 5;

extern volatile __bit MC1OUT @ (((unsigned) &CMOUT)*8) + 0;

extern volatile __bit MC2OUT @ (((unsigned) &CMOUT)*8) + 1;

extern volatile __bit MDBIT @ (((unsigned) &MDCON)*8) + 0;

extern volatile __bit MDCH0 @ (((unsigned) &MDCARH)*8) + 0;

extern volatile __bit MDCH1 @ (((unsigned) &MDCARH)*8) + 1;

extern volatile __bit MDCH2 @ (((unsigned) &MDCARH)*8) + 2;

extern volatile __bit MDCH3 @ (((unsigned) &MDCARH)*8) + 3;

extern volatile __bit MDCHODIS @ (((unsigned) &MDCARH)*8) + 7;

extern volatile __bit MDCHPOL @ (((unsigned) &MDCARH)*8) + 6;

extern volatile __bit MDCHSYNC @ (((unsigned) &MDCARH)*8) + 5;

extern volatile __bit MDCL0 @ (((unsigned) &MDCARL)*8) + 0;

extern volatile __bit MDCL1 @ (((unsigned) &MDCARL)*8) + 1;

extern volatile __bit MDCL2 @ (((unsigned) &MDCARL)*8) + 2;

extern volatile __bit MDCL3 @ (((unsigned) &MDCARL)*8) + 3;

extern volatile __bit MDCLODIS @ (((unsigned) &MDCARL)*8) + 7;

extern volatile __bit MDCLPOL @ (((unsigned) &MDCARL)*8) + 6;

extern volatile __bit MDCLSYNC @ (((unsigned) &MDCARL)*8) + 5;

extern volatile __bit MDEN @ (((unsigned) &MDCON)*8) + 7;

extern volatile __bit MDMS0 @ (((unsigned) &MDSRC)*8) + 0;

extern volatile __bit MDMS1 @ (((unsigned) &MDSRC)*8) + 1;

extern volatile __bit MDMS2 @ (((unsigned) &MDSRC)*8) + 2;

extern volatile __bit MDMS3 @ (((unsigned) &MDSRC)*8) + 3;

extern volatile __bit MDMSODIS @ (((unsigned) &MDSRC)*8) + 7;

extern volatile __bit MDOE @ (((unsigned) &MDCON)*8) + 6;

extern volatile __bit MDOPOL @ (((unsigned) &MDCON)*8) + 4;

extern volatile __bit MDOUT @ (((unsigned) &MDCON)*8) + 3;

extern volatile __bit MDSLR @ (((unsigned) &MDCON)*8) + 5;

extern volatile __bit MFIOFR @ (((unsigned) &OSCSTAT)*8) + 2;

extern volatile __bit OERR @ (((unsigned) &RCSTA)*8) + 1;

extern volatile __bit OSFIE @ (((unsigned) &PIE2)*8) + 7;

extern volatile __bit OSFIF @ (((unsigned) &PIR2)*8) + 7;

extern volatile __bit OSTS @ (((unsigned) &OSCSTAT)*8) + 5;

extern volatile __bit P1CSEL @ (((unsigned) &APFCON1)*8) + 2;

extern volatile __bit P1DC0 @ (((unsigned) &PWM1CON)*8) + 0;

extern volatile __bit P1DC1 @ (((unsigned) &PWM1CON)*8) + 1;

extern volatile __bit P1DC2 @ (((unsigned) &PWM1CON)*8) + 2;

extern volatile __bit P1DC3 @ (((unsigned) &PWM1CON)*8) + 3;

extern volatile __bit P1DC4 @ (((unsigned) &PWM1CON)*8) + 4;

extern volatile __bit P1DC5 @ (((unsigned) &PWM1CON)*8) + 5;

extern volatile __bit P1DC6 @ (((unsigned) &PWM1CON)*8) + 6;

extern volatile __bit P1DSEL @ (((unsigned) &APFCON1)*8) + 3;

extern volatile __bit P1M0 @ (((unsigned) &CCP1CON)*8) + 6;

extern volatile __bit P1M1 @ (((unsigned) &CCP1CON)*8) + 7;

extern volatile __bit P1RSEN @ (((unsigned) &PWM1CON)*8) + 7;

extern volatile __bit P2BSEL @ (((unsigned) &APFCON1)*8) + 1;

extern volatile __bit P2DC0 @ (((unsigned) &PWM2CON)*8) + 0;

extern volatile __bit P2DC1 @ (((unsigned) &PWM2CON)*8) + 1;

extern volatile __bit P2DC2 @ (((unsigned) &PWM2CON)*8) + 2;

extern volatile __bit P2DC3 @ (((unsigned) &PWM2CON)*8) + 3;

extern volatile __bit P2DC4 @ (((unsigned) &PWM2CON)*8) + 4;

extern volatile __bit P2DC5 @ (((unsigned) &PWM2CON)*8) + 5;

extern volatile __bit P2DC6 @ (((unsigned) &PWM2CON)*8) + 6;

extern volatile __bit P2M0 @ (((unsigned) &CCP2CON)*8) + 6;

extern volatile __bit P2M1 @ (((unsigned) &CCP2CON)*8) + 7;

extern volatile __bit P2RSEN @ (((unsigned) &PWM2CON)*8) + 7;

extern volatile __bit PEIE @ (((unsigned) &INTCON)*8) + 6;

extern volatile __bit PLLR @ (((unsigned) &OSCSTAT)*8) + 6;

extern volatile __bit PS0 @ (((unsigned) &OPTION_REG)*8) + 0;

extern volatile __bit PS1 @ (((unsigned) &OPTION_REG)*8) + 1;

extern volatile __bit PS2 @ (((unsigned) &OPTION_REG)*8) + 2;

extern volatile __bit PSA @ (((unsigned) &OPTION_REG)*8) + 3;

extern volatile __bit PSS1AC0 @ (((unsigned) &CCP1AS)*8) + 2;

extern volatile __bit PSS1AC1 @ (((unsigned) &CCP1AS)*8) + 3;

extern volatile __bit PSS1BD0 @ (((unsigned) &CCP1AS)*8) + 0;

extern volatile __bit PSS1BD1 @ (((unsigned) &CCP1AS)*8) + 1;

extern volatile __bit PSS2AC0 @ (((unsigned) &CCP2AS)*8) + 2;

extern volatile __bit PSS2AC1 @ (((unsigned) &CCP2AS)*8) + 3;

extern volatile __bit PSS2BD0 @ (((unsigned) &CCP2AS)*8) + 0;

extern volatile __bit PSS2BD1 @ (((unsigned) &CCP2AS)*8) + 1;

extern volatile __bit RA0 @ (((unsigned) &PORTA)*8) + 0;

extern volatile __bit RA1 @ (((unsigned) &PORTA)*8) + 1;

extern volatile __bit RA2 @ (((unsigned) &PORTA)*8) + 2;

extern volatile __bit RA3 @ (((unsigned) &PORTA)*8) + 3;

extern volatile __bit RA4 @ (((unsigned) &PORTA)*8) + 4;

extern volatile __bit RA5 @ (((unsigned) &PORTA)*8) + 5;

extern volatile __bit RB4 @ (((unsigned) &PORTB)*8) + 4;

extern volatile __bit RB5 @ (((unsigned) &PORTB)*8) + 5;

extern volatile __bit RB6 @ (((unsigned) &PORTB)*8) + 6;

extern volatile __bit RB7 @ (((unsigned) &PORTB)*8) + 7;

extern volatile __bit RC0 @ (((unsigned) &PORTC)*8) + 0;

extern volatile __bit RC1 @ (((unsigned) &PORTC)*8) + 1;

extern volatile __bit RC2 @ (((unsigned) &PORTC)*8) + 2;

extern volatile __bit RC3 @ (((unsigned) &PORTC)*8) + 3;

extern volatile __bit RC4 @ (((unsigned) &PORTC)*8) + 4;

extern volatile __bit RC5 @ (((unsigned) &PORTC)*8) + 5;

extern volatile __bit RC6 @ (((unsigned) &PORTC)*8) + 6;

extern volatile __bit RC7 @ (((unsigned) &PORTC)*8) + 7;

extern volatile __bit RCIDL @ (((unsigned) &BAUDCON)*8) + 6;

extern volatile __bit RCIE @ (((unsigned) &PIE1)*8) + 5;

extern volatile __bit RCIF @ (((unsigned) &PIR1)*8) + 5;

extern volatile __bit RD @ (((unsigned) &EECON1)*8) + 0;

extern volatile __bit RX9 @ (((unsigned) &RCSTA)*8) + 6;

extern volatile __bit RX9D @ (((unsigned) &RCSTA)*8) + 0;

extern volatile __bit RXDTSEL @ (((unsigned) &APFCON0)*8) + 7;

extern volatile __bit SBOREN @ (((unsigned) &BORCON)*8) + 7;

extern volatile __bit SCKP @ (((unsigned) &BAUDCON)*8) + 4;

extern volatile __bit SCS0 @ (((unsigned) &OSCCON)*8) + 0;

extern volatile __bit SCS1 @ (((unsigned) &OSCCON)*8) + 1;

extern volatile __bit SDO2SEL @ (((unsigned) &APFCON1)*8) + 5;

extern volatile __bit SENDB @ (((unsigned) &TXSTA)*8) + 3;

extern volatile __bit SPEN @ (((unsigned) &RCSTA)*8) + 7;

extern volatile __bit SPLLEN @ (((unsigned) &OSCCON)*8) + 7;

extern volatile __bit SRCLK0 @ (((unsigned) &SRCON0)*8) + 4;

extern volatile __bit SRCLK1 @ (((unsigned) &SRCON0)*8) + 5;

extern volatile __bit SRCLK2 @ (((unsigned) &SRCON0)*8) + 6;

extern volatile __bit SREN @ (((unsigned) &RCSTA)*8) + 5;

extern volatile __bit SRLEN @ (((unsigned) &SRCON0)*8) + 7;

extern volatile __bit SRNQEN @ (((unsigned) &SRCON0)*8) + 2;

extern volatile __bit SRPR @ (((unsigned) &SRCON0)*8) + 0;

extern volatile __bit SRPS @ (((unsigned) &SRCON0)*8) + 1;

extern volatile __bit SRQEN @ (((unsigned) &SRCON0)*8) + 3;

extern volatile __bit SRRC1E @ (((unsigned) &SRCON1)*8) + 0;

extern volatile __bit SRRC2E @ (((unsigned) &SRCON1)*8) + 1;

extern volatile __bit SRRCKE @ (((unsigned) &SRCON1)*8) + 2;

extern volatile __bit SRRPE @ (((unsigned) &SRCON1)*8) + 3;

extern volatile __bit SRSC1E @ (((unsigned) &SRCON1)*8) + 4;

extern volatile __bit SRSC2E @ (((unsigned) &SRCON1)*8) + 5;

extern volatile __bit SRSCKE @ (((unsigned) &SRCON1)*8) + 6;

extern volatile __bit SRSPE @ (((unsigned) &SRCON1)*8) + 7;

extern volatile __bit SS2SEL @ (((unsigned) &APFCON1)*8) + 4;

extern volatile __bit SSP1IE @ (((unsigned) &PIE1)*8) + 3;

extern volatile __bit SSP1IF @ (((unsigned) &PIR1)*8) + 3;

extern volatile __bit SSP2IE @ (((unsigned) &PIE4)*8) + 0;

extern volatile __bit SSP2IF @ (((unsigned) &PIR4)*8) + 0;

extern volatile __bit STKOVF @ (((unsigned) &PCON)*8) + 7;

extern volatile __bit STKUNF @ (((unsigned) &PCON)*8) + 6;

extern volatile __bit STR1A @ (((unsigned) &PSTR1CON)*8) + 0;

extern volatile __bit STR1B @ (((unsigned) &PSTR1CON)*8) + 1;

extern volatile __bit STR1C @ (((unsigned) &PSTR1CON)*8) + 2;

extern volatile __bit STR1D @ (((unsigned) &PSTR1CON)*8) + 3;

extern volatile __bit STR1SYNC @ (((unsigned) &PSTR1CON)*8) + 4;

extern volatile __bit STR2A @ (((unsigned) &PSTR2CON)*8) + 0;

extern volatile __bit STR2B @ (((unsigned) &PSTR2CON)*8) + 1;

extern volatile __bit STR2C @ (((unsigned) &PSTR2CON)*8) + 2;

extern volatile __bit STR2D @ (((unsigned) &PSTR2CON)*8) + 3;

extern volatile __bit STR2SYNC @ (((unsigned) &PSTR2CON)*8) + 4;

extern volatile __bit SWDTEN @ (((unsigned) &WDTCON)*8) + 0;

extern volatile __bit SYNC @ (((unsigned) &TXSTA)*8) + 4;

extern volatile __bit T0CS @ (((unsigned) &OPTION_REG)*8) + 5;

extern volatile __bit T0IE @ (((unsigned) &INTCON)*8) + 5;

extern volatile __bit T0IF @ (((unsigned) &INTCON)*8) + 2;

extern volatile __bit T0SE @ (((unsigned) &OPTION_REG)*8) + 4;

extern volatile __bit T0XCS @ (((unsigned) &CPSCON0)*8) + 0;

extern volatile __bit T1CKPS0 @ (((unsigned) &T1CON)*8) + 4;

extern volatile __bit T1CKPS1 @ (((unsigned) &T1CON)*8) + 5;

extern volatile __bit T1GGO @ (((unsigned) &T1GCON)*8) + 3;

extern volatile __bit T1GPOL @ (((unsigned) &T1GCON)*8) + 6;

extern volatile __bit T1GSEL @ (((unsigned) &APFCON0)*8) + 3;

extern volatile __bit T1GSPM @ (((unsigned) &T1GCON)*8) + 4;

extern volatile __bit T1GSS0 @ (((unsigned) &T1GCON)*8) + 0;

extern volatile __bit T1GSS1 @ (((unsigned) &T1GCON)*8) + 1;

extern volatile __bit T1GTM @ (((unsigned) &T1GCON)*8) + 5;

extern volatile __bit T1GVAL @ (((unsigned) &T1GCON)*8) + 2;

extern volatile __bit T1OSCEN @ (((unsigned) &T1CON)*8) + 3;

extern volatile __bit T1OSCR @ (((unsigned) &OSCSTAT)*8) + 7;

extern volatile __bit T2CKPS0 @ (((unsigned) &T2CON)*8) + 0;

extern volatile __bit T2CKPS1 @ (((unsigned) &T2CON)*8) + 1;

extern volatile __bit T2OUTPS0 @ (((unsigned) &T2CON)*8) + 3;

extern volatile __bit T2OUTPS1 @ (((unsigned) &T2CON)*8) + 4;

extern volatile __bit T2OUTPS2 @ (((unsigned) &T2CON)*8) + 5;

extern volatile __bit T2OUTPS3 @ (((unsigned) &T2CON)*8) + 6;

extern volatile __bit T4CKPS0 @ (((unsigned) &T4CON)*8) + 0;

extern volatile __bit T4CKPS1 @ (((unsigned) &T4CON)*8) + 1;

extern volatile __bit T4OUTPS0 @ (((unsigned) &T4CON)*8) + 3;

extern volatile __bit T4OUTPS1 @ (((unsigned) &T4CON)*8) + 4;

extern volatile __bit T4OUTPS2 @ (((unsigned) &T4CON)*8) + 5;

extern volatile __bit T4OUTPS3 @ (((unsigned) &T4CON)*8) + 6;

extern volatile __bit T6CKPS0 @ (((unsigned) &T6CON)*8) + 0;

extern volatile __bit T6CKPS1 @ (((unsigned) &T6CON)*8) + 1;

extern volatile __bit T6OUTPS0 @ (((unsigned) &T6CON)*8) + 3;

extern volatile __bit T6OUTPS1 @ (((unsigned) &T6CON)*8) + 4;

extern volatile __bit T6OUTPS2 @ (((unsigned) &T6CON)*8) + 5;

extern volatile __bit T6OUTPS3 @ (((unsigned) &T6CON)*8) + 6;

extern volatile __bit TMR0CS @ (((unsigned) &OPTION_REG)*8) + 5;

extern volatile __bit TMR0IE @ (((unsigned) &INTCON)*8) + 5;

extern volatile __bit TMR0IF @ (((unsigned) &INTCON)*8) + 2;

extern volatile __bit TMR0SE @ (((unsigned) &OPTION_REG)*8) + 4;

extern volatile __bit TMR1CS0 @ (((unsigned) &T1CON)*8) + 6;

extern volatile __bit TMR1CS1 @ (((unsigned) &T1CON)*8) + 7;

extern volatile __bit TMR1GE @ (((unsigned) &T1GCON)*8) + 7;

extern volatile __bit TMR1GIE @ (((unsigned) &PIE1)*8) + 7;

extern volatile __bit TMR1GIF @ (((unsigned) &PIR1)*8) + 7;

extern volatile __bit TMR1IE @ (((unsigned) &PIE1)*8) + 0;

extern volatile __bit TMR1IF @ (((unsigned) &PIR1)*8) + 0;

extern volatile __bit TMR1ON @ (((unsigned) &T1CON)*8) + 0;

extern volatile __bit TMR2IE @ (((unsigned) &PIE1)*8) + 1;

extern volatile __bit TMR2IF @ (((unsigned) &PIR1)*8) + 1;

extern volatile __bit TMR2ON @ (((unsigned) &T2CON)*8) + 2;

extern volatile __bit TMR4IE @ (((unsigned) &PIE3)*8) + 1;

extern volatile __bit TMR4IF @ (((unsigned) &PIR3)*8) + 1;

extern volatile __bit TMR4ON @ (((unsigned) &T4CON)*8) + 2;

extern volatile __bit TMR6IE @ (((unsigned) &PIE3)*8) + 3;

extern volatile __bit TMR6IF @ (((unsigned) &PIR3)*8) + 3;

extern volatile __bit TMR6ON @ (((unsigned) &T6CON)*8) + 2;

extern volatile __bit TRISA0 @ (((unsigned) &TRISA)*8) + 0;

extern volatile __bit TRISA1 @ (((unsigned) &TRISA)*8) + 1;

extern volatile __bit TRISA2 @ (((unsigned) &TRISA)*8) + 2;

extern volatile __bit TRISA3 @ (((unsigned) &TRISA)*8) + 3;

extern volatile __bit TRISA4 @ (((unsigned) &TRISA)*8) + 4;

extern volatile __bit TRISA5 @ (((unsigned) &TRISA)*8) + 5;

extern volatile __bit TRISB4 @ (((unsigned) &TRISB)*8) + 4;

extern volatile __bit TRISB5 @ (((unsigned) &TRISB)*8) + 5;

extern volatile __bit TRISB6 @ (((unsigned) &TRISB)*8) + 6;

extern volatile __bit TRISB7 @ (((unsigned) &TRISB)*8) + 7;

extern volatile __bit TRISC0 @ (((unsigned) &TRISC)*8) + 0;

extern volatile __bit TRISC1 @ (((unsigned) &TRISC)*8) + 1;

extern volatile __bit TRISC2 @ (((unsigned) &TRISC)*8) + 2;

extern volatile __bit TRISC3 @ (((unsigned) &TRISC)*8) + 3;

extern volatile __bit TRISC4 @ (((unsigned) &TRISC)*8) + 4;

extern volatile __bit TRISC5 @ (((unsigned) &TRISC)*8) + 5;

extern volatile __bit TRISC6 @ (((unsigned) &TRISC)*8) + 6;

extern volatile __bit TRISC7 @ (((unsigned) &TRISC)*8) + 7;

extern volatile __bit TRMT @ (((unsigned) &TXSTA)*8) + 1;

extern volatile __bit TSEN @ (((unsigned) &FVRCON)*8) + 5;

extern volatile __bit TSRNG @ (((unsigned) &FVRCON)*8) + 4;

extern volatile __bit TUN0 @ (((unsigned) &OSCTUNE)*8) + 0;

extern volatile __bit TUN1 @ (((unsigned) &OSCTUNE)*8) + 1;

extern volatile __bit TUN2 @ (((unsigned) &OSCTUNE)*8) + 2;

extern volatile __bit TUN3 @ (((unsigned) &OSCTUNE)*8) + 3;

extern volatile __bit TUN4 @ (((unsigned) &OSCTUNE)*8) + 4;

extern volatile __bit TUN5 @ (((unsigned) &OSCTUNE)*8) + 5;

extern volatile __bit TX9 @ (((unsigned) &TXSTA)*8) + 6;

extern volatile __bit TX9D @ (((unsigned) &TXSTA)*8) + 0;

extern volatile __bit TXCKSEL @ (((unsigned) &APFCON0)*8) + 2;

extern volatile __bit TXEN @ (((unsigned) &TXSTA)*8) + 5;

extern volatile __bit TXIE @ (((unsigned) &PIE1)*8) + 4;

extern volatile __bit TXIF @ (((unsigned) &PIR1)*8) + 4;

extern volatile __bit WDTPS0 @ (((unsigned) &WDTCON)*8) + 1;

extern volatile __bit WDTPS1 @ (((unsigned) &WDTCON)*8) + 2;

extern volatile __bit WDTPS2 @ (((unsigned) &WDTCON)*8) + 3;

extern volatile __bit WDTPS3 @ (((unsigned) &WDTCON)*8) + 4;

extern volatile __bit WDTPS4 @ (((unsigned) &WDTCON)*8) + 5;

extern volatile __bit WPUA0 @ (((unsigned) &WPUA)*8) + 0;

extern volatile __bit WPUA1 @ (((unsigned) &WPUA)*8) + 1;

extern volatile __bit WPUA2 @ (((unsigned) &WPUA)*8) + 2;

extern volatile __bit WPUA3 @ (((unsigned) &WPUA)*8) + 3;

extern volatile __bit WPUA4 @ (((unsigned) &WPUA)*8) + 4;

extern volatile __bit WPUA5 @ (((unsigned) &WPUA)*8) + 5;

extern volatile __bit WPUB4 @ (((unsigned) &WPUB)*8) + 4;

extern volatile __bit WPUB5 @ (((unsigned) &WPUB)*8) + 5;

extern volatile __bit WPUB6 @ (((unsigned) &WPUB)*8) + 6;

extern volatile __bit WPUB7 @ (((unsigned) &WPUB)*8) + 7;

extern volatile __bit WPUC0 @ (((unsigned) &WPUC)*8) + 0;

extern volatile __bit WPUC1 @ (((unsigned) &WPUC)*8) + 1;

extern volatile __bit WPUC2 @ (((unsigned) &WPUC)*8) + 2;

extern volatile __bit WPUC3 @ (((unsigned) &WPUC)*8) + 3;

extern volatile __bit WPUC4 @ (((unsigned) &WPUC)*8) + 4;

extern volatile __bit WPUC5 @ (((unsigned) &WPUC)*8) + 5;

extern volatile __bit WPUC6 @ (((unsigned) &WPUC)*8) + 6;

extern volatile __bit WPUC7 @ (((unsigned) &WPUC)*8) + 7;

extern volatile __bit WR @ (((unsigned) &EECON1)*8) + 1;

extern volatile __bit WREN @ (((unsigned) &EECON1)*8) + 2;

extern volatile __bit WRERR @ (((unsigned) &EECON1)*8) + 3;

extern volatile __bit WUE @ (((unsigned) &BAUDCON)*8) + 1;

extern volatile __bit ZERO @ (((unsigned) &STATUS)*8) + 2;

extern volatile __bit Z_SHAD @ (((unsigned) &STATUS_SHAD)*8) + 2;

extern volatile __bit nBOR @ (((unsigned) &PCON)*8) + 0;

extern volatile __bit nPD @ (((unsigned) &STATUS)*8) + 3;

extern volatile __bit nPOR @ (((unsigned) &PCON)*8) + 1;

extern volatile __bit nRI @ (((unsigned) &PCON)*8) + 2;

extern volatile __bit nRMCLR @ (((unsigned) &PCON)*8) + 3;

extern volatile __bit nT1SYNC @ (((unsigned) &T1CON)*8) + 2;

extern volatile __bit nTO @ (((unsigned) &STATUS)*8) + 4;

extern volatile __bit nWPUEN @ (((unsigned) &OPTION_REG)*8) + 7;


# 27 "C:\Program Files\Microchip\xc8\v1.12\include\pic.h"
#pragma intrinsic(_nop)
extern void _nop(void);

# 77
extern unsigned int flash_read(unsigned short addr);

# 41 "C:\Program Files\Microchip\xc8\v1.12\include\eeprom_routines.h"
extern void eeprom_write(unsigned char addr, unsigned char value);
extern unsigned char eeprom_read(unsigned char addr);
extern void eecpymem(volatile unsigned char *to, __eeprom unsigned char *from, unsigned char size);
extern void memcpyee(__eeprom unsigned char *to, const unsigned char *from, unsigned char size);


# 150 "C:\Program Files\Microchip\xc8\v1.12\include\pic.h"
#pragma intrinsic(_delay)
extern void _delay(unsigned long);


# 10 "BT_FreqAnalizer.c"
#pragma config FOSC = INTOSC
#pragma config WDTE = OFF
#pragma config PWRTE = ON
#pragma config MCLRE = ON
#pragma config CP = OFF
#pragma config CPD = OFF
#pragma config BOREN = ON
#pragma config CLKOUTEN = OFF
#pragma config IESO = OFF
#pragma config FCMEN = OFF

#pragma config WRT = OFF
#pragma config PLLEN = ON
#pragma config STVREN = OFF
#pragma config BORV = LO
#pragma config LVP = OFF

# 34
unsigned char msg1[] = "$$$";
unsigned char msg2[] = "SF,1\r\n";
unsigned char msg3[] = "SN,Analyzer\r\n";
unsigned char msg4[] = "R,1\r\n";

union{
unsigned long Freq;
unsigned int iFreq[2];
unsigned char cFreq[4];
}ddsFreq;
unsigned long oldFreq;
unsigned char State, Flag;
unsigned char RcvBuf[64];
unsigned char SndBuf[64];
int Index, i, j;

void Send(unsigned char Data);
void setFreq(long freq);
void spi_send(unsigned int data);
void Delayms( unsigned int t);
void Process(void);
void SendStr(unsigned char * str);
void SendCmd(unsigned char *cmd);


void main(void){

OSCCON = 0xF0;

LATCbits.LATC6 = 1;
LATAbits.LATA5 = 1;

APFCON0 = 0x84;
ANSELA = 0x00;
ANSELB = 0x00;
ANSELC = 0x04;
TRISA = 0x0F;
TRISB = 0x00;
TRISC = 0x24;
WPUA = 0x04;
OPTION_REGbits.nWPUEN = 0;

LATCbits.LATC1 = 0;
Delayms(200);
LATCbits.LATC1 = 1;

TXSTA = 0x24;
RCSTA = 0x90;
BAUDCON=0x08;
SPBRGH = 0;
SPBRGL = 68;
PIR1bits.RCIF = 0;
PIE1bits.RCIE = 1;

ADCON0 = 0;
ADCON1 = 0xA0;

ddsFreq.Freq = 1000;
oldFreq = 0;
spi_send(0x07FF);
spi_send(0x1000);
spi_send(0x2000);
spi_send(0x3000);
spi_send(0x4000);
setFreq(1000);
Index = 0;
Flag = 0;
State = 0;

INTCONbits.PEIE = 1;
INTCONbits.GIE = 1;


while(1) {
switch(State){
case 0:

if(PORTAbits.RA2 == 0){
Delayms(1000);
SendCmd(msg1);
Delayms(1000);
SendCmd(msg2);
SendCmd(msg3);
SendCmd(msg4);
}
State = 1;
break;
case 1:
Delayms(1000);
Index = 0;
State = 2;
break;
case 2:

if((Flag == 1) && (RcvBuf[0] == 'S')) {
LATBbits.LATB6 ^= 1;
SndBuf[0] = 'M';
SndBuf[1] = RcvBuf[1];
Process();
Index = 0;
Flag = 0;
}
break;
default:
break;
}
}
}

# 147
void Process(void){


switch(RcvBuf[1]){
unsigned int temp;

case 'T':
SndBuf[2] = 'O';
SndBuf[3] = 'K';
SndBuf[4] = 'E';
SendStr(SndBuf);
break;

case 'N':

for(i=0; i<4; i++)
ddsFreq.cFreq[i] = RcvBuf[i+2];
if(ddsFreq.Freq != oldFreq)
setFreq(ddsFreq.Freq);
oldFreq = ddsFreq.Freq;

Delayms(100);

temp = 0;
for(i=0; i<10; i++){
ADCON0 = 0x19;
ADCON0bits.GO = 1;
while(ADCON0bits.GO);
temp = temp + ADRESH*256 + ADRESL;
Delayms(2);
}
SndBuf[2] = (temp/10) % 256;
SndBuf[3] = (temp/10) / 256;
SndBuf[4] = 'E';
SendStr(SndBuf);
break;

default:
break;
}

}

# 193
void interrupt isr(void){
unsigned char data;

if(PIR1bits.RCIF){
PIR1bits.RCIF = 0;
if((RCSTAbits.OERR) || (RCSTAbits.FERR)){
RCSTA = 0;
RCSTA = 0x90;
}
else{
if((State > 1)&&(Index<64)){
RcvBuf[Index++] = RCREG;
if(Index >= 64)
Flag = 1;
}
else
data = RCREG;
}
}
}

# 216
void Send(unsigned char Data){
while(!TXSTAbits.TRMT);
TXREG = Data;
}

# 223
void SendStr(unsigned char * str){
LATBbits.LATB4 ^= 1;
for(i= 0; i<64; i++)
Send(*str++);
}

# 232
void SendCmd(unsigned char *cmd){
while(*cmd != 0)
Send(*cmd++);
Delayms(1000);
}

# 263
void setFreq(long freq){
float temp;
union{
unsigned long para;
unsigned int ipara[2];
}DDSpara;


temp = (0.3496 * (float)freq);
DDSpara.para = (long)temp << 4;

LATAbits.LATA5 = 1;
spi_send(0x07FF);
spi_send(0xC000 | ((DDSpara.ipara[0]>>4) & 0x0FFF));
spi_send(0xD000 | (DDSpara.ipara[1] & 0x0FFF));
LATAbits.LATA5 = 0;
LATAbits.LATA5 = 1;
}

# 285
void spi_send(unsigned int data){
unsigned int mask;

LATCbits.LATC6 = 0;
LATCbits.LATC3 = 1;
mask = 0x8000;
for(i=0; i<16; i++){
if((data & mask) != 0)
LATAbits.LATA4 = 1;
else
LATAbits.LATA4 = 0;
LATCbits.LATC3 = 0;
LATCbits.LATC3 = 0;
LATCbits.LATC3 = 1;
mask = mask >>1;
}
LATCbits.LATC6 = 1;
}

# 306
void Delayms( unsigned int t){
PIR1bits.TMR2IF = 0;
PR2 = 125;
T2CON = 0x07;
while (t--) {
while (!PIR1bits.TMR2IF);
PIR1bits.TMR2IF = 0;
}
}

