PICBASIC and PICBASIC PRO put those configuration fuses in a separate file. It will be the name of the chip with a .inc suffix (i.e. 16F876A.inc). You will find it in the PBP or PBC directory. When the compiler is run it will load in these fuses and embed those settings in the .hex file.
When you program the chip the programming software should load that information in automatically and then program the chip with those fuse settings.
Now you can override those settings by changing the setup in the programmer software as many people do. You could also just modify that .inc file to how you want it setup.
Open up the .inc file for the chip you are using to see how it is setup. Most likely you will have:
xt_osc - external oscillator under 8 Mhz
wdt_on - Watchdog timer on
lvp_off - Low voltage programming turned off
protect_ off - Code protection off
There will be two sets of these in the .inc file. One is for the melabs PM assembler and the other is for the Microchip MPASM assembler. Don't worry about it for now. If you change the file just change both to match what you want. Then you don't have to change it again.
Some like to use the programming software to change the fuses but that means you have to do it every time. Also if you send the .hex file to someone they have to know the fuse settings you want unless you embed that in the .hex file correctly by changing the .inc file. This is the method I recommend and I've covered this a few times in my Nuts & Volts column on "Getting Started with PICs".
Thanks for reading my book.




Bookmarks