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 CCS Technical Support

Fuses not set for PIC16F1827

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



Joined: 12 Mar 2013
Posts: 3

View user's profile Send private message

Fuses not set for PIC16F1827
PostPosted: Tue Mar 12, 2013 8:40 am     Reply with quote

Hi,

I was going to enable Brown-out in my project. Using latest PCM 4.141. This for I set in code

Code:
#fuses BROWNOUT


But MPLAB v8.88 in configurations Bits window is telling me:
"BOREN / Brown-out Reset enable / Brown-out reset disabled"
(Checkbox "Configuration Bits set in code" is set, of course.)

I took a look at the hex file where I can find the word for the config settings nearby the last line. The given value confirms that Brown-out is disabled in deed, regardless which fuse I set in code.

I went to set

Code:
#fuses NOBROWNOUT


and rebuild project in order to see, if Configuration Bits and value in hex would be changed, but no change there!

Same for

Code:
#fuses DEBUG


resp.

Code:
#fuses NODEBUG



Anyone out there who expierienced the same? Am I doing anything wrong or is it a compiler or an IDE issue?!?!

Thanks
Ttelmah



Joined: 11 Mar 2010
Posts: 19511

View user's profile Send private message

PostPosted: Tue Mar 12, 2013 8:59 am     Reply with quote

Hm.
Just tried it and the fuses happily set for me.
Code:

#fuses BROWNOUT,HS,NODEBUG.PLL_SW

//happily gives
   Word  1: 3FC2   HS NOWDT PUT MCLR NOPROTECT NOCPD BROWNOUT NOCLKOUT IESO FCMEN
   Word  2: 1EFF   NOWRT PLL_SW STVREN BORV19 NODEBUG NOLVP

Now, obvious things to remember (for example), is that BROWNOUT _won't_ set (nor will WDT), if DEBUG is selected.
Remember if you are building inside MPLAB, that it defaults to building in DEBUG mode. You need to turn this off in the project options in MPLAB.

Best Wishes
temtronic



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

View user's profile Send private message

PostPosted: Tue Mar 12, 2013 9:51 am     Reply with quote

also...
maybe your programmer 'forces' certain fuse settings ?
ttime



Joined: 12 Mar 2013
Posts: 3

View user's profile Send private message

PostPosted: Tue Mar 12, 2013 10:23 am     Reply with quote

Unfortunately still no change.

First, I took a look at the build configuration which was set so release. I've toggled and rebuilt it to see if there was a fault but nothing. I've updated to MPLAB 8.90. Now, there is no Build Configuration anymore. I guess I have to set it in code exclusively, now.

Second, I switched programmer to None where ICD3 was selected before. no change at all.

Toggling following fuses cause a change in Configuration Bits:

Quote:
PUT vs. NOPUT
MCLR vs. NOMCLR
WRT vs. NOWRT



I've tested following fuses where toggling made no change in Configuration Bits:

Quote:

DEBUG vs. NODEBUG
WDT vs. NOWDT
BROWNOUT vs. NOBROWNOUT
LVP vs. NOLVP
CPD vs. NOCPD
PROTECT vs. NOPROTECT


Crying or Very sad
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Mar 12, 2013 11:14 am     Reply with quote

If the drop down box at the top of MPLAB doesn't show DEBUG or
RELEASE, it means you need to re-install the CCS plugin.
Here is the link for the MPLAB 8.xx plugin:
http://www.ccsinfo.com/downloads/setup_mplab_plugin.exe

When you create a new project in MPLAB 8.xx, the drop-down box will
be set for DEBUG by default. To change this behavior for new projects,
and to make it default to RELEASE mode, edit the Windows registry
per the instructions in this post:
http://www.ccsinfo.com/forum/viewtopic.php?t=46818&start=21

If you still have problems with BROWNOUT and other fuses being disabled,
even though you removed the #fuses DEBUG line, it means you likely
have #device ICD=TRUE in your program. Comment out that line.
ttime



Joined: 12 Mar 2013
Posts: 3

View user's profile Send private message

FIXED
PostPosted: Wed Mar 13, 2013 1:56 am     Reply with quote

Yeah, man, that's it!! THANKS!!!!! Very Happy
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