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

WDT timer controlled by software

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



Joined: 25 Aug 2015
Posts: 18

View user's profile Send private message

WDT timer controlled by software
PostPosted: Thu Aug 27, 2015 3:36 am     Reply with quote

Dear Friend,

Please help me code to define WDT controlled by software.

my code:

#fuses SWDTEN,PROTECT,NOLVP,MCLR,NOBROWNOUT

I was used function : setup_wdt(WDT_OFF); to turn off WDT. But WDT still running while I still not turn ON.

How to fix it?
Ttelmah



Joined: 11 Mar 2010
Posts: 19337

View user's profile Send private message

PostPosted: Thu Aug 27, 2015 4:02 am     Reply with quote

Chip?.

Some don't even allow this. Most that do require you to select WDT_SW in the fuses. Also compiler version?. SWDTEN hasn't existed for many hundreds of compiler versions....
J_GROUP



Joined: 25 Aug 2015
Posts: 18

View user's profile Send private message

PostPosted: Thu Aug 27, 2015 10:20 am     Reply with quote

Thank for your reply. I am using 18F25K22
Ttelmah



Joined: 11 Mar 2010
Posts: 19337

View user's profile Send private message

PostPosted: Thu Aug 27, 2015 11:12 am     Reply with quote

As I said 'compiler version'?.

However any compiler that is new enough to support this chip will want WDT_SW. I'm surprised it compiles with SWDTEN.

You should also add NOXINST.

Get rid of protect, until you have finished development. Enabling this forces a full chip erase when anything is changed. Without this the programmer does not have to erase sections that haven't changed. Results in less 'life' being used up in the program memory. Only enable this once the code is finished.
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