yes for sure. There's many way to do that.
First of all, we will disable the PBP default configuration setting. with NOTEPAD open 16F877A.INC file in the PBP folder. It look like this
Code:
;****************************************************************
;* 16F877.INC *
;* *
;* By : Leonard Zerman, Jeff Schmoyer *
;* Notice : Copyright (c) 2003 microEngineering Labs, Inc. *
;* All Rights Reserved *
;* Date : 11/07/03 *
;* Version : 2.45 *
;* Notes : *
;****************************************************************
NOLIST
ifdef PM_USED
LIST
include 'M16F87x.INC' ; PM header
device pic16F877, xt_osc, wdt_on, pwrt_on, lvp_off, protect_off
XALL
NOLIST
else
LIST
LIST p = 16F877, r = dec, w = -302
INCLUDE "P16F877.INC" ; MPASM Header
__config _XT_OSC & _WDT_ON & _PWRTE_ON & _LVP_OFF & _CP_OFF
NOLIST
endif
LIST
now place a ; in front of theses lines
Code:
device pic16F877, xt_osc, wdt_on, pwrt_on, lvp_off, protect_off
__config _XT_OSC & _WDT_ON & _PWRTE_ON & _LVP_OFF & _CP_OFF
will look like this
Code:
;device pic16F877, xt_osc, wdt_on, pwrt_on, lvp_off, protect_off
;__config _XT_OSC & _WDT_ON & _PWRTE_ON & _LVP_OFF & _CP_OFF
default setting are now disabled.
Now putting your configuration fuse into your program:
If you're using PM as assembler(wich is, as i remind, the default setting in MicroCode Studio) you'll add this line in your program header
@ DEVICE PIC16F877A, HS_OSC
If you get some compilation error it's because you're using MPASM as assembler so use the following
@ __config _HS_OSC
Everything is also well explain in this thread
What do different clock speeds mean? (LP,XT,HS,RC)
I hate to say that but all the explanations are in the datasheet. Different oscillator setting, different possible oscillator speed.
In your case XT is for an crystal up to 4MHZ, HS 4MHZ & up.
Bookmarks