Thanks to Skimask, and Grounded! The info provided was just what I needed. I also found the same info on www.melab.com i.e.
SETTING FUSES WITH PIC BASIC PRO and MICROCODE STUDIO PLUS
1. The Fuse settings for each PIC are located in the PIC Basic Pro *.INC files. Those files are included in the PBP directory which is placed in the hard drive when PIC Basic Pro is installed
2. These Fuse settings can be placed in your own program in the form of a single line of assembly code. I use the 16F870 PIC, so for that one you will find the following line in the 16F870.INC file:
__config _XT_OSC & _WDT_ON & _PWRTE_ON & _LVP_OFF & _CP_OFF
which is located after the "ELSE" statement. You can put this same line of code in your own program and adjust the statements for your own purposes. In my case, I wanted everything off, but wanted the XT Oscillator since I am using a 4 Mhz Timing Crystal, so my code line looks like:
@ __config _XT_OSC & _WDT_OFF & _PWRTE_OFF & _LVP_OFF & _CP_OFF
This line will override whatever your PIC Programmer has in its own fuse setting section, therefore you don't need to tell the programmer what fuses to set.
If you do put your own fuse setting in your program, then you need to comment out the line in the *.INC file in the "ELSE" statement as follows:
else
LIST
LIST p = 16F870, r = dec, w = -302
INCLUDE "P16F870.INC" ; MPASM Header
;__config _XT_OSC & _WDT_ON & _PWRTE_ON & _LVP_OFF & _CP_OFF
otherwise, PIC Basic Pro tries to process both statements and that generates an error and your program will not compile.
In addition, note this fuse config line is different for different PICs. For example the one for the 16F84A in 16F84.INC is:
__config _XT_OSC & _WDT_ON & _CP_OFF
One last thing, insure the @ sign is in the 1st column of the program line, and make sure it is followed by at least 1 space. Don't forget any of the _ characters or the & characters.




Bookmarks