Hi Bruce,
I'm not using my Labx experimenters board for this one, I have it bread boarded. One more thing I noticed is that when I first copied and pasted the code from my inc file into my program is that only 7 of them would compile. Then I started moving them around and when I placed the CONFIG2H statement above the CONFIG2L statement then they both compiled....... strange? This is what I pasted into my code below to configure my fuse settings:
'@ __CONFIG _CONFIG1H, _OSCS_OFF_1H & _RCIO_OSC_1H; This dosen't compile
;Configuration Byte 1H Options
'_OSCS_ON_1H EQU H'DF' ; Oscillator Switch enable
'_OSCS_OFF_1H EQU H'FF'
'_LP_OSC_1H EQU H'F8' ; Oscillator type
'_XT_OSC_1H EQU H'F9'
'_HS_OSC_1H EQU H'FA'
'_RC_OSC_1H EQU H'FB'
'_EC_OSC_1H EQU H'FC' ; External Clock w/OSC2 output divide by 4
'_ECIO_OSC_1H EQU H'FD' ; w/OSC2 as an IO pin (RA6)
'_HSPLL_OSC_1H EQU H'FE' ; HS PLL
'_RCIO_OSC_1H EQU H'FF' ; RC w/OSC2 as an IO pin (RA6)
@ __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H; this one was below 2L code
;Configuration Byte 2H Options
'_WDT_ON_2H EQU H'FF' ; Watch Dog Timer enable
'_WDT_OFF_2H EQU H'FE'
'_WDTPS_128_2H EQU H'FF' ; Watch Dog Timer PostScaler count
'_WDTPS_64_2H EQU H'FD'
'_WDTPS_32_2H EQU H'FB'
'_WDTPS_16_2H EQU H'F9'
'_WDTPS_8_2H EQU H'F7'
'_WDTPS_4_2H EQU H'F5'
'_WDTPS_2_2H EQU H'F3'
'_WDTPS_1_2H EQU H'F1'
' was ON was OFF
@ __CONFIG _CONFIG2L, _BOR_OFF_2L & _BORV_20_2L & _PWRT_ON_2L
;Configuration Byte 2L Options
'_BOR_ON_2L EQU H'FF' ; Brown-Out Reset enable
'_BOR_OFF_2L EQU H'FD'
'_PWRT_OFF_2L EQU H'FF' ; Power-Up Timer enable
'_PWRT_ON_2L EQU H'FE'
'_BORV_20_2L EQU H'FF' ; BOR Voltage - 2.0v
'_BORV_27_2L EQU H'FB' ; 2.7v
'_BORV_42_2L EQU H'F7' ; 4.2v
'_BORV_45_2L EQU H'F3' ; 4.5v
'@ __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H; This dosen't compile here
';Configuration Byte 2H Options but compiles above 2L
''_WDT_ON_2H EQU H'FF' ; Watch Dog Timer enable
''_WDT_OFF_2H EQU H'FE'
''_WDTPS_128_2H EQU H'FF' ; Watch Dog Timer PostScaler count
''_WDTPS_64_2H EQU H'FD'
''_WDTPS_32_2H EQU H'FB'
''_WDTPS_16_2H EQU H'F9'
''_WDTPS_8_2H EQU H'F7'
''_WDTPS_4_2H EQU H'F5'
''_WDTPS_2_2H EQU H'F3'
''_WDTPS_1_2H EQU H'F1'
' was ON
@ __CONFIG _CONFIG3H, _CCP2MX_OFF_3H
;Configuration Byte 3H Options
'_CCP2MX_ON_3H EQU H'FF' ; CCP2 pin Mux enable
'_CCP2MX_OFF_3H EQU H'FE'
'' This dosen't compile below
'@ __CONFIG _CONFIG4L, _STVR_ON_4L & _LVP_OFF_4L & _DEBUG_OFF_4L
';Configuration Byte 4L Options
''_STVR_ON_4L EQU H'FF' ; Stack over/underflow Reset enable
''_STVR_OFF_4L EQU H'FE'
''_LVP_ON_4L EQU H'FF' ; Low-voltage ICSP enable
''_LVP_OFF_4L EQU H'FB'
''_DEBUG_ON_4L EQU H'7F' ; Backgound Debugger enable
''_DEBUG_OFF_4L EQU H'FF'
@ __CONFIG _CONFIG5L, _CP0_OFF_5L & _CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L
;Configuration Byte 5L Options
'_CP0_ON_5L EQU H'FE' ; Code protect user block enable
'_CP0_OFF_5L EQU H'FF'
'_CP1_ON_5L EQU H'FD'
'_CP1_OFF_5L EQU H'FF'
'_CP2_ON_5L EQU H'FB'
'_CP2_OFF_5L EQU H'FF'
'_CP3_ON_5L EQU H'F7'
'_CP3_OFF_5L EQU H'FF'
' was ON
@ __CONFIG _CONFIG5H, _CPB_OFF_5H & _CPD_OFF_5H
;Configuration Byte 5H Options
'_CPB_ON_5H EQU H'BF' ; Code protect boot block enable
'_CPB_OFF_5H EQU H'FF'
'_CPD_ON_5H EQU H'7F' ; Code protect Data EE enable
'_CPD_OFF_5H EQU H'FF'
@ __CONFIG _CONFIG6L, _WRT0_OFF_6L & _WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L
;Configuration Byte 6L Options
'_WRT0_ON_6L EQU H'FE' ; Write protect user block enable
'_WRT0_OFF_6L EQU H'FF'
'_WRT1_ON_6L EQU H'FD'
'_WRT1_OFF_6L EQU H'FF'
'_WRT2_ON_6L EQU H'FB'
'_WRT2_OFF_6L EQU H'FF'
'_WRT3_ON_6L EQU H'F7'
'_WRT3_OFF_6L EQU H'FF'
@ __CONFIG _CONFIG6H, _WRTC_OFF_6H & _WRTB_OFF_6H & _WRTD_OFF_6H
;Configuration Byte 6H Options
'_WRTC_ON_6H EQU H'DF' ; Write protect CONFIG regs enable
'_WRTC_OFF_6H EQU H'FF'
'_WRTB_ON_6H EQU H'BF' ; Write protect boot block enable
'_WRTB_OFF_6H EQU H'FF'
'_WRTD_ON_6H EQU H'7F' ; Write protect Data EE enable
'_WRTD_OFF_6H EQU H'FF'
@ __CONFIG _CONFIG7L, _EBTR0_OFF_7L & _EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L
;Configuration Byte 7L Options
'_EBTR0_ON_7L EQU H'FE' ; Table Read protect user block enable
'_EBTR0_OFF_7L EQU H'FF'
'_EBTR1_ON_7L EQU H'FD'
'_EBTR1_OFF_7L EQU H'FF'
'_EBTR2_ON_7L EQU H'FB'
'_EBTR2_OFF_7L EQU H'FF'
'_EBTR3_ON_7L EQU H'F7'
'_EBTR3_OFF_7L EQU H'FF'
@ __CONFIG _CONFIG7H, _EBTRB_OFF_7H
;Configuration Byte 7H Options
'_EBTRB_ON_7H EQU H'BF' ; Table Read protect boot block enable
'_EBTRB_OFF_7H EQU H'FF'
And with the two CONFIG1H & CONFIG4L sections commented out, it compiles ok and I can use them.
Thanks
jessey
Bookmarks