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

PIC18F4550 and brownout fuses

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



Joined: 14 Aug 2012
Posts: 30
Location: France

View user's profile Send private message

PIC18F4550 and brownout fuses
PostPosted: Mon Jan 18, 2016 2:40 am     Reply with quote

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: 19245

View user's profile Send private message

PostPosted: Mon Jan 18, 2016 4:29 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Jan 18, 2016 9:19 am     Reply with quote

RF_Developer



Joined: 07 Feb 2011
Posts: 839

View user's profile Send private message

PostPosted: Mon Jan 18, 2016 9:23 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Jan 18, 2016 9:28 am     Reply with quote

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: 19245

View user's profile Send private message

PostPosted: Mon Jan 18, 2016 9:35 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Jan 18, 2016 10:01 am     Reply with quote

So I will do very careful and check all of the different fuses.
Thanks a lot
Fabrice
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