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 2.3 second

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



Joined: 15 Sep 2003
Posts: 58

View user's profile Send private message

WDT timer 2.3 second
PostPosted: Wed May 12, 2004 6:27 am     Reply with quote

Hi all,

How do I setup WDT timer for 2.3 seconds with 18F242

For PCM it was "setup_counters(RTCC_INTERNAL, WDT_2304MS)"
but this does not work with 18F242.

There is no define in header file for WDT_2304MS.

Can I just add this to my header file?


Kind regards,


Gerrit Faas
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Wed May 12, 2004 6:34 am     Reply with quote

This is how to do it under PCH:
Add WDT and WDT128 to your #fuses, then call the function
setup_wdt(WDT_ON);

Watchdog on PIC18s is hadnled a bit differently. The WDT128 basically sets the postscaler for the watchdog (From the datasheet: The WDT has a postscaler that can extend the WDT Reset period. The postscaler is selected at the time of the device programming, by the value written to the CONFIG2H configuration register). Refer to the datasheet and also the CCS header file for more information.
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