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
Posted: Wed May 12, 2004 6:34 am
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.
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