WDT-Reset - How to know
Hello,
we implement the WDT in our code.
How it is possible to check out, if there was a WDT-Reset ?
In the init-Part of my code, I check the Bit TO to be cleared and PD to be set (this is the setting after a WDT-Reset), but I think the PicBasic kills them while working on his Reset-Code....
PIC16F876
;Reset ?
Stat_POR=0:If POR_=0 Then Stat_POR=1:POR_=1
;WDT ?
Stat_WDT=0:IF (TO_=0) AND (PD_=1) Then Stat_WDT=1
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
Bookmarks