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

How can I switch on/off the watchdog of PIC16F616 ?

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



Joined: 10 Aug 2011
Posts: 1
Location: South Korea

View user's profile Send private message

How can I switch on/off the watchdog of PIC16F616 ?
PostPosted: Thu Aug 11, 2011 12:01 am     Reply with quote

I want to switch the watchdog of PIC16F616 in code, but there isn't a function in CCS-C Lib.

I just found two functions: setup_wdt(), restart_wdt().

There are some options for setup_wdt(), such as WDT_1152MS, WDT_2304, etc.

But there aren't WDT_ON or WDT_OFF.

How can I switch the Watchdog timer in code?

Please, give me a idea~ Shocked
Ttelmah



Joined: 11 Mar 2010
Posts: 19513

View user's profile Send private message

PostPosted: Thu Aug 11, 2011 3:56 am     Reply with quote

Key is to read the data sheet.
Is the watchdog software controllable on this chip?. No...

The CCS functions are available _on chips that support them_. The reason they don't work on your chip, is that the hardware doesn't support them.

What you can do, is change the divider, so you can set the divider to maximum, and reset the watchdog, so it won't trigger for a long time, but if the watchdog is enabled in the fuses, it'll keep triggering.

Best Wishes
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