text: /* Generated on 2016-07-26
  ===============================================================================
        P I C   T D D   R E A D Y   R E G I S T E R   D E F I N I T I O N
  ===============================================================================
  
  Created by Tibor Simon - tiborsimon.io
  Generator script:  https://github.com/tiborsimon/pic-definition-converter
  
  Based on the register definition header file v1.37 provided by Microchip.
  Original definition date and license: */
  
  // Generated 11/03/2016 GMT
  
  /*
  * Copyright © 2016, Microchip Technology Inc. and its subsidiaries ("Microchip")
  * All rights reserved.
  *
  * This software is developed by Microchip Technology Inc. and its subsidiaries ("Microchip").
  *
  * Redistribution and use in source and binary forms, with or without modification, are
  * permitted provided that the following conditions are met:
  *
  *     1. Redistributions of source code must retain the above copyright notice, this list of
  *        conditions and the following disclaimer.
  *
  *     2. Redistributions in binary form must reproduce the above copyright notice, this list
  *        of conditions and the following disclaimer in the documentation and/or other
  *        materials provided with the distribution.
  *
  *     3. Microchip's name may not be used to endorse or promote products derived from this
  *        software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY MICROCHIP "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL MICROCHIP BE LIABLE FOR ANY DIRECT, INDIRECT,
  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO
  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA OR PROFITS; OR BUSINESS
  * INTERRUPTION) HOWSOEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *  */
  
  #ifndef _PIC16LF819_H_
  #define _PIC16LF819_H_
  
  
  /*--------------------------------------------#
  | STATUS                                  0x3 |
  #---------------------------------------------#
  | IRP | RP1 | RP0 | nTO | nPD | ZERO | DC | C |
  #---------------------------------------------#
  | 7   | 6   | 5   | 4   | 3   | 2    | 1  | 0 |
  #--------------------------------------------*/
  
  #define STATUS                                   0x0
  #define STATUS_address                           0x003
  #define STATUS_position                          0x0
  #define STATUS_size                              0x8
  #define STATUS_value_mask                        0xFF
  #define STATUS_clear_mask                        0x0
  
  #define C                                        0x0
  #define C_address                                0x003
  #define C_position                               0x0
  #define C_size                                   0x1
  #define C_value_mask                             0x1
  #define C_clear_mask                             0xFE
  
  #define CARRY                                    0x0
  #define CARRY_address                            0x003
  #define CARRY_position                           0x0
  #define CARRY_size                               0x1
  #define CARRY_value_mask                         0x1
  #define CARRY_clear_mask                         0xFE
  
  #define DC                                       0x1
  #define DC_address                               0x003
  #define DC_position                              0x1
  #define DC_size                                  0x1
  #define DC_value_mask                            0x2
  #define DC_clear_mask                            0xFD
  
  #define ZERO                                     0x2
  #define ZERO_address                             0x003
  #define ZERO_position                            0x2
  #define ZERO_size                                0x1
  #define ZERO_value_mask                          0x4
  #define ZERO_clear_mask                          0xFB
  
  #define Z                                        0x2
  #define Z_address                                0x003
  #define Z_position                               0x2
  #define Z_size                                   0x1
  #define Z_value_mask                             0x4
  #define Z_clear_mask                             0xFB
  
  #define nPD                                      0x3
  #define nPD_address                              0x003
  #define nPD_position                             0x3
  #define nPD_size                                 0x1
  #define nPD_value_mask                           0x8
  #define nPD_clear_mask                           0xF7
  
  #define nTO                                      0x4
  #define nTO_address                              0x003
  #define nTO_position                             0x4
  #define nTO_size                                 0x1
  #define nTO_value_mask                           0x10
  #define nTO_clear_mask                           0xEF
  
  #define RP0                                      0x5
  #define RP0_address                              0x003
  #define RP0_position                             0x5
  #define RP0_size                                 0x1
  #define RP0_value_mask                           0x20
  #define RP0_clear_mask                           0xDF
  
  #define RP                                       0x5
  #define RP_address                               0x003
  #define RP_position                              0x5
  #define RP_size                                  0x2
  #define RP_value_mask                            0x60
  #define RP_clear_mask                            0x9F
  
  #define RP1                                      0x6
  #define RP1_address                              0x003
  #define RP1_position                             0x6
  #define RP1_size                                 0x1
  #define RP1_value_mask                           0x40
  #define RP1_clear_mask                           0xBF
  
  #define IRP                                      0x7
  #define IRP_address                              0x003
  #define IRP_position                             0x7
  #define IRP_size                                 0x1
  #define IRP_value_mask                           0x80
  #define IRP_clear_mask                           0x7F
  
  
  /*----------------------------------------------#
  | PORTA                                     0x5 |
  #-----------------------------------------------#
  | RA7 | RA6 | RA5 | RA4 | RA3 | RA2 | RA1 | RA0 |
  #-----------------------------------------------#
  | 7   | 6   | 5   | 4   | 3   | 2   | 1   | 0   |
  #----------------------------------------------*/
  
  #define PORTA                                    0x0
  #define PORTA_address                            0x005
  #define PORTA_position                           0x0
  #define PORTA_size                               0x8
  #define PORTA_value_mask                         0xFF
  #define PORTA_clear_mask                         0x0
  
  #define RA0                                      0x0
  #define RA0_address                              0x005
  #define RA0_position                             0x0
  #define RA0_size                                 0x1
  #define RA0_value_mask                           0x1
  #define RA0_clear_mask                           0xFE
  
  #define RA1                                      0x1
  #define RA1_address                              0x005
  #define RA1_position                             0x1
  #define RA1_size                                 0x1
  #define RA1_value_mask                           0x2
  #define RA1_clear_mask                           0xFD
  
  #define RA2                                      0x2
  #define RA2_address                              0x005
  #define RA2_position                             0x2
  #define RA2_size                                 0x1
  #define RA2_value_mask                           0x4
  #define RA2_clear_mask                           0xFB
  
  #define RA3                                      0x3
  #define RA3_address                              0x005
  #define RA3_position                             0x3
  #define RA3_size                                 0x1
  #define RA3_value_mask                           0x8
  #define RA3_clear_mask                           0xF7
  
  #define RA4                                      0x4
  #define RA4_address                              0x005
  #define RA4_position                             0x4
  #define RA4_size                                 0x1
  #define RA4_value_mask                           0x10
  #define RA4_clear_mask                           0xEF
  
  #define RA5                                      0x5
  #define RA5_address                              0x005
  #define RA5_position                             0x5
  #define RA5_size                                 0x1
  #define RA5_value_mask                           0x20
  #define RA5_clear_mask                           0xDF
  
  #define RA6                                      0x6
  #define RA6_address                              0x005
  #define RA6_position                             0x6
  #define RA6_size                                 0x1
  #define RA6_value_mask                           0x40
  #define RA6_clear_mask                           0xBF
  
  #define RA7                                      0x7
  #define RA7_address                              0x005
  #define RA7_position                             0x7
  #define RA7_size                                 0x1
  #define RA7_value_mask                           0x80
  #define RA7_clear_mask                           0x7F
  
  
  /*----------------------------------------------#
  | PORTB                                     0x6 |
  #-----------------------------------------------#
  | RB7 | RB6 | RB5 | RB4 | RB3 | RB2 | RB1 | RB0 |
  #-----------------------------------------------#
  | 7   | 6   | 5   | 4   | 3   | 2   | 1   | 0   |
  #----------------------------------------------*/
  
  #define PORTB                                    0x0
  #define PORTB_address                            0x006
  #define PORTB_position                           0x0
  #define PORTB_size                               0x8
  #define PORTB_value_mask                         0xFF
  #define PORTB_clear_mask                         0x0
  
  #define RB0                                      0x0
  #define RB0_address                              0x006
  #define RB0_position                             0x0
  #define RB0_size                                 0x1
  #define RB0_value_mask                           0x1
  #define RB0_clear_mask                           0xFE
  
  #define RB1                                      0x1
  #define RB1_address                              0x006
  #define RB1_position                             0x1
  #define RB1_size                                 0x1
  #define RB1_value_mask                           0x2
  #define RB1_clear_mask                           0xFD
  
  #define RB2                                      0x2
  #define RB2_address                              0x006
  #define RB2_position                             0x2
  #define RB2_size                                 0x1
  #define RB2_value_mask                           0x4
  #define RB2_clear_mask                           0xFB
  
  #define RB3                                      0x3
  #define RB3_address                              0x006
  #define RB3_position                             0x3
  #define RB3_size                                 0x1
  #define RB3_value_mask                           0x8
  #define RB3_clear_mask                           0xF7
  
  #define RB4                                      0x4
  #define RB4_address                              0x006
  #define RB4_position                             0x4
  #define RB4_size                                 0x1
  #define RB4_value_mask                           0x10
  #define RB4_clear_mask                           0xEF
  
  #define RB5                                      0x5
  #define RB5_address                              0x006
  #define RB5_position                             0x5
  #define RB5_size                                 0x1
  #define RB5_value_mask                           0x20
  #define RB5_clear_mask                           0xDF
  
  #define RB6                                      0x6
  #define RB6_address                              0x006
  #define RB6_position                             0x6
  #define RB6_size                                 0x1
  #define RB6_value_mask                           0x40
  #define RB6_clear_mask                           0xBF
  
  #define RB7                                      0x7
  #define RB7_address                              0x006
  #define RB7_position                             0x7
  #define RB7_size                                 0x1
  #define RB7_value_mask                           0x80
  #define RB7_clear_mask                           0x7F
  
  
  /*------------------------------#
  | PCLATH                    0xA |
  #-------------------------------#
  | - | - | - | PCLATH            |
  #-------------------------------#
  | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
  #------------------------------*/
  
  #define PCLATH                                   0x0
  #define PCLATH_address                           0x00A
  #define PCLATH_position                          0x0
  #define PCLATH_size                              0x5
  #define PCLATH_value_mask                        0x1F
  #define PCLATH_clear_mask                        0xE0
  
  
  /*---------------------------------------------------------#
  | INTCON                                               0xB |
  #----------------------------------------------------------#
  | GIE | PEIE | TMR0IE | INTE | RBIE | TMR0IF | INTF | RBIF |
  #----------------------------------------------------------#
  | 7   | 6    | 5      | 4    | 3    | 2      | 1    | 0    |
  #---------------------------------------------------------*/
  
  #define INTCON                                   0x0
  #define INTCON_address                           0x00B
  #define INTCON_position                          0x0
  #define INTCON_size                              0x8
  #define INTCON_value_mask                        0xFF
  #define INTCON_clear_mask                        0x0
  
  #define RBIF                                     0x0
  #define RBIF_address                             0x00B
  #define RBIF_position                            0x0
  #define RBIF_size                                0x1
  #define RBIF_value_mask                          0x1
  #define RBIF_clear_mask                          0xFE
  
  #define INTF                                     0x1
  #define INTF_address                             0x00B
  #define INTF_position                            0x1
  #define INTF_size                                0x1
  #define INTF_value_mask                          0x2
  #define INTF_clear_mask                          0xFD
  
  #define TMR0IF                                   0x2
  #define TMR0IF_address                           0x00B
  #define TMR0IF_position                          0x2
  #define TMR0IF_size                              0x1
  #define TMR0IF_value_mask                        0x4
  #define TMR0IF_clear_mask                        0xFB
  
  #define RBIE                                     0x3
  #define RBIE_address                             0x00B
  #define RBIE_position                            0x3
  #define RBIE_size                                0x1
  #define RBIE_value_mask                          0x8
  #define RBIE_clear_mask                          0xF7
  
  #define INTE                                     0x4
  #define INTE_address                             0x00B
  #define INTE_position                            0x4
  #define INTE_size                                0x1
  #define INTE_value_mask                          0x10
  #define INTE_clear_mask                          0xEF
  
  #define TMR0IE                                   0x5
  #define TMR0IE_address                           0x00B
  #define TMR0IE_position                          0x5
  #define TMR0IE_size                              0x1
  #define TMR0IE_value_mask                        0x20
  #define TMR0IE_clear_mask                        0xDF
  
  #define PEIE                                     0x6
  #define PEIE_address                             0x00B
  #define PEIE_position                            0x6
  #define PEIE_size                                0x1
  #define PEIE_value_mask                          0x40
  #define PEIE_clear_mask                          0xBF
  
  #define GIE                                      0x7
  #define GIE_address                              0x00B
  #define GIE_position                             0x7
  #define GIE_size                                 0x1
  #define GIE_value_mask                           0x80
  #define GIE_clear_mask                           0x7F
  
  
  /*----------------------------------------------------#
  | PIR1                                            0xC |
  #-----------------------------------------------------#
  | - | ADIF | - | - | SSPIF | CCP1IF | TMR2IF | TMR1IF |
  #-----------------------------------------------------#
  | 7 | 6    | 5 | 4 | 3     | 2      | 1      | 0      |
  #----------------------------------------------------*/
  
  #define PIR1                                     0x0
  #define PIR1_address                             0x00C
  #define PIR1_position                            0x0
  #define PIR1_size                                0x8
  #define PIR1_value_mask                          0xFF
  #define PIR1_clear_mask                          0x0
  
  #define TMR1IF                                   0x0
  #define TMR1IF_address                           0x00C
  #define TMR1IF_position                          0x0
  #define TMR1IF_size                              0x1
  #define TMR1IF_value_mask                        0x1
  #define TMR1IF_clear_mask                        0xFE
  
  #define TMR2IF                                   0x1
  #define TMR2IF_address                           0x00C
  #define TMR2IF_position                          0x1
  #define TMR2IF_size                              0x1
  #define TMR2IF_value_mask                        0x2
  #define TMR2IF_clear_mask                        0xFD
  
  #define CCP1IF                                   0x2
  #define CCP1IF_address                           0x00C
  #define CCP1IF_position                          0x2
  #define CCP1IF_size                              0x1
  #define CCP1IF_value_mask                        0x4
  #define CCP1IF_clear_mask                        0xFB
  
  #define SSPIF                                    0x3
  #define SSPIF_address                            0x00C
  #define SSPIF_position                           0x3
  #define SSPIF_size                               0x1
  #define SSPIF_value_mask                         0x8
  #define SSPIF_clear_mask                         0xF7
  
  #define ADIF                                     0x6
  #define ADIF_address                             0x00C
  #define ADIF_position                            0x6
  #define ADIF_size                                0x1
  #define ADIF_value_mask                          0x40
  #define ADIF_clear_mask                          0xBF
  
  
  /*---------------------------------#
  | PIR2                         0xD |
  #----------------------------------#
  | - | - | - | EEIF | - | - | - | - |
  #----------------------------------#
  | 7 | 6 | 5 | 4    | 3 | 2 | 1 | 0 |
  #---------------------------------*/
  
  #define PIR2                                     0x0
  #define PIR2_address                             0x00D
  #define PIR2_position                            0x0
  #define PIR2_size                                0x8
  #define PIR2_value_mask                          0xFF
  #define PIR2_clear_mask                          0x0
  
  #define EEIF                                     0x4
  #define EEIF_address                             0x00D
  #define EEIF_position                            0x4
  #define EEIF_size                                0x1
  #define EEIF_value_mask                          0x10
  #define EEIF_clear_mask                          0xEF
  
  
  /*-----------------------------------------------------------------#
  | T1CON                                                       0x10 |
  #------------------------------------------------------------------#
  | - | - | T1CKPS1 | T1CKPS0 | T1OSCEN | T1INSYNC | TMR1CS | TMR1ON |
  #------------------------------------------------------------------#
  | 7 | 6 | 5       | 4       | 3       | 2        | 1      | 0      |
  #-----------------------------------------------------------------*/
  
  #define T1CON                                    0x0
  #define T1CON_address                            0x010
  #define T1CON_position                           0x0
  #define T1CON_size                               0x8
  #define T1CON_value_mask                         0xFF
  #define T1CON_clear_mask                         0x0
  
  #define TMR1ON                                   0x0
  #define TMR1ON_address                           0x010
  #define TMR1ON_position                          0x0
  #define TMR1ON_size                              0x1
  #define TMR1ON_value_mask                        0x1
  #define TMR1ON_clear_mask                        0xFE
  
  #define TMR1CS                                   0x1
  #define TMR1CS_address                           0x010
  #define TMR1CS_position                          0x1
  #define TMR1CS_size                              0x1
  #define TMR1CS_value_mask                        0x2
  #define TMR1CS_clear_mask                        0xFD
  
  #define nT1SYNC                                  0x2
  #define nT1SYNC_address                          0x010
  #define nT1SYNC_position                         0x2
  #define nT1SYNC_size                             0x1
  #define nT1SYNC_value_mask                       0x4
  #define nT1SYNC_clear_mask                       0xFB
  
  #define T1INSYNC                                 0x2
  #define T1INSYNC_address                         0x010
  #define T1INSYNC_position                        0x2
  #define T1INSYNC_size                            0x1
  #define T1INSYNC_value_mask                      0x4
  #define T1INSYNC_clear_mask                      0xFB
  
  #define T1OSCEN                                  0x3
  #define T1OSCEN_address                          0x010
  #define T1OSCEN_position                         0x3
  #define T1OSCEN_size                             0x1
  #define T1OSCEN_value_mask                       0x8
  #define T1OSCEN_clear_mask                       0xF7
  
  #define T1CKPS0                                  0x4
  #define T1CKPS0_address                          0x010
  #define T1CKPS0_position                         0x4
  #define T1CKPS0_size                             0x1
  #define T1CKPS0_value_mask                       0x10
  #define T1CKPS0_clear_mask                       0xEF
  
  #define T1CKPS                                   0x4
  #define T1CKPS_address                           0x010
  #define T1CKPS_position                          0x4
  #define T1CKPS_size                              0x2
  #define T1CKPS_value_mask                        0x30
  #define T1CKPS_clear_mask                        0xCF
  
  #define T1CKPS1                                  0x5
  #define T1CKPS1_address                          0x010
  #define T1CKPS1_position                         0x5
  #define T1CKPS1_size                             0x1
  #define T1CKPS1_value_mask                       0x20
  #define T1CKPS1_clear_mask                       0xDF
  
  
  /*-----------------------------------------------------------------------#
  | T2CON                                                             0x12 |
  #------------------------------------------------------------------------#
  | - | TOUTPS3 | TOUTPS2 | TOUTPS1 | TOUTPS0 | TMR2ON | T2CKPS1 | T2CKPS0 |
  #------------------------------------------------------------------------#
  | 7 | 6       | 5       | 4       | 3       | 2      | 1       | 0       |
  #-----------------------------------------------------------------------*/
  
  #define T2CON                                    0x0
  #define T2CON_address                            0x012
  #define T2CON_position                           0x0
  #define T2CON_size                               0x8
  #define T2CON_value_mask                         0xFF
  #define T2CON_clear_mask                         0x0
  
  #define T2CKPS0                                  0x0
  #define T2CKPS0_address                          0x012
  #define T2CKPS0_position                         0x0
  #define T2CKPS0_size                             0x1
  #define T2CKPS0_value_mask                       0x1
  #define T2CKPS0_clear_mask                       0xFE
  
  #define T2CKPS                                   0x0
  #define T2CKPS_address                           0x012
  #define T2CKPS_position                          0x0
  #define T2CKPS_size                              0x2
  #define T2CKPS_value_mask                        0x3
  #define T2CKPS_clear_mask                        0xFC
  
  #define T2CKPS1                                  0x1
  #define T2CKPS1_address                          0x012
  #define T2CKPS1_position                         0x1
  #define T2CKPS1_size                             0x1
  #define T2CKPS1_value_mask                       0x2
  #define T2CKPS1_clear_mask                       0xFD
  
  #define TMR2ON                                   0x2
  #define TMR2ON_address                           0x012
  #define TMR2ON_position                          0x2
  #define TMR2ON_size                              0x1
  #define TMR2ON_value_mask                        0x4
  #define TMR2ON_clear_mask                        0xFB
  
  #define TOUTPS0                                  0x3
  #define TOUTPS0_address                          0x012
  #define TOUTPS0_position                         0x3
  #define TOUTPS0_size                             0x1
  #define TOUTPS0_value_mask                       0x8
  #define TOUTPS0_clear_mask                       0xF7
  
  #define TOUTPS                                   0x3
  #define TOUTPS_address                           0x012
  #define TOUTPS_position                          0x3
  #define TOUTPS_size                              0x4
  #define TOUTPS_value_mask                        0x78
  #define TOUTPS_clear_mask                        0x87
  
  #define TOUTPS1                                  0x4
  #define TOUTPS1_address                          0x012
  #define TOUTPS1_position                         0x4
  #define TOUTPS1_size                             0x1
  #define TOUTPS1_value_mask                       0x10
  #define TOUTPS1_clear_mask                       0xEF
  
  #define TOUTPS2                                  0x5
  #define TOUTPS2_address                          0x012
  #define TOUTPS2_position                         0x5
  #define TOUTPS2_size                             0x1
  #define TOUTPS2_value_mask                       0x20
  #define TOUTPS2_clear_mask                       0xDF
  
  #define TOUTPS3                                  0x6
  #define TOUTPS3_address                          0x012
  #define TOUTPS3_position                         0x6
  #define TOUTPS3_size                             0x1
  #define TOUTPS3_value_mask                       0x40
  #define TOUTPS3_clear_mask                       0xBF
  
  
  /*-----------------------------------------------------------#
  | SSPCON                                                0x14 |
  #------------------------------------------------------------#
  | WCOL | SSPOV | SSPEN | CKP | SSPM3 | SSPM2 | SSPM1 | SSPM0 |
  #------------------------------------------------------------#
  | 7    | 6     | 5     | 4   | 3     | 2     | 1     | 0     |
  #-----------------------------------------------------------*/
  
  #define SSPCON                                   0x0
  #define SSPCON_address                           0x014
  #define SSPCON_position                          0x0
  #define SSPCON_size                              0x8
  #define SSPCON_value_mask                        0xFF
  #define SSPCON_clear_mask                        0x0
  
  #define SSPM0                                    0x0
  #define SSPM0_address                            0x014
  #define SSPM0_position                           0x0
  #define SSPM0_size                               0x1
  #define SSPM0_value_mask                         0x1
  #define SSPM0_clear_mask                         0xFE
  
  #define SSPM                                     0x0
  #define SSPM_address                             0x014
  #define SSPM_position                            0x0
  #define SSPM_size                                0x4
  #define SSPM_value_mask                          0xF
  #define SSPM_clear_mask                          0xF0
  
  #define SSPM1                                    0x1
  #define SSPM1_address                            0x014
  #define SSPM1_position                           0x1
  #define SSPM1_size                               0x1
  #define SSPM1_value_mask                         0x2
  #define SSPM1_clear_mask                         0xFD
  
  #define SSPM2                                    0x2
  #define SSPM2_address                            0x014
  #define SSPM2_position                           0x2
  #define SSPM2_size                               0x1
  #define SSPM2_value_mask                         0x4
  #define SSPM2_clear_mask                         0xFB
  
  #define SSPM3                                    0x3
  #define SSPM3_address                            0x014
  #define SSPM3_position                           0x3
  #define SSPM3_size                               0x1
  #define SSPM3_value_mask                         0x8
  #define SSPM3_clear_mask                         0xF7
  
  #define CKP                                      0x4
  #define CKP_address                              0x014
  #define CKP_position                             0x4
  #define CKP_size                                 0x1
  #define CKP_value_mask                           0x10
  #define CKP_clear_mask                           0xEF
  
  #define SSPEN                                    0x5
  #define SSPEN_address                            0x014
  #define SSPEN_position                           0x5
  #define SSPEN_size                               0x1
  #define SSPEN_value_mask                         0x20
  #define SSPEN_clear_mask                         0xDF
  
  #define SSPOV                                    0x6
  #define SSPOV_address                            0x014
  #define SSPOV_position                           0x6
  #define SSPOV_size                               0x1
  #define SSPOV_value_mask                         0x40
  #define SSPOV_clear_mask                         0xBF
  
  #define WCOL                                     0x7
  #define WCOL_address                             0x014
  #define WCOL_position                            0x7
  #define WCOL_size                                0x1
  #define WCOL_value_mask                          0x80
  #define WCOL_clear_mask                          0x7F
  
  
  /*----------------------------------------------------------#
  | CCP1CON                                              0x17 |
  #-----------------------------------------------------------#
  | - | - | CCP1X | CCP1Y | CCP1M3 | CCP1M2 | CCP1M1 | CCP1M0 |
  #-----------------------------------------------------------#
  | 7 | 6 | 5     | 4     | 3      | 2      | 1      | 0      |
  #----------------------------------------------------------*/
  
  #define CCP1CON                                  0x0
  #define CCP1CON_address                          0x017
  #define CCP1CON_position                         0x0
  #define CCP1CON_size                             0x8
  #define CCP1CON_value_mask                       0xFF
  #define CCP1CON_clear_mask                       0x0
  
  #define CCP1M0                                   0x0
  #define CCP1M0_address                           0x017
  #define CCP1M0_position                          0x0
  #define CCP1M0_size                              0x1
  #define CCP1M0_value_mask                        0x1
  #define CCP1M0_clear_mask                        0xFE
  
  #define CCP1M                                    0x0
  #define CCP1M_address                            0x017
  #define CCP1M_position                           0x0
  #define CCP1M_size                               0x4
  #define CCP1M_value_mask                         0xF
  #define CCP1M_clear_mask                         0xF0
  
  #define CCP1M1                                   0x1
  #define CCP1M1_address                           0x017
  #define CCP1M1_position                          0x1
  #define CCP1M1_size                              0x1
  #define CCP1M1_value_mask                        0x2
  #define CCP1M1_clear_mask                        0xFD
  
  #define CCP1M2                                   0x2
  #define CCP1M2_address                           0x017
  #define CCP1M2_position                          0x2
  #define CCP1M2_size                              0x1
  #define CCP1M2_value_mask                        0x4
  #define CCP1M2_clear_mask                        0xFB
  
  #define CCP1M3                                   0x3
  #define CCP1M3_address                           0x017
  #define CCP1M3_position                          0x3
  #define CCP1M3_size                              0x1
  #define CCP1M3_value_mask                        0x8
  #define CCP1M3_clear_mask                        0xF7
  
  #define CCP1Y                                    0x4
  #define CCP1Y_address                            0x017
  #define CCP1Y_position                           0x4
  #define CCP1Y_size                               0x1
  #define CCP1Y_value_mask                         0x10
  #define CCP1Y_clear_mask                         0xEF
  
  #define CCP1X                                    0x5
  #define CCP1X_address                            0x017
  #define CCP1X_position                           0x5
  #define CCP1X_size                               0x1
  #define CCP1X_value_mask                         0x20
  #define CCP1X_clear_mask                         0xDF
  
  
  /*------------------------------------------------------#
  | ADCON0                                           0x1F |
  #-------------------------------------------------------#
  | ADCS1 | ADCS0 | CHS2 | CHS1 | CHS0 | nDONE | - | ADON |
  #-------------------------------------------------------#
  | 7     | 6     | 5    | 4    | 3    | 2     | 1 | 0    |
  #------------------------------------------------------*/
  
  #define ADCON0                                   0x0
  #define ADCON0_address                           0x01F
  #define ADCON0_position                          0x0
  #define ADCON0_size                              0x8
  #define ADCON0_value_mask                        0xFF
  #define ADCON0_clear_mask                        0x0
  
  #define ADON                                     0x0
  #define ADON_address                             0x01F
  #define ADON_position                            0x0
  #define ADON_size                                0x1
  #define ADON_value_mask                          0x1
  #define ADON_clear_mask                          0xFE
  
  #define nDONE                                    0x2
  #define nDONE_address                            0x01F
  #define nDONE_position                           0x2
  #define nDONE_size                               0x1
  #define nDONE_value_mask                         0x4
  #define nDONE_clear_mask                         0xFB
  
  #define GO_nDONE                                 0x2
  #define GO_nDONE_address                         0x01F
  #define GO_nDONE_position                        0x2
  #define GO_nDONE_size                            0x1
  #define GO_nDONE_value_mask                      0x4
  #define GO_nDONE_clear_mask                      0xFB
  
  #define GO_DONE                                  0x2
  #define GO_DONE_address                          0x01F
  #define GO_DONE_position                         0x2
  #define GO_DONE_size                             0x1
  #define GO_DONE_value_mask                       0x4
  #define GO_DONE_clear_mask                       0xFB
  
  #define GO                                       0x2
  #define GO_address                               0x01F
  #define GO_position                              0x2
  #define GO_size                                  0x1
  #define GO_value_mask                            0x4
  #define GO_clear_mask                            0xFB
  
  #define CHS                                      0x3
  #define CHS_address                              0x01F
  #define CHS_position                             0x3
  #define CHS_size                                 0x3
  #define CHS_value_mask                           0x38
  #define CHS_clear_mask                           0xC7
  
  #define CHS0                                     0x3
  #define CHS0_address                             0x01F
  #define CHS0_position                            0x3
  #define CHS0_size                                0x1
  #define CHS0_value_mask                          0x8
  #define CHS0_clear_mask                          0xF7
  
  #define CHS1                                     0x4
  #define CHS1_address                             0x01F
  #define CHS1_position                            0x4
  #define CHS1_size                                0x1
  #define CHS1_value_mask                          0x10
  #define CHS1_clear_mask                          0xEF
  
  #define CHS2                                     0x5
  #define CHS2_address                             0x01F
  #define CHS2_position                            0x5
  #define CHS2_size                                0x1
  #define CHS2_value_mask                          0x20
  #define CHS2_clear_mask                          0xDF
  
  #define ADCS                                     0x6
  #define ADCS_address                             0x01F
  #define ADCS_position                            0x6
  #define ADCS_size                                0x2
  #define ADCS_value_mask                          0xC0
  #define ADCS_clear_mask                          0x3F
  
  #define ADCS0                                    0x6
  #define ADCS0_address                            0x01F
  #define ADCS0_position                           0x6
  #define ADCS0_size                               0x1
  #define ADCS0_value_mask                         0x40
  #define ADCS0_clear_mask                         0xBF
  
  #define ADCS1                                    0x7
  #define ADCS1_address                            0x01F
  #define ADCS1_position                           0x7
  #define ADCS1_size                               0x1
  #define ADCS1_value_mask                         0x80
  #define ADCS1_clear_mask                         0x7F
  
  
  /*-----------------------------------------------------#
  | OPTION_REG                                      0x81 |
  #------------------------------------------------------#
  | nRBPU | INTEDG | T0CS | T0SE | PSA | PS2 | PS1 | PS0 |
  #------------------------------------------------------#
  | 7     | 6      | 5    | 4    | 3   | 2   | 1   | 0   |
  #-----------------------------------------------------*/
  
  #define OPTION_REG                               0x0
  #define OPTION_REG_address                       0x081
  #define OPTION_REG_position                      0x0
  #define OPTION_REG_size                          0x8
  #define OPTION_REG_value_mask                    0xFF
  #define OPTION_REG_clear_mask                    0x0
  
  #define PS                                       0x0
  #define PS_address                               0x081
  #define PS_position                              0x0
  #define PS_size                                  0x3
  #define PS_value_mask                            0x7
  #define PS_clear_mask                            0xF8
  
  #define PS0                                      0x0
  #define PS0_address                              0x081
  #define PS0_position                             0x0
  #define PS0_size                                 0x1
  #define PS0_value_mask                           0x1
  #define PS0_clear_mask                           0xFE
  
  #define PS1                                      0x1
  #define PS1_address                              0x081
  #define PS1_position                             0x1
  #define PS1_size                                 0x1
  #define PS1_value_mask                           0x2
  #define PS1_clear_mask                           0xFD
  
  #define PS2                                      0x2
  #define PS2_address                              0x081
  #define PS2_position                             0x2
  #define PS2_size                                 0x1
  #define PS2_value_mask                           0x4
  #define PS2_clear_mask                           0xFB
  
  #define PSA                                      0x3
  #define PSA_address                              0x081
  #define PSA_position                             0x3
  #define PSA_size                                 0x1
  #define PSA_value_mask                           0x8
  #define PSA_clear_mask                           0xF7
  
  #define T0SE                                     0x4
  #define T0SE_address                             0x081
  #define T0SE_position                            0x4
  #define T0SE_size                                0x1
  #define T0SE_value_mask                          0x10
  #define T0SE_clear_mask                          0xEF
  
  #define T0CS                                     0x5
  #define T0CS_address                             0x081
  #define T0CS_position                            0x5
  #define T0CS_size                                0x1
  #define T0CS_value_mask                          0x20
  #define T0CS_clear_mask                          0xDF
  
  #define INTEDG                                   0x6
  #define INTEDG_address                           0x081
  #define INTEDG_position                          0x6
  #define INTEDG_size                              0x1
  #define INTEDG_value_mask                        0x40
  #define INTEDG_clear_mask                        0xBF
  
  #define nRBPU                                    0x7
  #define nRBPU_address                            0x081
  #define nRBPU_position                           0x7
  #define nRBPU_size                               0x1
  #define nRBPU_value_mask                         0x80
  #define nRBPU_clear_mask                         0x7F
  
  
  /*----------------------------------------------------------------------#
  | TRISA                                                            0x85 |
  #-----------------------------------------------------------------------#
  | TRISA7 | TRISA6 | TRISA5 | TRISA4 | TRISA3 | TRISA2 | TRISA1 | TRISA0 |
  #-----------------------------------------------------------------------#
  | 7      | 6      | 5      | 4      | 3      | 2      | 1      | 0      |
  #----------------------------------------------------------------------*/
  
  #define TRISA                                    0x0
  #define TRISA_address                            0x085
  #define TRISA_position                           0x0
  #define TRISA_size                               0x8
  #define TRISA_value_mask                         0xFF
  #define TRISA_clear_mask                         0x0
  
  #define TRISA0                                   0x0
  #define TRISA0_address                           0x085
  #define TRISA0_position                          0x0
  #define TRISA0_size                              0x1
  #define TRISA0_value_mask                        0x1
  #define TRISA0_clear_mask                        0xFE
  
  #define TRISA1                                   0x1
  #define TRISA1_address                           0x085
  #define TRISA1_position                          0x1
  #define TRISA1_size                              0x1
  #define TRISA1_value_mask                        0x2
  #define TRISA1_clear_mask                        0xFD
  
  #define TRISA2                                   0x2
  #define TRISA2_address                           0x085
  #define TRISA2_position                          0x2
  #define TRISA2_size                              0x1
  #define TRISA2_value_mask                        0x4
  #define TRISA2_clear_mask                        0xFB
  
  #define TRISA3                                   0x3
  #define TRISA3_address                           0x085
  #define TRISA3_position                          0x3
  #define TRISA3_size                              0x1
  #define TRISA3_value_mask                        0x8
  #define TRISA3_clear_mask                        0xF7
  
  #define TRISA4                                   0x4
  #define TRISA4_address                           0x085
  #define TRISA4_position                          0x4
  #define TRISA4_size                              0x1
  #define TRISA4_value_mask                        0x10
  #define TRISA4_clear_mask                        0xEF
  
  #define TRISA5                                   0x5
  #define TRISA5_address                           0x085
  #define TRISA5_position                          0x5
  #define TRISA5_size                              0x1
  #define TRISA5_value_mask                        0x20
  #define TRISA5_clear_mask                        0xDF
  
  #define TRISA6                                   0x6
  #define TRISA6_address                           0x085
  #define TRISA6_position                          0x6
  #define TRISA6_size                              0x1
  #define TRISA6_value_mask                        0x40
  #define TRISA6_clear_mask                        0xBF
  
  #define TRISA7                                   0x7
  #define TRISA7_address                           0x085
  #define TRISA7_position                          0x7
  #define TRISA7_size                              0x1
  #define TRISA7_value_mask                        0x80
  #define TRISA7_clear_mask                        0x7F
  
  
  /*----------------------------------------------------------------------#
  | TRISB                                                            0x86 |
  #-----------------------------------------------------------------------#
  | TRISB7 | TRISB6 | TRISB5 | TRISB4 | TRISB3 | TRISB2 | TRISB1 | TRISB0 |
  #-----------------------------------------------------------------------#
  | 7      | 6      | 5      | 4      | 3      | 2      | 1      | 0      |
  #----------------------------------------------------------------------*/
  
  #define TRISB                                    0x0
  #define TRISB_address                            0x086
  #define TRISB_position                           0x0
  #define TRISB_size                               0x8
  #define TRISB_value_mask                         0xFF
  #define TRISB_clear_mask                         0x0
  
  #define TRISB0                                   0x0
  #define TRISB0_address                           0x086
  #define TRISB0_position                          0x0
  #define TRISB0_size                              0x1
  #define TRISB0_value_mask                        0x1
  #define TRISB0_clear_mask                        0xFE
  
  #define TRISB1                                   0x1
  #define TRISB1_address                           0x086
  #define TRISB1_position                          0x1
  #define TRISB1_size                              0x1
  #define TRISB1_value_mask                        0x2
  #define TRISB1_clear_mask                        0xFD
  
  #define TRISB2                                   0x2
  #define TRISB2_address                           0x086
  #define TRISB2_position                          0x2
  #define TRISB2_size                              0x1
  #define TRISB2_value_mask                        0x4
  #define TRISB2_clear_mask                        0xFB
  
  #define TRISB3                                   0x3
  #define TRISB3_address                           0x086
  #define TRISB3_position                          0x3
  #define TRISB3_size                              0x1
  #define TRISB3_value_mask                        0x8
  #define TRISB3_clear_mask                        0xF7
  
  #define TRISB4                                   0x4
  #define TRISB4_address                           0x086
  #define TRISB4_position                          0x4
  #define TRISB4_size                              0x1
  #define TRISB4_value_mask                        0x10
  #define TRISB4_clear_mask                        0xEF
  
  #define TRISB5                                   0x5
  #define TRISB5_address                           0x086
  #define TRISB5_position                          0x5
  #define TRISB5_size                              0x1
  #define TRISB5_value_mask                        0x20
  #define TRISB5_clear_mask                        0xDF
  
  #define TRISB6                                   0x6
  #define TRISB6_address                           0x086
  #define TRISB6_position                          0x6
  #define TRISB6_size                              0x1
  #define TRISB6_value_mask                        0x40
  #define TRISB6_clear_mask                        0xBF
  
  #define TRISB7                                   0x7
  #define TRISB7_address                           0x086
  #define TRISB7_position                          0x7
  #define TRISB7_size                              0x1
  #define TRISB7_value_mask                        0x80
  #define TRISB7_clear_mask                        0x7F
  
  
  /*----------------------------------------------------#
  | PIE1                                           0x8C |
  #-----------------------------------------------------#
  | - | ADIE | - | - | SSPIE | CCP1IE | TMR2IE | TMR1IE |
  #-----------------------------------------------------#
  | 7 | 6    | 5 | 4 | 3     | 2      | 1      | 0      |
  #----------------------------------------------------*/
  
  #define PIE1                                     0x0
  #define PIE1_address                             0x08C
  #define PIE1_position                            0x0
  #define PIE1_size                                0x8
  #define PIE1_value_mask                          0xFF
  #define PIE1_clear_mask                          0x0
  
  #define TMR1IE                                   0x0
  #define TMR1IE_address                           0x08C
  #define TMR1IE_position                          0x0
  #define TMR1IE_size                              0x1
  #define TMR1IE_value_mask                        0x1
  #define TMR1IE_clear_mask                        0xFE
  
  #define TMR2IE                                   0x1
  #define TMR2IE_address                           0x08C
  #define TMR2IE_position                          0x1
  #define TMR2IE_size                              0x1
  #define TMR2IE_value_mask                        0x2
  #define TMR2IE_clear_mask                        0xFD
  
  #define CCP1IE                                   0x2
  #define CCP1IE_address                           0x08C
  #define CCP1IE_position                          0x2
  #define CCP1IE_size                              0x1
  #define CCP1IE_value_mask                        0x4
  #define CCP1IE_clear_mask                        0xFB
  
  #define SSPIE                                    0x3
  #define SSPIE_address                            0x08C
  #define SSPIE_position                           0x3
  #define SSPIE_size                               0x1
  #define SSPIE_value_mask                         0x8
  #define SSPIE_clear_mask                         0xF7
  
  #define ADIE                                     0x6
  #define ADIE_address                             0x08C
  #define ADIE_position                            0x6
  #define ADIE_size                                0x1
  #define ADIE_value_mask                          0x40
  #define ADIE_clear_mask                          0xBF
  
  
  /*---------------------------------#
  | PIE2                        0x8D |
  #----------------------------------#
  | - | - | - | EEIE | - | - | - | - |
  #----------------------------------#
  | 7 | 6 | 5 | 4    | 3 | 2 | 1 | 0 |
  #---------------------------------*/
  
  #define PIE2                                     0x0
  #define PIE2_address                             0x08D
  #define PIE2_position                            0x0
  #define PIE2_size                                0x8
  #define PIE2_value_mask                          0xFF
  #define PIE2_clear_mask                          0x0
  
  #define EEIE                                     0x4
  #define EEIE_address                             0x08D
  #define EEIE_position                            0x4
  #define EEIE_size                                0x1
  #define EEIE_value_mask                          0x10
  #define EEIE_clear_mask                          0xEF
  
  
  /*------------------------------------#
  | PCON                           0x8E |
  #-------------------------------------#
  | - | - | - | - | - | - | nPOR | nBOR |
  #-------------------------------------#
  | 7 | 6 | 5 | 4 | 3 | 2 | 1    | 0    |
  #------------------------------------*/
  
  #define PCON                                     0x0
  #define PCON_address                             0x08E
  #define PCON_position                            0x0
  #define PCON_size                                0x8
  #define PCON_value_mask                          0xFF
  #define PCON_clear_mask                          0x0
  
  #define nBOR                                     0x0
  #define nBOR_address                             0x08E
  #define nBOR_position                            0x0
  #define nBOR_size                                0x1
  #define nBOR_value_mask                          0x1
  #define nBOR_clear_mask                          0xFE
  
  #define nBO                                      0x0
  #define nBO_address                              0x08E
  #define nBO_position                             0x0
  #define nBO_size                                 0x1
  #define nBO_value_mask                           0x1
  #define nBO_clear_mask                           0xFE
  
  #define nPOR                                     0x1
  #define nPOR_address                             0x08E
  #define nPOR_position                            0x1
  #define nPOR_size                                0x1
  #define nPOR_value_mask                          0x2
  #define nPOR_clear_mask                          0xFD
  
  
  /*---------------------------------------------#
  | OSCCON                                  0x8F |
  #----------------------------------------------#
  | - | IRCF2 | IRCF1 | IRCF0 | - | IOFS | - | - |
  #----------------------------------------------#
  | 7 | 6     | 5     | 4     | 3 | 2    | 1 | 0 |
  #---------------------------------------------*/
  
  #define OSCCON                                   0x0
  #define OSCCON_address                           0x08F
  #define OSCCON_position                          0x0
  #define OSCCON_size                              0x8
  #define OSCCON_value_mask                        0xFF
  #define OSCCON_clear_mask                        0x0
  
  #define IOFS                                     0x2
  #define IOFS_address                             0x08F
  #define IOFS_position                            0x2
  #define IOFS_size                                0x1
  #define IOFS_value_mask                          0x4
  #define IOFS_clear_mask                          0xFB
  
  #define IRCF                                     0x4
  #define IRCF_address                             0x08F
  #define IRCF_position                            0x4
  #define IRCF_size                                0x3
  #define IRCF_value_mask                          0x70
  #define IRCF_clear_mask                          0x8F
  
  #define IRCF0                                    0x4
  #define IRCF0_address                            0x08F
  #define IRCF0_position                           0x4
  #define IRCF0_size                               0x1
  #define IRCF0_value_mask                         0x10
  #define IRCF0_clear_mask                         0xEF
  
  #define IRCF1                                    0x5
  #define IRCF1_address                            0x08F
  #define IRCF1_position                           0x5
  #define IRCF1_size                               0x1
  #define IRCF1_value_mask                         0x20
  #define IRCF1_clear_mask                         0xDF
  
  #define IRCF2                                    0x6
  #define IRCF2_address                            0x08F
  #define IRCF2_position                           0x6
  #define IRCF2_size                               0x1
  #define IRCF2_value_mask                         0x40
  #define IRCF2_clear_mask                         0xBF
  
  
  /*------------------------------------------------#
  | OSCTUNE                                    0x90 |
  #-------------------------------------------------#
  | - | - | TUN5 | TUN4 | TUN3 | TUN2 | TUN1 | TUN0 |
  #-------------------------------------------------#
  | 7 | 6 | 5    | 4    | 3    | 2    | 1    | 0    |
  #------------------------------------------------*/
  
  #define OSCTUNE                                  0x0
  #define OSCTUNE_address                          0x090
  #define OSCTUNE_position                         0x0
  #define OSCTUNE_size                             0x8
  #define OSCTUNE_value_mask                       0xFF
  #define OSCTUNE_clear_mask                       0x0
  
  #define TUN0                                     0x0
  #define TUN0_address                             0x090
  #define TUN0_position                            0x0
  #define TUN0_size                                0x1
  #define TUN0_value_mask                          0x1
  #define TUN0_clear_mask                          0xFE
  
  #define TUN                                      0x0
  #define TUN_address                              0x090
  #define TUN_position                             0x0
  #define TUN_size                                 0x6
  #define TUN_value_mask                           0x3F
  #define TUN_clear_mask                           0xC0
  
  #define TUN1                                     0x1
  #define TUN1_address                             0x090
  #define TUN1_position                            0x1
  #define TUN1_size                                0x1
  #define TUN1_value_mask                          0x2
  #define TUN1_clear_mask                          0xFD
  
  #define TUN2                                     0x2
  #define TUN2_address                             0x090
  #define TUN2_position                            0x2
  #define TUN2_size                                0x1
  #define TUN2_value_mask                          0x4
  #define TUN2_clear_mask                          0xFB
  
  #define TUN3                                     0x3
  #define TUN3_address                             0x090
  #define TUN3_position                            0x3
  #define TUN3_size                                0x1
  #define TUN3_value_mask                          0x8
  #define TUN3_clear_mask                          0xF7
  
  #define TUN4                                     0x4
  #define TUN4_address                             0x090
  #define TUN4_position                            0x4
  #define TUN4_size                                0x1
  #define TUN4_value_mask                          0x10
  #define TUN4_clear_mask                          0xEF
  
  #define TUN5                                     0x5
  #define TUN5_address                             0x090
  #define TUN5_position                            0x5
  #define TUN5_size                                0x1
  #define TUN5_value_mask                          0x20
  #define TUN5_clear_mask                          0xDF
  
  
  /*-----------------------------------------------------#
  | SSPSTAT                                         0x94 |
  #------------------------------------------------------#
  | SMP | CKE | nA | I2C_STOP | S | READ_WRITE | UA | BF |
  #------------------------------------------------------#
  | 7   | 6   | 5  | 4        | 3 | 2          | 1  | 0  |
  #-----------------------------------------------------*/
  
  #define SSPSTAT                                  0x0
  #define SSPSTAT_address                          0x094
  #define SSPSTAT_position                         0x0
  #define SSPSTAT_size                             0x8
  #define SSPSTAT_value_mask                       0xFF
  #define SSPSTAT_clear_mask                       0x0
  
  #define BF                                       0x0
  #define BF_address                               0x094
  #define BF_position                              0x0
  #define BF_size                                  0x1
  #define BF_value_mask                            0x1
  #define BF_clear_mask                            0xFE
  
  #define UA                                       0x1
  #define UA_address                               0x094
  #define UA_position                              0x1
  #define UA_size                                  0x1
  #define UA_value_mask                            0x2
  #define UA_clear_mask                            0xFD
  
  #define R_nW                                     0x2
  #define R_nW_address                             0x094
  #define R_nW_position                            0x2
  #define R_nW_size                                0x1
  #define R_nW_value_mask                          0x4
  #define R_nW_clear_mask                          0xFB
  
  #define READ_WRITE                               0x2
  #define READ_WRITE_address                       0x094
  #define READ_WRITE_position                      0x2
  #define READ_WRITE_size                          0x1
  #define READ_WRITE_value_mask                    0x4
  #define READ_WRITE_clear_mask                    0xFB
  
  #define I2C_READ                                 0x2
  #define I2C_READ_address                         0x094
  #define I2C_READ_position                        0x2
  #define I2C_READ_size                            0x1
  #define I2C_READ_value_mask                      0x4
  #define I2C_READ_clear_mask                      0xFB
  
  #define nW                                       0x2
  #define nW_address                               0x094
  #define nW_position                              0x2
  #define nW_size                                  0x1
  #define nW_value_mask                            0x4
  #define nW_clear_mask                            0xFB
  
  #define R                                        0x2
  #define R_address                                0x094
  #define R_position                               0x2
  #define R_size                                   0x1
  #define R_value_mask                             0x4
  #define R_clear_mask                             0xFB
  
  #define nWRITE                                   0x2
  #define nWRITE_address                           0x094
  #define nWRITE_position                          0x2
  #define nWRITE_size                              0x1
  #define nWRITE_value_mask                        0x4
  #define nWRITE_clear_mask                        0xFB
  
  #define R_W                                      0x2
  #define R_W_address                              0x094
  #define R_W_position                             0x2
  #define R_W_size                                 0x1
  #define R_W_value_mask                           0x4
  #define R_W_clear_mask                           0xFB
  
  #define S                                        0x3
  #define S_address                                0x094
  #define S_position                               0x3
  #define S_size                                   0x1
  #define S_value_mask                             0x8
  #define S_clear_mask                             0xF7
  
  #define I2C_START                                0x3
  #define I2C_START_address                        0x094
  #define I2C_START_position                       0x3
  #define I2C_START_size                           0x1
  #define I2C_START_value_mask                     0x8
  #define I2C_START_clear_mask                     0xF7
  
  #define I2C_STOP                                 0x4
  #define I2C_STOP_address                         0x094
  #define I2C_STOP_position                        0x4
  #define I2C_STOP_size                            0x1
  #define I2C_STOP_value_mask                      0x10
  #define I2C_STOP_clear_mask                      0xEF
  
  #define P                                        0x4
  #define P_address                                0x094
  #define P_position                               0x4
  #define P_size                                   0x1
  #define P_value_mask                             0x10
  #define P_clear_mask                             0xEF
  
  #define nA                                       0x5
  #define nA_address                               0x094
  #define nA_position                              0x5
  #define nA_size                                  0x1
  #define nA_value_mask                            0x20
  #define nA_clear_mask                            0xDF
  
  #define D_A                                      0x5
  #define D_A_address                              0x094
  #define D_A_position                             0x5
  #define D_A_size                                 0x1
  #define D_A_value_mask                           0x20
  #define D_A_clear_mask                           0xDF
  
  #define D_nA                                     0x5
  #define D_nA_address                             0x094
  #define D_nA_position                            0x5
  #define D_nA_size                                0x1
  #define D_nA_value_mask                          0x20
  #define D_nA_clear_mask                          0xDF
  
  #define D                                        0x5
  #define D_address                                0x094
  #define D_position                               0x5
  #define D_size                                   0x1
  #define D_value_mask                             0x20
  #define D_clear_mask                             0xDF
  
  #define DATA_ADDRESS                             0x5
  #define DATA_ADDRESS_address                     0x094
  #define DATA_ADDRESS_position                    0x5
  #define DATA_ADDRESS_size                        0x1
  #define DATA_ADDRESS_value_mask                  0x20
  #define DATA_ADDRESS_clear_mask                  0xDF
  
  #define nADDRESS                                 0x5
  #define nADDRESS_address                         0x094
  #define nADDRESS_position                        0x5
  #define nADDRESS_size                            0x1
  #define nADDRESS_value_mask                      0x20
  #define nADDRESS_clear_mask                      0xDF
  
  #define I2C_DATA                                 0x5
  #define I2C_DATA_address                         0x094
  #define I2C_DATA_position                        0x5
  #define I2C_DATA_size                            0x1
  #define I2C_DATA_value_mask                      0x20
  #define I2C_DATA_clear_mask                      0xDF
  
  #define CKE                                      0x6
  #define CKE_address                              0x094
  #define CKE_position                             0x6
  #define CKE_size                                 0x1
  #define CKE_value_mask                           0x40
  #define CKE_clear_mask                           0xBF
  
  #define SMP                                      0x7
  #define SMP_address                              0x094
  #define SMP_position                             0x7
  #define SMP_size                                 0x1
  #define SMP_value_mask                           0x80
  #define SMP_clear_mask                           0x7F
  
  
  /*-----------------------------------------------------#
  | ADCON1                                          0x9F |
  #------------------------------------------------------#
  | ADFM | ADCS2 | - | - | PCFG3 | PCFG2 | PCFG1 | PCFG0 |
  #------------------------------------------------------#
  | 7    | 6     | 5 | 4 | 3     | 2     | 1     | 0     |
  #-----------------------------------------------------*/
  
  #define ADCON1                                   0x0
  #define ADCON1_address                           0x09F
  #define ADCON1_position                          0x0
  #define ADCON1_size                              0x8
  #define ADCON1_value_mask                        0xFF
  #define ADCON1_clear_mask                        0x0
  
  #define PCFG0                                    0x0
  #define PCFG0_address                            0x09F
  #define PCFG0_position                           0x0
  #define PCFG0_size                               0x1
  #define PCFG0_value_mask                         0x1
  #define PCFG0_clear_mask                         0xFE
  
  #define PCFG                                     0x0
  #define PCFG_address                             0x09F
  #define PCFG_position                            0x0
  #define PCFG_size                                0x4
  #define PCFG_value_mask                          0xF
  #define PCFG_clear_mask                          0xF0
  
  #define PCFG1                                    0x1
  #define PCFG1_address                            0x09F
  #define PCFG1_position                           0x1
  #define PCFG1_size                               0x1
  #define PCFG1_value_mask                         0x2
  #define PCFG1_clear_mask                         0xFD
  
  #define PCFG2                                    0x2
  #define PCFG2_address                            0x09F
  #define PCFG2_position                           0x2
  #define PCFG2_size                               0x1
  #define PCFG2_value_mask                         0x4
  #define PCFG2_clear_mask                         0xFB
  
  #define PCFG3                                    0x3
  #define PCFG3_address                            0x09F
  #define PCFG3_position                           0x3
  #define PCFG3_size                               0x1
  #define PCFG3_value_mask                         0x8
  #define PCFG3_clear_mask                         0xF7
  
  #define ADCS2                                    0x6
  #define ADCS2_address                            0x09F
  #define ADCS2_position                           0x6
  #define ADCS2_size                               0x1
  #define ADCS2_value_mask                         0x40
  #define ADCS2_clear_mask                         0xBF
  
  #define ADFM                                     0x7
  #define ADFM_address                             0x09F
  #define ADFM_position                            0x7
  #define ADFM_size                                0x1
  #define ADFM_value_mask                          0x80
  #define ADFM_clear_mask                          0x7F
  
  
  /*----------------------------------------------#
  | EECON1                                  0x18C |
  #-----------------------------------------------#
  | EEPGD | - | - | FREE | WRERR | WREN | WR | RD |
  #-----------------------------------------------#
  | 7     | 6 | 5 | 4    | 3     | 2    | 1  | 0  |
  #----------------------------------------------*/
  
  #define EECON1                                   0x0
  #define EECON1_address                           0x18C
  #define EECON1_position                          0x0
  #define EECON1_size                              0x8
  #define EECON1_value_mask                        0xFF
  #define EECON1_clear_mask                        0x0
  
  #define RD                                       0x0
  #define RD_address                               0x18C
  #define RD_position                              0x0
  #define RD_size                                  0x1
  #define RD_value_mask                            0x1
  #define RD_clear_mask                            0xFE
  
  #define WR                                       0x1
  #define WR_address                               0x18C
  #define WR_position                              0x1
  #define WR_size                                  0x1
  #define WR_value_mask                            0x2
  #define WR_clear_mask                            0xFD
  
  #define WREN                                     0x2
  #define WREN_address                             0x18C
  #define WREN_position                            0x2
  #define WREN_size                                0x1
  #define WREN_value_mask                          0x4
  #define WREN_clear_mask                          0xFB
  
  #define WRERR                                    0x3
  #define WRERR_address                            0x18C
  #define WRERR_position                           0x3
  #define WRERR_size                               0x1
  #define WRERR_value_mask                         0x8
  #define WRERR_clear_mask                         0xF7
  
  #define FREE                                     0x4
  #define FREE_address                             0x18C
  #define FREE_position                            0x4
  #define FREE_size                                0x1
  #define FREE_value_mask                          0x10
  #define FREE_clear_mask                          0xEF
  
  #define EEPGD                                    0x7
  #define EEPGD_address                            0x18C
  #define EEPGD_position                           0x7
  #define EEPGD_size                               0x1
  #define EEPGD_value_mask                         0x80
  #define EEPGD_clear_mask                         0x7F
  
  #endif // _PIC16LF819_H_
  