is only setting a partial number of config bits for that chip ,the bits that are omitted will revert to their default state , it may cause your [totally unspecified] problem, or it may be in the unposted code or both#config
__CONFIG _CP_OFF & _WDTE_OFF & _BOREN_OFF & _PWRTE_ON & _INTRC_OSC_NOCLKOUT & _MCLRE_OFF
#endconfig
this is the device info file from your ?:\PBP3\DEVICE_REFERENCE folder
Code:;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; File: PIC16F616.INFO ; Date: 05/18/16 ; Generated by melabs File Manager ; ; PICBASIC PRO(tm) Compiler version: 3.0.9 ; ; Copyright 2016 microEngineering Labs, Inc. All Rights Reserved ; The content herein is intended to facilitate embedded development using ; PICBASIC PRO Compiler. Reproduction or utilization for other purposes ; is prohibited without written permission from microEngineering Labs, Inc.. ; ; microEngineering Labs, Inc. ; 2845 Ore Mill Road STE 4 ; Colorado Springs, CO 80904 ; 719-520-5323 ; fax: 719-520-1867 ; http://melabs.com ; [email protected] ; ; Modifications to this file in the \DEVICE_REFERENCE folder will be ; overwritten when you install future upgrades. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;MPASM __CONFIG Directive Options ; ; The PBP default configuration for the PIC16F616 is: ; ; #CONFIG ; __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _MCLRE_ON & _IOSCFS_4MHZ & _CP_OFF ; #ENDCONFIG ; ; You may use the information below to construct your own configuration ; directives for the PIC16F616. Please note that ALL DEFAULT ; CONFIGURATION SETTINGS WILL BE OVERWRITTEN when you include a #CONFIG ; block in your program. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; Available __CONFIG labels for PIC16F616: ; ;CONFIG Options ; ; Oscillator Selection bits ; _FOSC_EXTRCCLK ;RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN ; _EXTRC_OSC_CLKOUT ;RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN ; _EXTRC ;RC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN ; _FOSC_EXTRCIO ;RCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN ; _EXTRC_OSC_NOCLKOUT ;RCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN ; _EXTRCIO ;RCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, RC on RA5/OSC1/CLKIN ; _FOSC_INTOSCCLK ;INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN ; _INTRC_OSC_CLKOUT ;INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN ; _INTOSC ;INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN ; _FOSC_INTOSCIO ;INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN ; _INTRC_OSC_NOCLKOUT ;INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN ; _INTOSCIO ;INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN ; _FOSC_EC ;EC: I/O function on RA4/OSC2/CLKOUT pin, CLKIN on RA5/OSC1/CLKIN ; _EC_OSC ;EC: I/O function on RA4/OSC2/CLKOUT pin, CLKIN on RA5/OSC1/CLKIN ; _FOSC_HS ;HS oscillator: High-speed crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN ; _HS_OSC ;HS oscillator: High-speed crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN ; _FOSC_XT ;XT oscillator: Crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN ; _XT_OSC ;XT oscillator: Crystal/resonator on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN ; _FOSC_LP ;LP oscillator: Low-power crystal on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN ; _LP_OSC ;LP oscillator: Low-power crystal on RA4/OSC2/CLKOUT and RA5/OSC1/CLKIN ; ; Watchdog Timer Enable bit ; _WDTE_ON ;WDT enabled ; _WDT_ON ;WDT enabled ; _WDTE_OFF ;WDT disabled and can be enabled by SWDTEN bit of the WDTCON register ; _WDT_OFF ;WDT disabled and can be enabled by SWDTEN bit of the WDTCON register ; ; Power-up Timer Enable bit ; _PWRTE_OFF ;PWRT disabled ; _PWRTE_ON ;PWRT enabled ; ; MCLR Pin Function Select bit ; _MCLRE_ON ;MCLR pin function is MCLR ; _MCLRE_OFF ;MCLR pin function is digital input, MCLR internally tied to VDD ; ; Code Protection bit ; _CP_OFF ;Program memory code protection is disabled ; _CP_ON ;Program memory code protection is enabled ; ; Internal Oscillator Frequency Select bit ; _IOSCFS_8MHZ ;8 MHz ; _IOSCFS8 ;8 MHz ; _IOSCFS_4MHZ ;4 MHz ; _IOSCFS4 ;4 MHz ; ; Brown-out Reset Selection bits ; _BOREN_ON ;BOR enabled ; _BOD_ON ;BOR enabled ; _BOR_ON ;BOR enabled ; _BOREN_NSLEEP ;BOR enabled during operation and disabled in Sleep ; _BOD_NSLEEP ;BOR enabled during operation and disabled in Sleep ; _BOR_NSLEEP ;BOR enabled during operation and disabled in Sleep ; _BOREN_OFF ;BOR Disabled ; _BOREN_OFF ;BOR Disabled ; _BOD_OFF ;BOR Disabled ; _BOR_OFF ;BOR Disabled ; ; ;/MPASM ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;




Bookmarks