Hi mackrackit

i tried this
Quote Originally Posted by mackrackit View Post
Code:
loop:
If pot value => 3V then time
goto loop

time:
for X = 1 to 255
pauseus 10
t = t + 1
do whatever, pot
if pot value =  5V then tCalc
next x
tCalc:
display t
goto time
You may want to consider using ADCIN in place of POT.
Notice I changed the example to PAUSEUS.
And someplace around here there is a discussion about code execution time, or just test it to adjust the PAUSEUS.
but it doesnt stop counting for a defined voltage once it is triggered it does not stop for the final voltage.

loop:

adcin 0, adval

If adval => 500 then time
goto loop

time:
for X = 1 to 1023
pauseus 10
t = t + 1
If adval = 1000 then tcalc
next x


tCalc:
LCDOUT $fe, 2,"Time" ,":",DEC t
goto time
Once i stop it i ll adjust the pauseus value
Anything missing? any suggestions?