//
// Register Declarations for Microchip 16C926 Processor
//
//
// This header file was automatically generated by:
//
// inc2h.pl
//
// Copyright (c) 2002, Kevin L. Pauba, All Rights Reserved
//
// SDCC is licensed under the GNU Public license (GPL) v2. Note that
// this license covers the code to the compiler and other executables,
// but explicitly does not cover any code or objects generated by sdcc.
//
// For pic device libraries and header files which are derived from
// Microchip header (.inc) and linker script (.lkr) files Microchip
// requires that "The header files should state that they are only to be
// used with authentic Microchip devices" which makes them incompatible
// with the GPL. Pic device libraries and header files are located at
// non-free/lib and non-free/include directories respectively.
// Sdcc should be run with the --use-non-free command line option in
// order to include non-free header files and libraries.
//
// See http://sdcc.sourceforge.net/ for the latest information on sdcc.
//
// 
#ifndef P16C926_H
#define P16C926_H

//
// Register addresses.
//
#define INDF_ADDR       0x0000
#define TMR0_ADDR       0x0001
#define PCL_ADDR        0x0002
#define STATUS_ADDR     0x0003
#define FSR_ADDR        0x0004
#define PORTA_ADDR      0x0005
#define PORTB_ADDR      0x0006
#define PORTC_ADDR      0x0007
#define PORTD_ADDR      0x0008
#define PORTE_ADDR      0x0009
#define PCLATH_ADDR     0x000A
#define INTCON_ADDR     0x000B
#define PIR1_ADDR       0x000C
#define TMR1_ADDR       0x000E
#define TMR1L_ADDR      0x000E
#define TMR1H_ADDR      0x000F
#define T1CON_ADDR      0x0010
#define TMR2_ADDR       0x0011
#define T2CON_ADDR      0x0012
#define SSPBUF_ADDR     0x0013
#define SSPCON_ADDR     0x0014
#define CCPR1_ADDR      0x0015
#define CCPR1L_ADDR     0x0015
#define CCPR1H_ADDR     0x0016
#define CCP1CON_ADDR    0x0017
#define ADRESH_ADDR     0x001E
#define ADCON0_ADDR     0x001F
#define OPTION_REG_ADDR 0x0081
#define TRISA_ADDR      0x0085
#define TRISB_ADDR      0x0086
#define TRISC_ADDR      0x0087
#define TRISD_ADDR      0x0088
#define TRISE_ADDR      0x0089
#define PIE1_ADDR       0x008C
#define PCON_ADDR       0x008E
#define PR2_ADDR        0x0092
#define SSPADD_ADDR     0x0093
#define SSPSTAT_ADDR    0x0094
#define ADRESL_ADDR     0x009E
#define ADCON1_ADDR     0x009F
#define PORTF_ADDR      0x0107
#define PORTG_ADDR      0x0108
#define PMCON1_ADDR     0x010C
#define LCDSE_ADDR      0x010D
#define LCDPS_ADDR      0x010E
#define LCDCON_ADDR     0x010F
#define LCDD00_ADDR     0x0110
#define LCDD01_ADDR     0x0111
#define LCDD02_ADDR     0x0112
#define LCDD03_ADDR     0x0113
#define LCDD04_ADDR     0x0114
#define LCDD05_ADDR     0x0115
#define LCDD06_ADDR     0x0116
#define LCDD07_ADDR     0x0117
#define LCDD08_ADDR     0x0118
#define LCDD09_ADDR     0x0119
#define LCDD10_ADDR     0x011A
#define LCDD11_ADDR     0x011B
#define LCDD12_ADDR     0x011C
#define LCDD13_ADDR     0x011D
#define LCDD14_ADDR     0x011E
#define LCDD15_ADDR     0x011F
#define TRISF_ADDR      0x0187
#define TRISG_ADDR      0x0188
#define PMDATA_ADDR     0x018C
#define PMADR_ADDR      0x018D
#define PMDATH_ADDR     0x018E
#define PMADRH_ADDR     0x018F

//
// Memory organization.
//



//         LIST

//==========================================================================
//  MPASM PIC16C926 processor include
//
//  (c) Copyright 1999-2012 Microchip Technology, All rights reserved
//==========================================================================

//         NOLIST

//==========================================================================
//  This header file defines configurations, registers, and other useful
//  bits of information for the PIC16C926 microcontroller.  These names
//  are taken to match the data sheets as closely as possible.
//
//  Note that the processor must be selected before this file is included.
//  The processor may be selected the following ways:
//
//       1. Command line switch:
//               C:\MPASM MYFILE.ASM /PIC16C926
//       2. LIST directive in the source file
//               LIST   P=PIC16C926
//       3. Processor Type entry in the MPASM full-screen interface
//       4. Setting the processor in the MPLAB Project Dialog
//==========================================================================

//==========================================================================
//
//       Verify Processor
//
//==========================================================================
//        IFNDEF __16C926
//            MESSG "Processor-header file mismatch.  Verify selected processor."
//         ENDIF



//==========================================================================
//
//       Register Definitions
//
//==========================================================================

#define W                    0x0000
#define F                    0x0001

//----- Register Files -----------------------------------------------------

//-----Bank0------------------
extern __sfr  __at (INDF_ADDR)                    INDF;
extern __sfr  __at (TMR0_ADDR)                    TMR0;
extern __sfr  __at (PCL_ADDR)                     PCL;
extern __sfr  __at (STATUS_ADDR)                  STATUS;
extern __sfr  __at (FSR_ADDR)                     FSR;
extern __sfr  __at (PORTA_ADDR)                   PORTA;
extern __sfr  __at (PORTB_ADDR)                   PORTB;
extern __sfr  __at (PORTC_ADDR)                   PORTC;
extern __sfr  __at (PORTD_ADDR)                   PORTD;
extern __sfr  __at (PORTE_ADDR)                   PORTE;
extern __sfr  __at (PCLATH_ADDR)                  PCLATH;
extern __sfr  __at (INTCON_ADDR)                  INTCON;
extern __sfr  __at (PIR1_ADDR)                    PIR1;
extern __sfr  __at (TMR1_ADDR)                    TMR1;
extern __sfr  __at (TMR1L_ADDR)                   TMR1L;
extern __sfr  __at (TMR1H_ADDR)                   TMR1H;
extern __sfr  __at (T1CON_ADDR)                   T1CON;
extern __sfr  __at (TMR2_ADDR)                    TMR2;
extern __sfr  __at (T2CON_ADDR)                   T2CON;
extern __sfr  __at (SSPBUF_ADDR)                  SSPBUF;
extern __sfr  __at (SSPCON_ADDR)                  SSPCON;
extern __sfr  __at (CCPR1_ADDR)                   CCPR1;
extern __sfr  __at (CCPR1L_ADDR)                  CCPR1L;
extern __sfr  __at (CCPR1H_ADDR)                  CCPR1H;
extern __sfr  __at (CCP1CON_ADDR)                 CCP1CON;
extern __sfr  __at (ADRESH_ADDR)                  ADRESH;
extern __sfr  __at (ADCON0_ADDR)                  ADCON0;

//-----Bank1------------------
extern __sfr  __at (OPTION_REG_ADDR)              OPTION_REG;
extern __sfr  __at (TRISA_ADDR)                   TRISA;
extern __sfr  __at (TRISB_ADDR)                   TRISB;
extern __sfr  __at (TRISC_ADDR)                   TRISC;
extern __sfr  __at (TRISD_ADDR)                   TRISD;
extern __sfr  __at (TRISE_ADDR)                   TRISE;
extern __sfr  __at (PIE1_ADDR)                    PIE1;
extern __sfr  __at (PCON_ADDR)                    PCON;
extern __sfr  __at (PR2_ADDR)                     PR2;
extern __sfr  __at (SSPADD_ADDR)                  SSPADD;
extern __sfr  __at (SSPSTAT_ADDR)                 SSPSTAT;
extern __sfr  __at (ADRESL_ADDR)                  ADRESL;
extern __sfr  __at (ADCON1_ADDR)                  ADCON1;

