-- =================================================== -- Title: JalV2 device include file for PIC 16F819 -- -- Author: Rob Hamerling, Copyright (c) 2008..2011, all rights reserved. -- -- Adapted-by: -- -- Revision: $Revision: 2828 $ -- -- Compiler: 2.4o -- -- This file is part of jallib (http://jallib.googlecode.com) -- Released under the ZLIB license (http://www.opensource.org/licenses/zlib-license.html) -- -- Description: -- Device include file for pic16f819, containing: -- - Declaration of ports and pins of the chip. -- - Procedures for shadowing of ports and pins -- to circumvent the read-modify-write problem. -- - Symbolic definitions for configuration bits (fuses) -- - Some device dependent procedures for common -- operations, like: -- . enable_digital_io() -- -- Sources: -- - x:/mplab880/mplab ide/device/pic16f819.dev -- - x:/mplab880/mpasm suite/lkr/16f819_g.lkr -- -- Notes: -- - Created with Dev2Jal Rexx script version 0.1.24 -- - File creation date/time: 9 Nov 2011 11:12 -- -- =================================================== -- const word DEVICE_ID = 0x04E0 const byte PICTYPE[] = "16F819" const byte DATASHEET[] = "39598E" const byte PGMSPEC[] = "39603C" -- -- Vdd Range: 2.500-5.500 Nominal: 5.000 -- Vpp Range: 9.000-12.000 Default: 12.000 -- -- --------------------------------------------------- -- include chipdef_jallib -- common constants -- pragma target cpu PIC_14 -- (banks=4) pragma target chip 16f819 pragma target bank 0x0080 pragma target page 0x0800 pragma stack 8 pragma code 2048 -- (words) pragma eeprom 0x2100,256 pragma ID 0x2000,4 pragma data 0x20-0x6F,0xA0-0xEF,0x120-0x16F pragma shared 0x70-0x7F -- var volatile byte _pic_accum shared at 0x7E -- (compiler) var volatile byte _pic_isr_w shared at 0x7F -- (compiler) -- const word _FUSES_CT = 1 const word _FUSE_BASE = 0x2007 const word _FUSES = 0b_0011_1111_1111_1111 -- -- ------------------------------------------------ var volatile byte INDF at { 0x0,0x80,0x100,0x180 } var volatile byte _ind at { 0x0,0x80,0x100,0x180 } -- (compiler) -- ------------------------------------------------ var volatile byte TMR0 at { 0x1,0x101 } -- ------------------------------------------------ var volatile byte PCL at { 0x2,0x82,0x102,0x182 } var volatile byte _pcl at { 0x2,0x82,0x102,0x182 } -- (compiler) -- ------------------------------------------------ var volatile byte STATUS at { 0x3,0x83,0x103,0x183 } var volatile bit STATUS_IRP at STATUS : 7 var volatile bit*2 STATUS_RP at STATUS : 5 var volatile bit STATUS_NTO at STATUS : 4 var volatile bit STATUS_NPD at STATUS : 3 var volatile bit STATUS_Z at STATUS : 2 var volatile bit STATUS_DC at STATUS : 1 var volatile bit STATUS_C at STATUS : 0 var volatile byte _status at { 0x3,0x83,0x103,0x183 } -- (compiler) const byte _irp = 7 -- (compiler) const byte _rp1 = 6 -- (compiler) const byte _rp0 = 5 -- (compiler) const byte _not_to = 4 -- (compiler) const byte _not_pd = 3 -- (compiler) const byte _z = 2 -- (compiler) const byte _dc = 1 -- (compiler) const byte _c = 0 -- (compiler) -- ------------------------------------------------ var volatile byte FSR at { 0x4,0x84,0x104,0x184 } var volatile byte _fsr at { 0x4,0x84,0x104,0x184 } -- (compiler) -- ------------------------------------------------ var volatile byte _PORTA at { 0x5 } -- var byte PORTA at _PORTA var byte _PORTA_shadow -- procedure PORTA'put(byte in x at _PORTA_shadow) is pragma inline _PORTA = _PORTA_shadow end procedure -- procedure PORTA_low'put(byte in x) is pragma inline _PORTA_shadow = (_PORTA_shadow & 0xF0) | (x & 0x0F) _PORTA = _PORTA_shadow end procedure function PORTA_low'get() return byte is pragma inline return (PORTA & 0x0F) end function -- procedure PORTA_high'put(byte in x) is pragma inline _PORTA_shadow = (_PORTA_shadow & 0x0F) | (x << 4) _PORTA = _PORTA_shadow end procedure function PORTA_high'get() return byte is pragma inline return (PORTA >> 4) end function -- var volatile bit PORTA_RA7 at _PORTA : 7 var volatile bit pin_A7 at _PORTA : 7 alias pin_OSC1 is pin_A7 alias pin_CLKI is pin_A7 -- procedure pin_A7'put(bit in x at _PORTA_shadow : 7) is pragma inline _PORTA = _PORTA_shadow end procedure -- var volatile bit PORTA_RA6 at _PORTA : 6 var volatile bit pin_A6 at _PORTA : 6 alias pin_OSC2 is pin_A6 alias pin_CLKO is pin_A6 -- procedure pin_A6'put(bit in x at _PORTA_shadow : 6) is pragma inline _PORTA = _PORTA_shadow end procedure -- var volatile bit PORTA_RA5 at _PORTA : 5 var volatile bit pin_A5 at _PORTA : 5 alias pin_MCLR is pin_A5 alias pin_VPP is pin_A5 -- procedure pin_A5'put(bit in x at _PORTA_shadow : 5) is pragma inline _PORTA = _PORTA_shadow end procedure -- var volatile bit PORTA_RA4 at _PORTA : 4 var volatile bit pin_A4 at _PORTA : 4 alias pin_AN4 is pin_A4 alias pin_T0CKI is pin_A4 -- procedure pin_A4'put(bit in x at _PORTA_shadow : 4) is pragma inline _PORTA = _PORTA_shadow end procedure -- var volatile bit PORTA_RA3 at _PORTA : 3 var volatile bit pin_A3 at _PORTA : 3 alias pin_AN3 is pin_A3 alias pin_VREF_POS is pin_A3 -- procedure pin_A3'put(bit in x at _PORTA_shadow : 3) is pragma inline _PORTA = _PORTA_shadow end procedure -- var volatile bit PORTA_RA2 at _PORTA : 2 var volatile bit pin_A2 at _PORTA : 2 alias pin_AN2 is pin_A2 alias pin_VREF is pin_A2 -- procedure pin_A2'put(bit in x at _PORTA_shadow : 2) is pragma inline _PORTA = _PORTA_shadow end procedure -- var volatile bit PORTA_RA1 at _PORTA : 1 var volatile bit pin_A1 at _PORTA : 1 alias pin_AN1 is pin_A1 -- procedure pin_A1'put(bit in x at _PORTA_shadow : 1) is pragma inline _PORTA = _PORTA_shadow end procedure -- var volatile bit PORTA_RA0 at _PORTA : 0 var volatile bit pin_A0 at _PORTA : 0 alias pin_AN0 is pin_A0 -- procedure pin_A0'put(bit in x at _PORTA_shadow : 0) is pragma inline _PORTA = _PORTA_shadow end procedure -- -- ------------------------------------------------ var volatile byte _PORTB at { 0x6,0x106 } -- var byte PORTB at _PORTB var byte _PORTB_shadow -- procedure PORTB'put(byte in x at _PORTB_shadow) is pragma inline _PORTB = _PORTB_shadow end procedure -- procedure PORTB_low'put(byte in x) is pragma inline _PORTB_shadow = (_PORTB_shadow & 0xF0) | (x & 0x0F) _PORTB = _PORTB_shadow end procedure function PORTB_low'get() return byte is pragma inline return (PORTB & 0x0F) end function -- procedure PORTB_high'put(byte in x) is pragma inline _PORTB_shadow = (_PORTB_shadow & 0x0F) | (x << 4) _PORTB = _PORTB_shadow end procedure function PORTB_high'get() return byte is pragma inline return (PORTB >> 4) end function -- var volatile bit PORTB_RB7 at _PORTB : 7 var volatile bit pin_B7 at _PORTB : 7 alias pin_T1OSI is pin_B7 alias pin_PGD is pin_B7 -- procedure pin_B7'put(bit in x at _PORTB_shadow : 7) is pragma inline _PORTB = _PORTB_shadow end procedure -- var volatile bit PORTB_RB6 at _PORTB : 6 var volatile bit pin_B6 at _PORTB : 6 alias pin_T1OSO is pin_B6 alias pin_T1CKI is pin_B6 alias pin_PGC is pin_B6 -- procedure pin_B6'put(bit in x at _PORTB_shadow : 6) is pragma inline _PORTB = _PORTB_shadow end procedure -- var volatile bit PORTB_RB5 at _PORTB : 5 var volatile bit pin_B5 at _PORTB : 5 alias pin_SS is pin_B5 -- procedure pin_B5'put(bit in x at _PORTB_shadow : 5) is pragma inline _PORTB = _PORTB_shadow end procedure -- var volatile bit PORTB_RB4 at _PORTB : 4 var volatile bit pin_B4 at _PORTB : 4 alias pin_SCK is pin_B4 alias pin_SCL is pin_B4 -- procedure pin_B4'put(bit in x at _PORTB_shadow : 4) is pragma inline _PORTB = _PORTB_shadow end procedure -- var volatile bit PORTB_RB3 at _PORTB : 3 var volatile bit pin_B3 at _PORTB : 3 alias pin_CCP1_RB3 is pin_B3 alias pin_PGM is pin_B3 -- procedure pin_B3'put(bit in x at _PORTB_shadow : 3) is pragma inline _PORTB = _PORTB_shadow end procedure -- var volatile bit PORTB_RB2 at _PORTB : 2 var volatile bit pin_B2 at _PORTB : 2 alias pin_SDO is pin_B2 alias pin_CCP1_RB2 is pin_B2 -- procedure pin_B2'put(bit in x at _PORTB_shadow : 2) is pragma inline _PORTB = _PORTB_shadow end procedure -- var volatile bit PORTB_RB1 at _PORTB : 1 var volatile bit pin_B1 at _PORTB : 1 alias pin_SDI is pin_B1 alias pin_SDA is pin_B1 -- procedure pin_B1'put(bit in x at _PORTB_shadow : 1) is pragma inline _PORTB = _PORTB_shadow end procedure -- var volatile bit PORTB_RB0 at _PORTB : 0 var volatile bit pin_B0 at _PORTB : 0 alias pin_INT is pin_B0 -- procedure pin_B0'put(bit in x at _PORTB_shadow : 0) is pragma inline _PORTB = _PORTB_shadow end procedure -- -- ------------------------------------------------ var volatile byte PCLATH at { 0xA,0x8A,0x10A,0x18A } var volatile bit*5 PCLATH_PCLATH at PCLATH : 0 var volatile byte _pclath at { 0xA,0x8A,0x10A,0x18A } -- (compiler) -- ------------------------------------------------ var volatile byte INTCON at { 0xB,0x8B,0x10B,0x18B } var volatile bit INTCON_GIE at INTCON : 7 var volatile bit INTCON_PEIE at INTCON : 6 var volatile bit INTCON_TMR0IE at INTCON : 5 var volatile bit INTCON_INTE at INTCON : 4 var volatile bit INTCON_RBIE at INTCON : 3 var volatile bit INTCON_TMR0IF at INTCON : 2 var volatile bit INTCON_INTF at INTCON : 1 var volatile bit INTCON_RBIF at INTCON : 0 -- ------------------------------------------------ var volatile byte PIR1 at { 0xC } var volatile bit PIR1_ADIF at PIR1 : 6 var volatile bit PIR1_SSPIF at PIR1 : 3 var volatile bit PIR1_CCP1IF at PIR1 : 2 var volatile bit PIR1_TMR2IF at PIR1 : 1 var volatile bit PIR1_TMR1IF at PIR1 : 0 -- ------------------------------------------------ var volatile byte PIR2 at { 0xD } var volatile bit PIR2_EEIF at PIR2 : 4 -- ------------------------------------------------ var volatile word TMR1 at { 0xE } -- ------------------------------------------------ var volatile byte TMR1L at { 0xE } -- ------------------------------------------------ var volatile byte TMR1H at { 0xF } -- ------------------------------------------------ var volatile byte T1CON at { 0x10 } var volatile bit*2 T1CON_T1CKPS at T1CON : 4 var volatile bit T1CON_T1OSCEN at T1CON : 3 var volatile bit T1CON_NT1SYNC at T1CON : 2 var volatile bit T1CON_TMR1CS at T1CON : 1 var volatile bit T1CON_TMR1ON at T1CON : 0 -- ------------------------------------------------ var volatile byte TMR2 at { 0x11 } -- ------------------------------------------------ var volatile byte T2CON at { 0x12 } var volatile bit*4 T2CON_TOUTPS at T2CON : 3 var volatile bit T2CON_TMR2ON at T2CON : 2 var volatile bit*2 T2CON_T2CKPS at T2CON : 0 -- ------------------------------------------------ var volatile byte SSPBUF at { 0x13 } -- ------------------------------------------------ var volatile byte SSPCON at { 0x14 } var volatile bit SSPCON_WCOL at SSPCON : 7 var volatile bit SSPCON_SSPOV at SSPCON : 6 var volatile bit SSPCON_SSPEN at SSPCON : 5 var volatile bit SSPCON_CKP at SSPCON : 4 var volatile bit*4 SSPCON_SSPM at SSPCON : 0 -- ------------------------------------------------ var volatile word CCPR1 at { 0x15 } -- ------------------------------------------------ var volatile byte CCPR1L at { 0x15 } -- ------------------------------------------------ var volatile byte CCPR1H at { 0x16 } -- ------------------------------------------------ var volatile byte CCP1CON at { 0x17 } var volatile bit*2 CCP1CON_DC1B at CCP1CON : 4 var volatile bit*4 CCP1CON_CCP1M at CCP1CON : 0 -- ------------------------------------------------ var volatile byte ADRESH at { 0x1E } -- ------------------------------------------------ var volatile byte ADCON0 at { 0x1F } var volatile bit*2 ADCON0_ADCS10 at ADCON0 : 6 var volatile bit*3 ADCON0_CHS at ADCON0 : 3 var volatile bit ADCON0_GO at ADCON0 : 2 var volatile bit ADCON0_NDONE at ADCON0 : 2 var volatile bit ADCON0_ADON at ADCON0 : 0 -- ------------------------------------------------ var volatile byte OPTION_REG at { 0x81,0x181 } var volatile bit OPTION_REG_NRBPU at OPTION_REG : 7 var volatile bit OPTION_REG_INTEDG at OPTION_REG : 6 var volatile bit OPTION_REG_T0CS at OPTION_REG : 5 alias T0CON_T0CS is OPTION_REG_T0CS var volatile bit OPTION_REG_T0SE at OPTION_REG : 4 alias T0CON_T0SE is OPTION_REG_T0SE var volatile bit OPTION_REG_PSA at OPTION_REG : 3 alias T0CON_PSA is OPTION_REG_PSA var volatile bit*3 OPTION_REG_PS at OPTION_REG : 0 alias T0CON_T0PS is OPTION_REG_PS -- ------------------------------------------------ var volatile byte TRISA at { 0x85 } var volatile byte PORTA_direction at TRISA -- procedure PORTA_low_direction'put(byte in x) is pragma inline TRISA = (TRISA & 0xF0) | (x & 0x0F) end procedure function PORTA_low_direction'get() return byte is pragma inline return (TRISA & 0x0F) end function -- procedure PORTA_high_direction'put(byte in x) is pragma inline TRISA = (TRISA & 0x0F) | (x << 4) end procedure function PORTA_high_direction'get() return byte is pragma inline return (TRISA >> 4) end function -- var volatile bit TRISA_TRISA7 at TRISA : 7 var volatile bit pin_A7_direction at TRISA : 7 alias pin_OSC1_direction is pin_A7_direction alias pin_CLKI_direction is pin_A7_direction -- var volatile bit TRISA_TRISA6 at TRISA : 6 var volatile bit pin_A6_direction at TRISA : 6 alias pin_OSC2_direction is pin_A6_direction alias pin_CLKO_direction is pin_A6_direction -- var volatile bit TRISA_TRISA5 at TRISA : 5 var volatile bit pin_A5_direction at TRISA : 5 alias pin_MCLR_direction is pin_A5_direction alias pin_VPP_direction is pin_A5_direction -- var volatile bit TRISA_TRISA4 at TRISA : 4 var volatile bit pin_A4_direction at TRISA : 4 alias pin_AN4_direction is pin_A4_direction alias pin_T0CKI_direction is pin_A4_direction -- var volatile bit TRISA_TRISA3 at TRISA : 3 var volatile bit pin_A3_direction at TRISA : 3 alias pin_AN3_direction is pin_A3_direction alias pin_VREF_POS_direction is pin_A3_direction -- var volatile bit TRISA_TRISA2 at TRISA : 2 var volatile bit pin_A2_direction at TRISA : 2 alias pin_AN2_direction is pin_A2_direction alias pin_VREF_direction is pin_A2_direction -- var volatile bit TRISA_TRISA1 at TRISA : 1 var volatile bit pin_A1_direction at TRISA : 1 alias pin_AN1_direction is pin_A1_direction -- var volatile bit TRISA_TRISA0 at TRISA : 0 var volatile bit pin_A0_direction at TRISA : 0 alias pin_AN0_direction is pin_A0_direction -- -- ------------------------------------------------ var volatile byte TRISB at { 0x86,0x186 } var volatile byte PORTB_direction at TRISB -- procedure PORTB_low_direction'put(byte in x) is pragma inline TRISB = (TRISB & 0xF0) | (x & 0x0F) end procedure function PORTB_low_direction'get() return byte is pragma inline return (TRISB & 0x0F) end function -- procedure PORTB_high_direction'put(byte in x) is pragma inline TRISB = (TRISB & 0x0F) | (x << 4) end procedure function PORTB_high_direction'get() return byte is pragma inline return (TRISB >> 4) end function -- var volatile bit TRISB_TRISB7 at TRISB : 7 var volatile bit pin_B7_direction at TRISB : 7 alias pin_T1OSI_direction is pin_B7_direction alias pin_PGD_direction is pin_B7_direction -- var volatile bit TRISB_TRISB6 at TRISB : 6 var volatile bit pin_B6_direction at TRISB : 6 alias pin_T1OSO_direction is pin_B6_direction alias pin_T1CKI_direction is pin_B6_direction alias pin_PGC_direction is pin_B6_direction -- var volatile bit TRISB_TRISB5 at TRISB : 5 var volatile bit pin_B5_direction at TRISB : 5 alias pin_SS_direction is pin_B5_direction -- var volatile bit TRISB_TRISB4 at TRISB : 4 var volatile bit pin_B4_direction at TRISB : 4 alias pin_SCK_direction is pin_B4_direction alias pin_SCL_direction is pin_B4_direction -- var volatile bit TRISB_TRISB3 at TRISB : 3 var volatile bit pin_B3_direction at TRISB : 3 alias pin_CCP1_RB3_direction is pin_B3_direction alias pin_PGM_direction is pin_B3_direction -- var volatile bit TRISB_TRISB2 at TRISB : 2 var volatile bit pin_B2_direction at TRISB : 2 alias pin_SDO_direction is pin_B2_direction alias pin_CCP1_RB2_direction is pin_B2_direction -- var volatile bit TRISB_TRISB1 at TRISB : 1 var volatile bit pin_B1_direction at TRISB : 1 alias pin_SDI_direction is pin_B1_direction alias pin_SDA_direction is pin_B1_direction -- var volatile bit TRISB_TRISB0 at TRISB : 0 var volatile bit pin_B0_direction at TRISB : 0 alias pin_INT_direction is pin_B0_direction -- -- ------------------------------------------------ var volatile byte PIE1 at { 0x8C } var volatile bit PIE1_ADIE at PIE1 : 6 var volatile bit PIE1_SSPIE at PIE1 : 3 var volatile bit PIE1_CCP1IE at PIE1 : 2 var volatile bit PIE1_TMR2IE at PIE1 : 1 var volatile bit PIE1_TMR1IE at PIE1 : 0 -- ------------------------------------------------ var volatile byte PIE2 at { 0x8D } var volatile bit PIE2_EEIE at PIE2 : 4 -- ------------------------------------------------ var volatile byte PCON at { 0x8E } var volatile bit PCON_NPOR at PCON : 1 var volatile bit PCON_NBOR at PCON : 0 -- ------------------------------------------------ var volatile byte OSCCON at { 0x8F } var volatile bit*3 OSCCON_IRCF at OSCCON : 4 var volatile bit OSCCON_IOFS at OSCCON : 2 -- ------------------------------------------------ var volatile byte OSCTUNE at { 0x90 } var volatile bit*6 OSCTUNE_TUN at OSCTUNE : 0 -- ------------------------------------------------ var volatile byte PR2 at { 0x92 } -- ------------------------------------------------ var volatile byte SSPADD at { 0x93 } -- ------------------------------------------------ var volatile byte SSPSTAT at { 0x94 } var volatile bit SSPSTAT_SMP at SSPSTAT : 7 var volatile bit SSPSTAT_CKE at SSPSTAT : 6 var volatile bit SSPSTAT_D at SSPSTAT : 5 var volatile bit SSPSTAT_NA at SSPSTAT : 5 var volatile bit SSPSTAT_P at SSPSTAT : 4 var volatile bit SSPSTAT_S at SSPSTAT : 3 var volatile bit SSPSTAT_R at SSPSTAT : 2 var volatile bit SSPSTAT_NW at SSPSTAT : 2 var volatile bit SSPSTAT_UA at SSPSTAT : 1 var volatile bit SSPSTAT_BF at SSPSTAT : 0 -- ------------------------------------------------ var volatile byte ADRESL at { 0x9E } -- ------------------------------------------------ var volatile byte ADCON1 at { 0x9F } var volatile bit ADCON1_ADFM at ADCON1 : 7 var volatile bit ADCON1_ADCS2 at ADCON1 : 6 var byte ADCON0_ADCS procedure ADCON0_ADCS'put(byte in x) is pragma inline ADCON0_ADCS10 = x -- low order bits ADCON1_ADCS2 = (x & 0x04) end procedure var volatile bit*4 ADCON1_PCFG at ADCON1 : 0 -- ------------------------------------------------ var volatile byte EEDATA at { 0x10C } -- ------------------------------------------------ var volatile byte EEADR at { 0x10D } -- ------------------------------------------------ var volatile byte EEDATH at { 0x10E } var volatile bit*6 EEDATH_EEDATH at EEDATH : 0 -- ------------------------------------------------ var volatile byte EEADRH at { 0x10F } var volatile bit*3 EEADRH_EEADRH at EEADRH : 0 -- ------------------------------------------------ var volatile byte EECON1 at { 0x18C } var volatile bit EECON1_EEPGD at EECON1 : 7 var volatile bit EECON1_FREE at EECON1 : 4 var volatile bit EECON1_WRERR at EECON1 : 3 var volatile bit EECON1_WREN at EECON1 : 2 var volatile bit EECON1_WR at EECON1 : 1 var volatile bit EECON1_RD at EECON1 : 0 -- ------------------------------------------------ var volatile byte EECON2 at { 0x18D } -- -- =================================================== -- -- Special (device specific) constants and procedures -- const ADC_GROUP = ADC_V1 const byte ADC_NTOTAL_CHANNEL = 5 const byte ADC_ADCS_BITCOUNT = 3 -- const PPS_GROUP = PPS_0 -- no Peripheral Pin Selection -- -- - - - - - - - - - - - - - - - - - - - - - - - - - - -- Disable ADC module procedure adc_off() is pragma inline ADCON0 = 0b0000_0000 -- disable ADC ADCON1 = 0b0000_0111 -- digital I/O end procedure -- -- - - - - - - - - - - - - - - - - - - - - - - - - - - -- Switch analog ports to digital mode (if analog module present). procedure enable_digital_io() is pragma inline adc_off() end procedure -- -- ================================================== -- -- Symbolic Fuse definitions -- ------------------------- -- -- CONFIG (0x2007) -- pragma fuse_def OSC 0x13 { -- oscillator selection bits RC_CLKOUT = 0x13 -- extrc oscillator; clko function on ra6/osc2/clko pin RC_NOCLKOUT = 0x12 -- extrc oscillator; port i/o function on ra6/osc2/clko pin INTOSC_CLKOUT = 0x11 -- intrc oscillator; clko function on ra6/osc2/clko pin and port i/o function on ra7/osc1/clki pin INTOSC_NOCLKOUT = 0x10 -- intrc oscillator; port i/o function on both ra6/osc2/clko pin and ra7/osc1/clki pin EC_NOCLKOUT = 0x3 -- extclk; port i/o function on ra6/osc2/clko pin HS = 0x2 -- hs oscillator XT = 0x1 -- xt oscillator LP = 0x0 -- lp oscillator } pragma fuse_def WDT 0x4 { -- watchdog timer enable bit ENABLED = 0x4 -- enabled DISABLED = 0x0 -- disabled } pragma fuse_def PWRTE 0x8 { -- power-up timer enable bit DISABLED = 0x8 -- disabled ENABLED = 0x0 -- enabled } pragma fuse_def MCLR 0x20 { -- ra5/mclr/vpp pin function select bit EXTERNAL = 0x20 -- enabled INTERNAL = 0x0 -- disabled } pragma fuse_def BROWNOUT 0x40 { -- brown-out reset enable bit ENABLED = 0x40 -- enabled DISABLED = 0x0 -- disabled } pragma fuse_def LVP 0x80 { -- low-voltage programming enable bit ENABLED = 0x80 -- enabled DISABLED = 0x0 -- disabled } pragma fuse_def CPD 0x100 { -- data ee memory code protection bit DISABLED = 0x100 -- disabled ENABLED = 0x0 -- enabled } pragma fuse_def WRT 0x600 { -- flash program memory write enable bits NO_PROTECTION = 0x600 -- disabled R0000_01FF = 0x400 -- 0000h to 01ffh write-protected, 0200h to 07ffh may be modified by eecon control R0000_03FF = 0x200 -- 0000h to 03ffh write-protected, 0400h to 07ffh may be modified by eecon control R0000_05FF = 0x0 -- 0000h to 05ffh write-protected, 0600h to 07ffh may be modified by eecon control } pragma fuse_def DEBUG 0x800 { -- in-circuit debugger mode bit DISABLED = 0x800 -- disabled ENABLED = 0x0 -- enabled } pragma fuse_def CCP1MUX 0x1000 { -- ccp1 pin selection bit pin_B2 = 0x1000 -- ccp1 function on rb2 pin_B3 = 0x0 -- ccp1 function on rb3 } pragma fuse_def CP 0x2000 { -- flash program memory code protection bit DISABLED = 0x2000 -- disabled ENABLED = 0x0 -- enabled } --