PM Standard - HW Watchdog issue...


Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3212
Posted: 05:30am 09 Oct 2025      

Tested watchdog circuit, with some test code.

Sub MM.startup
 Pause 100
 Run
End Sub

Dim integer n=5000
Dim float t0
SetPin gp1,din 'read output of 74HC14 pin 4
SetPin gp0,dout  'intput to 74HC14 pin 1
t0=Timer
Print "press any key to exit to console, except Ctrl-C"
' With Ctrl-C the watchdog keeps running, unless you do  Pin(gp0)=1  before it resets.
Do
 Inc n,10

 If Inkey$<>"" Then 'press any key to exit
   Pin(gp0)=1
   Pause 200
   Exit Do
 EndIf

 Pause n
 Print n,Timer-t0,Pin(gp1)
 Pulse gp0,10
 t0=Timer
Loop

Pin(gp0)=1
End

Edited 2025-10-09 15:41 by phil99