//-----Bank2------------------
extern __sfr  __at (PORTF_ADDR)                   PORTF;
extern __sfr  __at (PORTG_ADDR)                   PORTG;
extern __sfr  __at (PMCON1_ADDR)                  PMCON1;
extern __sfr  __at (LCDSE_ADDR)                   LCDSE;
extern __sfr  __at (LCDPS_ADDR)                   LCDPS;
extern __sfr  __at (LCDCON_ADDR)                  LCDCON;
extern __sfr  __at (LCDD00_ADDR)                  LCDD00;
extern __sfr  __at (LCDD01_ADDR)                  LCDD01;
extern __sfr  __at (LCDD02_ADDR)                  LCDD02;
extern __sfr  __at (LCDD03_ADDR)                  LCDD03;
extern __sfr  __at (LCDD04_ADDR)                  LCDD04;
extern __sfr  __at (LCDD05_ADDR)                  LCDD05;
extern __sfr  __at (LCDD06_ADDR)                  LCDD06;
extern __sfr  __at (LCDD07_ADDR)                  LCDD07;
extern __sfr  __at (LCDD08_ADDR)                  LCDD08;
extern __sfr  __at (LCDD09_ADDR)                  LCDD09;
extern __sfr  __at (LCDD10_ADDR)                  LCDD10;
extern __sfr  __at (LCDD11_ADDR)                  LCDD11;
extern __sfr  __at (LCDD12_ADDR)                  LCDD12;
extern __sfr  __at (LCDD13_ADDR)                  LCDD13;
extern __sfr  __at (LCDD14_ADDR)                  LCDD14;
extern __sfr  __at (LCDD15_ADDR)                  LCDD15;

//-----Bank3------------------
extern __sfr  __at (TRISF_ADDR)                   TRISF;
extern __sfr  __at (TRISG_ADDR)                   TRISG;
extern __sfr  __at (PMDATA_ADDR)                  PMDATA;
extern __sfr  __at (PMADR_ADDR)                   PMADR;
extern __sfr  __at (PMDATH_ADDR)                  PMDATH;
extern __sfr  __at (PMADRH_ADDR)                  PMADRH;

//----- STATUS Bits -----------------------------------------------------



//----- PORTA Bits -----------------------------------------------------


//----- PORTB Bits -----------------------------------------------------


//----- PORTC Bits -----------------------------------------------------


//----- PORTD Bits -----------------------------------------------------


//----- PORTE Bits -----------------------------------------------------


//----- INTCON Bits -----------------------------------------------------



//----- PIR1 Bits -----------------------------------------------------


//----- T1CON Bits -----------------------------------------------------



//----- T2CON Bits -----------------------------------------------------



//----- SSPCON Bits -----------------------------------------------------



//----- CCP1CON Bits -----------------------------------------------------


//----- ADCON0 Bits -----------------------------------------------------





//----- OPTION_REG Bits -----------------------------------------------------



//----- TRISA Bits -----------------------------------------------------


//----- TRISB Bits -----------------------------------------------------


//----- TRISC Bits -----------------------------------------------------


//----- TRISD Bits -----------------------------------------------------


//----- TRISE Bits -----------------------------------------------------



//----- PIE1 Bits -----------------------------------------------------


//----- PCON Bits -----------------------------------------------------


//----- SSPSTAT Bits -----------------------------------------------------








//----- ADCON1 Bits -----------------------------------------------------



//----- PORTF Bits -----------------------------------------------------


//----- PORTG Bits -----------------------------------------------------


//----- PMCON1 Bits -----------------------------------------------------


//----- LCDSE Bits -----------------------------------------------------


//----- LCDPS Bits -----------------------------------------------------


//----- LCDCON Bits -----------------------------------------------------



//----- LCDD00 Bits -----------------------------------------------------


//----- LCDD01 Bits -----------------------------------------------------


//----- LCDD02 Bits -----------------------------------------------------


//----- LCDD03 Bits -----------------------------------------------------


//----- LCDD04 Bits -----------------------------------------------------


//----- LCDD05 Bits -----------------------------------------------------


//----- LCDD06 Bits -----------------------------------------------------


//----- LCDD07 Bits -----------------------------------------------------


//----- LCDD08 Bits -----------------------------------------------------


//----- LCDD09 Bits -----------------------------------------------------


//----- LCDD10 Bits -----------------------------------------------------


//----- LCDD11 Bits -----------------------------------------------------


//----- LCDD12 Bits -----------------------------------------------------


//----- LCDD13 Bits -----------------------------------------------------


//----- LCDD14 Bits -----------------------------------------------------


//----- LCDD15 Bits -----------------------------------------------------


//----- TRISF Bits -----------------------------------------------------


//----- TRISG Bits -----------------------------------------------------




//==========================================================================
//
//       RAM Definitions
//
//==========================================================================
//        __MAXRAM  H'01FF'
//        __BADRAM  H'000D'
//        __BADRAM  H'0018'-H'001D'
//        __BADRAM  H'008D'
//        __BADRAM  H'008F'-H'0091'
//        __BADRAM  H'0095'-H'009D'
//        __BADRAM  H'0105'
//        __BADRAM  H'0109'
//        __BADRAM  H'0185'
//        __BADRAM  H'0189'
//        __BADRAM  H'0190'-H'019F'

//==========================================================================
//
//       Configuration Bits
//
//   NAME            Address
//   CONFIG1           2007h
//
//==========================================================================

// The following is an assignment of address values for all of the
// configuration registers for the purpose of table reads
#define _CONFIG1             0x2007

//----- CONFIG1 Options --------------------------------------------------
#define _FOSC_LP             0x3FFC    // LP oscillator
#define _LP_OSC              0x3FFC    // LP oscillator
#define _FOSC_XT             0x3FFD    // XT oscillator
#define _XT_OSC              0x3FFD    // XT oscillator
#define _FOSC_HS             0x3FFE    // HS oscillator
#define _HS_OSC              0x3FFE    // HS oscillator
#define _FOSC_RC             0x3FFF    // RC oscillator
#define _RC_OSC              0x3FFF    // RC oscillator

#define _WDTE_OFF            0x3FFB    // WDT disabled
#define _WDT_OFF             0x3FFB    // WDT disabled
#define _WDTE_ON             0x3FFF    // WDT enabled
#define _WDT_ON              0x3FFF    // WDT enabled

#define _PWRTE_ON            0x3FF7    // PWRT enabled
#define _PWRTE_OFF           0x3FFF    // PWRT disabled

#define _CP_ALL              0x3FCF    // All memory is code protected
#define _CP_75               0x3FDF    // 0000h-1EFFh code protected
#define _CP_50               0x3FEF    // 0000h-0FFFh code protected
#define _CP_OFF              0x3FFF    // Code protection off

#define _BOREN_OFF           0x3FBF    // BOR disabled
#define _BODEN_OFF           0x3FBF    // BOR disabled
#define _BOREN_ON            0x3FFF    // BOR enabled
#define _BODEN_ON            0x3FFF    // BOR enabled

//----- DEVID Equates --------------------------------------------------
#define _DEVID1              0x2006

//----- IDLOC Equates --------------------------------------------------
#define _IDLOC0              0x2000
#define _IDLOC1              0x2001
#define _IDLOC2              0x2002
#define _IDLOC3              0x2003

//         LIST

