Hi hackinblack,
hackinblack wrote:option_reg = option_reg | 0b00001111; //Configure watchdog to 1:128 Postscaler
With Flowcode V7 and above, registers are all in upper case.
Within 12F509 The register you are referring to as
option_reg is just called
OPTION.
However within 12F509 this register is Write only!
So instead of
you must use
instead
hackinblack wrote:wdtcon = 0b00000111;
The way the values of watchdog timer gets altered is by setting the 3 lower bits of
OPTION register as WDTCON does not exist within 12F509.
All this information can be found within the 12F509 datasheet.
You should also add C code block with a command to reset the watchdog timer:
Use Auto clear watchdog in project options.
I would not recommend using the 12F509, you will be facing several stack and memory issues as this chip is now outdated.
I would recommend using 12F1840 instead as its much superior with heaps more stack and memory and it runs of it's internal oscillator at a maximum speed of 32MHz!