View previous topic :: View next topic |
Author |
Message |
ttime
Joined: 12 Mar 2013 Posts: 3
|
Fuses not set for PIC16F1827 |
Posted: Tue Mar 12, 2013 8:40 am |
|
|
Hi,
I was going to enable Brown-out in my project. Using latest PCM 4.141. This for I set in code
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
and rebuild project in order to see, if Configuration Bits and value in hex would be changed, but no change there!
Same for
resp.
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: 19504
|
|
Posted: Tue Mar 12, 2013 8:59 am |
|
|
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: 9225 Location: Greensville,Ontario
|
|
Posted: Tue Mar 12, 2013 9:51 am |
|
|
also...
maybe your programmer 'forces' certain fuse settings ? |
|
|
ttime
Joined: 12 Mar 2013 Posts: 3
|
|
Posted: Tue Mar 12, 2013 10:23 am |
|
|
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
|
|
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Mar 12, 2013 11:14 am |
|
|
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
|
FIXED |
Posted: Wed Mar 13, 2013 1:56 am |
|
|
Yeah, man, that's it!! THANKS!!!!! |
|
|
|