CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

#FUSES options

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PROMOD



Joined: 01 Feb 2018
Posts: 42

View user's profile Send private message

#FUSES options
PostPosted: Thu Nov 01, 2018 9:41 pm     Reply with quote

Quote:
options vary depending on the device. A list of all valid options has been put at the top of each devices .h file in a comment for reference. The PCW device edit utility can modify a particular devices fuses. The PCW pull down menu VIEW | Valid fuses will show all fuses with their descriptions.

Some common options are:
1. LP, XT, HS, RC
2. WDT, NOWDT
3. PROTECT, NOPROTECT
4. PUT, NOPUT (Power Up Timer)
5. BROWNOUT, NOBROWNOUT
In the above 1 no refers to oscillator. But what do 2, 3, 4, 5 refer to I don't understand. Could someone please explain? When and why a fuse form the above list should I select?
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Thu Nov 01, 2018 11:53 pm     Reply with quote

Realistically, this is a 'read the data sheet' question.
Combined with what you actually want the chip to do.

WDT - enable the hardware watchdog. Generally actually using the watchdog usefully requires a lot more careful code than most people use.
<https://betterembsw.blogspot.com/2014/05/proper-watchdog-timer-use.html>

PROTECT - enables read protection of the chip's ROM. Only ever turn this on when your code is finished. Having this enabled, increases wear on the ROM when doing code development.

PUT - delays chip start to give time for a crystal to stabilise. Should be used if you are using a crystal.

BROWNOUT - enables brownout reset on the chip. If the supply droops below the point where the chip can actually work properly, ensures the chip physically resets.

Most modern chips will have hundreds more fuses than this. All are described in the data sheet, and this is why this is vital when working with any PIC. The fuses need to be set correctly if the chip is going to work as expected. The 'defaults; are rarely what is needed.
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Nov 04, 2018 6:32 am     Reply with quote

I've always had PUT enabled for all the PICs+, for all types of clocks. That extra 50-60ms doesn't really cost anything on 'bootup' yet helps ensure the PIC starts up properly.

The sad thing is there are so many Fuses ! I've had to make an 'include' file of all of them,in a KNOWN working configuration. It saves a lot of typing (2 fingers here, one 1/2 dead..). Remembering 30-35 instructions was easy, fuse not so much !!

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Sun Nov 04, 2018 8:13 am     Reply with quote

An early PIC like the 16F84, has a really low number of fuses (just 5 in this case). Modern PIC's, especially those supporting USB, can have a huge number. For example the PIC24FJ1024GA610, has 88. Some of the 'medium age' devices that have peripheral that are re-configured by the fuses, have even more. The highest number I have met is about 120....
It is always worth simply printing this part of the data sheet, and working through it marking the ones that need to be set. Then working out the actual values for all of them. As Jay says, making an include file with the settings you want for a project/chip is a very good way of handling this. Particularly since if you then do another project with the same chip this can simply be copied, and any small tweaks made for the new project....
dluu13



Joined: 28 Sep 2018
Posts: 395
Location: Toronto, ON

View user's profile Send private message Visit poster's website

PostPosted: Tue Nov 06, 2018 8:16 am     Reply with quote

I found a handy file in my "c:\program files (x86)\PICC" directory named Fuses.txt

It appears to be a comprehensive list of fuses, along with what each one stands for. The header file for your PIC will list what fuses are available for your device. These will just help you figure out what the abbreviations mean, but you should still check your datasheet to figure out what to do with them.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group