watchdog (by hanguyen)
Dear Sir,
I have a problem, i wrote watchdog instruction.I don't understand the "incode.cpp" file.Please tell me the step to implement.
Thank you!
(no subject) (by Jonathan Westhues)
Sorry, I don't understand. intcode.cpp contains the routines that generate LDmicro's intermediate code from the ladder logic program. That intermediate code is then translated to native PIC or AVR code. There's no mention of any watchdog timer in intcode.cpp.
The PIC and AVR targets do generate instructions to reset the watchdog timer. So it's okay to enable the watchdog timer for those parts (by programming the appropriate bit in the configuration word), as long as the cycle time is faster than the default watchdog timeout. It's also okay to leave the watchdog timer disabled, in which case those instructions just do nothing.