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

Problem with watchdog on a 18F2520

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



Joined: 06 Dec 2005
Posts: 59

View user's profile Send private message

Problem with watchdog on a 18F2520
PostPosted: Tue Nov 28, 2006 9:44 am     Reply with quote

My watchdog on a 18F2520 overflows each 2.18 minutes as it is given in the datasheet (section 23.2, page 260) as the max time for the watchdog. Clearly, 2.18 minutes is far to much. How can I adjust the watchdog to shorter times?

I use:

Code:
#fuses HS,WDT,PUT,PROTECT,NOMCLR,CPD,BROWNOUT,NOIESO,NOFCMEN,NODEBUG,INTRC_IO,NOLVP


Thanks for any help!

Best Regards
nilsener
davekelly



Joined: 04 Oct 2006
Posts: 53
Location: Berkshire, England

View user's profile Send private message

PostPosted: Tue Nov 28, 2006 9:55 am     Reply with quote

Use the setup_wdt() function.

Refer to the manual for the time constants.
nilsener



Joined: 06 Dec 2005
Posts: 59

View user's profile Send private message

PostPosted: Tue Nov 28, 2006 10:08 am     Reply with quote

problem solved. The fuse WDT seems to set the watchdog to max time. I now use the fuse WDT256 to get adequate times.
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