|
|
View previous topic :: View next topic |
Author |
Message |
James Lee
Joined: 10 Aug 2011 Posts: 1 Location: South Korea
|
How can I switch on/off the watchdog of PIC16F616 ? |
Posted: Thu Aug 11, 2011 12:01 am |
|
|
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~ |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Thu Aug 11, 2011 3:56 am |
|
|
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 |
|
|
|
|
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
|