PDA

View Full Version : Getting started with Chuck Hellebuyck fuses



quester
- 28th February 2008, 22:30
I need to know what fuses should be enabled and disabled for my first project flashing one led. PIC16F876
WDT
BODEN
CPD
DEBUG
CODE PROTECT
PWRTE
LVP
WRT
OSILLATOR
I would be grateful for any help Thanks

BobK
- 29th February 2008, 00:58
Hi Quester,

I started learning with Chuck's book. I don't really remember setting any fuses in my first few projects as the programmer's software has some basic defaults that take care of your basic needs. If you use for example the internal clock instead of a 4mhz crystal then yes you would need to make a change but just go for it and see what happens. You really can't hurt anything and it really helps you learn how to troubleshoot your projects.

HTH,

BobK

quester
- 1st March 2008, 00:05
The programmer that I have needs to be set up for the fuses I mentioned for example osillater. I am using 4mhz. I understand WDT needs to be disabled and PWRTE need to be enabled also code protect needs to be disabled but the rest I dont know.
This is the list.
WDT
BODEN
CPD
DEBUG
CODE PROTECT
PWRTE
LVP
WRT
OSILLATOR

Archangel
- 1st March 2008, 06:14
Hi quester,
The first Catagory you see on the home page is Frequently Asked Questions where you will find this and many other very important threads.
http://www.picbasic.co.uk/forum/showthread.php?t=543
Please visit those threads, You will find them very helpful, and Welcome to this forum.
JS

elproducts
- 9th March 2008, 03:47
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.