Interupt
ensernet
Posts: 1
I am trying to come up with a way to change a value in my program without stopping and waiting for input from a debug input.· I have tried to use· ·if debug in = "" then.· The "" meaning equals nothing. This didn't work. Anyone got an idea
Comments
It's not exactly clear what you're trying to accomplish, but any of the following methods are available:
1. You can make a decision on the Nth iteration through a programmed loop.
2. You can make a decision based on the value of an internally generated pseudo-random number.
3. You can make a decision based on the value (0 or 1) of one or more of the port pins.
A bit more informatuon on your part will probably provide other possible alternatives as well.
Regards,
Bruce Bates
I9600 CON 16384 ' 9600 baud, inverted
MyVar CON WORD
DEBUGIN DEC MyVar
is the same as:
SERIN 16, I9600, [noparse][[/noparse]DEC MyVar]
So, you can use SERIN instead of DEBUGIN. Now, SERIN has a time-out paramter. So you can use that to look for input for a little while, run your program some, then look for more input for a little while.
Look in the Manual under SERIN, and then look for the time-out parameter.