since the isr TB1 is an accurate timebase you can
make a new var
modify the I/o key routineCode:kio_inhibit var byte
and add this to the isrCode:IF KP = 0 THEN '1/0 BUTTON PRESSED ;use p_level to see what state machine is in 0=off ,non zero = on if kio_inhibit==0 then kio_inhibit=152 ;152*32mS = about 5 seconds if p_level then ccp1con=0 ;must be on kill it led=0 p_level= 0 else ;must be off power to max p_level= 5 endif endif
now the I/O key is inhibited for 5 sec after being acted onCode:if kio_inhibit then kio_inhibit = kio_inhibit -1 endif
I like ART's quote and its so true
you need to adjust your way of thinking to loops , states and flags . it opens up a whole new vistaPBP is very well documented, however you’ll notice all examples of command use are also examples of exactly how not to write a cyclic program.




Bookmarks