View previous topic :: View next topic |
Author |
Message |
neo19
Joined: 14 Aug 2012 Posts: 30 Location: France
|
PIC18F4550 and brownout fuses |
Posted: Mon Jan 18, 2016 2:40 am |
|
|
Hi,
I'm working with a PIC18F4550.
My version of CCS C COMPILER is 5.030
My version of CCSLOAD is V5.006
My problem is I would like to use brownout options:
- Reset when brownout is detected
- and brownout reset at 4.3V
So it seems very simple.
My configuration is :
Code: |
#include <18F4550.h>
#device adc=10
#device ICD = TRUE
#fuses HSPLL, NOWDT, NOPROTECT, NOLVP, NODEBUG, USBDIV, PLL5, CPUDIV1, VREGEN
#use delay (clock=48M)
|
I insert Code: | #fuses BROWNOUT,BORV43 | and when I check the file .hex with CCSLOAD I see that the configuration is not good:
- no brownout detect NOK
- brownout reset at 4.3V OK
I've checked the fuses BROWNOUT,BORV43 in the file PIC18F4550.h and it's OK.
I could force the brownout detection with CCSLOAD but it's not what I want to do.
Someone has and idea why #fuse brownout is not recognised?
Best regards,
Fabrice |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19541
|
|
Posted: Mon Jan 18, 2016 4:29 am |
|
|
5.006, was a beta version at best. I'm afraid it's just an internal typo in the database. It was fixed by 5.009. However I'd not trust anything before perhaps 5.012, to be a usable version. |
|
|
neo19
Joined: 14 Aug 2012 Posts: 30 Location: France
|
|
Posted: Mon Jan 18, 2016 9:19 am |
|
|
|
|
|
RF_Developer
Joined: 07 Feb 2011 Posts: 839
|
|
Posted: Mon Jan 18, 2016 9:23 am |
|
|
With #device ICD = TRUE some fuses are forced to turn some things off. These include watchdog, low voltage detector and most importantly for you, brownout.
Comment out that line - only use it when you are intending to use an ICSP debugger. |
|
|
neo19
Joined: 14 Aug 2012 Posts: 30 Location: France
|
|
Posted: Mon Jan 18, 2016 9:28 am |
|
|
So, I've downloaded the latest version of ccsload and it the same result.
If I comment out the line #device ICD = TRUE, it's OK now.
Thanks a lot,
Fabrice |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19541
|
|
Posted: Mon Jan 18, 2016 9:35 am |
|
|
You'd also find the watchdog turned off, and several other things.
The brownout won't work with ICD, so they turn it off. |
|
|
neo19
Joined: 14 Aug 2012 Posts: 30 Location: France
|
|
Posted: Mon Jan 18, 2016 10:01 am |
|
|
So I will do very careful and check all of the different fuses.
Thanks a lot
Fabrice |
|
|
|