Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

introduction to PIC 18

Status
Not open for further replies.

gopintj

Member level 4
Joined
Sep 1, 2010
Messages
77
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,298
Location
Thirukalukalukundra, Kanchipuram, Tamilnadu, India
Activity points
1,953
hi, i am now trying pic 18 series microcontroller for better understanding about them. I am in need of some sample program codes and would like to pursue the knowledge of microcontroller with the help of it.
Please provide me some example programs and hence it will be very useful for me to get knowledge about it.
I use HIGH TECH C PICC 18 compiler.
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,349
Reputation
4,692
Reaction score
2,275
Trophy points
1,413
Location
Southwest, USA
Activity points
62,377

engshahrul

Banned
Joined
Apr 27, 2009
Messages
330
Helped
98
Reputation
196
Reaction score
94
Trophy points
1,308
Location
Malaysia
Activity points
0
See this example code for PIC18F4550 using Hi-Tech. **broken link removed**.
 

gopintj

Member level 4
Joined
Sep 1, 2010
Messages
77
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,298
Location
Thirukalukalukundra, Kanchipuram, Tamilnadu, India
Activity points
1,953
thank you bigdog and engshahrul.

Could you please explain me what the below codes?
I used this config operation for my pic 16 as __CONFIG(0x1932)


__CONFIG(1,0x0200);
__CONFIG(2,0X1E1F);
__CONFIG(3,0X8100);
__CONFIG(4,0X00C1);
__CONFIG(5,0XC00F);

could anyone please explain me what are the above codes.?
 

Tahmid

