Hello everyone
I failed miserably to get my head round HSERIN/HSEROUT yesterday so I am trying a new approach. I really need some background timer running so that I can set a time out a bit like this:
Main:
if portb.0 = 1 then gosub dostuff 'a pin gets waggled
'if 3 minutes is up then do something here
goto main
gosub dostuff
'reset the timer back to 0
return
Basically under normal circumstances pins will be going high and low and each time they do I want to set the timer back to zero, it is only if there is inactivity that I want to flag it, but do it in the background while the main code is executing. I have been trying to find a simple timer example that applies to me but can't quite understand what I need.
Thanks
Bookmarks