// ----- ADCON0 bits --------------------
typedef union {
  struct {
    unsigned char ADON:1;
    unsigned char :1;
    unsigned char GO_NOT_DONE:1;
    unsigned char CHS0:1;
    unsigned char CHS1:1;
    unsigned char CHS2:1;
    unsigned char ADCS0:1;
    unsigned char ADCS1:1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char GO:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char NOT_DONE:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char GO_DONE:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __ADCON0bits_t;
extern volatile __ADCON0bits_t __at(ADCON0_ADDR) ADCON0bits;

// ----- ADCON1 bits --------------------
typedef union {
  struct {
    unsigned char PCFG0:1;
    unsigned char PCFG1:1;
    unsigned char PCFG2:1;
    unsigned char PCFG3:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char ADFM:1;
  };
} __ADCON1bits_t;
extern volatile __ADCON1bits_t __at(ADCON1_ADDR) ADCON1bits;

// ----- CCP1CON bits --------------------
typedef union {
  struct {
    unsigned char CCP1M0:1;
    unsigned char CCP1M1:1;
    unsigned char CCP1M2:1;
    unsigned char CCP1M3:1;
    unsigned char CCP1Y:1;
    unsigned char CCP1X:1;
    unsigned char :1;
    unsigned char :1;
  };
} __CCP1CONbits_t;
extern volatile __CCP1CONbits_t __at(CCP1CON_ADDR) CCP1CONbits;

// ----- INTCON bits --------------------
typedef union {
  struct {
    unsigned char RBIF:1;
    unsigned char INTF:1;
    unsigned char T0IF:1;
    unsigned char RBIE:1;
    unsigned char INTE:1;
    unsigned char T0IE:1;
    unsigned char PEIE:1;
    unsigned char GIE:1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char TMR0IF:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char TMR0IE:1;
    unsigned char :1;
    unsigned char :1;
  };
} __INTCONbits_t;
extern volatile __INTCONbits_t __at(INTCON_ADDR) INTCONbits;

// ----- LCDCON bits --------------------
typedef union {
  struct {
    unsigned char LMUX0:1;
    unsigned char LMUX1:1;
    unsigned char CS0:1;
    unsigned char CS1:1;
    unsigned char VGEN:1;
    unsigned char WERR:1;
    unsigned char SLPEN:1;
    unsigned char LCDEN:1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char BIAS:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __LCDCONbits_t;
extern volatile __LCDCONbits_t __at(LCDCON_ADDR) LCDCONbits;

// ----- LCDD00 bits --------------------
typedef union {
  struct {
    unsigned char SEG00:1;
    unsigned char SEG01:1;
    unsigned char SEG02:1;
    unsigned char SEG03:1;
    unsigned char SEG04:1;
    unsigned char SEG05:1;
    unsigned char SEG06:1;
    unsigned char SEG07:1;
  };
} __LCDD00bits_t;
extern volatile __LCDD00bits_t __at(LCDD00_ADDR) LCDD00bits;

// ----- LCDD01 bits --------------------
typedef union {
  struct {
    unsigned char SEG08:1;
    unsigned char SEG09:1;
    unsigned char SEG10:1;
    unsigned char SEG11:1;
    unsigned char SEG12:1;
    unsigned char SEG13:1;
    unsigned char SEG14:1;
    unsigned char SEG15:1;
  };
} __LCDD01bits_t;
extern volatile __LCDD01bits_t __at(LCDD01_ADDR) LCDD01bits;

// ----- LCDD02 bits --------------------
typedef union {
  struct {
    unsigned char SEG16:1;
    unsigned char SEG17:1;
    unsigned char SEG18:1;
    unsigned char SEG19:1;
    unsigned char SEG20:1;
    unsigned char SEG21:1;
    unsigned char SEG22:1;
    unsigned char SEG23:1;
  };
} __LCDD02bits_t;
extern volatile __LCDD02bits_t __at(LCDD02_ADDR) LCDD02bits;

// ----- LCDD03 bits --------------------
typedef union {
  struct {
    unsigned char SEG24:1;
    unsigned char SEG25:1;
    unsigned char SEG26:1;
    unsigned char SEG27:1;
    unsigned char SEG28:1;
    unsigned char SEG29:1;
    unsigned char SEG30:1;
    unsigned char SEG31:1;
  };
} __LCDD03bits_t;
extern volatile __LCDD03bits_t __at(LCDD03_ADDR) LCDD03bits;

// ----- LCDD04 bits --------------------
typedef union {
  struct {
    unsigned char SEG00:1;
    unsigned char SEG01:1;
    unsigned char SEG02:1;
    unsigned char SEG03:1;
    unsigned char SEG04:1;
    unsigned char SEG05:1;
    unsigned char SEG06:1;
    unsigned char SEG07:1;
  };
} __LCDD04bits_t;
extern volatile __LCDD04bits_t __at(LCDD04_ADDR) LCDD04bits;

// ----- LCDD05 bits --------------------
typedef union {
  struct {
    unsigned char SEG08:1;
    unsigned char SEG09:1;
    unsigned char SEG10:1;
    unsigned char SEG11:1;
    unsigned char SEG12:1;
    unsigned char SEG13:1;
    unsigned char SEG14:1;
    unsigned char SEG15:1;
  };
} __LCDD05bits_t;
extern volatile __LCDD05bits_t __at(LCDD05_ADDR) LCDD05bits;

// ----- LCDD06 bits --------------------
typedef union {
  struct {
    unsigned char SEG16:1;
    unsigned char SEG17:1;
    unsigned char SEG18:1;
    unsigned char SEG19:1;
    unsigned char SEG20:1;
    unsigned char SEG21:1;
    unsigned char SEG22:1;
    unsigned char SEG23:1;
  };
} __LCDD06bits_t;
extern volatile __LCDD06bits_t __at(LCDD06_ADDR) LCDD06bits;

// ----- LCDD07 bits --------------------
typedef union {
  struct {
    unsigned char SEG24:1;
    unsigned char SEG25:1;
    unsigned char SEG26:1;
    unsigned char SEG27:1;
    unsigned char SEG28:1;
    unsigned char SEG29:1;
    unsigned char SEG30:1;
    unsigned char SEG31:1;
  };
} __LCDD07bits_t;
extern volatile __LCDD07bits_t __at(LCDD07_ADDR) LCDD07bits;

// ----- LCDD08 bits --------------------
typedef union {
  struct {
    unsigned char SEG00:1;
    unsigned char SEG01:1;
    unsigned char SEG02:1;
    unsigned char SEG03:1;
    unsigned char SEG04:1;
    unsigned char SEG05:1;
    unsigned char SEG06:1;
    unsigned char SEG07:1;
  };
} __LCDD08bits_t;
extern volatile __LCDD08bits_t __at(LCDD08_ADDR) LCDD08bits;

// ----- LCDD09 bits --------------------
typedef union {
  struct {
    unsigned char SEG08:1;
    unsigned char SEG09:1;
    unsigned char SEG10:1;
    unsigned char SEG11:1;
    unsigned char SEG12:1;
    unsigned char SEG13:1;
    unsigned char SEG14:1;
    unsigned char SEG15:1;
  };
} __LCDD09bits_t;
extern volatile __LCDD09bits_t __at(LCDD09_ADDR) LCDD09bits;

// ----- LCDD10 bits --------------------
typedef union {
  struct {
    unsigned char SEG16:1;
    unsigned char SEG17:1;
    unsigned char SEG18:1;
    unsigned char SEG19:1;
    unsigned char SEG20:1;
    unsigned char SEG21:1;
    unsigned char SEG22:1;
    unsigned char SEG23:1;
  };
} __LCDD10bits_t;
extern volatile __LCDD10bits_t __at(LCDD10_ADDR) LCDD10bits;

// ----- LCDD11 bits --------------------
typedef union {
  struct {
    unsigned char SEG24:1;
    unsigned char SEG25:1;
    unsigned char SEG26:1;
    unsigned char SEG27:1;
    unsigned char SEG28:1;
    unsigned char SEG29:1;
    unsigned char SEG30:1;
    unsigned char SEG31:1;
  };
} __LCDD11bits_t;
extern volatile __LCDD11bits_t __at(LCDD11_ADDR) LCDD11bits;

// ----- LCDD12 bits --------------------
typedef union {
  struct {
    unsigned char SEG00:1;
    unsigned char SEG01:1;
    unsigned char SEG02:1;
    unsigned char SEG03:1;
    unsigned char SEG04:1;
    unsigned char SEG05:1;
    unsigned char SEG06:1;
    unsigned char SEG07:1;
  };
} __LCDD12bits_t;
extern volatile __LCDD12bits_t __at(LCDD12_ADDR) LCDD12bits;

// ----- LCDD13 bits --------------------
typedef union {
  struct {
    unsigned char SEG08:1;
    unsigned char SEG09:1;
    unsigned char SEG10:1;
    unsigned char SEG11:1;
    unsigned char SEG12:1;
    unsigned char SEG13:1;
    unsigned char SEG14:1;
    unsigned char SEG15:1;
  };
} __LCDD13bits_t;
extern volatile __LCDD13bits_t __at(LCDD13_ADDR) LCDD13bits;

// ----- LCDD14 bits --------------------
typedef union {
  struct {
    unsigned char SEG16:1;
    unsigned char SEG17:1;
    unsigned char SEG18:1;
    unsigned char SEG19:1;
    unsigned char SEG20:1;
    unsigned char SEG21:1;
    unsigned char SEG22:1;
    unsigned char SEG23:1;
  };
} __LCDD14bits_t;
extern volatile __LCDD14bits_t __at(LCDD14_ADDR) LCDD14bits;

// ----- LCDD15 bits --------------------
typedef union {
  struct {
    unsigned char SEG24:1;
    unsigned char SEG25:1;
    unsigned char SEG26:1;
    unsigned char SEG27:1;
    unsigned char SEG28:1;
    unsigned char SEG29:1;
    unsigned char SEG30:1;
    unsigned char SEG31:1;
  };
} __LCDD15bits_t;
extern volatile __LCDD15bits_t __at(LCDD15_ADDR) LCDD15bits;

// ----- LCDPS bits --------------------
typedef union {
  struct {
    unsigned char LP0:1;
    unsigned char LP1:1;
    unsigned char LP2:1;
    unsigned char LP3:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __LCDPSbits_t;
extern volatile __LCDPSbits_t __at(LCDPS_ADDR) LCDPSbits;

// ----- LCDSE bits --------------------
typedef union {
  struct {
    unsigned char SE0:1;
    unsigned char SE5:1;
    unsigned char SE9:1;
    unsigned char SE12:1;
    unsigned char SE16:1;
    unsigned char SE20:1;
    unsigned char SE27:1;
    unsigned char SE29:1;
  };
} __LCDSEbits_t;
extern volatile __LCDSEbits_t __at(LCDSE_ADDR) LCDSEbits;

// ----- OPTION_REG bits --------------------
typedef union {
  struct {
    unsigned char PS0:1;
    unsigned char PS1:1;
    unsigned char PS2:1;
    unsigned char PSA:1;
    unsigned char T0SE:1;
    unsigned char T0CS:1;
    unsigned char INTEDG:1;
    unsigned char NOT_RBPU:1;
  };
} __OPTION_REGbits_t;
extern volatile __OPTION_REGbits_t __at(OPTION_REG_ADDR) OPTION_REGbits;

// ----- PCON bits --------------------
typedef union {
  struct {
    unsigned char NOT_BOR:1;
    unsigned char NOT_POR:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __PCONbits_t;
extern volatile __PCONbits_t __at(PCON_ADDR) PCONbits;

// ----- PIE1 bits --------------------
typedef union {
  struct {
    unsigned char TMR1IE:1;
    unsigned char TMR2IE:1;
    unsigned char CCP1IE:1;
    unsigned char SSPIE:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char ADIE:1;
    unsigned char LCDIE:1;
  };
} __PIE1bits_t;
extern volatile __PIE1bits_t __at(PIE1_ADDR) PIE1bits;

// ----- PIR1 bits --------------------
typedef union {
  struct {
    unsigned char TMR1IF:1;
    unsigned char TMR2IF:1;
    unsigned char CCP1IF:1;
    unsigned char SSPIF:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char ADIF:1;
    unsigned char LCDIF:1;
  };
} __PIR1bits_t;
extern volatile __PIR1bits_t __at(PIR1_ADDR) PIR1bits;

// ----- PMCON1 bits --------------------
typedef union {
  struct {
    unsigned char RD:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __PMCON1bits_t;
extern volatile __PMCON1bits_t __at(PMCON1_ADDR) PMCON1bits;

// ----- PORTA bits --------------------
typedef union {
  struct {
    unsigned char RA0:1;
    unsigned char RA1:1;
    unsigned char RA2:1;
    unsigned char RA3:1;
    unsigned char RA4:1;
    unsigned char RA5:1;
    unsigned char :1;
    unsigned char :1;
  };
} __PORTAbits_t;
extern volatile __PORTAbits_t __at(PORTA_ADDR) PORTAbits;

// ----- PORTB bits --------------------
typedef union {
  struct {
    unsigned char RB0:1;
    unsigned char RB1:1;
    unsigned char RB2:1;
    unsigned char RB3:1;
    unsigned char RB4:1;
    unsigned char RB5:1;
    unsigned char RB6:1;
    unsigned char RB7:1;
  };
} __PORTBbits_t;
extern volatile __PORTBbits_t __at(PORTB_ADDR) PORTBbits;

// ----- PORTC bits --------------------
typedef union {
  struct {
    unsigned char RC0:1;
    unsigned char RC1:1;
    unsigned char RC2:1;
    unsigned char RC3:1;
    unsigned char RC4:1;
    unsigned char RC5:1;
    unsigned char :1;
    unsigned char :1;
  };
} __PORTCbits_t;
extern volatile __PORTCbits_t __at(PORTC_ADDR) PORTCbits;

// ----- PORTD bits --------------------
typedef union {
  struct {
    unsigned char RD0:1;
    unsigned char RD1:1;
    unsigned char RD2:1;
    unsigned char RD3:1;
    unsigned char RD4:1;
    unsigned char RD5:1;
    unsigned char RD6:1;
    unsigned char RD7:1;
  };
} __PORTDbits_t;
extern volatile __PORTDbits_t __at(PORTD_ADDR) PORTDbits;

// ----- PORTE bits --------------------
typedef union {
  struct {
    unsigned char RE0:1;
    unsigned char RE1:1;
    unsigned char RE2:1;
    unsigned char RE3:1;
    unsigned char RE4:1;
    unsigned char RE5:1;
    unsigned char RE6:1;
    unsigned char RE7:1;
  };
} __PORTEbits_t;
extern volatile __PORTEbits_t __at(PORTE_ADDR) PORTEbits;

// ----- PORTF bits --------------------
typedef union {
  struct {
    unsigned char RF0:1;
    unsigned char RF1:1;
    unsigned char RF2:1;
    unsigned char RF3:1;
    unsigned char RF4:1;
    unsigned char RF5:1;
    unsigned char RF6:1;
    unsigned char RF7:1;
  };
} __PORTFbits_t;
extern volatile __PORTFbits_t __at(PORTF_ADDR) PORTFbits;

// ----- PORTG bits --------------------
typedef union {
  struct {
    unsigned char RG0:1;
    unsigned char RG1:1;
    unsigned char RG2:1;
    unsigned char RG3:1;
    unsigned char RG4:1;
    unsigned char RG5:1;
    unsigned char RG6:1;
    unsigned char RG7:1;
  };
} __PORTGbits_t;
extern volatile __PORTGbits_t __at(PORTG_ADDR) PORTGbits;

// ----- SSPCON bits --------------------
typedef union {
  struct {
    unsigned char SSPM0:1;
    unsigned char SSPM1:1;
    unsigned char SSPM2:1;
    unsigned char SSPM3:1;
    unsigned char CKP:1;
    unsigned char SSPEN:1;
    unsigned char SSPOV:1;
    unsigned char WCOL:1;
  };
} __SSPCONbits_t;
extern volatile __SSPCONbits_t __at(SSPCON_ADDR) SSPCONbits;

// ----- SSPSTAT bits --------------------
typedef union {
  struct {
    unsigned char BF:1;
    unsigned char UA:1;
    unsigned char R_NOT_W:1;
    unsigned char S:1;
    unsigned char P:1;
    unsigned char D_NOT_A:1;
    unsigned char CKE:1;
    unsigned char SMP:1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char R:1;
    unsigned char I2C_START:1;
    unsigned char I2C_STOP:1;
    unsigned char D:1;
    unsigned char :1;
    unsigned char :1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char I2C_READ:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char I2C_DATA:1;
    unsigned char :1;
    unsigned char :1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char R_W:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char D_A:1;
    unsigned char :1;
    unsigned char :1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char READ_WRITE:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char DATA_ADDRESS:1;
    unsigned char :1;
    unsigned char :1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char NOT_W:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char NOT_A:1;
    unsigned char :1;
    unsigned char :1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char NOT_WRITE:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char NOT_ADDRESS:1;
    unsigned char :1;
    unsigned char :1;
  };
} __SSPSTATbits_t;
extern volatile __SSPSTATbits_t __at(SSPSTAT_ADDR) SSPSTATbits;

// ----- STATUS bits --------------------
typedef union {
  struct {
    unsigned char C:1;
    unsigned char DC:1;
    unsigned char Z:1;
    unsigned char NOT_PD:1;
    unsigned char NOT_TO:1;
    unsigned char RP0:1;
    unsigned char RP1:1;
    unsigned char IRP:1;
  };
} __STATUSbits_t;
extern volatile __STATUSbits_t __at(STATUS_ADDR) STATUSbits;

// ----- T1CON bits --------------------
typedef union {
  struct {
    unsigned char TMR1ON:1;
    unsigned char TMR1CS:1;
    unsigned char NOT_T1SYNC:1;
    unsigned char T1OSCEN:1;
    unsigned char T1CKPS0:1;
    unsigned char T1CKPS1:1;
    unsigned char :1;
    unsigned char :1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char T1INSYNC:1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
  };
} __T1CONbits_t;
extern volatile __T1CONbits_t __at(T1CON_ADDR) T1CONbits;

// ----- T2CON bits --------------------
typedef union {
  struct {
    unsigned char T2CKPS0:1;
    unsigned char T2CKPS1:1;
    unsigned char TMR2ON:1;
    unsigned char TOUTPS0:1;
    unsigned char TOUTPS1:1;
    unsigned char TOUTPS2:1;
    unsigned char TOUTPS3:1;
    unsigned char :1;
  };
} __T2CONbits_t;
extern volatile __T2CONbits_t __at(T2CON_ADDR) T2CONbits;

// ----- TRISA bits --------------------
typedef union {
  struct {
    unsigned char TRISA0:1;
    unsigned char TRISA1:1;
    unsigned char TRISA2:1;
    unsigned char TRISA3:1;
    unsigned char TRISA4:1;
    unsigned char TRISA5:1;
    unsigned char :1;
    unsigned char :1;
  };
} __TRISAbits_t;
extern volatile __TRISAbits_t __at(TRISA_ADDR) TRISAbits;

// ----- TRISB bits --------------------
typedef union {
  struct {
    unsigned char TRISB0:1;
    unsigned char TRISB1:1;
    unsigned char TRISB2:1;
    unsigned char TRISB3:1;
    unsigned char TRISB4:1;
    unsigned char TRISB5:1;
    unsigned char TRISB6:1;
    unsigned char TRISB7:1;
  };
} __TRISBbits_t;
extern volatile __TRISBbits_t __at(TRISB_ADDR) TRISBbits;

// ----- TRISC bits --------------------
typedef union {
  struct {
    unsigned char TRISC0:1;
    unsigned char TRISC1:1;
    unsigned char TRISC2:1;
    unsigned char TRISC3:1;
    unsigned char TRISC4:1;
    unsigned char TRISC5:1;
    unsigned char :1;
    unsigned char :1;
  };
} __TRISCbits_t;
extern volatile __TRISCbits_t __at(TRISC_ADDR) TRISCbits;

// ----- TRISD bits --------------------
typedef union {
  struct {
    unsigned char TRISD0:1;
    unsigned char TRISD1:1;
    unsigned char TRISD2:1;
    unsigned char TRISD3:1;
    unsigned char TRISD4:1;
    unsigned char TRISD5:1;
    unsigned char TRISD6:1;
    unsigned char TRISD7:1;
  };
} __TRISDbits_t;
extern volatile __TRISDbits_t __at(TRISD_ADDR) TRISDbits;

// ----- TRISE bits --------------------
typedef union {
  struct {
    unsigned char TRISE0:1;
    unsigned char TRISE1:1;
    unsigned char TRISE2:1;
    unsigned char TRISE3:1;
    unsigned char TRISE4:1;
    unsigned char TRISE5:1;
    unsigned char TRISE6:1;
    unsigned char TRISE7:1;
  };
  struct {
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char :1;
    unsigned char PSPMODE:1;
    unsigned char IBOV:1;
    unsigned char OBF:1;
    unsigned char IBF:1;
  };
} __TRISEbits_t;
extern volatile __TRISEbits_t __at(TRISE_ADDR) TRISEbits;

// ----- TRISF bits --------------------
typedef union {
  struct {
    unsigned char TRISF0:1;
    unsigned char TRISF1:1;
    unsigned char TRISF2:1;
    unsigned char TRISF3:1;
    unsigned char TRISF4:1;
    unsigned char TRISF5:1;
    unsigned char TRISF6:1;
    unsigned char TRISF7:1;
  };
} __TRISFbits_t;
extern volatile __TRISFbits_t __at(TRISF_ADDR) TRISFbits;

// ----- TRISG bits --------------------
typedef union {
  struct {
    unsigned char TRISG0:1;
    unsigned char TRISG1:1;
    unsigned char TRISG2:1;
    unsigned char TRISG3:1;
    unsigned char TRISG4:1;
    unsigned char TRISG5:1;
    unsigned char TRISG6:1;
    unsigned char TRISG7:1;
  };
} __TRISGbits_t;
extern volatile __TRISGbits_t __at(TRISG_ADDR) TRISGbits;


#ifndef NO_BIT_DEFINES

#define ADON                 ADCON0bits.ADON                /* bit 0 */
#define GO                   ADCON0bits.GO                  /* bit 2 */
#define GO_DONE              ADCON0bits.GO_DONE             /* bit 2 */
#define GO_NOT_DONE          ADCON0bits.GO_NOT_DONE         /* bit 2 */
#define NOT_DONE             ADCON0bits.NOT_DONE            /* bit 2 */
#define CHS0                 ADCON0bits.CHS0                /* bit 3 */
#define CHS1                 ADCON0bits.CHS1                /* bit 4 */
#define CHS2                 ADCON0bits.CHS2                /* bit 5 */
#define ADCS0                ADCON0bits.ADCS0               /* bit 6 */
#define ADCS1                ADCON0bits.ADCS1               /* bit 7 */

#define PCFG0                ADCON1bits.PCFG0               /* bit 0 */
#define PCFG1                ADCON1bits.PCFG1               /* bit 1 */
#define PCFG2                ADCON1bits.PCFG2               /* bit 2 */
#define PCFG3                ADCON1bits.PCFG3               /* bit 3 */
#define ADFM                 ADCON1bits.ADFM                /* bit 7 */

#define CCP1M0               CCP1CONbits.CCP1M0             /* bit 0 */
#define CCP1M1               CCP1CONbits.CCP1M1             /* bit 1 */
#define CCP1M2               CCP1CONbits.CCP1M2             /* bit 2 */
#define CCP1M3               CCP1CONbits.CCP1M3             /* bit 3 */
#define CCP1Y                CCP1CONbits.CCP1Y              /* bit 4 */
#define CCP1X                CCP1CONbits.CCP1X              /* bit 5 */

#define RBIF                 INTCONbits.RBIF                /* bit 0 */
#define INTF                 INTCONbits.INTF                /* bit 1 */
#define T0IF                 INTCONbits.T0IF                /* bit 2 */
#define TMR0IF               INTCONbits.TMR0IF              /* bit 2 */
#define RBIE                 INTCONbits.RBIE                /* bit 3 */
#define INTE                 INTCONbits.INTE                /* bit 4 */
#define T0IE                 INTCONbits.T0IE                /* bit 5 */
#define TMR0IE               INTCONbits.TMR0IE              /* bit 5 */
#define PEIE                 INTCONbits.PEIE                /* bit 6 */
#define GIE                  INTCONbits.GIE                 /* bit 7 */

#define LMUX0                LCDCONbits.LMUX0               /* bit 0 */
#define LMUX1                LCDCONbits.LMUX1               /* bit 1 */
#define CS0                  LCDCONbits.CS0                 /* bit 2 */
#define CS1                  LCDCONbits.CS1                 /* bit 3 */
#define BIAS                 LCDCONbits.BIAS                /* bit 4 */
#define VGEN                 LCDCONbits.VGEN                /* bit 4 */
#define WERR                 LCDCONbits.WERR                /* bit 5 */
#define SLPEN                LCDCONbits.SLPEN               /* bit 6 */
#define LCDEN                LCDCONbits.LCDEN               /* bit 7 */

#define SEG00                LCDD00bits.SEG00               /* bit 0, shadows bit in LCDD04bits, LCDD08bits, LCDD12bits */
#define SEG01                LCDD00bits.SEG01               /* bit 1, shadows bit in LCDD04bits, LCDD08bits, LCDD12bits */
#define SEG02                LCDD00bits.SEG02               /* bit 2, shadows bit in LCDD04bits, LCDD08bits, LCDD12bits */
#define SEG03                LCDD00bits.SEG03               /* bit 3, shadows bit in LCDD04bits, LCDD08bits, LCDD12bits */
#define SEG04                LCDD00bits.SEG04               /* bit 4, shadows bit in LCDD04bits, LCDD08bits, LCDD12bits */
#define SEG05                LCDD00bits.SEG05               /* bit 5, shadows bit in LCDD04bits, LCDD08bits, LCDD12bits */
#define SEG06                LCDD00bits.SEG06               /* bit 6, shadows bit in LCDD04bits, LCDD08bits, LCDD12bits */
#define SEG07                LCDD00bits.SEG07               /* bit 7, shadows bit in LCDD04bits, LCDD08bits, LCDD12bits */

#define SEG08                LCDD01bits.SEG08               /* bit 0, shadows bit in LCDD05bits, LCDD09bits, LCDD13bits */
#define SEG09                LCDD01bits.SEG09               /* bit 1, shadows bit in LCDD05bits, LCDD09bits, LCDD13bits */
#define SEG10                LCDD01bits.SEG10               /* bit 2, shadows bit in LCDD05bits, LCDD09bits, LCDD13bits */
#define SEG11                LCDD01bits.SEG11               /* bit 3, shadows bit in LCDD05bits, LCDD09bits, LCDD13bits */
#define SEG12                LCDD01bits.SEG12               /* bit 4, shadows bit in LCDD05bits, LCDD09bits, LCDD13bits */
#define SEG13                LCDD01bits.SEG13               /* bit 5, shadows bit in LCDD05bits, LCDD09bits, LCDD13bits */
#define SEG14                LCDD01bits.SEG14               /* bit 6, shadows bit in LCDD05bits, LCDD09bits, LCDD13bits */
#define SEG15                LCDD01bits.SEG15               /* bit 7, shadows bit in LCDD05bits, LCDD09bits, LCDD13bits */

#define SEG16                LCDD02bits.SEG16               /* bit 0, shadows bit in LCDD06bits, LCDD10bits, LCDD14bits */
#define SEG17                LCDD02bits.SEG17               /* bit 1, shadows bit in LCDD06bits, LCDD10bits, LCDD14bits */
#define SEG18                LCDD02bits.SEG18               /* bit 2, shadows bit in LCDD06bits, LCDD10bits, LCDD14bits */
#define SEG19                LCDD02bits.SEG19               /* bit 3, shadows bit in LCDD06bits, LCDD10bits, LCDD14bits */
#define SEG20                LCDD02bits.SEG20               /* bit 4, shadows bit in LCDD06bits, LCDD10bits, LCDD14bits */
#define SEG21                LCDD02bits.SEG21               /* bit 5, shadows bit in LCDD06bits, LCDD10bits, LCDD14bits */
#define SEG22                LCDD02bits.SEG22               /* bit 6, shadows bit in LCDD06bits, LCDD10bits, LCDD14bits */
#define SEG23                LCDD02bits.SEG23               /* bit 7, shadows bit in LCDD06bits, LCDD10bits, LCDD14bits */

#define SEG24                LCDD03bits.SEG24               /* bit 0, shadows bit in LCDD07bits, LCDD11bits, LCDD15bits */
#define SEG25                LCDD03bits.SEG25               /* bit 1, shadows bit in LCDD07bits, LCDD11bits, LCDD15bits */
#define SEG26                LCDD03bits.SEG26               /* bit 2, shadows bit in LCDD07bits, LCDD11bits, LCDD15bits */
#define SEG27                LCDD03bits.SEG27               /* bit 3, shadows bit in LCDD07bits, LCDD11bits, LCDD15bits */
#define SEG28                LCDD03bits.SEG28               /* bit 4, shadows bit in LCDD07bits, LCDD11bits, LCDD15bits */
#define SEG29                LCDD03bits.SEG29               /* bit 5, shadows bit in LCDD07bits, LCDD11bits, LCDD15bits */
#define SEG30                LCDD03bits.SEG30               /* bit 6, shadows bit in LCDD07bits, LCDD11bits, LCDD15bits */
#define SEG31                LCDD03bits.SEG31               /* bit 7, shadows bit in LCDD07bits, LCDD11bits, LCDD15bits */

#define LP0                  LCDPSbits.LP0                  /* bit 0 */
#define LP1                  LCDPSbits.LP1                  /* bit 1 */
#define LP2                  LCDPSbits.LP2                  /* bit 2 */
#define LP3                  LCDPSbits.LP3                  /* bit 3 */

#define SE0                  LCDSEbits.SE0                  /* bit 0 */
#define SE5                  LCDSEbits.SE5                  /* bit 1 */
#define SE9                  LCDSEbits.SE9                  /* bit 2 */
#define SE12                 LCDSEbits.SE12                 /* bit 3 */
#define SE16                 LCDSEbits.SE16                 /* bit 4 */
#define SE20                 LCDSEbits.SE20                 /* bit 5 */
#define SE27                 LCDSEbits.SE27                 /* bit 6 */
#define SE29                 LCDSEbits.SE29                 /* bit 7 */

#define PS0                  OPTION_REGbits.PS0             /* bit 0 */
#define PS1                  OPTION_REGbits.PS1             /* bit 1 */
#define PS2                  OPTION_REGbits.PS2             /* bit 2 */
#define PSA                  OPTION_REGbits.PSA             /* bit 3 */
#define T0SE                 OPTION_REGbits.T0SE            /* bit 4 */
#define T0CS                 OPTION_REGbits.T0CS            /* bit 5 */
#define INTEDG               OPTION_REGbits.INTEDG          /* bit 6 */
#define NOT_RBPU             OPTION_REGbits.NOT_RBPU        /* bit 7 */

#define NOT_BOR              PCONbits.NOT_BOR               /* bit 0 */
#define NOT_POR              PCONbits.NOT_POR               /* bit 1 */

#define TMR1IE               PIE1bits.TMR1IE                /* bit 0 */
#define TMR2IE               PIE1bits.TMR2IE                /* bit 1 */
#define CCP1IE               PIE1bits.CCP1IE                /* bit 2 */
#define SSPIE                PIE1bits.SSPIE                 /* bit 3 */
#define ADIE                 PIE1bits.ADIE                  /* bit 6 */
#define LCDIE                PIE1bits.LCDIE                 /* bit 7 */

#define TMR1IF               PIR1bits.TMR1IF                /* bit 0 */
#define TMR2IF               PIR1bits.TMR2IF                /* bit 1 */
#define CCP1IF               PIR1bits.CCP1IF                /* bit 2 */
#define SSPIF                PIR1bits.SSPIF                 /* bit 3 */
#define ADIF                 PIR1bits.ADIF                  /* bit 6 */
#define LCDIF                PIR1bits.LCDIF                 /* bit 7 */

#define RD                   PMCON1bits.RD                  /* bit 0 */

#define RA0                  PORTAbits.RA0                  /* bit 0 */
#define RA1                  PORTAbits.RA1                  /* bit 1 */
#define RA2                  PORTAbits.RA2                  /* bit 2 */
#define RA3                  PORTAbits.RA3                  /* bit 3 */
#define RA4                  PORTAbits.RA4                  /* bit 4 */
#define RA5                  PORTAbits.RA5                  /* bit 5 */

#define RB0                  PORTBbits.RB0                  /* bit 0 */
#define RB1                  PORTBbits.RB1                  /* bit 1 */
#define RB2                  PORTBbits.RB2                  /* bit 2 */
#define RB3                  PORTBbits.RB3                  /* bit 3 */
#define RB4                  PORTBbits.RB4                  /* bit 4 */
#define RB5                  PORTBbits.RB5                  /* bit 5 */
#define RB6                  PORTBbits.RB6                  /* bit 6 */
#define RB7                  PORTBbits.RB7                  /* bit 7 */

#define RC0                  PORTCbits.RC0                  /* bit 0 */
#define RC1                  PORTCbits.RC1                  /* bit 1 */
#define RC2                  PORTCbits.RC2                  /* bit 2 */
#define RC3                  PORTCbits.RC3                  /* bit 3 */
#define RC4                  PORTCbits.RC4                  /* bit 4 */
#define RC5                  PORTCbits.RC5                  /* bit 5 */

#define RD0                  PORTDbits.RD0                  /* bit 0 */
#define RD1                  PORTDbits.RD1                  /* bit 1 */
#define RD2                  PORTDbits.RD2                  /* bit 2 */
#define RD3                  PORTDbits.RD3                  /* bit 3 */
#define RD4                  PORTDbits.RD4                  /* bit 4 */
#define RD5                  PORTDbits.RD5                  /* bit 5 */
#define RD6                  PORTDbits.RD6                  /* bit 6 */
#define RD7                  PORTDbits.RD7                  /* bit 7 */

#define RE0                  PORTEbits.RE0                  /* bit 0 */
#define RE1                  PORTEbits.RE1                  /* bit 1 */
#define RE2                  PORTEbits.RE2                  /* bit 2 */
#define RE3                  PORTEbits.RE3                  /* bit 3 */
#define RE4                  PORTEbits.RE4                  /* bit 4 */
#define RE5                  PORTEbits.RE5                  /* bit 5 */
#define RE6                  PORTEbits.RE6                  /* bit 6 */
#define RE7                  PORTEbits.RE7                  /* bit 7 */

#define RF0                  PORTFbits.RF0                  /* bit 0 */
#define RF1                  PORTFbits.RF1                  /* bit 1 */
#define RF2                  PORTFbits.RF2                  /* bit 2 */
#define RF3                  PORTFbits.RF3                  /* bit 3 */
#define RF4                  PORTFbits.RF4                  /* bit 4 */
#define RF5                  PORTFbits.RF5                  /* bit 5 */
#define RF6                  PORTFbits.RF6                  /* bit 6 */
#define RF7                  PORTFbits.RF7                  /* bit 7 */

#define RG0                  PORTGbits.RG0                  /* bit 0 */
#define RG1                  PORTGbits.RG1                  /* bit 1 */
#define RG2                  PORTGbits.RG2                  /* bit 2 */
#define RG3                  PORTGbits.RG3                  /* bit 3 */
#define RG4                  PORTGbits.RG4                  /* bit 4 */
#define RG5                  PORTGbits.RG5                  /* bit 5 */
#define RG6                  PORTGbits.RG6                  /* bit 6 */
#define RG7                  PORTGbits.RG7                  /* bit 7 */

#define SSPM0                SSPCONbits.SSPM0               /* bit 0 */
#define SSPM1                SSPCONbits.SSPM1               /* bit 1 */
#define SSPM2                SSPCONbits.SSPM2               /* bit 2 */
#define SSPM3                SSPCONbits.SSPM3               /* bit 3 */
#define CKP                  SSPCONbits.CKP                 /* bit 4 */
#define SSPEN                SSPCONbits.SSPEN               /* bit 5 */
#define SSPOV                SSPCONbits.SSPOV               /* bit 6 */
#define WCOL                 SSPCONbits.WCOL                /* bit 7 */

#define BF                   SSPSTATbits.BF                 /* bit 0 */
#define UA                   SSPSTATbits.UA                 /* bit 1 */
#define I2C_READ             SSPSTATbits.I2C_READ           /* bit 2 */
#define NOT_W                SSPSTATbits.NOT_W              /* bit 2 */
#define NOT_WRITE            SSPSTATbits.NOT_WRITE          /* bit 2 */
#define R                    SSPSTATbits.R                  /* bit 2 */
#define READ_WRITE           SSPSTATbits.READ_WRITE         /* bit 2 */
#define R_NOT_W              SSPSTATbits.R_NOT_W            /* bit 2 */
#define R_W                  SSPSTATbits.R_W                /* bit 2 */
#define I2C_START            SSPSTATbits.I2C_START          /* bit 3 */
#define S                    SSPSTATbits.S                  /* bit 3 */
#define I2C_STOP             SSPSTATbits.I2C_STOP           /* bit 4 */
#define P                    SSPSTATbits.P                  /* bit 4 */
#define D                    SSPSTATbits.D                  /* bit 5 */
#define DATA_ADDRESS         SSPSTATbits.DATA_ADDRESS       /* bit 5 */
#define D_A                  SSPSTATbits.D_A                /* bit 5 */
#define D_NOT_A              SSPSTATbits.D_NOT_A            /* bit 5 */
#define I2C_DATA             SSPSTATbits.I2C_DATA           /* bit 5 */
#define NOT_A                SSPSTATbits.NOT_A              /* bit 5 */
#define NOT_ADDRESS          SSPSTATbits.NOT_ADDRESS        /* bit 5 */
#define CKE                  SSPSTATbits.CKE                /* bit 6 */
#define SMP                  SSPSTATbits.SMP                /* bit 7 */

#define C                    STATUSbits.C                   /* bit 0 */
#define DC                   STATUSbits.DC                  /* bit 1 */
#define Z                    STATUSbits.Z                   /* bit 2 */
#define NOT_PD               STATUSbits.NOT_PD              /* bit 3 */
#define NOT_TO               STATUSbits.NOT_TO              /* bit 4 */
#define RP0                  STATUSbits.RP0                 /* bit 5 */
#define RP1                  STATUSbits.RP1                 /* bit 6 */
#define IRP                  STATUSbits.IRP                 /* bit 7 */

#define TMR1ON               T1CONbits.TMR1ON               /* bit 0 */
#define TMR1CS               T1CONbits.TMR1CS               /* bit 1 */
#define NOT_T1SYNC           T1CONbits.NOT_T1SYNC           /* bit 2 */
#define T1INSYNC             T1CONbits.T1INSYNC             /* bit 2 */
#define T1OSCEN              T1CONbits.T1OSCEN              /* bit 3 */
#define T1CKPS0              T1CONbits.T1CKPS0              /* bit 4 */
#define T1CKPS1              T1CONbits.T1CKPS1              /* bit 5 */

#define T2CKPS0              T2CONbits.T2CKPS0              /* bit 0 */
#define T2CKPS1              T2CONbits.T2CKPS1              /* bit 1 */
#define TMR2ON               T2CONbits.TMR2ON               /* bit 2 */
#define TOUTPS0              T2CONbits.TOUTPS0              /* bit 3 */
#define TOUTPS1              T2CONbits.TOUTPS1              /* bit 4 */
#define TOUTPS2              T2CONbits.TOUTPS2              /* bit 5 */
#define TOUTPS3              T2CONbits.TOUTPS3              /* bit 6 */

#define TRISA0               TRISAbits.TRISA0               /* bit 0 */
#define TRISA1               TRISAbits.TRISA1               /* bit 1 */
#define TRISA2               TRISAbits.TRISA2               /* bit 2 */
#define TRISA3               TRISAbits.TRISA3               /* bit 3 */
#define TRISA4               TRISAbits.TRISA4               /* bit 4 */
#define TRISA5               TRISAbits.TRISA5               /* bit 5 */

#define TRISB0               TRISBbits.TRISB0               /* bit 0 */
#define TRISB1               TRISBbits.TRISB1               /* bit 1 */
#define TRISB2               TRISBbits.TRISB2               /* bit 2 */
#define TRISB3               TRISBbits.TRISB3               /* bit 3 */
#define TRISB4               TRISBbits.TRISB4               /* bit 4 */
#define TRISB5               TRISBbits.TRISB5               /* bit 5 */
#define TRISB6               TRISBbits.TRISB6               /* bit 6 */
#define TRISB7               TRISBbits.TRISB7               /* bit 7 */

#define TRISC0               TRISCbits.TRISC0               /* bit 0 */
#define TRISC1               TRISCbits.TRISC1               /* bit 1 */
#define TRISC2               TRISCbits.TRISC2               /* bit 2 */
#define TRISC3               TRISCbits.TRISC3               /* bit 3 */
#define TRISC4               TRISCbits.TRISC4               /* bit 4 */
#define TRISC5               TRISCbits.TRISC5               /* bit 5 */

#define TRISD0               TRISDbits.TRISD0               /* bit 0 */
#define TRISD1               TRISDbits.TRISD1               /* bit 1 */
#define TRISD2               TRISDbits.TRISD2               /* bit 2 */
#define TRISD3               TRISDbits.TRISD3               /* bit 3 */
#define TRISD4               TRISDbits.TRISD4               /* bit 4 */
#define TRISD5               TRISDbits.TRISD5               /* bit 5 */
#define TRISD6               TRISDbits.TRISD6               /* bit 6 */
#define TRISD7               TRISDbits.TRISD7               /* bit 7 */

#define TRISE0               TRISEbits.TRISE0               /* bit 0 */
#define TRISE1               TRISEbits.TRISE1               /* bit 1 */
#define TRISE2               TRISEbits.TRISE2               /* bit 2 */
#define TRISE3               TRISEbits.TRISE3               /* bit 3 */
#define PSPMODE              TRISEbits.PSPMODE              /* bit 4 */
#define TRISE4               TRISEbits.TRISE4               /* bit 4 */
#define IBOV                 TRISEbits.IBOV                 /* bit 5 */
#define TRISE5               TRISEbits.TRISE5               /* bit 5 */
#define OBF                  TRISEbits.OBF                  /* bit 6 */
#define TRISE6               TRISEbits.TRISE6               /* bit 6 */
#define IBF                  TRISEbits.IBF                  /* bit 7 */
#define TRISE7               TRISEbits.TRISE7               /* bit 7 */

#define TRISF0               TRISFbits.TRISF0               /* bit 0 */
#define TRISF1               TRISFbits.TRISF1               /* bit 1 */
#define TRISF2               TRISFbits.TRISF2               /* bit 2 */
#define TRISF3               TRISFbits.TRISF3               /* bit 3 */
#define TRISF4               TRISFbits.TRISF4               /* bit 4 */
#define TRISF5               TRISFbits.TRISF5               /* bit 5 */
#define TRISF6               TRISFbits.TRISF6               /* bit 6 */
#define TRISF7               TRISFbits.TRISF7               /* bit 7 */

#define TRISG0               TRISGbits.TRISG0               /* bit 0 */
#define TRISG1               TRISGbits.TRISG1               /* bit 1 */
#define TRISG2               TRISGbits.TRISG2               /* bit 2 */
#define TRISG3               TRISGbits.TRISG3               /* bit 3 */
#define TRISG4               TRISGbits.TRISG4               /* bit 4 */
#define TRISG5               TRISGbits.TRISG5               /* bit 5 */
#define TRISG6               TRISGbits.TRISG6               /* bit 6 */
#define TRISG7               TRISGbits.TRISG7               /* bit 7 */
#endif /* NO_BIT_DEFINES */

#ifndef NO_LEGACY_NAMES
#define ADCON0_bits          ADCON0bits
#define ADCON1_bits          ADCON1bits
#define CCP1CON_bits         CCP1CONbits
#define INTCON_bits          INTCONbits
#define LCDCON_bits          LCDCONbits
#define LCDD00_bits          LCDD00bits
#define LCDD01_bits          LCDD01bits
#define LCDD02_bits          LCDD02bits
#define LCDD03_bits          LCDD03bits
#define LCDD04_bits          LCDD04bits
#define LCDD05_bits          LCDD05bits
#define LCDD06_bits          LCDD06bits
#define LCDD07_bits          LCDD07bits
#define LCDD08_bits          LCDD08bits
#define LCDD09_bits          LCDD09bits
#define LCDD10_bits          LCDD10bits
#define LCDD11_bits          LCDD11bits
#define LCDD12_bits          LCDD12bits
#define LCDD13_bits          LCDD13bits
#define LCDD14_bits          LCDD14bits
#define LCDD15_bits          LCDD15bits
#define LCDPS_bits           LCDPSbits
#define LCDSE_bits           LCDSEbits
#define OPTION_REG_bits      OPTION_REGbits
#define PCON_bits            PCONbits
#define PIE1_bits            PIE1bits
#define PIR1_bits            PIR1bits
#define PMCON1_bits          PMCON1bits
#define PORTA_bits           PORTAbits
#define PORTB_bits           PORTBbits
#define PORTC_bits           PORTCbits
#define PORTD_bits           PORTDbits
#define PORTE_bits           PORTEbits
#define PORTF_bits           PORTFbits
#define PORTG_bits           PORTGbits
#define SSPCON_bits          SSPCONbits
#define SSPSTAT_bits         SSPSTATbits
#define STATUS_bits          STATUSbits
#define T1CON_bits           T1CONbits
#define T2CON_bits           T2CONbits
#define TRISA_bits           TRISAbits
#define TRISB_bits           TRISBbits
#define TRISC_bits           TRISCbits
#define TRISD_bits           TRISDbits
#define TRISE_bits           TRISEbits
#define TRISF_bits           TRISFbits
#define TRISG_bits           TRISGbits
#endif /* NO_LEGACY_NAMES */

#endif