Advanced Member level 5
Joined
Jun 17, 2008
Messages
4,758
Helped
1,792
Reputation
3,576
Reaction score
1,651
Trophy points
1,393
Location
Silicon Valley, California, USA (from Dhaka, Bangl
Activity points
30,543
If you studied the datasheet, you would know that the PIC18 has multiple configuration words, whereas PIC16 had one.
You are defining 1st, 2nd, 3rd, 4th and 5th configuration words.
Here:
Code:
__CONFIG(1,0x0200);
You are writing to 1st configuration word. The value written is 0x0200.
Likewise:
Code:
__CONFIG(4,0X00C1);
You are writing to 4th configuration word. The value written is 0x00C1.

Hope this helps.
Tahmid.

---------- Post added at 22:50 ---------- Previous post was at 22:47 ----------

The first configuration word is made up of 2 registers: CONFIG1H and CONFIG1L. Similarly CONFIG4H and CONFIG4L make up the 4th configuration word.

Here is the table from the 18F4550 datasheet. You can see the registers here. For more detail, refer to the datasheet.



Hope this helps.
Tahmid.
 

gopintj

Member level 4
Joined
Sep 1, 2010
Messages
77
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,298
Location
Thirukalukalukundra, Kanchipuram, Tamilnadu, India
Activity points
1,953
At last I found the correct solution by the help of you.

Now, i got struck up due to some unknown warning.
Here is the code from where i get that warning "variable "_RB0" is deprecated (declared at C:\Program Files\HI-TECH Software\PICC-18\9.80\include\pic18f6520.h:4614)"

Here is my program

#include<htc.h>
#include"delay.c"
__PROG_CONFIG(1,0x0200);
__PROG_CONFIG(2,0x000F);
__PROG_CONFIG(3,0x0003);
__PROG_CONFIG(4,0x0005);
void main()
{
TRISB=0x00;
PORTB=0x00;
while(1)
{
RB0=1;
DelayBigMs(200);
RB0=0;
DelayBigMs(200);
}
}

Please suggest me an idea.
 

engshahrul

Banned
Joined
Apr 27, 2009
Messages
330
Helped
98
Reputation
196
Reaction score
94
Trophy points
1,308
Location
Malaysia
Activity points
0
At last I found the correct solution by the help of you.

Now, i got struck up due to some unknown warning.
Here is the code from where i get that warning "variable "_RB0" is deprecated (declared at C:\Program Files\HI-TECH Software\PICC-18\9.80\include\pic18f6520.h:4614)"

Here is my program

#include<htc.h>
#include"delay.c"
__PROG_CONFIG(1,0x0200);
__PROG_CONFIG(2,0x000F);
__PROG_CONFIG(3,0x0003);
__PROG_CONFIG(4,0x0005);
void main()
{
TRISB=0x00;
PORTB=0x00;
while(1)
{
RB0=1;
DelayBigMs(200);
RB0=0;
DelayBigMs(200);
}
}

Please suggest me an idea.
Maybe you need to put #include<pic18.h>
 

bigdogguru

Administrator
Joined
Mar 12, 2010
Messages
9,831
Helped
2,349
Reputation
4,692
Reaction score
2,275
Trophy points
1,413
Location
Southwest, USA
Activity points
62,377
Maybe you need to put #include<pic18.h>

It is not necessary to include any device specific header file. The header file "htc.h" includes all the necessary device specific header files from the "Configure"->"Select Device..." setting in the MPLAB IDE.

Here is the code from where i get that warning "variable "_RB0" is deprecated (declared at C:\Program Files\HI-TECH Software\PICC-18\9.80\include\pic18f6520.h:4614)"

Microchip recommends writing to the PORT Latch rather than directly to the PORT itself. The warning message is alerting you to this fact and it is why the RB0 is referred to as "deprecated."

When assigning a value to any PORT or PORT pin in the PIC18 family, assign it to the PORT Latch instead:

Original Code:

Code:
#include<htc.h>
#include"delay.c"
__PROG_CONFIG(1,0x0200);
__PROG_CONFIG(2,0x000F);
__PROG_CONFIG(3,0x0003);
__PROG_CONFIG(4,0x0005);
void main()
{
	TRISB=0x00;
	PORTB=0x00;
	while(1)
	{
		RB0=1;
		DelayBigMs(200);
		RB0=0;
		DelayBigMs(200);
	}
}

New Method:

Code:
#include<htc.h>
#include"delay.c"
__PROG_CONFIG(1,0x0200);
__PROG_CONFIG(2,0x000F);
__PROG_CONFIG(3,0x0003);
__PROG_CONFIG(4,0x0005);
void main()
{
	TRISB=0x00;
	[COLOR="#FF0000"]LATB[/COLOR]=0x00;
	while(1)
	{
		[COLOR="#FF0000"]LATB0[/COLOR]=1;
		DelayBigMs(200);
		[COLOR="#FF0000"]LATB0[/COLOR]=0;
		DelayBigMs(200);
	}
}

You can find this and other definition in the device specific header file located in the "include" directory of the compiler installation directory. I would also recommend the you Bitwise AND the appropriate Configuration Register Bit Mask Definitions rather than use the numerical equivalent in the codes CONFIG statements.

Example:
Code:
__CONFIG(4,DEBUGEN & LVPDIS);
__CONFIG(6,WPB & UNPROTECT);

I usually add the appropriate device specific header file to the project workspace view, so that I can reference it as I code for a particular device's definitions.



Example, "pic18f4550.h"
Code:
#ifndef	_HTC_H_
#warning Header file pic18f4550.h included directly. Use #include <htc.h> instead.
#endif

 /* header file for the MICROCHIP PIC microcontroller
    18F4550
 */

#ifndef __PIC18F4550_H
#define __PIC18F4550_H

#include <peripheral/pconfig.h>

// Config Register: CONFIG1L
// PLL Prescaler Selection bits
// Divide by 12 (48 MHz oscillator input)
#define PLLDIV_12            0xFFF8 
// Divide by 10 (40 MHz oscillator input)
#define PLLDIV_10            0xFFF9 
// Divide by 6 (24 MHz oscillator input)
#define PLLDIV_6             0xFFFA 
// Divide by 5 (20 MHz oscillator input)
#define PLLDIV_5             0xFFFB 
// Divide by 4 (16 MHz oscillator input)
#define PLLDIV_4             0xFFFC 
// Divide by 3 (12 MHz oscillator input)
#define PLLDIV_3             0xFFFD 
// Divide by 2 (8 MHz oscillator input)
#define PLLDIV_2             0xFFFE 
// No prescale (4 MHz oscillator input drives PLL directly)
#define PLLDIV_1             0xFFFF 
// System Clock Postscaler Selection bits
// [Primary Oscillator Src: /4][96 MHz PLL Src: /6]
#define CPUDIV_OSC4_PLL6     0xFFE7 
// [Primary Oscillator Src: /3][96 MHz PLL Src: /4]
#define CPUDIV_OSC3_PLL4     0xFFEF 
// [Primary Oscillator Src: /2][96 MHz PLL Src: /3]
#define CPUDIV_OSC2_PLL3     0xFFF7 
// [Primary Oscillator Src: /1][96 MHz PLL Src: /2]
#define CPUDIV_OSC1_PLL2     0xFFFF 
// USB Clock Selection bit (used in Full-Speed USB mode only; UCFG:FSEN = 1)
// USB clock source comes from the 96 MHz PLL divided by 2
#define USBDIV_2             0xFFDF 
// USB clock source comes directly from the primary oscillator block with no postscale
#define USBDIV_1             0xFFFF 


// Config Register: CONFIG1H
// Oscillator Selection bits
// HS oscillator, PLL enabled (HSPLL)
#define FOSC_HSPLL_HS        0xF4FF 
// HS oscillator (HS)
#define FOSC_HS              0xF6FF 
// Internal oscillator, HS oscillator used by USB (INTHS)
#define FOSC_INTOSC_HS       0xF1FF 
// Internal oscillator, XT used by USB (INTXT)
#define FOSC_INTOSC_XT       0xF0FF 
// Internal oscillator, CLKO function on RA6, EC used by USB (INTCKO)
#define FOSC_INTOSC_EC       0xF3FF 
// Internal oscillator, port function on RA6, EC used by USB (INTIO)
#define FOSC_INTOSCIO_EC     0xF2FF 
// EC oscillator, PLL enabled, CLKO function on RA6 (ECPLL)
#define FOSC_ECPLL_EC        0xFDFF 
// EC oscillator, PLL enabled, port function on RA6 (ECPIO)
#define FOSC_ECPLLIO_EC      0xFCFF 
// EC oscillator, CLKO function on RA6 (EC)
#define FOSC_EC_EC           0xFFFF 
// EC oscillator, port function on RA6 (ECIO)
#define FOSC_ECIO_EC         0xFEFF 
// XT oscillator, PLL enabled (XTPLL)
#define FOSC_XTPLL_XT        0xF8FF 
// XT oscillator (XT)
#define FOSC_XT_XT           0xFAFF 
// Fail-Safe Clock Monitor Enable bit
// Fail-Safe Clock Monitor enabled
#define FCMEN_ON             0xBFFF 
// Fail-Safe Clock Monitor disabled
#define FCMEN_OFF            0xFFFF 
// Internal/External Oscillator Switchover bit
// Oscillator Switchover mode enabled
#define IESO_ON              0x7FFF 
// Oscillator Switchover mode disabled
#define IESO_OFF             0xFFFF 


// Config Register: CONFIG2L
// Power-up Timer Enable bit
// PWRT disabled
#define PWRT_OFF             0xFFFF 
// PWRT enabled
#define PWRT_ON              0xFFFE 
// Brown-out Reset Enable bits
// Brown-out Reset enabled in hardware only (SBOREN is disabled)
#define BOR_ON               0xFFFF 
// Brown-out Reset enabled in hardware only and disabled in Sleep mode (SBOREN is disabled)
#define BOR_ON_ACTIVE        0xFFFD 
// Brown-out Reset enabled and controlled by software (SBOREN is enabled)
#define BOR_SOFT             0xFFFB 
// Brown-out Reset disabled in hardware and software
#define BOR_OFF              0xFFF9 
// Brown-out Reset Voltage bits
// Minimum setting
#define BORV_3               0xFFFF 
#define BORV_2               0xFFF7 
#define BORV_1               0xFFEF 
// Maximum setting
#define BORV_0               0xFFE7 
// USB Voltage Regulator Enable bit
// USB voltage regulator enabled
#define VREGEN_ON            0xFFDF 
// USB voltage regulator disabled
#define VREGEN_OFF           0xFFFF 


// Config Register: CONFIG2H
// Watchdog Timer Enable bit
// WDT enabled
#define WDT_ON               0xFFFF 
// WDT disabled (control is placed on the SWDTEN bit)
#define WDT_OFF              0xFEFF 
// Watchdog Timer Postscale Select bits
// 1:32768
#define WDTPS_32768          0xFFFF 
// 1:16384
#define WDTPS_16384          0xFDFF 
// 1:8192
#define WDTPS_8192           0xFBFF 
// 1:4096
#define WDTPS_4096           0xF9FF 
// 1:2048
#define WDTPS_2048           0xF7FF 
// 1:1024
#define WDTPS_1024           0xF5FF 
// 1:512
#define WDTPS_512            0xF3FF 
// 1:256
#define WDTPS_256            0xF1FF 
// 1:128
#define WDTPS_128            0xEFFF 
// 1:64
#define WDTPS_64             0xEDFF 
// 1:32
#define WDTPS_32             0xEBFF 
// 1:16
#define WDTPS_16             0xE9FF 
// 1:8
#define WDTPS_8              0xE7FF 
// 1:4
#define WDTPS_4              0xE5FF 
// 1:2
#define WDTPS_2              0xE3FF 
// 1:1
#define WDTPS_1              0xE1FF 


// Config Register: CONFIG3H
// CCP2 MUX bit
// CCP2 input/output is multiplexed with RC1
#define CCP2MX_ON            0xFFFF 
// CCP2 input/output is multiplexed with RB3
#define CCP2MX_OFF           0xFEFF 
// PORTB A/D Enable bit
// PORTB<4:0> pins are configured as analog input channels on Reset
#define PBADEN_ON            0xFFFF 
// PORTB<4:0> pins are configured as digital I/O on Reset
#define PBADEN_OFF           0xFDFF 
// Low-Power Timer 1 Oscillator Enable bit
// Timer1 configured for low-power operation
#define LPT1OSC_ON           0xFBFF 
// Timer1 configured for higher power operation
#define LPT1OSC_OFF          0xFFFF 
// MCLR Pin Enable bit
// MCLR pin enabled; RE3 input pin disabled
#define MCLRE_ON             0xFFFF 
// RE3 input pin enabled; MCLR pin disabled
#define MCLRE_OFF            0x7FFF 


// Config Register: CONFIG4L
// Stack Full/Underflow Reset Enable bit
// Stack full/underflow will cause Reset
#define STVREN_ON            0xFFFF 
// Stack full/underflow will not cause Reset
#define STVREN_OFF           0xFFFE 
// Single-Supply ICSP Enable bit
// Single-Supply ICSP enabled
#define LVP_ON               0xFFFF 
// Single-Supply ICSP disabled
#define LVP_OFF              0xFFFB 
// Dedicated In-Circuit Debug/Programming Port (ICPORT) Enable bit
// ICPORT enabled
#define ICPRT_ON             0xFFDF 
// ICPORT disabled
#define ICPRT_OFF            0xFFFF 
// Extended Instruction Set Enable bit
// Instruction set extension and Indexed Addressing mode enabled
#define XINST_ON             0xFFBF 
// Instruction set extension and Indexed Addressing mode disabled (Legacy mode)
#define XINST_OFF            0xFFFF 
// Background Debugger Enable bit
// Background debugger disabled, RB6 and RB7 configured as general purpose I/O pins
#define DEBUG_OFF            0xFFFF 
// Background debugger enabled, RB6 and RB7 are dedicated to In-Circuit Debug
#define DEBUG_ON             0xFF7F 


// Config Register: CONFIG5L
// Code Protection bit
// Block 0 (000800-001FFFh) is not code-protected
#define CP0_OFF              0xFFFF 
// Block 0 (000800-001FFFh) is code-protected
#define CP0_ON               0xFFFE 
// Code Protection bit
// Block 1 (002000-003FFFh) is not code-protected
#define CP1_OFF              0xFFFF 
// Block 1 (002000-003FFFh) is code-protected
#define CP1_ON               0xFFFD 
// Code Protection bit
// Block 2 (004000-005FFFh) is not code-protected
#define CP2_OFF              0xFFFF 
// Block 2 (004000-005FFFh) is code-protected
#define CP2_ON               0xFFFB 
// Code Protection bit
// Block 3 (006000-007FFFh) is not code-protected
#define CP3_OFF              0xFFFF 
// Block 3 (006000-007FFFh) is code-protected
#define CP3_ON               0xFFF7 


// Config Register: CONFIG5H
// Boot Block Code Protection bit
// Boot block (000000-0007FFh) is not code-protected
#define CPB_OFF              0xFFFF 
// Boot block (000000-0007FFh) is code-protected
#define CPB_ON               0xBFFF 
// Data EEPROM Code Protection bit
// Data EEPROM is not code-protected
#define CPD_OFF              0xFFFF 
// Data EEPROM is code-protected
#define CPD_ON               0x7FFF 


// Config Register: CONFIG6L
// Write Protection bit
// Block 0 (000800-001FFFh) is not write-protected
#define WRT0_OFF             0xFFFF 
// Block 0 (000800-001FFFh) is write-protected
#define WRT0_ON              0xFFFE 
// Write Protection bit
// Block 1 (002000-003FFFh) is not write-protected
#define WRT1_OFF             0xFFFF 
// Block 1 (002000-003FFFh) is write-protected
#define WRT1_ON              0xFFFD 
// Write Protection bit
// Block 2 (004000-005FFFh) is not write-protected
#define WRT2_OFF             0xFFFF 
// Block 2 (004000-005FFFh) is write-protected
#define WRT2_ON              0xFFFB 
// Write Protection bit
// Block 3 (006000-007FFFh) is not write-protected
#define WRT3_OFF             0xFFFF 
// Block 3 (006000-007FFFh) is write-protected
#define WRT3_ON              0xFFF7 


// Config Register: CONFIG6H
// Configuration Register Write Protection bit
// Configuration registers (300000-3000FFh) are not write-protected
#define WRTC_OFF             0xFFFF 
// Configuration registers (300000-3000FFh) are write-protected
#define WRTC_ON              0xDFFF 
// Boot Block Write Protection bit
// Boot block (000000-0007FFh) is not write-protected
#define WRTB_OFF             0xFFFF 
// Boot block (000000-0007FFh) is write-protected
#define WRTB_ON              0xBFFF 
// Data EEPROM Write Protection bit
// Data EEPROM is not write-protected
#define WRTD_OFF             0xFFFF 
// Data EEPROM is write-protected
#define WRTD_ON              0x7FFF 


// Config Register: CONFIG7L
// Table Read Protection bit
// Block 0 (000800-001FFFh) is not protected from table reads executed in other blocks
#define EBTR0_OFF            0xFFFF 
// Block 0 (000800-001FFFh) is protected from table reads executed in other blocks
#define EBTR0_ON             0xFFFE 
// Table Read Protection bit
// Block 1 (002000-003FFFh) is not protected from table reads executed in other blocks
#define EBTR1_OFF            0xFFFF 
// Block 1 (002000-003FFFh) is protected from table reads executed in other blocks
#define EBTR1_ON             0xFFFD 
// Table Read Protection bit
// Block 2 (004000-005FFFh) is not protected from table reads executed in other blocks
#define EBTR2_OFF            0xFFFF 
// Block 2 (004000-005FFFh) is protected from table reads executed in other blocks
#define EBTR2_ON             0xFFFB 
// Table Read Protection bit
// Block 3 (006000-007FFFh) is not protected from table reads executed in other blocks
#define EBTR3_OFF            0xFFFF 
// Block 3 (006000-007FFFh) is protected from table reads executed in other blocks
#define EBTR3_ON             0xFFF7 


// Config Register: CONFIG7H
// Boot Block Table Read Protection bit
// Boot block (000000-0007FFh) is not protected from table reads executed in other blocks
#define EBTRB_OFF            0xFFFF 
// Boot block (000000-0007FFh) is protected from table reads executed in other blocks
#define EBTRB_ON             0xBFFF 


//
// Special function register definitions: Bank 0xf
//

// Register: SPPDATA
extern volatile unsigned char           SPPDATA             @ 0xF62;
// bit and bitfield definitions

// Register: SPPCFG
extern volatile unsigned char           SPPCFG              @ 0xF63;
// bit and bitfield definitions
extern volatile bit CLK1EN              @ ((unsigned)&SPPCFG*8)+4;
extern volatile bit CSEN                @ ((unsigned)&SPPCFG*8)+5;
extern volatile bit WS0                 @ ((unsigned)&SPPCFG*8)+0;
extern volatile bit WS1                 @ ((unsigned)&SPPCFG*8)+1;
extern volatile bit WS2                 @ ((unsigned)&SPPCFG*8)+2;
extern volatile bit WS3                 @ ((unsigned)&SPPCFG*8)+3;
extern volatile bit CLKCFG0             @ ((unsigned)&SPPCFG*8)+6;
extern volatile bit CLKCFG1             @ ((unsigned)&SPPCFG*8)+7;
extern union {
    struct {
        volatile unsigned WS                  : 4;
        volatile unsigned CLK1EN              : 1;
        volatile unsigned CSEN                : 1;
        volatile unsigned CLKCFG              : 2;
    };
    struct {
        volatile unsigned WS0                 : 1;
        volatile unsigned WS1                 : 1;
        volatile unsigned WS2                 : 1;
        volatile unsigned WS3                 : 1;
        volatile unsigned                     : 2;
        volatile unsigned CLKCFG0             : 1;
        volatile unsigned CLKCFG1             : 1;
    };
} SPPCFGbits @ 0xF63;

// Register: SPPEPS
extern volatile unsigned char           SPPEPS              @ 0xF64;
// bit and bitfield definitions
extern volatile bit SPPBUSY             @ ((unsigned)&SPPEPS*8)+4;
extern volatile bit WRSPP               @ ((unsigned)&SPPEPS*8)+6;
extern volatile bit RDSPP               @ ((unsigned)&SPPEPS*8)+7;
//extern volatile bit ADDR0              @ ((unsigned)&SPPEPS*8)+0;
//extern volatile bit ADDR1              @ ((unsigned)&SPPEPS*8)+1;
//extern volatile bit ADDR2              @ ((unsigned)&SPPEPS*8)+2;
//extern volatile bit ADDR3              @ ((unsigned)&SPPEPS*8)+3;
extern union {
    struct {
        volatile unsigned ADDR                : 4;
        volatile unsigned SPPBUSY             : 1;
        volatile unsigned                     : 1;
        volatile unsigned WRSPP               : 1;
        volatile unsigned RDSPP               : 1;
    };
    struct {
        volatile unsigned ADDR0               : 1;
        volatile unsigned ADDR1               : 1;
        volatile unsigned ADDR2               : 1;
        volatile unsigned ADDR3               : 1;
    };
} SPPEPSbits @ 0xF64;

// Register: SPPCON
extern volatile unsigned char           SPPCON              @ 0xF65;
// bit and bitfield definitions
extern volatile bit SPPEN               @ ((unsigned)&SPPCON*8)+0;
extern volatile bit SPPOWN              @ ((unsigned)&SPPCON*8)+1;
extern union {
    struct {
        volatile unsigned SPPEN               : 1;
        volatile unsigned SPPOWN              : 1;
    };
} SPPCONbits @ 0xF65;
// bit and bitfield definitions

// Register: UFRML
extern volatile unsigned char           UFRML               @ 0xF66;
// bit and bitfield definitions
extern volatile bit FRM0                @ ((unsigned)&UFRML*8)+0;
extern volatile bit FRM1                @ ((unsigned)&UFRML*8)+1;
extern volatile bit FRM2                @ ((unsigned)&UFRML*8)+2;
extern volatile bit FRM3                @ ((unsigned)&UFRML*8)+3;
extern volatile bit FRM4                @ ((unsigned)&UFRML*8)+4;
extern volatile bit FRM5                @ ((unsigned)&UFRML*8)+5;
extern volatile bit FRM6                @ ((unsigned)&UFRML*8)+6;
extern volatile bit FRM7                @ ((unsigned)&UFRML*8)+7;
extern union {
    struct {
        volatile unsigned FRM0                : 1;
        volatile unsigned FRM1                : 1;
        volatile unsigned FRM2                : 1;
        volatile unsigned FRM3                : 1;
        volatile unsigned FRM4                : 1;
        volatile unsigned FRM5                : 1;
        volatile unsigned FRM6                : 1;
        volatile unsigned FRM7                : 1;
    };
} UFRMLbits @ 0xF66;

// Register: UFRMH
extern volatile unsigned char           UFRMH               @ 0xF67;
// bit and bitfield definitions
extern volatile bit FRM8                @ ((unsigned)&UFRMH*8)+0;
extern volatile bit FRM9                @ ((unsigned)&UFRMH*8)+1;
extern volatile bit FRM10               @ ((unsigned)&UFRMH*8)+2;
extern union {
    struct {
        volatile unsigned FRM                 : 3;
    };
    struct {
        volatile unsigned FRM8                : 1;
        volatile unsigned FRM9                : 1;
        volatile unsigned FRM10               : 1;
    };
} UFRMHbits @ 0xF67;

// Register: UFRM
extern volatile unsigned int            UFRM                @ 0xF66;

// Register: UIR
extern volatile unsigned char           UIR                 @ 0xF68;
// bit and bitfield definitions
extern volatile bit URSTIF              @ ((unsigned)&UIR*8)+0;
extern volatile bit UERRIF              @ ((unsigned)&UIR*8)+1;
extern volatile bit ACTVIF              @ ((unsigned)&UIR*8)+2;
extern volatile bit TRNIF               @ ((unsigned)&UIR*8)+3;
extern volatile bit IDLEIF              @ ((unsigned)&UIR*8)+4;
extern volatile bit STALLIF             @ ((unsigned)&UIR*8)+5;
extern volatile bit SOFIF               @ ((unsigned)&UIR*8)+6;
extern union {
    struct {
        volatile unsigned URSTIF              : 1;
        volatile unsigned UERRIF              : 1;
        volatile unsigned ACTVIF              : 1;
        volatile unsigned TRNIF               : 1;
        volatile unsigned IDLEIF              : 1;
        volatile unsigned STALLIF             : 1;
        volatile unsigned SOFIF               : 1;
    };
} UIRbits @ 0xF68;

// Register: UIE
extern volatile unsigned char           UIE                 @ 0xF69;
// bit and bitfield definitions
extern volatile bit URSTIE              @ ((unsigned)&UIE*8)+0;
extern volatile bit UERRIE              @ ((unsigned)&UIE*8)+1;
extern volatile bit ACTVIE              @ ((unsigned)&UIE*8)+2;
extern volatile bit TRNIE               @ ((unsigned)&UIE*8)+3;
extern volatile bit IDLEIE              @ ((unsigned)&UIE*8)+4;
extern volatile bit STALLIE             @ ((unsigned)&UIE*8)+5;
extern volatile bit SOFIE               @ ((unsigned)&UIE*8)+6;
extern union {
    struct {
        volatile unsigned URSTIE              : 1;
        volatile unsigned UERRIE              : 1;
        volatile unsigned ACTVIE              : 1;
        volatile unsigned TRNIE               : 1;
        volatile unsigned IDLEIE              : 1;
        volatile unsigned STALLIE             : 1;
        volatile unsigned SOFIE               : 1;
    };
} UIEbits @ 0xF69;

// Register: UEIR
extern volatile unsigned char           UEIR                @ 0xF6A;
// bit and bitfield definitions
extern volatile bit PIDEF               @ ((unsigned)&UEIR*8)+0;
extern volatile bit CRC5EF              @ ((unsigned)&UEIR*8)+1;
extern volatile bit CRC16EF             @ ((unsigned)&UEIR*8)+2;
extern volatile bit DFN8EF              @ ((unsigned)&UEIR*8)+3;
extern volatile bit BTOEF               @ ((unsigned)&UEIR*8)+4;
extern volatile bit BTSEF               @ ((unsigned)&UEIR*8)+7;
extern union {
    struct {
        volatile unsigned PIDEF               : 1;
        volatile unsigned CRC5EF              : 1;
        volatile unsigned CRC16EF             : 1;
        volatile unsigned DFN8EF              : 1;
        volatile unsigned BTOEF               : 1;
        volatile unsigned                     : 2;
        volatile unsigned BTSEF               : 1;
    };
} UEIRbits @ 0xF6A;

// Register: UEIE
extern volatile unsigned char           UEIE                @ 0xF6B;
// bit and bitfield definitions
extern volatile bit PIDEE               @ ((unsigned)&UEIE*8)+0;
extern volatile bit CRC5EE              @ ((unsigned)&UEIE*8)+1;
extern volatile bit CRC16EE             @ ((unsigned)&UEIE*8)+2;
extern volatile bit DFN8EE              @ ((unsigned)&UEIE*8)+3;
extern volatile bit BTOEE               @ ((unsigned)&UEIE*8)+4;
extern volatile bit BTSEE               @ ((unsigned)&UEIE*8)+7;
extern union {
    struct {
        volatile unsigned PIDEE               : 1;
        volatile unsigned CRC5EE              : 1;
        volatile unsigned CRC16EE             : 1;
        volatile unsigned DFN8EE              : 1;
        volatile unsigned BTOEE               : 1;
        volatile unsigned                     : 2;
        volatile unsigned BTSEE               : 1;
    };
} UEIEbits @ 0xF6B;

// Register: USTAT
extern volatile unsigned char           USTAT               @ 0xF6C;
// bit and bitfield definitions
extern volatile bit PPBI                @ ((unsigned)&USTAT*8)+1;
extern volatile bit DIR                 @ ((unsigned)&USTAT*8)+2;
extern volatile bit ENDP0               @ ((unsigned)&USTAT*8)+3;
extern volatile bit ENDP1               @ ((unsigned)&USTAT*8)+4;
extern volatile bit ENDP2               @ ((unsigned)&USTAT*8)+5;
extern volatile bit ENDP3               @ ((unsigned)&USTAT*8)+6;
extern union {
    struct {
        volatile unsigned                     : 1;
        volatile unsigned PPBI                : 1;
        volatile unsigned DIR                 : 1;
        volatile unsigned ENDP                : 4;
    };
    struct {
        volatile unsigned : 3;
        volatile unsigned ENDP0               : 1;
        volatile unsigned ENDP1               : 1;
        volatile unsigned ENDP2               : 1;
        volatile unsigned ENDP3               : 1;
    };
} USTATbits @ 0xF6C;

// Register: UCON
extern volatile unsigned char           UCON                @ 0xF6D;
// bit and bitfield definitions
extern volatile bit SUSPND              @ ((unsigned)&UCON*8)+1;
extern volatile bit RESUME              @ ((unsigned)&UCON*8)+2;
extern volatile bit USBEN               @ ((unsigned)&UCON*8)+3;
extern volatile bit PKTDIS              @ ((unsigned)&UCON*8)+4;
extern volatile bit SE0                 @ ((unsigned)&UCON*8)+5;
extern volatile bit PPBRST              @ ((unsigned)&UCON*8)+6;
extern union {
    struct {
        volatile unsigned                     : 1;
        volatile unsigned SUSPND              : 1;
        volatile unsigned RESUME              : 1;
        volatile unsigned USBEN               : 1;
        volatile unsigned PKTDIS              : 1;
        volatile unsigned SE0                 : 1;
        volatile unsigned PPBRST              : 1;
    };
} UCONbits @ 0xF6D;

// Register: UADDR
extern volatile unsigned char           UADDR               @ 0xF6E;
// bit and bitfield definitions
//extern volatile bit ADDR0              @ ((unsigned)&UADDR*8)+0;
//extern volatile bit ADDR1              @ ((unsigned)&UADDR*8)+1;
//extern volatile bit ADDR2              @ ((unsigned)&UADDR*8)+2;
//extern volatile bit ADDR3              @ ((unsigned)&UADDR*8)+3;
extern volatile bit ADDR4               @ ((unsigned)&UADDR*8)+4;
extern volatile bit ADDR5               @ ((unsigned)&UADDR*8)+5;
extern volatile bit ADDR6               @ ((unsigned)&UADDR*8)+6;
extern union {
    struct {
        volatile unsigned ADDR                : 7;
    };
    struct {
        volatile unsigned ADDR0               : 1;
        volatile unsigned ADDR1               : 1;
        volatile unsigned ADDR2               : 1;
        volatile unsigned ADDR3               : 1;
        volatile unsigned ADDR4               : 1;
        volatile unsigned ADDR5               : 1;
        volatile unsigned ADDR6               : 1;
    };
} UADDRbits @ 0xF6E;

// Register: UCFG
extern volatile unsigned char           UCFG                @ 0xF6F;
// bit and bitfield definitions
extern volatile bit FSEN                @ ((unsigned)&UCFG*8)+2;
extern volatile bit UTRDIS              @ ((unsigned)&UCFG*8)+3;
extern volatile bit UPUEN               @ ((unsigned)&UCFG*8)+4;
extern volatile bit UOEMON              @ ((unsigned)&UCFG*8)+6;
extern volatile bit UTEYE               @ ((unsigned)&UCFG*8)+7;
extern volatile bit PPB0                @ ((unsigned)&UCFG*8)+0;
extern volatile bit PPB1                @ ((unsigned)&UCFG*8)+1;
extern union {
    struct {
        volatile unsigned PPB                 : 2;
        volatile unsigned FSEN                : 1;
        volatile unsigned UTRDIS              : 1;
        volatile unsigned UPUEN               : 1;
        volatile unsigned                     : 1;
        volatile unsigned UOEMON              : 1;
        volatile unsigned UTEYE               : 1;
    };
    struct {
        volatile unsigned PPB0                : 1;
        volatile unsigned PPB1                : 1;
    };
} UCFGbits @ 0xF6F;

// Register: UEP0
extern volatile unsigned char           UEP0                @ 0xF70;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP0*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP0*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP0*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP0*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP0*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP0bits @ 0xF70;

// Register: UEP1
extern volatile unsigned char           UEP1                @ 0xF71;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP1*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP1*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP1*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP1*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP1*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP1bits @ 0xF71;

// Register: UEP2
extern volatile unsigned char           UEP2                @ 0xF72;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP2*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP2*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP2*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP2*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP2*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP2bits @ 0xF72;

// Register: UEP3
extern volatile unsigned char           UEP3                @ 0xF73;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP3*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP3*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP3*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP3*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP3*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP3bits @ 0xF73;

// Register: UEP4
extern volatile unsigned char           UEP4                @ 0xF74;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP4*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP4*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP4*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP4*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP4*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP4bits @ 0xF74;

// Register: UEP5
extern volatile unsigned char           UEP5                @ 0xF75;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP5*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP5*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP5*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP5*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP5*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP5bits @ 0xF75;

// Register: UEP6
extern volatile unsigned char           UEP6                @ 0xF76;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP6*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP6*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP6*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP6*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP6*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP6bits @ 0xF76;

// Register: UEP7
extern volatile unsigned char           UEP7                @ 0xF77;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP7*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP7*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP7*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP7*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP7*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP7bits @ 0xF77;

// Register: UEP8
extern volatile unsigned char           UEP8                @ 0xF78;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP8*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP8*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP8*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP8*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP8*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP8bits @ 0xF78;

// Register: UEP9
extern volatile unsigned char           UEP9                @ 0xF79;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP9*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP9*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP9*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP9*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP9*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP9bits @ 0xF79;

// Register: UEP10
extern volatile unsigned char           UEP10               @ 0xF7A;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP10*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP10*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP10*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP10*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP10*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP10bits @ 0xF7A;

// Register: UEP11
extern volatile unsigned char           UEP11               @ 0xF7B;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP11*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP11*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP11*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP11*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP11*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP11bits @ 0xF7B;

// Register: UEP12
extern volatile unsigned char           UEP12               @ 0xF7C;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP12*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP12*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP12*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP12*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP12*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP12bits @ 0xF7C;

// Register: UEP13
extern volatile unsigned char           UEP13               @ 0xF7D;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP13*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP13*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP13*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP13*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP13*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP13bits @ 0xF7D;

// Register: UEP14
extern volatile unsigned char           UEP14               @ 0xF7E;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP14*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP14*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP14*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP14*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP14*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP14bits @ 0xF7E;

// Register: UEP15
extern volatile unsigned char           UEP15               @ 0xF7F;
// bit and bitfield definitions
//extern volatile bit EPSTALL            @ ((unsigned)&UEP15*8)+0;
//extern volatile bit EPINEN             @ ((unsigned)&UEP15*8)+1;
//extern volatile bit EPOUTEN            @ ((unsigned)&UEP15*8)+2;
//extern volatile bit EPCONDIS           @ ((unsigned)&UEP15*8)+3;
//extern volatile bit EPHSHK             @ ((unsigned)&UEP15*8)+4;
extern union {
    struct {
        volatile unsigned EPSTALL             : 1;
        volatile unsigned EPINEN              : 1;
        volatile unsigned EPOUTEN             : 1;
        volatile unsigned EPCONDIS            : 1;
        volatile unsigned EPHSHK              : 1;
    };
} UEP15bits @ 0xF7F;

// Register: PORTA
extern volatile unsigned char           PORTA               @ 0xF80;
// bit and bitfield definitions
//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 RA6                @ ((unsigned)&PORTA*8)+6;
extern volatile bit AN0                 @ ((unsigned)&PORTA*8)+0;
extern volatile bit AN1                 @ ((unsigned)&PORTA*8)+1;
extern volatile bit AN2                 @ ((unsigned)&PORTA*8)+2;
extern volatile bit AN3                 @ ((unsigned)&PORTA*8)+3;
extern volatile bit T0CKI               @ ((unsigned)&PORTA*8)+4;
extern volatile bit AN4                 @ ((unsigned)&PORTA*8)+5;
extern volatile bit OSC2                @ ((unsigned)&PORTA*8)+6;
extern volatile bit VREFM               @ ((unsigned)&PORTA*8)+2;
extern volatile bit VREFP               @ ((unsigned)&PORTA*8)+3;
extern volatile bit LVDIN               @ ((unsigned)&PORTA*8)+5;
extern volatile bit HLVDIN              @ ((unsigned)&PORTA*8)+5;
extern union {
    struct {
        volatile unsigned RA0                 : 1;
        volatile unsigned RA1                 : 1;
        volatile unsigned RA2                 : 1;
        volatile unsigned RA3                 : 1;
        volatile unsigned RA4                 : 1;
        volatile unsigned RA5                 : 1;
        volatile unsigned RA6                 : 1;
    };
    struct {
        volatile unsigned AN0                 : 1;
        volatile unsigned AN1                 : 1;
        volatile unsigned AN2                 : 1;
        volatile unsigned AN3                 : 1;
        volatile unsigned T0CKI               : 1;
        volatile unsigned AN4                 : 1;
        volatile unsigned OSC2                : 1;
    };
    struct {
        volatile unsigned                     : 2;
        volatile unsigned VREFM               : 1;
        volatile unsigned VREFP               : 1;
        volatile unsigned : 1;
        volatile unsigned LVDIN               : 1;
    };
    struct {
        volatile unsigned : 5;
        volatile unsigned HLVDIN              : 1;
    };
} PORTAbits @ 0xF80;

// Register: PORTB
extern volatile unsigned char           PORTB               @ 0xF81;
// bit and bitfield definitions
//extern volatile bit RB0                @ ((unsigned)&PORTB*8)+0;
//extern volatile bit RB1                @ ((unsigned)&PORTB*8)+1;
//extern volatile bit RB2                @ ((unsigned)&PORTB*8)+2;
//extern volatile bit RB3                @ ((unsigned)&PORTB*8)+3;
//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 INT0                @ ((unsigned)&PORTB*8)+0;
extern volatile bit INT1                @ ((unsigned)&PORTB*8)+1;
extern volatile bit INT2                @ ((unsigned)&PORTB*8)+2;
extern volatile bit PGM                 @ ((unsigned)&PORTB*8)+5;
extern volatile bit PGC                 @ ((unsigned)&PORTB*8)+6;
extern volatile bit PGD                 @ ((unsigned)&PORTB*8)+7;
extern union {
    struct {
        volatile unsigned RB0                 : 1;
        volatile unsigned RB1                 : 1;
        volatile unsigned RB2                 : 1;
        volatile unsigned RB3                 : 1;
        volatile unsigned RB4                 : 1;
        volatile unsigned RB5                 : 1;
        volatile unsigned RB6                 : 1;
        volatile unsigned RB7                 : 1;
    };
    struct {
        volatile unsigned INT0                : 1;
        volatile unsigned INT1                : 1;
        volatile unsigned INT2                : 1;
        volatile unsigned                     : 2;
        volatile unsigned PGM                 : 1;
        volatile unsigned PGC                 : 1;
        volatile unsigned PGD                 : 1;
    };
} PORTBbits @ 0xF81;

// Register: PORTC
extern volatile unsigned char           PORTC               @ 0xF82;
// bit and bitfield definitions
//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 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 T1OSO               @ ((unsigned)&PORTC*8)+0;
extern volatile bit T1OSI               @ ((unsigned)&PORTC*8)+1;
extern volatile bit CCP1                @ ((unsigned)&PORTC*8)+2;
extern volatile bit TX                  @ ((unsigned)&PORTC*8)+6;
extern volatile bit RX                  @ ((unsigned)&PORTC*8)+7;
extern volatile bit T13CKI              @ ((unsigned)&PORTC*8)+0;
extern volatile bit P1A                 @ ((unsigned)&PORTC*8)+2;
extern volatile bit CK                  @ ((unsigned)&PORTC*8)+6;
extern volatile bit DT                  @ ((unsigned)&PORTC*8)+7;
extern union {
    struct {
        volatile unsigned RC0                 : 1;
        volatile unsigned RC1                 : 1;
        volatile unsigned RC2                 : 1;
        volatile unsigned                     : 1;
        volatile unsigned RC4                 : 1;
        volatile unsigned RC5                 : 1;
        volatile unsigned RC6                 : 1;
        volatile unsigned RC7                 : 1;
    };
    struct {
        volatile unsigned T1OSO               : 1;
        volatile unsigned T1OSI               : 1;
        volatile unsigned CCP1                : 1;
        volatile unsigned : 3;
        volatile unsigned TX                  : 1;
        volatile unsigned RX                  : 1;
    };
    struct {
        volatile unsigned T13CKI              : 1;
        volatile unsigned : 1;
        volatile unsigned P1A                 : 1;
        volatile unsigned : 3;
        volatile unsigned CK                  : 1;
        volatile unsigned DT                  : 1;
    };
} PORTCbits @ 0xF82;

// Register: PORTD
extern volatile unsigned char           PORTD               @ 0xF83;
// bit and bitfield definitions
//extern volatile bit RD0                @ ((unsigned)&PORTD*8)+0;
//extern volatile bit RD1                @ ((unsigned)&PORTD*8)+1;
//extern volatile bit RD2                @ ((unsigned)&PORTD*8)+2;
//extern volatile bit RD3                @ ((unsigned)&PORTD*8)+3;
//extern volatile bit RD4                @ ((unsigned)&PORTD*8)+4;
//extern volatile bit RD5                @ ((unsigned)&PORTD*8)+5;
//extern volatile bit RD6                @ ((unsigned)&PORTD*8)+6;
//extern volatile bit RD7                @ ((unsigned)&PORTD*8)+7;
extern volatile bit SPP0                @ ((unsigned)&PORTD*8)+0;
extern volatile bit SPP1                @ ((unsigned)&PORTD*8)+1;
extern volatile bit SPP2                @ ((unsigned)&PORTD*8)+2;
extern volatile bit SPP3                @ ((unsigned)&PORTD*8)+3;
extern volatile bit SPP4                @ ((unsigned)&PORTD*8)+4;
extern volatile bit SPP5                @ ((unsigned)&PORTD*8)+5;
extern volatile bit SPP6                @ ((unsigned)&PORTD*8)+6;
extern volatile bit SPP7                @ ((unsigned)&PORTD*8)+7;
extern union {
    struct {
        volatile unsigned RD0                 : 1;
        volatile unsigned RD1                 : 1;
        volatile unsigned RD2                 : 1;
        volatile unsigned RD3                 : 1;
        volatile unsigned RD4                 : 1;
        volatile unsigned RD5                 : 1;
        volatile unsigned RD6                 : 1;
        volatile unsigned RD7                 : 1;
    };
    struct {
        volatile unsigned SPP0                : 1;
        volatile unsigned SPP1                : 1;
        volatile unsigned SPP2                : 1;
        volatile unsigned SPP3                : 1;
        volatile unsigned SPP4                : 1;
        volatile unsigned SPP5                : 1;
        volatile unsigned SPP6                : 1;
        volatile unsigned SPP7                : 1;
    };
} PORTDbits @ 0xF83;

// Register: PORTE
extern volatile unsigned char           PORTE               @ 0xF84;
// bit and bitfield definitions
//extern volatile bit RE0                @ ((unsigned)&PORTE*8)+0;
//extern volatile bit RE1                @ ((unsigned)&PORTE*8)+1;
//extern volatile bit RE2                @ ((unsigned)&PORTE*8)+2;
extern volatile bit RE3                 @ ((unsigned)&PORTE*8)+3;
extern volatile bit RDPU                @ ((unsigned)&PORTE*8)+7;
extern volatile bit CK1SPP              @ ((unsigned)&PORTE*8)+0;
extern volatile bit CK2SPP              @ ((unsigned)&PORTE*8)+1;
extern volatile bit OESPP               @ ((unsigned)&PORTE*8)+2;
extern union {
    struct {
        volatile unsigned RE0                 : 1;
        volatile unsigned RE1                 : 1;
        volatile unsigned RE2                 : 1;
        volatile unsigned RE3                 : 1;
        volatile unsigned                     : 3;
        volatile unsigned RDPU                : 1;
    };
    struct {
        volatile unsigned CK1SPP              : 1;
        volatile unsigned CK2SPP              : 1;
        volatile unsigned OESPP               : 1;
    };
} PORTEbits @ 0xF84;

// Register: LATA
extern volatile unsigned char           LATA                @ 0xF89;
// bit and bitfield definitions
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 LATA3               @ ((unsigned)&LATA*8)+3;
extern volatile bit LATA4               @ ((unsigned)&LATA*8)+4;
extern volatile bit LATA5               @ ((unsigned)&LATA*8)+5;
extern volatile bit LATA6               @ ((unsigned)&LATA*8)+6;
extern union {
    struct {
        volatile unsigned LATA0               : 1;
        volatile unsigned LATA1               : 1;
        volatile unsigned LATA2               : 1;
        volatile unsigned LATA3               : 1;
        volatile unsigned LATA4               : 1;
        volatile unsigned LATA5               : 1;
        volatile unsigned LATA6               : 1;
    };
} LATAbits @ 0xF89;

// Register: LATB
extern volatile unsigned char           LATB                @ 0xF8A;
// bit and bitfield definitions
extern volatile bit LATB0               @ ((unsigned)&LATB*8)+0;
extern volatile bit LATB1               @ ((unsigned)&LATB*8)+1;
extern volatile bit LATB2               @ ((unsigned)&LATB*8)+2;
extern volatile bit LATB3               @ ((unsigned)&LATB*8)+3;
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 union {
    struct {
        volatile unsigned LATB0               : 1;
        volatile unsigned LATB1               : 1;
        volatile unsigned LATB2               : 1;
        volatile unsigned LATB3               : 1;
        volatile unsigned LATB4               : 1;
        volatile unsigned LATB5               : 1;
        volatile unsigned LATB6               : 1;
        volatile unsigned LATB7               : 1;
    };
} LATBbits @ 0xF8A;

// Register: LATC
extern volatile unsigned char           LATC                @ 0xF8B;
// bit and bitfield definitions
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 LATC6               @ ((unsigned)&LATC*8)+6;
extern volatile bit LATC7               @ ((unsigned)&LATC*8)+7;
extern union {
    struct {
        volatile unsigned LATC0               : 1;
        volatile unsigned LATC1               : 1;
        volatile unsigned LATC2               : 1;
        volatile unsigned                     : 3;
        volatile unsigned LATC6               : 1;
        volatile unsigned LATC7               : 1;
    };
} LATCbits @ 0xF8B;

// Register: LATD
extern volatile unsigned char           LATD                @ 0xF8C;
// bit and bitfield definitions
extern volatile bit LATD0               @ ((unsigned)&LATD*8)+0;
extern volatile bit LATD1               @ ((unsigned)&LATD*8)+1;
extern volatile bit LATD2               @ ((unsigned)&LATD*8)+2;
extern volatile bit LATD3               @ ((unsigned)&LATD*8)+3;
extern volatile bit LATD4               @ ((unsigned)&LATD*8)+4;
extern volatile bit LATD5               @ ((unsigned)&LATD*8)+5;
extern volatile bit LATD6               @ ((unsigned)&LATD*8)+6;
extern volatile bit LATD7               @ ((unsigned)&LATD*8)+7;
extern union {
    struct {
        volatile unsigned LATD0               : 1;
        volatile unsigned LATD1               : 1;
        volatile unsigned LATD2               : 1;
        volatile unsigned LATD3               : 1;
        volatile unsigned LATD4               : 1;
        volatile unsigned LATD5               : 1;
        volatile unsigned LATD6               : 1;
        volatile unsigned LATD7               : 1;
    };
} LATDbits @ 0xF8C;

// Register: LATE
extern volatile unsigned char           LATE                @ 0xF8D;
// bit and bitfield definitions
extern volatile bit LATE0               @ ((unsigned)&LATE*8)+0;
extern volatile bit LATE1               @ ((unsigned)&LATE*8)+1;
extern volatile bit LATE2               @ ((unsigned)&LATE*8)+2;
extern union {
    struct {
        volatile unsigned LATE0               : 1;
        volatile unsigned LATE1               : 1;
        volatile unsigned LATE2               : 1;
    };
} LATEbits @ 0xF8D;

// Register: TRISA
extern volatile unsigned char           TRISA               @ 0xF92;
extern volatile unsigned char           DDRA                @ 0xF92;
// bit and bitfield definitions
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 TRISA6              @ ((unsigned)&TRISA*8)+6;
//extern volatile bit RA0                @ ((unsigned)&TRISA*8)+0;
//extern volatile bit RA1                @ ((unsigned)&TRISA*8)+1;
//extern volatile bit RA2                @ ((unsigned)&TRISA*8)+2;
//extern volatile bit RA3                @ ((unsigned)&TRISA*8)+3;
//extern volatile bit RA4                @ ((unsigned)&TRISA*8)+4;
//extern volatile bit RA5                @ ((unsigned)&TRISA*8)+5;
//extern volatile bit RA6                @ ((unsigned)&TRISA*8)+6;
extern union {
    struct {
        volatile unsigned TRISA0              : 1;
        volatile unsigned TRISA1              : 1;
        volatile unsigned TRISA2              : 1;
        volatile unsigned TRISA3              : 1;
        volatile unsigned TRISA4              : 1;
        volatile unsigned TRISA5              : 1;
        volatile unsigned TRISA6              : 1;
    };
    struct {
        volatile unsigned RA0                 : 1;
        volatile unsigned RA1                 : 1;
        volatile unsigned RA2                 : 1;
        volatile unsigned RA3                 : 1;
        volatile unsigned RA4                 : 1;
        volatile unsigned RA5                 : 1;
        volatile unsigned RA6                 : 1;
    };
} TRISAbits @ 0xF92;

// Register: TRISB
extern volatile unsigned char           TRISB               @ 0xF93;
extern volatile unsigned char           DDRB                @ 0xF93;
// bit and bitfield definitions
extern volatile bit TRISB0              @ ((unsigned)&TRISB*8)+0;
extern volatile bit TRISB1              @ ((unsigned)&TRISB*8)+1;
extern volatile bit TRISB2              @ ((unsigned)&TRISB*8)+2;
extern volatile bit TRISB3              @ ((unsigned)&TRISB*8)+3;
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 RB0                @ ((unsigned)&TRISB*8)+0;
//extern volatile bit RB1                @ ((unsigned)&TRISB*8)+1;
//extern volatile bit RB2                @ ((unsigned)&TRISB*8)+2;
//extern volatile bit RB3                @ ((unsigned)&TRISB*8)+3;
//extern volatile bit RB4                @ ((unsigned)&TRISB*8)+4;
//extern volatile bit RB5                @ ((unsigned)&TRISB*8)+5;
//extern volatile bit RB6                @ ((unsigned)&TRISB*8)+6;
//extern volatile bit RB7                @ ((unsigned)&TRISB*8)+7;
extern union {
    struct {
        volatile unsigned TRISB0              : 1;
        volatile unsigned TRISB1              : 1;
        volatile unsigned TRISB2              : 1;
        volatile unsigned TRISB3              : 1;
        volatile unsigned TRISB4              : 1;
        volatile unsigned TRISB5              : 1;
        volatile unsigned TRISB6              : 1;
        volatile unsigned TRISB7              : 1;
    };
    struct {
        volatile unsigned RB0                 : 1;
        volatile unsigned RB1                 : 1;
        volatile unsigned RB2                 : 1;
        volatile unsigned RB3                 : 1;
        volatile unsigned RB4                 : 1;
        volatile unsigned RB5                 : 1;
        volatile unsigned RB6                 : 1;
        volatile unsigned RB7                 : 1;
    };
} TRISBbits @ 0xF93;

// Register: TRISC
extern volatile unsigned char           TRISC               @ 0xF94;
extern volatile unsigned char           DDRC                @ 0xF94;
// bit and bitfield definitions
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 TRISC6              @ ((unsigned)&TRISC*8)+6;
extern volatile bit TRISC7              @ ((unsigned)&TRISC*8)+7;
//extern volatile bit RC0                @ ((unsigned)&TRISC*8)+0;
//extern volatile bit RC1                @ ((unsigned)&TRISC*8)+1;
//extern volatile bit RC2                @ ((unsigned)&TRISC*8)+2;
//extern volatile bit RC6                @ ((unsigned)&TRISC*8)+6;
//extern volatile bit RC7                @ ((unsigned)&TRISC*8)+7;
extern union {
    struct {
        volatile unsigned TRISC0              : 1;
        volatile unsigned TRISC1              : 1;
        volatile unsigned TRISC2              : 1;
        volatile unsigned                     : 3;
        volatile unsigned TRISC6              : 1;
        volatile unsigned TRISC7              : 1;
    };
    struct {
        volatile unsigned RC0                 : 1;
        volatile unsigned RC1                 : 1;
        volatile unsigned RC2                 : 1;
        volatile unsigned : 3;
        volatile unsigned RC6                 : 1;
        volatile unsigned RC7                 : 1;
    };
} TRISCbits @ 0xF94;

// Register: TRISD
extern volatile unsigned char           TRISD               @ 0xF95;
extern volatile unsigned char           DDRD                @ 0xF95;
// bit and bitfield definitions
extern volatile bit TRISD0              @ ((unsigned)&TRISD*8)+0;
extern volatile bit TRISD1              @ ((unsigned)&TRISD*8)+1;
extern volatile bit TRISD2              @ ((unsigned)&TRISD*8)+2;
extern volatile bit TRISD3              @ ((unsigned)&TRISD*8)+3;
extern volatile bit TRISD4              @ ((unsigned)&TRISD*8)+4;
extern volatile bit TRISD5              @ ((unsigned)&TRISD*8)+5;
extern volatile bit TRISD6              @ ((unsigned)&TRISD*8)+6;
extern volatile bit TRISD7              @ ((unsigned)&TRISD*8)+7;
//extern volatile bit RD0                @ ((unsigned)&TRISD*8)+0;
//extern volatile bit RD1                @ ((unsigned)&TRISD*8)+1;
//extern volatile bit RD2                @ ((unsigned)&TRISD*8)+2;
//extern volatile bit RD3                @ ((unsigned)&TRISD*8)+3;
//extern volatile bit RD4                @ ((unsigned)&TRISD*8)+4;
//extern volatile bit RD5                @ ((unsigned)&TRISD*8)+5;
//extern volatile bit RD6                @ ((unsigned)&TRISD*8)+6;
//extern volatile bit RD7                @ ((unsigned)&TRISD*8)+7;
extern union {
    struct {
        volatile unsigned TRISD0              : 1;
        volatile unsigned TRISD1              : 1;
        volatile unsigned TRISD2              : 1;
        volatile unsigned TRISD3              : 1;
        volatile unsigned TRISD4              : 1;
        volatile unsigned TRISD5              : 1;
        volatile unsigned TRISD6              : 1;
        volatile unsigned TRISD7              : 1;
    };
    struct {
        volatile unsigned RD0                 : 1;
        volatile unsigned RD1                 : 1;
        volatile unsigned RD2                 : 1;
        volatile unsigned RD3                 : 1;
        volatile unsigned RD4                 : 1;
        volatile unsigned RD5                 : 1;
        volatile unsigned RD6                 : 1;
        volatile unsigned RD7                 : 1;
    };
} TRISDbits @ 0xF95;

// Register: TRISE
extern volatile unsigned char           TRISE               @ 0xF96;
extern volatile unsigned char           DDRE                @ 0xF96;
// bit and bitfield definitions
extern volatile bit TRISE0              @ ((unsigned)&TRISE*8)+0;
extern volatile bit TRISE1              @ ((unsigned)&TRISE*8)+1;
extern volatile bit TRISE2              @ ((unsigned)&TRISE*8)+2;
//extern volatile bit RE0                @ ((unsigned)&TRISE*8)+0;
//extern volatile bit RE1                @ ((unsigned)&TRISE*8)+1;
//extern volatile bit RE2                @ ((unsigned)&TRISE*8)+2;
extern union {
    struct {
        volatile unsigned TRISE0              : 1;
        volatile unsigned TRISE1              : 1;
        volatile unsigned TRISE2              : 1;
    };
    struct {
        volatile unsigned RE0                 : 1;
        volatile unsigned RE1                 : 1;
        volatile unsigned RE2                 : 1;
    };
} TRISEbits @ 0xF96;

// Register: OSCTUNE
extern volatile unsigned char           OSCTUNE             @ 0xF9B;
// bit and bitfield definitions
extern volatile bit INTSRC              @ ((unsigned)&OSCTUNE*8)+7;
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 union {
    struct {
        volatile unsigned TUN                 : 5;
        volatile unsigned                     : 2;
        volatile unsigned INTSRC              : 1;
    };
    struct {
        volatile unsigned TUN0                : 1;
        volatile unsigned TUN1                : 1;
        volatile unsigned TUN2                : 1;
        volatile unsigned TUN3                : 1;
        volatile unsigned TUN4                : 1;
    };
} OSCTUNEbits @ 0xF9B;

// Register: PIE1
extern volatile unsigned char           PIE1                @ 0xF9D;
// bit and bitfield definitions
extern volatile bit TMR1IE              @ ((unsigned)&PIE1*8)+0;
extern volatile bit TMR2IE              @ ((unsigned)&PIE1*8)+1;
extern volatile bit CCP1IE              @ ((unsigned)&PIE1*8)+2;
extern volatile bit SSPIE               @ ((unsigned)&PIE1*8)+3;
extern volatile bit TXIE                @ ((unsigned)&PIE1*8)+4;
extern volatile bit RCIE                @ ((unsigned)&PIE1*8)+5;
extern volatile bit ADIE                @ ((unsigned)&PIE1*8)+6;
extern volatile bit SPPIE               @ ((unsigned)&PIE1*8)+7;
extern union {
    struct {
        volatile unsigned TMR1IE              : 1;
        volatile unsigned TMR2IE              : 1;
        volatile unsigned CCP1IE              : 1;
        volatile unsigned SSPIE               : 1;
        volatile unsigned TXIE                : 1;
        volatile unsigned RCIE                : 1;
        volatile unsigned ADIE                : 1;
        volatile unsigned SPPIE               : 1;
    };
} PIE1bits @ 0xF9D;

// Register: PIR1
extern volatile unsigned char           PIR1                @ 0xF9E;
// bit and bitfield definitions
extern volatile bit TMR1IF              @ ((unsigned)&PIR1*8)+0;
extern volatile bit TMR2IF              @ ((unsigned)&PIR1*8)+1;
extern volatile bit CCP1IF              @ ((unsigned)&PIR1*8)+2;
extern volatile bit SSPIF               @ ((unsigned)&PIR1*8)+3;
extern volatile bit TXIF                @ ((unsigned)&PIR1*8)+4;
extern volatile bit RCIF                @ ((unsigned)&PIR1*8)+5;
extern volatile bit ADIF                @ ((unsigned)&PIR1*8)+6;
extern volatile bit SPPIF               @ ((unsigned)&PIR1*8)+7;
extern union {
    struct {
        volatile unsigned TMR1IF              : 1;
        volatile unsigned TMR2IF              : 1;
        volatile unsigned CCP1IF              : 1;
        volatile unsigned SSPIF               : 1;
        volatile unsigned TXIF                : 1;
        volatile unsigned RCIF                : 1;
        volatile unsigned ADIF                : 1;
        volatile unsigned SPPIF               : 1;
    };
} PIR1bits @ 0xF9E;

// Register: IPR1
extern volatile unsigned char           IPR1                @ 0xF9F;
// bit and bitfield definitions
extern volatile bit TMR1IP              @ ((unsigned)&IPR1*8)+0;
extern volatile bit TMR2IP              @ ((unsigned)&IPR1*8)+1;
extern volatile bit CCP1IP              @ ((unsigned)&IPR1*8)+2;
extern volatile bit SSPIP               @ ((unsigned)&IPR1*8)+3;
extern volatile bit TXIP                @ ((unsigned)&IPR1*8)+4;
extern volatile bit RCIP                @ ((unsigned)&IPR1*8)+5;
extern volatile bit ADIP                @ ((unsigned)&IPR1*8)+6;
extern volatile bit SPPIP               @ ((unsigned)&IPR1*8)+7;
extern union {
    struct {
        volatile unsigned TMR1IP              : 1;
        volatile unsigned TMR2IP              : 1;
        volatile unsigned CCP1IP              : 1;
        volatile unsigned SSPIP               : 1;
        volatile unsigned TXIP                : 1;
        volatile unsigned RCIP                : 1;
        volatile unsigned ADIP                : 1;
        volatile unsigned SPPIP               : 1;
    };
} IPR1bits @ 0xF9F;

// Register: PIE2
extern volatile unsigned char           PIE2                @ 0xFA0;
// bit and bitfield definitions
extern volatile bit CCP2IE              @ ((unsigned)&PIE2*8)+0;
extern volatile bit TMR3IE              @ ((unsigned)&PIE2*8)+1;
extern volatile bit HLVDIE              @ ((unsigned)&PIE2*8)+2;
extern volatile bit BCLIE               @ ((unsigned)&PIE2*8)+3;
extern volatile bit EEIE                @ ((unsigned)&PIE2*8)+4;
extern volatile bit USBIE               @ ((unsigned)&PIE2*8)+5;
extern volatile bit CMIE                @ ((unsigned)&PIE2*8)+6;
extern volatile bit OSCFIE              @ ((unsigned)&PIE2*8)+7;
extern volatile bit LVDIE               @ ((unsigned)&PIE2*8)+2;
extern union {
    struct {
        volatile unsigned CCP2IE              : 1;
        volatile unsigned TMR3IE              : 1;
        volatile unsigned HLVDIE              : 1;
        volatile unsigned BCLIE               : 1;
        volatile unsigned EEIE                : 1;
        volatile unsigned USBIE               : 1;
        volatile unsigned CMIE                : 1;
        volatile unsigned OSCFIE              : 1;
    };
    struct {
        volatile unsigned                     : 2;
        volatile unsigned LVDIE               : 1;
    };
} PIE2bits @ 0xFA0;

// Register: PIR2
extern volatile unsigned char           PIR2                @ 0xFA1;
// bit and bitfield definitions
extern volatile bit CCP2IF              @ ((unsigned)&PIR2*8)+0;
extern volatile bit TMR3IF              @ ((unsigned)&PIR2*8)+1;
extern volatile bit HLVDIF              @ ((unsigned)&PIR2*8)+2;
extern volatile bit BCLIF               @ ((unsigned)&PIR2*8)+3;
extern volatile bit EEIF                @ ((unsigned)&PIR2*8)+4;
extern volatile bit USBIF               @ ((unsigned)&PIR2*8)+5;
extern volatile bit CMIF                @ ((unsigned)&PIR2*8)+6;
extern volatile bit OSCFIF              @ ((unsigned)&PIR2*8)+7;
extern volatile bit LVDIF               @ ((unsigned)&PIR2*8)+2;
extern union {
    struct {
        volatile unsigned CCP2IF              : 1;
        volatile unsigned TMR3IF              : 1;
        volatile unsigned HLVDIF              : 1;
        volatile unsigned BCLIF               : 1;
        volatile unsigned EEIF                : 1;
        volatile unsigned USBIF               : 1;
        volatile unsigned CMIF                : 1;
        volatile unsigned OSCFIF              : 1;
    };
    struct {
        volatile unsigned                     : 2;
        volatile unsigned LVDIF               : 1;
    };
} PIR2bits @ 0xFA1;

// Register: IPR2
extern volatile unsigned char           IPR2                @ 0xFA2;
// bit and bitfield definitions
extern volatile bit CCP2IP              @ ((unsigned)&IPR2*8)+0;
extern volatile bit TMR3IP              @ ((unsigned)&IPR2*8)+1;
extern volatile bit HLVDIP              @ ((unsigned)&IPR2*8)+2;
extern volatile bit BCLIP               @ ((unsigned)&IPR2*8)+3;
extern volatile bit EEIP                @ ((unsigned)&IPR2*8)+4;
extern volatile bit USBIP               @ ((unsigned)&IPR2*8)+5;
extern volatile bit CMIP                @ ((unsigned)&IPR2*8)+6;
extern volatile bit OSCFIP              @ ((unsigned)&IPR2*8)+7;
extern volatile bit LVDIP               @ ((unsigned)&IPR2*8)+2;
extern union {
    struct {
        volatile unsigned CCP2IP              : 1;
        volatile unsigned TMR3IP              : 1;
        volatile unsigned HLVDIP              : 1;
        volatile unsigned BCLIP               : 1;
        volatile unsigned EEIP                : 1;
        volatile unsigned USBIP               : 1;
        volatile unsigned CMIP                : 1;
        volatile unsigned OSCFIP              : 1;
    };
    struct {
        volatile unsigned                     : 2;
        volatile unsigned LVDIP               : 1;
    };
} IPR2bits @ 0xFA2;

// Register: EECON1
extern volatile unsigned char           EECON1              @ 0xFA6;
// bit and bitfield definitions
extern volatile bit RD                  @ ((unsigned)&EECON1*8)+0;
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 FREE                @ ((unsigned)&EECON1*8)+4;
extern volatile bit CFGS                @ ((unsigned)&EECON1*8)+6;
extern volatile bit EEPGD               @ ((unsigned)&EECON1*8)+7;
extern union {
    struct {
        volatile unsigned RD                  : 1;
        volatile unsigned WR                  : 1;
        volatile unsigned WREN                : 1;
        volatile unsigned WRERR               : 1;
        volatile unsigned FREE                : 1;
        volatile unsigned                     : 1;
        volatile unsigned CFGS                : 1;
        volatile unsigned EEPGD               : 1;
    };
} EECON1bits @ 0xFA6;

// Register: EECON2
extern volatile unsigned char           EECON2              @ 0xFA7;
// bit and bitfield definitions

// Register: EEDATA
extern volatile unsigned char           EEDATA              @ 0xFA8;
// bit and bitfield definitions

// Register: EEADR
extern volatile unsigned char           EEADR               @ 0xFA9;
// bit and bitfield definitions

// Register: RCSTA
extern volatile unsigned char           RCSTA               @ 0xFAB;
// bit and bitfield definitions
extern volatile bit RX9D                @ ((unsigned)&RCSTA*8)+0;
extern volatile bit OERR                @ ((unsigned)&RCSTA*8)+1;
extern volatile bit FERR                @ ((unsigned)&RCSTA*8)+2;
extern volatile bit ADDEN               @ ((unsigned)&RCSTA*8)+3;
extern volatile bit CREN                @ ((unsigned)&RCSTA*8)+4;
extern volatile bit SREN                @ ((unsigned)&RCSTA*8)+5;
extern volatile bit RX9                 @ ((unsigned)&RCSTA*8)+6;
extern volatile bit SPEN                @ ((unsigned)&RCSTA*8)+7;
extern volatile bit ADEN                @ ((unsigned)&RCSTA*8)+3;
extern union {
    struct {
        volatile unsigned RX9D                : 1;
        volatile unsigned OERR                : 1;
        volatile unsigned FERR                : 1;
        volatile unsigned ADDEN               : 1;
        volatile unsigned CREN                : 1;
        volatile unsigned SREN                : 1;
        volatile unsigned RX9                 : 1;
        volatile unsigned SPEN                : 1;
    };
    struct {
        volatile unsigned                     : 3;
        volatile unsigned ADEN                : 1;
    };
} RCSTAbits @ 0xFAB;

// Register: TXSTA
extern volatile unsigned char           TXSTA               @ 0xFAC;
// bit and bitfield definitions
extern volatile bit TX9D                @ ((unsigned)&TXSTA*8)+0;
extern volatile bit TRMT                @ ((unsigned)&TXSTA*8)+1;
extern volatile bit BRGH                @ ((unsigned)&TXSTA*8)+2;
extern volatile bit SENDB               @ ((unsigned)&TXSTA*8)+3;
extern volatile bit SYNC                @ ((unsigned)&TXSTA*8)+4;
extern volatile bit TXEN                @ ((unsigned)&TXSTA*8)+5;
extern volatile bit TX9                 @ ((unsigned)&TXSTA*8)+6;
extern volatile bit CSRC                @ ((unsigned)&TXSTA*8)+7;
extern union {
    struct {
        volatile unsigned TX9D                : 1;
        volatile unsigned TRMT                : 1;
        volatile unsigned BRGH                : 1;
        volatile unsigned SENDB               : 1;
        volatile unsigned SYNC                : 1;
        volatile unsigned TXEN                : 1;
        volatile unsigned TX9                 : 1;
        volatile unsigned CSRC                : 1;
    };
} TXSTAbits @ 0xFAC;

// Register: TXREG
extern volatile unsigned char           TXREG               @ 0xFAD;
// bit and bitfield definitions

// Register: RCREG
extern volatile unsigned char           RCREG               @ 0xFAE;
// bit and bitfield definitions

// Register: SPBRG
extern volatile unsigned char           SPBRG               @ 0xFAF;
// bit and bitfield definitions

// Register: SPBRGH
extern volatile unsigned char           SPBRGH              @ 0xFB0;
// bit and bitfield definitions

// Register: T3CON
extern volatile unsigned char           T3CON               @ 0xFB1;
// bit and bitfield definitions
extern volatile bit TMR3ON              @ ((unsigned)&T3CON*8)+0;
extern volatile bit TMR3CS              @ ((unsigned)&T3CON*8)+1;
extern volatile bit nT3SYNC             @ ((unsigned)&T3CON*8)+2;
extern volatile bit T3CCP1              @ ((unsigned)&T3CON*8)+3;
extern volatile bit T3CCP2              @ ((unsigned)&T3CON*8)+6;
//extern volatile bit RD16               @ ((unsigned)&T3CON*8)+7;
extern volatile bit T3SYNC              @ ((unsigned)&T3CON*8)+2;
extern volatile bit T3CKPS0             @ ((unsigned)&T3CON*8)+4;
extern volatile bit T3CKPS1             @ ((unsigned)&T3CON*8)+5;
extern volatile bit T3NSYNC             @ ((unsigned)&T3CON*8)+2;
extern union {
    struct {
        volatile unsigned TMR3ON              : 1;
        volatile unsigned TMR3CS              : 1;
        volatile unsigned nT3SYNC             : 1;
        volatile unsigned T3CCP1              : 1;
        volatile unsigned T3CKPS              : 2;
        volatile unsigned T3CCP2              : 1;
        volatile unsigned RD16                : 1;
    };
    struct {
        volatile unsigned                     : 2;
        volatile unsigned T3SYNC              : 1;
        volatile unsigned : 1;
        volatile unsigned T3CKPS0             : 1;
        volatile unsigned T3CKPS1             : 1;
    };
    struct {
        volatile unsigned : 2;
        volatile unsigned T3NSYNC             : 1;
    };
} T3CONbits @ 0xFB1;
// bit and bitfield definitions

// Register: TMR3L
extern volatile unsigned char           TMR3L               @ 0xFB2;
// bit and bitfield definitions

// Register: TMR3H
extern volatile unsigned char           TMR3H               @ 0xFB3;
// bit and bitfield definitions

// Register: TMR3
extern volatile unsigned int            TMR3                @ 0xFB2;

// Register: CMCON
extern volatile unsigned char           CMCON               @ 0xFB4;
// bit and bitfield definitions
extern volatile bit CIS                 @ ((unsigned)&CMCON*8)+3;
extern volatile bit C1INV               @ ((unsigned)&CMCON*8)+4;
extern volatile bit C2INV               @ ((unsigned)&CMCON*8)+5;
extern volatile bit C1OUT               @ ((unsigned)&CMCON*8)+6;
extern volatile bit C2OUT               @ ((unsigned)&CMCON*8)+7;
extern volatile bit CM0                 @ ((unsigned)&CMCON*8)+0;
extern volatile bit CM1                 @ ((unsigned)&CMCON*8)+1;
extern volatile bit CM2                 @ ((unsigned)&CMCON*8)+2;
extern union {
    struct {
        volatile unsigned CM                  : 3;
        volatile unsigned CIS                 : 1;
        volatile unsigned C1INV               : 1;
        volatile unsigned C2INV               : 1;
        volatile unsigned C1OUT               : 1;
        volatile unsigned C2OUT               : 1;
    };
    struct {
        volatile unsigned CM0                 : 1;
        volatile unsigned CM1                 : 1;
        volatile unsigned CM2                 : 1;
    };
} CMCONbits @ 0xFB4;

// Register: CVRCON
extern volatile unsigned char           CVRCON              @ 0xFB5;
// bit and bitfield definitions
extern volatile bit CVRSS               @ ((unsigned)&CVRCON*8)+4;
extern volatile bit CVRR                @ ((unsigned)&CVRCON*8)+5;
extern volatile bit CVROE               @ ((unsigned)&CVRCON*8)+6;
extern volatile bit CVREN               @ ((unsigned)&CVRCON*8)+7;
extern volatile bit CVR0                @ ((unsigned)&CVRCON*8)+0;
extern volatile bit CVR1                @ ((unsigned)&CVRCON*8)+1;
extern volatile bit CVR2                @ ((unsigned)&CVRCON*8)+2;
extern volatile bit CVR3                @ ((unsigned)&CVRCON*8)+3;
extern volatile bit CVREF               @ ((unsigned)&CVRCON*8)+4;
extern union {
    struct {
        volatile unsigned CVR                 : 4;
        volatile unsigned CVRSS               : 1;
        volatile unsigned CVRR                : 1;
        volatile unsigned CVROE               : 1;
        volatile unsigned CVREN               : 1;
    };
    struct {
        volatile unsigned CVR0                : 1;
        volatile unsigned CVR1                : 1;
        volatile unsigned CVR2                : 1;
        volatile unsigned CVR3                : 1;
        volatile unsigned CVREF               : 1;
    };
} CVRCONbits @ 0xFB5;

// Register: ECCP1AS
extern volatile unsigned char           ECCP1AS             @ 0xFB6;
extern volatile unsigned char           CCP1AS              @ 0xFB6;
// bit and bitfield definitions
extern volatile bit ECCPASE             @ ((unsigned)&ECCP1AS*8)+7;
extern volatile bit PSSBD0              @ ((unsigned)&ECCP1AS*8)+0;
extern volatile bit PSSBD1              @ ((unsigned)&ECCP1AS*8)+1;
extern volatile bit PSSAC0              @ ((unsigned)&ECCP1AS*8)+2;
extern volatile bit PSSAC1              @ ((unsigned)&ECCP1AS*8)+3;
extern volatile bit ECCPAS0             @ ((unsigned)&ECCP1AS*8)+4;
extern volatile bit ECCPAS1             @ ((unsigned)&ECCP1AS*8)+5;
extern volatile bit ECCPAS2             @ ((unsigned)&ECCP1AS*8)+6;
extern union {
    struct {
        volatile unsigned PSSBD               : 2;
        volatile unsigned PSSAC               : 2;
        volatile unsigned ECCPAS              : 3;
        volatile unsigned ECCPASE             : 1;
    };
    struct {
        volatile unsigned PSSBD0              : 1;
        volatile unsigned PSSBD1              : 1;
        volatile unsigned PSSAC0              : 1;
        volatile unsigned PSSAC1              : 1;
        volatile unsigned ECCPAS0             : 1;
        volatile unsigned ECCPAS1             : 1;
        volatile unsigned ECCPAS2             : 1;
    };
} ECCP1ASbits @ 0xFB6;

// Register: ECCP1DEL
extern volatile unsigned char           ECCP1DEL            @ 0xFB7;
extern volatile unsigned char           CCP1DEL             @ 0xFB7;
// bit and bitfield definitions
extern volatile bit PRSEN               @ ((unsigned)&ECCP1DEL*8)+7;
extern volatile bit PDC0                @ ((unsigned)&ECCP1DEL*8)+0;
extern volatile bit PDC1                @ ((unsigned)&ECCP1DEL*8)+1;
extern volatile bit PDC2                @ ((unsigned)&ECCP1DEL*8)+2;
extern volatile bit PDC3                @ ((unsigned)&ECCP1DEL*8)+3;
extern volatile bit PDC4                @ ((unsigned)&ECCP1DEL*8)+4;
extern volatile bit PDC5                @ ((unsigned)&ECCP1DEL*8)+5;
extern volatile bit PDC6                @ ((unsigned)&ECCP1DEL*8)+6;
extern union {
    struct {
        volatile unsigned PDC                 : 7;
        volatile unsigned PRSEN               : 1;
    };
    struct {
        volatile unsigned PDC0                : 1;
        volatile unsigned PDC1                : 1;
        volatile unsigned PDC2                : 1;
        volatile unsigned PDC3                : 1;
        volatile unsigned PDC4                : 1;
        volatile unsigned PDC5                : 1;
        volatile unsigned PDC6                : 1;
    };
} ECCP1DELbits @ 0xFB7;

// Register: BAUDCON
extern volatile unsigned char           BAUDCON             @ 0xFB8;
extern volatile unsigned char           BAUDCTL             @ 0xFB8;
// bit and bitfield definitions
extern volatile bit ABDEN               @ ((unsigned)&BAUDCON*8)+0;
extern volatile bit WUE                 @ ((unsigned)&BAUDCON*8)+1;
extern volatile bit BRG16               @ ((unsigned)&BAUDCON*8)+3;
extern volatile bit TXCKP               @ ((unsigned)&BAUDCON*8)+4;
extern volatile bit RXDTP               @ ((unsigned)&BAUDCON*8)+5;
extern volatile bit RCIDL               @ ((unsigned)&BAUDCON*8)+6;
extern volatile bit ABDOVF              @ ((unsigned)&BAUDCON*8)+7;
extern volatile bit SCKP                @ ((unsigned)&BAUDCON*8)+4;
extern volatile bit RCMT                @ ((unsigned)&BAUDCON*8)+6;
extern union {
    struct {
        volatile unsigned ABDEN               : 1;
        volatile unsigned WUE                 : 1;
        volatile unsigned                     : 1;
        volatile unsigned BRG16               : 1;
        volatile unsigned TXCKP               : 1;
        volatile unsigned RXDTP               : 1;
        volatile unsigned RCIDL               : 1;
        volatile unsigned ABDOVF              : 1;
    };
    struct {
        volatile unsigned : 4;
        volatile unsigned SCKP                : 1;
        volatile unsigned : 1;
        volatile unsigned RCMT                : 1;
    };
} BAUDCONbits @ 0xFB8;

// Register: CCP2CON
extern volatile unsigned char           CCP2CON             @ 0xFBA;
// bit and bitfield definitions
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 DC2B0               @ ((unsigned)&CCP2CON*8)+4;
extern volatile bit DC2B1               @ ((unsigned)&CCP2CON*8)+5;
extern union {
    struct {
        volatile unsigned CCP2M               : 4;
        volatile unsigned DC2B                : 2;
    };
    struct {
        volatile unsigned CCP2M0              : 1;
        volatile unsigned CCP2M1              : 1;
        volatile unsigned CCP2M2              : 1;
        volatile unsigned CCP2M3              : 1;
        volatile unsigned DC2B0               : 1;
        volatile unsigned DC2B1               : 1;
    };
} CCP2CONbits @ 0xFBA;
// bit and bitfield definitions

// Register: CCPR2L
extern volatile unsigned char           CCPR2L              @ 0xFBB;
// bit and bitfield definitions

// Register: CCPR2H
extern volatile unsigned char           CCPR2H              @ 0xFBC;
// bit and bitfield definitions

// Register: CCPR2
extern volatile unsigned int            CCPR2               @ 0xFBB;

// Register: CCP1CON
extern volatile unsigned char           CCP1CON             @ 0xFBD;
extern volatile unsigned char           ECCP1CON            @ 0xFBD;
// bit and bitfield definitions
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 DC1B0               @ ((unsigned)&CCP1CON*8)+4;
extern volatile bit DC1B1               @ ((unsigned)&CCP1CON*8)+5;
extern volatile bit P1M0                @ ((unsigned)&CCP1CON*8)+6;
extern volatile bit P1M1                @ ((unsigned)&CCP1CON*8)+7;
extern union {
    struct {
        volatile unsigned CCP1M               : 4;
        volatile unsigned DC1B                : 2;
        volatile unsigned P1M                 : 2;
    };
    struct {
        volatile unsigned CCP1M0              : 1;
        volatile unsigned CCP1M1              : 1;
        volatile unsigned CCP1M2              : 1;
        volatile unsigned CCP1M3              : 1;
        volatile unsigned DC1B0               : 1;
        volatile unsigned DC1B1               : 1;
        volatile unsigned P1M0                : 1;
        volatile unsigned P1M1                : 1;
    };
} CCP1CONbits @ 0xFBD;
// bit and bitfield definitions

// Register: CCPR1L
extern volatile unsigned char           CCPR1L              @ 0xFBE;
// bit and bitfield definitions

// Register: CCPR1H
extern volatile unsigned char           CCPR1H              @ 0xFBF;
// bit and bitfield definitions

// Register: CCPR1
extern volatile unsigned int            CCPR1               @ 0xFBE;

// Register: ADCON2
extern volatile unsigned char           ADCON2              @ 0xFC0;
// bit and bitfield definitions
extern volatile bit ADFM                @ ((unsigned)&ADCON2*8)+7;
extern volatile bit ADCS0               @ ((unsigned)&ADCON2*8)+0;
extern volatile bit ADCS1               @ ((unsigned)&ADCON2*8)+1;
extern volatile bit ADCS2               @ ((unsigned)&ADCON2*8)+2;
extern volatile bit ACQT0               @ ((unsigned)&ADCON2*8)+3;
extern volatile bit ACQT1               @ ((unsigned)&ADCON2*8)+4;
extern volatile bit ACQT2               @ ((unsigned)&ADCON2*8)+5;
extern union {
    struct {
        volatile unsigned ADCS                : 3;
        volatile unsigned ACQT                : 3;
        volatile unsigned                     : 1;
        volatile unsigned ADFM                : 1;
    };
    struct {
        volatile unsigned ADCS0               : 1;
        volatile unsigned ADCS1               : 1;
        volatile unsigned ADCS2               : 1;
        volatile unsigned ACQT0               : 1;
        volatile unsigned ACQT1               : 1;
        volatile unsigned ACQT2               : 1;
    };
} ADCON2bits @ 0xFC0;

// Register: ADCON1
extern volatile unsigned char           ADCON1              @ 0xFC1;
// bit and bitfield definitions
extern volatile bit PCFG0               @ ((unsigned)&ADCON1*8)+0;
extern volatile bit PCFG1               @ ((unsigned)&ADCON1*8)+1;
extern volatile bit PCFG2               @ ((unsigned)&ADCON1*8)+2;
extern volatile bit PCFG3               @ ((unsigned)&ADCON1*8)+3;
extern volatile bit VCFG0               @ ((unsigned)&ADCON1*8)+4;
extern volatile bit VCFG1               @ ((unsigned)&ADCON1*8)+5;
extern union {
    struct {
        volatile unsigned PCFG                : 4;
        volatile unsigned VCFG                : 2;
    };
    struct {
        volatile unsigned PCFG0               : 1;
        volatile unsigned PCFG1               : 1;
        volatile unsigned PCFG2               : 1;
        volatile unsigned PCFG3               : 1;
        volatile unsigned VCFG0               : 1;
        volatile unsigned VCFG1               : 1;
    };
} ADCON1bits @ 0xFC1;

// Register: ADCON0
extern volatile unsigned char           ADCON0              @ 0xFC2;
// bit and bitfield definitions
extern volatile bit ADON                @ ((unsigned)&ADCON0*8)+0;
extern volatile bit GO_nDONE            @ ((unsigned)&ADCON0*8)+1;
extern volatile bit GO_DONE             @ ((unsigned)&ADCON0*8)+1;
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 DONE                @ ((unsigned)&ADCON0*8)+1;
extern volatile bit GO                  @ ((unsigned)&ADCON0*8)+1;
extern volatile bit nDONE               @ ((unsigned)&ADCON0*8)+1;
extern union {
    struct {
        volatile unsigned ADON                : 1;
        volatile unsigned GO_nDONE            : 1;
        volatile unsigned CHS                 : 4;
    };
    struct {
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 4;
    };
    struct {
        volatile unsigned                     : 1;
        volatile unsigned GO_DONE             : 1;
        volatile unsigned CHS0                : 1;
        volatile unsigned CHS1                : 1;
        volatile unsigned CHS2                : 1;
        volatile unsigned CHS3                : 1;
    };
    struct {
        volatile unsigned : 1;
        volatile unsigned DONE                : 1;
    };
    struct {
        volatile unsigned : 1;
        volatile unsigned GO                  : 1;
    };
    struct {
        volatile unsigned : 1;
        volatile unsigned nDONE               : 1;
    };
} ADCON0bits @ 0xFC2;
// bit and bitfield definitions

// Register: ADRESL
extern volatile unsigned char           ADRESL              @ 0xFC3;
// bit and bitfield definitions

// Register: ADRESH
extern volatile unsigned char           ADRESH              @ 0xFC4;
// bit and bitfield definitions

// Register: ADRES
extern volatile unsigned int            ADRES               @ 0xFC3;

// Register: SSPCON2
extern volatile unsigned char           SSPCON2             @ 0xFC5;
// bit and bitfield definitions
extern volatile bit SEN                 @ ((unsigned)&SSPCON2*8)+0;
extern volatile bit RSEN                @ ((unsigned)&SSPCON2*8)+1;
extern volatile bit PEN                 @ ((unsigned)&SSPCON2*8)+2;
extern volatile bit RCEN                @ ((unsigned)&SSPCON2*8)+3;
extern volatile bit ACKEN               @ ((unsigned)&SSPCON2*8)+4;
extern volatile bit ACKDT               @ ((unsigned)&SSPCON2*8)+5;
extern volatile bit ACKSTAT             @ ((unsigned)&SSPCON2*8)+6;
extern volatile bit GCEN                @ ((unsigned)&SSPCON2*8)+7;
extern union {
    struct {
        volatile unsigned SEN                 : 1;
        volatile unsigned RSEN                : 1;
        volatile unsigned PEN                 : 1;
        volatile unsigned RCEN                : 1;
        volatile unsigned ACKEN               : 1;
        volatile unsigned ACKDT               : 1;
        volatile unsigned ACKSTAT             : 1;
        volatile unsigned GCEN                : 1;
    };
} SSPCON2bits @ 0xFC5;

// Register: SSPCON1
extern volatile unsigned char           SSPCON1             @ 0xFC6;
// bit and bitfield definitions
extern volatile bit CKP                 @ ((unsigned)&SSPCON1*8)+4;
extern volatile bit SSPEN               @ ((unsigned)&SSPCON1*8)+5;
extern volatile bit SSPOV               @ ((unsigned)&SSPCON1*8)+6;
extern volatile bit WCOL                @ ((unsigned)&SSPCON1*8)+7;
extern volatile bit SSPM0               @ ((unsigned)&SSPCON1*8)+0;
extern volatile bit SSPM1               @ ((unsigned)&SSPCON1*8)+1;
extern volatile bit SSPM2               @ ((unsigned)&SSPCON1*8)+2;
extern volatile bit SSPM3               @ ((unsigned)&SSPCON1*8)+3;
extern union {
    struct {
        volatile unsigned SSPM                : 4;
        volatile unsigned CKP                 : 1;
        volatile unsigned SSPEN               : 1;
        volatile unsigned SSPOV               : 1;
        volatile unsigned WCOL                : 1;
    };
    struct {
        volatile unsigned SSPM0               : 1;
        volatile unsigned SSPM1               : 1;
        volatile unsigned SSPM2               : 1;
        volatile unsigned SSPM3               : 1;
    };
} SSPCON1bits @ 0xFC6;

// Register: SSPSTAT
extern volatile unsigned char           SSPSTAT             @ 0xFC7;
// bit and bitfield definitions
extern volatile bit BF                  @ ((unsigned)&SSPSTAT*8)+0;
extern volatile bit UA                  @ ((unsigned)&SSPSTAT*8)+1;
extern volatile bit R_nW                @ ((unsigned)&SSPSTAT*8)+2;
extern volatile bit S                   @ ((unsigned)&SSPSTAT*8)+3;
extern volatile bit P                   @ ((unsigned)&SSPSTAT*8)+4;
extern volatile bit D_nA                @ ((unsigned)&SSPSTAT*8)+5;
extern volatile bit CKE                 @ ((unsigned)&SSPSTAT*8)+6;
extern volatile bit SMP                 @ ((unsigned)&SSPSTAT*8)+7;
extern volatile bit R_W                 @ ((unsigned)&SSPSTAT*8)+2;
extern volatile bit D_A                 @ ((unsigned)&SSPSTAT*8)+5;
extern volatile bit I2C_READ            @ ((unsigned)&SSPSTAT*8)+2;
extern volatile bit I2C_START           @ ((unsigned)&SSPSTAT*8)+3;
extern volatile bit I2C_STOP            @ ((unsigned)&SSPSTAT*8)+4;
extern volatile bit I2C_DAT             @ ((unsigned)&SSPSTAT*8)+5;
extern volatile bit nW                  @ ((unsigned)&SSPSTAT*8)+2;
extern volatile bit nA                  @ ((unsigned)&SSPSTAT*8)+5;
extern volatile bit nWRITE              @ ((unsigned)&SSPSTAT*8)+2;
extern volatile bit nADDRESS            @ ((unsigned)&SSPSTAT*8)+5;
extern volatile bit READ_WRITE          @ ((unsigned)&SSPSTAT*8)+2;
extern volatile bit DATA_ADDRESS        @ ((unsigned)&SSPSTAT*8)+5;
extern volatile bit R                   @ ((unsigned)&SSPSTAT*8)+2;
extern volatile bit D                   @ ((unsigned)&SSPSTAT*8)+5;
extern union {
    struct {
        volatile unsigned BF                  : 1;
        volatile unsigned UA                  : 1;
        volatile unsigned R_nW                : 1;
        volatile unsigned S                   : 1;
        volatile unsigned P                   : 1;
        volatile unsigned D_nA                : 1;
        volatile unsigned CKE                 : 1;
        volatile unsigned SMP                 : 1;
    };
    struct {
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
    };
    struct {
        volatile unsigned                     : 2;
        volatile unsigned R_W                 : 1;
        volatile unsigned : 2;
        volatile unsigned D_A                 : 1;
    };
    struct {
        volatile unsigned : 2;
        volatile unsigned I2C_READ            : 1;
        volatile unsigned I2C_START           : 1;
        volatile unsigned I2C_STOP            : 1;
        volatile unsigned I2C_DAT             : 1;
    };
    struct {
        volatile unsigned : 2;
        volatile unsigned nW                  : 1;
        volatile unsigned : 2;
        volatile unsigned nA                  : 1;
    };
    struct {
        volatile unsigned : 2;
        volatile unsigned nWRITE              : 1;
        volatile unsigned : 2;
        volatile unsigned nADDRESS            : 1;
    };
    struct {
        volatile unsigned : 2;
        volatile unsigned READ_WRITE          : 1;
        volatile unsigned : 2;
        volatile unsigned DATA_ADDRESS        : 1;
    };
    struct {
        volatile unsigned : 2;
        volatile unsigned R                   : 1;
        volatile unsigned : 2;
        volatile unsigned D                   : 1;
    };
} SSPSTATbits @ 0xFC7;

// Register: SSPADD
extern volatile unsigned char           SSPADD              @ 0xFC8;
// bit and bitfield definitions

// Register: SSPBUF
extern volatile unsigned char           SSPBUF              @ 0xFC9;
// bit and bitfield definitions

// Register: T2CON
extern volatile unsigned char           T2CON               @ 0xFCA;
// bit and bitfield definitions
extern volatile bit TMR2ON              @ ((unsigned)&T2CON*8)+2;
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 TOUTPS0             @ ((unsigned)&T2CON*8)+3;
extern volatile bit TOUTPS1             @ ((unsigned)&T2CON*8)+4;
extern volatile bit TOUTPS2             @ ((unsigned)&T2CON*8)+5;
extern volatile bit TOUTPS3             @ ((unsigned)&T2CON*8)+6;
extern union {
    struct {
        volatile unsigned T2CKPS              : 2;
        volatile unsigned TMR2ON              : 1;
        volatile unsigned TOUTPS              : 4;
    };
    struct {
        volatile unsigned T2CKPS0             : 1;
        volatile unsigned T2CKPS1             : 1;
        volatile unsigned                     : 1;
        volatile unsigned T2OUTPS0            : 1;
        volatile unsigned T2OUTPS1            : 1;
        volatile unsigned T2OUTPS2            : 1;
        volatile unsigned T2OUTPS3            : 1;
    };
    struct {
        volatile unsigned : 3;
        volatile unsigned TOUTPS0             : 1;
        volatile unsigned TOUTPS1             : 1;
        volatile unsigned TOUTPS2             : 1;
        volatile unsigned TOUTPS3             : 1;
    };
} T2CONbits @ 0xFCA;

// Register: PR2
extern volatile unsigned char           PR2                 @ 0xFCB;
// bit and bitfield definitions

// Register: TMR2
extern volatile unsigned char           TMR2                @ 0xFCC;
// bit and bitfield definitions

// Register: T1CON
extern volatile unsigned char           T1CON               @ 0xFCD;
// bit and bitfield definitions
extern volatile bit TMR1ON              @ ((unsigned)&T1CON*8)+0;
extern volatile bit TMR1CS              @ ((unsigned)&T1CON*8)+1;
extern volatile bit nT1SYNC             @ ((unsigned)&T1CON*8)+2;
extern volatile bit T1OSCEN             @ ((unsigned)&T1CON*8)+3;
extern volatile bit T1RUN               @ ((unsigned)&T1CON*8)+6;
//extern volatile bit RD16               @ ((unsigned)&T1CON*8)+7;
extern volatile bit T1SYNC              @ ((unsigned)&T1CON*8)+2;
extern volatile bit T1CKPS0             @ ((unsigned)&T1CON*8)+4;
extern volatile bit T1CKPS1             @ ((unsigned)&T1CON*8)+5;
extern union {
    struct {
        volatile unsigned TMR1ON              : 1;
        volatile unsigned TMR1CS              : 1;
        volatile unsigned nT1SYNC             : 1;
        volatile unsigned T1OSCEN             : 1;
        volatile unsigned T1CKPS              : 2;
        volatile unsigned T1RUN               : 1;
        volatile unsigned RD16                : 1;
    };
    struct {
        volatile unsigned                     : 2;
        volatile unsigned T1SYNC              : 1;
        volatile unsigned : 1;
        volatile unsigned T1CKPS0             : 1;
        volatile unsigned T1CKPS1             : 1;
    };
} T1CONbits @ 0xFCD;
// bit and bitfield definitions

// Register: TMR1L
extern volatile unsigned char           TMR1L               @ 0xFCE;
// bit and bitfield definitions

// Register: TMR1H
extern volatile unsigned char           TMR1H               @ 0xFCF;
// bit and bitfield definitions

// Register: TMR1
extern volatile unsigned int            TMR1                @ 0xFCE;

// Register: RCON
extern volatile unsigned char           RCON                @ 0xFD0;
// bit and bitfield definitions
extern volatile bit nBOR                @ ((unsigned)&RCON*8)+0;
extern volatile bit nPOR                @ ((unsigned)&RCON*8)+1;
extern volatile bit nPD                 @ ((unsigned)&RCON*8)+2;
extern volatile bit nTO                 @ ((unsigned)&RCON*8)+3;
extern volatile bit nRI                 @ ((unsigned)&RCON*8)+4;
extern volatile bit SBOREN              @ ((unsigned)&RCON*8)+6;
extern volatile bit IPEN                @ ((unsigned)&RCON*8)+7;
extern volatile bit BOR                 @ ((unsigned)&RCON*8)+0;
extern volatile bit POR                 @ ((unsigned)&RCON*8)+1;
extern volatile bit PD                  @ ((unsigned)&RCON*8)+2;
extern volatile bit TO                  @ ((unsigned)&RCON*8)+3;
extern volatile bit RI                  @ ((unsigned)&RCON*8)+4;
extern volatile bit nIPEN               @ ((unsigned)&RCON*8)+7;
extern union {
    struct {
        volatile unsigned nBOR                : 1;
        volatile unsigned nPOR                : 1;
        volatile unsigned nPD                 : 1;
        volatile unsigned nTO                 : 1;
        volatile unsigned nRI                 : 1;
        volatile unsigned                     : 1;
        volatile unsigned SBOREN              : 1;
        volatile unsigned IPEN                : 1;
    };
    struct {
        volatile unsigned BOR                 : 1;
        volatile unsigned POR                 : 1;
        volatile unsigned PD                  : 1;
        volatile unsigned TO                  : 1;
        volatile unsigned RI                  : 1;
        volatile unsigned : 2;
        volatile unsigned nIPEN               : 1;
    };
} RCONbits @ 0xFD0;

// Register: WDTCON
extern volatile unsigned char           WDTCON              @ 0xFD1;
// bit and bitfield definitions
extern volatile bit SWDTEN              @ ((unsigned)&WDTCON*8)+0;
extern volatile bit SWDTE               @ ((unsigned)&WDTCON*8)+0;
extern union {
    struct {
        volatile unsigned SWDTEN              : 1;
    };
    struct {
        volatile unsigned SWDTE               : 1;
    };
} WDTCONbits @ 0xFD1;

// Register: HLVDCON
extern volatile unsigned char           HLVDCON             @ 0xFD2;
extern volatile unsigned char           LVDCON              @ 0xFD2;
// bit and bitfield definitions
extern volatile bit HLVDEN              @ ((unsigned)&HLVDCON*8)+4;
extern volatile bit IRVST               @ ((unsigned)&HLVDCON*8)+5;
extern volatile bit VDIRMAG             @ ((unsigned)&HLVDCON*8)+7;
extern volatile bit HLVDL0              @ ((unsigned)&HLVDCON*8)+0;
extern volatile bit HLVDL1              @ ((unsigned)&HLVDCON*8)+1;
extern volatile bit HLVDL2              @ ((unsigned)&HLVDCON*8)+2;
extern volatile bit HLVDL3              @ ((unsigned)&HLVDCON*8)+3;
extern volatile bit LVDL0               @ ((unsigned)&HLVDCON*8)+0;
extern volatile bit LVDL1               @ ((unsigned)&HLVDCON*8)+1;
extern volatile bit LVDL2               @ ((unsigned)&HLVDCON*8)+2;
extern volatile bit LVDL3               @ ((unsigned)&HLVDCON*8)+3;
extern volatile bit LVDEN               @ ((unsigned)&HLVDCON*8)+4;
extern volatile bit IVRST               @ ((unsigned)&HLVDCON*8)+5;
extern volatile bit LVV0                @ ((unsigned)&HLVDCON*8)+0;
extern volatile bit LVV1                @ ((unsigned)&HLVDCON*8)+1;
extern volatile bit LVV2                @ ((unsigned)&HLVDCON*8)+2;
extern volatile bit LVV3                @ ((unsigned)&HLVDCON*8)+3;
extern volatile bit BGST                @ ((unsigned)&HLVDCON*8)+5;
extern union {
    struct {
        volatile unsigned HLVDL               : 4;
        volatile unsigned HLVDEN              : 1;
        volatile unsigned IRVST               : 1;
        volatile unsigned                     : 1;
        volatile unsigned VDIRMAG             : 1;
    };
    struct {
        volatile unsigned HLVDL0              : 1;
        volatile unsigned HLVDL1              : 1;
        volatile unsigned HLVDL2              : 1;
        volatile unsigned HLVDL3              : 1;
    };
    struct {
        volatile unsigned LVDL0               : 1;
        volatile unsigned LVDL1               : 1;
        volatile unsigned LVDL2               : 1;
        volatile unsigned LVDL3               : 1;
        volatile unsigned LVDEN               : 1;
        volatile unsigned IVRST               : 1;
    };
    struct {
        volatile unsigned LVV0                : 1;
        volatile unsigned LVV1                : 1;
        volatile unsigned LVV2                : 1;
        volatile unsigned LVV3                : 1;
        volatile unsigned : 1;
        volatile unsigned BGST                : 1;
    };
} HLVDCONbits @ 0xFD2;

// Register: OSCCON
extern volatile unsigned char           OSCCON              @ 0xFD3;
// bit and bitfield definitions
extern volatile bit IOFS                @ ((unsigned)&OSCCON*8)+2;
extern volatile bit OSTS                @ ((unsigned)&OSCCON*8)+3;
extern volatile bit IDLEN               @ ((unsigned)&OSCCON*8)+7;
extern volatile bit SCS0                @ ((unsigned)&OSCCON*8)+0;
extern volatile bit SCS1                @ ((unsigned)&OSCCON*8)+1;
extern volatile bit FLTS                @ ((unsigned)&OSCCON*8)+2;
extern volatile bit IRCF0               @ ((unsigned)&OSCCON*8)+4;
extern volatile bit IRCF1               @ ((unsigned)&OSCCON*8)+5;
extern volatile bit IRCF2               @ ((unsigned)&OSCCON*8)+6;
extern union {
    struct {
        volatile unsigned SCS                 : 2;
        volatile unsigned IOFS                : 1;
        volatile unsigned OSTS                : 1;
        volatile unsigned IRCF                : 3;
        volatile unsigned IDLEN               : 1;
    };
    struct {
        volatile unsigned SCS0                : 1;
        volatile unsigned SCS1                : 1;
        volatile unsigned FLTS                : 1;
        volatile unsigned                     : 1;
        volatile unsigned IRCF0               : 1;
        volatile unsigned IRCF1               : 1;
        volatile unsigned IRCF2               : 1;
    };
} OSCCONbits @ 0xFD3;

// Register: T0CON
extern volatile unsigned char           T0CON               @ 0xFD5;
// bit and bitfield definitions
extern volatile bit PSA                 @ ((unsigned)&T0CON*8)+3;
extern volatile bit T0SE                @ ((unsigned)&T0CON*8)+4;
extern volatile bit T0CS                @ ((unsigned)&T0CON*8)+5;
extern volatile bit T08BIT              @ ((unsigned)&T0CON*8)+6;
extern volatile bit TMR0ON              @ ((unsigned)&T0CON*8)+7;
extern volatile bit T0PS0               @ ((unsigned)&T0CON*8)+0;
extern volatile bit T0PS1               @ ((unsigned)&T0CON*8)+1;
extern volatile bit T0PS2               @ ((unsigned)&T0CON*8)+2;
extern union {
    struct {
        volatile unsigned T0PS                : 3;
        volatile unsigned PSA                 : 1;
        volatile unsigned T0SE                : 1;
        volatile unsigned T0CS                : 1;
        volatile unsigned T08BIT              : 1;
        volatile unsigned TMR0ON              : 1;
    };
    struct {
        volatile unsigned T0PS0               : 1;
        volatile unsigned T0PS1               : 1;
        volatile unsigned T0PS2               : 1;
    };
} T0CONbits @ 0xFD5;
// bit and bitfield definitions

// Register: TMR0L
extern volatile unsigned char           TMR0L               @ 0xFD6;
// bit and bitfield definitions

// Register: TMR0H
extern volatile unsigned char           TMR0H               @ 0xFD7;
// bit and bitfield definitions

// Register: TMR0
extern volatile unsigned int            TMR0                @ 0xFD6;

// Register: STATUS
extern volatile unsigned char           STATUS              @ 0xFD8;
// bit and bitfield definitions
extern volatile bit CARRY               @ ((unsigned)&STATUS*8)+0;
extern volatile bit DC                  @ ((unsigned)&STATUS*8)+1;
extern volatile bit ZERO                @ ((unsigned)&STATUS*8)+2;
extern volatile bit OV                  @ ((unsigned)&STATUS*8)+3;
extern volatile bit N                   @ ((unsigned)&STATUS*8)+4;
extern union {
    struct {
        volatile unsigned C                   : 1;
        volatile unsigned DC                  : 1;
        volatile unsigned Z                   : 1;
        volatile unsigned OV                  : 1;
        volatile unsigned N                   : 1;
    };
} STATUSbits @ 0xFD8;
// bit and bitfield definitions

// Register: FSR2L
extern volatile unsigned char           FSR2L               @ 0xFD9;
// bit and bitfield definitions

// Register: FSR2H
extern volatile unsigned char           FSR2H               @ 0xFDA;
// bit and bitfield definitions
extern union {
    struct {
        volatile unsigned                     : 4;
    };
} FSR2Hbits @ 0xFDA;

// Register: FSR2
extern volatile unsigned int            FSR2                @ 0xFD9;

// Register: PLUSW2
extern volatile unsigned char           PLUSW2              @ 0xFDB;
// bit and bitfield definitions

// Register: PREINC2
extern volatile unsigned char           PREINC2             @ 0xFDC;
// bit and bitfield definitions

// Register: POSTDEC2
extern volatile unsigned char           POSTDEC2            @ 0xFDD;
// bit and bitfield definitions

// Register: POSTINC2
extern volatile unsigned char           POSTINC2            @ 0xFDE;
// bit and bitfield definitions

// Register: INDF2
extern volatile unsigned char           INDF2               @ 0xFDF;
// bit and bitfield definitions

// Register: BSR
extern volatile unsigned char           BSR                 @ 0xFE0;
// bit and bitfield definitions
extern union {
    struct {
        volatile unsigned                     : 4;
    };
} BSRbits @ 0xFE0;
// bit and bitfield definitions

// Register: FSR1L
extern volatile unsigned char           FSR1L               @ 0xFE1;
// bit and bitfield definitions

// Register: FSR1H
extern volatile unsigned char           FSR1H               @ 0xFE2;
// bit and bitfield definitions
extern union {
    struct {
        volatile unsigned                     : 4;
    };
} FSR1Hbits @ 0xFE2;

// Register: FSR1
extern volatile unsigned int            FSR1                @ 0xFE1;

// Register: PLUSW1
extern volatile unsigned char           PLUSW1              @ 0xFE3;
// bit and bitfield definitions

// Register: PREINC1
extern volatile unsigned char           PREINC1             @ 0xFE4;
// bit and bitfield definitions

// Register: POSTDEC1
extern volatile unsigned char           POSTDEC1            @ 0xFE5;
// bit and bitfield definitions

// Register: POSTINC1
extern volatile unsigned char           POSTINC1            @ 0xFE6;
// bit and bitfield definitions

// Register: INDF1
extern volatile unsigned char           INDF1               @ 0xFE7;
// bit and bitfield definitions

// Register: WREG
extern volatile unsigned char           WREG                @ 0xFE8;
// bit and bitfield definitions
// bit and bitfield definitions

// Register: FSR0L
extern volatile unsigned char           FSR0L               @ 0xFE9;
// bit and bitfield definitions

// Register: FSR0H
extern volatile unsigned char           FSR0H               @ 0xFEA;
// bit and bitfield definitions
extern union {
    struct {
        volatile unsigned                     : 4;
    };
} FSR0Hbits @ 0xFEA;

// Register: FSR0
extern volatile unsigned int            FSR0                @ 0xFE9;

// Register: PLUSW0
extern volatile unsigned char           PLUSW0              @ 0xFEB;
// bit and bitfield definitions

// Register: PREINC0
extern volatile unsigned char           PREINC0             @ 0xFEC;
// bit and bitfield definitions

// Register: POSTDEC0
extern volatile unsigned char           POSTDEC0            @ 0xFED;
// bit and bitfield definitions

// Register: POSTINC0
extern volatile unsigned char           POSTINC0            @ 0xFEE;
// bit and bitfield definitions

// Register: INDF0
extern volatile unsigned char           INDF0               @ 0xFEF;
// bit and bitfield definitions

// Register: INTCON3
extern volatile unsigned char           INTCON3             @ 0xFF0;
// bit and bitfield definitions
extern volatile bit INT1IF              @ ((unsigned)&INTCON3*8)+0;
extern volatile bit INT2IF              @ ((unsigned)&INTCON3*8)+1;
extern volatile bit INT1IE              @ ((unsigned)&INTCON3*8)+3;
extern volatile bit INT2IE              @ ((unsigned)&INTCON3*8)+4;
extern volatile bit INT1IP              @ ((unsigned)&INTCON3*8)+6;
extern volatile bit INT2IP              @ ((unsigned)&INTCON3*8)+7;
extern volatile bit INT1F               @ ((unsigned)&INTCON3*8)+0;
extern volatile bit INT2F               @ ((unsigned)&INTCON3*8)+1;
extern volatile bit INT1E               @ ((unsigned)&INTCON3*8)+3;
extern volatile bit INT2E               @ ((unsigned)&INTCON3*8)+4;
extern volatile bit INT1P               @ ((unsigned)&INTCON3*8)+6;
extern volatile bit INT2P               @ ((unsigned)&INTCON3*8)+7;
extern union {
    struct {
        volatile unsigned INT1IF              : 1;
        volatile unsigned INT2IF              : 1;
        volatile unsigned                     : 1;
        volatile unsigned INT1IE              : 1;
        volatile unsigned INT2IE              : 1;
        volatile unsigned : 1;
        volatile unsigned INT1IP              : 1;
        volatile unsigned INT2IP              : 1;
    };
    struct {
        volatile unsigned INT1F               : 1;
        volatile unsigned INT2F               : 1;
        volatile unsigned : 1;
        volatile unsigned INT1E               : 1;
        volatile unsigned INT2E               : 1;
        volatile unsigned : 1;
        volatile unsigned INT1P               : 1;
        volatile unsigned INT2P               : 1;
    };
} INTCON3bits @ 0xFF0;

// Register: INTCON2
extern volatile unsigned char           INTCON2             @ 0xFF1;
// bit and bitfield definitions
extern volatile bit RBIP                @ ((unsigned)&INTCON2*8)+0;
extern volatile bit TMR0IP              @ ((unsigned)&INTCON2*8)+2;
extern volatile bit INTEDG2             @ ((unsigned)&INTCON2*8)+4;
extern volatile bit INTEDG1             @ ((unsigned)&INTCON2*8)+5;
extern volatile bit INTEDG0             @ ((unsigned)&INTCON2*8)+6;
extern volatile bit nRBPU               @ ((unsigned)&INTCON2*8)+7;
extern volatile bit T0IP                @ ((unsigned)&INTCON2*8)+2;
extern volatile bit RBPU                @ ((unsigned)&INTCON2*8)+7;
extern union {
    struct {
        volatile unsigned RBIP                : 1;
        volatile unsigned                     : 1;
        volatile unsigned TMR0IP              : 1;
        volatile unsigned : 1;
        volatile unsigned INTEDG2             : 1;
        volatile unsigned INTEDG1             : 1;
        volatile unsigned INTEDG0             : 1;
        volatile unsigned nRBPU               : 1;
    };
    struct {
        volatile unsigned : 2;
        volatile unsigned T0IP                : 1;
        volatile unsigned : 4;
        volatile unsigned RBPU                : 1;
    };
} INTCON2bits @ 0xFF1;

// Register: INTCON
extern volatile unsigned char           INTCON              @ 0xFF2;
// bit and bitfield definitions
extern volatile bit RBIF                @ ((unsigned)&INTCON*8)+0;
extern volatile bit INT0IF              @ ((unsigned)&INTCON*8)+1;
extern volatile bit TMR0IF              @ ((unsigned)&INTCON*8)+2;
extern volatile bit RBIE                @ ((unsigned)&INTCON*8)+3;
extern volatile bit INT0IE              @ ((unsigned)&INTCON*8)+4;
extern volatile bit TMR0IE              @ ((unsigned)&INTCON*8)+5;
extern volatile bit PEIE_GIEL           @ ((unsigned)&INTCON*8)+6;
extern volatile bit GIE_GIEH            @ ((unsigned)&INTCON*8)+7;
extern volatile bit PEIE                @ ((unsigned)&INTCON*8)+6;
extern volatile bit GIE                 @ ((unsigned)&INTCON*8)+7;
extern volatile bit GIEL                @ ((unsigned)&INTCON*8)+6;
extern volatile bit GIEH                @ ((unsigned)&INTCON*8)+7;
extern volatile bit INT0F               @ ((unsigned)&INTCON*8)+1;
extern volatile bit T0IF                @ ((unsigned)&INTCON*8)+2;
extern volatile bit INT0E               @ ((unsigned)&INTCON*8)+4;
extern volatile bit T0IE                @ ((unsigned)&INTCON*8)+5;
extern union {
    struct {
        volatile unsigned RBIF                : 1;
        volatile unsigned INT0IF              : 1;
        volatile unsigned TMR0IF              : 1;
        volatile unsigned RBIE                : 1;
        volatile unsigned INT0IE              : 1;
        volatile unsigned TMR0IE              : 1;
        volatile unsigned PEIE_GIEL           : 1;
        volatile unsigned GIE_GIEH            : 1;
    };
    struct {
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned PEIE                : 1;
        volatile unsigned GIE                 : 1;
    };
    struct {
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned GIEL                : 1;
        volatile unsigned GIEH                : 1;
    };
    struct {
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
    };
    struct {
        volatile unsigned                     : 1;
        volatile unsigned INT0F               : 1;
        volatile unsigned T0IF                : 1;
        volatile unsigned : 1;
        volatile unsigned INT0E               : 1;
        volatile unsigned T0IE                : 1;
        volatile unsigned : 1;
        volatile unsigned : 1;
    };
    struct {
        volatile unsigned : 6;
        volatile unsigned : 1;
        volatile unsigned : 1;
    };
} INTCONbits @ 0xFF2;
// bit and bitfield definitions

// Register: PRODL
extern volatile unsigned char           PRODL               @ 0xFF3;
// bit and bitfield definitions

// Register: PRODH
extern volatile unsigned char           PRODH               @ 0xFF4;
// bit and bitfield definitions

// Register: PROD
extern volatile unsigned int            PROD                @ 0xFF3;

// Register: TABLAT
extern volatile unsigned char           TABLAT              @ 0xFF5;
// bit and bitfield definitions
// bit and bitfield definitions

// Register: TBLPTRL
extern volatile unsigned char           TBLPTRL             @ 0xFF6;
// bit and bitfield definitions

// Register: TBLPTRH
extern volatile unsigned char           TBLPTRH             @ 0xFF7;
// bit and bitfield definitions

// Register: TBLPTRU
extern volatile unsigned char           TBLPTRU             @ 0xFF8;
// bit and bitfield definitions
extern union {
    struct {
        volatile unsigned                     : 5;
    };
} TBLPTRUbits @ 0xFF8;

// Register: TBLPTR
extern volatile far unsigned char * TBLPTR              @ 0xFF6;
// bit and bitfield definitions

// Register: PCL
extern volatile unsigned char           PCL                 @ 0xFF9;
// bit and bitfield definitions

// Register: PCLATH
extern volatile unsigned char           PCLATH              @ 0xFFA;
// bit and bitfield definitions

// Register: PCLATU
extern volatile unsigned char           PCLATU              @ 0xFFB;
// bit and bitfield definitions
extern union {
    struct {
        volatile unsigned                     : 5;
    };
} PCLATUbits @ 0xFFB;

// Register: PCLAT
extern volatile unsigned short long int PCLAT               @ 0xFF9;

// Register: STKPTR
extern volatile unsigned char           STKPTR              @ 0xFFC;
// bit and bitfield definitions
extern volatile bit STKUNF              @ ((unsigned)&STKPTR*8)+6;
extern volatile bit STKFUL              @ ((unsigned)&STKPTR*8)+7;
extern volatile bit STKPTR0             @ ((unsigned)&STKPTR*8)+0;
extern volatile bit STKPTR1             @ ((unsigned)&STKPTR*8)+1;
extern volatile bit STKPTR2             @ ((unsigned)&STKPTR*8)+2;
extern volatile bit STKPTR3             @ ((unsigned)&STKPTR*8)+3;
extern volatile bit STKPTR4             @ ((unsigned)&STKPTR*8)+4;
extern volatile bit STKOVF              @ ((unsigned)&STKPTR*8)+7;
extern union {
    struct {
        volatile unsigned STKPTR              : 5;
        volatile unsigned                     : 1;
        volatile unsigned STKUNF              : 1;
        volatile unsigned STKFUL              : 1;
    };
    struct {
        volatile unsigned STKPTR0             : 1;
        volatile unsigned STKPTR1             : 1;
        volatile unsigned STKPTR2             : 1;
        volatile unsigned STKPTR3             : 1;
        volatile unsigned STKPTR4             : 1;
    };
    struct {
        volatile unsigned : 7;
        volatile unsigned STKOVF              : 1;
    };
} STKPTRbits @ 0xFFC;
// bit and bitfield definitions

// Register: TOSL
extern volatile unsigned char           TOSL                @ 0xFFD;
// bit and bitfield definitions

// Register: TOSH
extern volatile unsigned char           TOSH                @ 0xFFE;
// bit and bitfield definitions

// Register: TOSU
extern volatile unsigned char           TOSU                @ 0xFFF;
// bit and bitfield definitions
extern union {
    struct {
        volatile unsigned                     : 5;
    };
} TOSUbits @ 0xFFF;

// Register: TOS
extern volatile unsigned short long int TOS                 @ 0xFFD;

// Register: TMR0_Internal
extern volatile unsigned int            TMR0_Internal       @ 0x1000;
// bit and bitfield definitions
extern union {
    struct {
        volatile unsigned InternalTMR         : 16;
    };
} TMR0_Internalbits @ 0x1000;

// Register: TMR0_Prescale
extern volatile unsigned char           TMR0_Prescale       @ 0x1002;
// bit and bitfield definitions

// Register: TMR1_Internal
extern volatile unsigned int            TMR1_Internal       @ 0x1003;
// bit and bitfield definitions
extern union {
    struct {
        volatile unsigned InternalTMR         : 16;
    };
} TMR1_Internalbits @ 0x1003;

// Register: TMR1_Prescale
extern volatile unsigned char           TMR1_Prescale       @ 0x1005;
// bit and bitfield definitions

// Register: TMR2_Prescale
extern volatile unsigned char           TMR2_Prescale       @ 0x1006;
// bit and bitfield definitions

// Register: TMR3_Internal
extern volatile unsigned int            TMR3_Internal       @ 0x1007;
// bit and bitfield definitions
extern union {
    struct {
        volatile unsigned InternalTMR         : 16;
    };
} TMR3_Internalbits @ 0x1007;

// Register: TMR3_Prescale
extern volatile unsigned char           TMR3_Prescale       @ 0x1009;
// bit and bitfield definitions


#endif

Hope this clears up your concerns,

BigDog
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top