Currently banging my head against a bit of a wall, I need to listen to a pin for a period of time, the time is variable.
the best way I have come up with so far is a do loop with 2 exit option.
this will run a 08m2 @16mhz (I may bump it to 32 in the future but not sure about that yet)
any idea approximately how long this loop will take per cycle
the other route I was thinking about taking is using a serin with timeout as the input is coming from another picaxe.
the timeout doesn't have to be super accurate but the timeout maybe several seconds. max would be around 16s due to word variable limitations and affects of increased clock speed.
the best way I have come up with so far is a do loop with 2 exit option.
Code:
[color=Blue]do while [/color][color=Purple]loopnumber [/color][color=DarkCyan]< [/color][color=Purple]time_out
[/color][color=Green]'listen to next sensor
[/color][color=Blue]if [/color][color=Purple]casin [/color][color=DarkCyan]= [/color][color=Navy]1 [/color][color=Blue]then exit
inc [/color][color=Purple]loopnumber
[/color][color=Blue]pause [/color][color=Navy]1 [/color][color=Green]'0.25ms @16mhz
[/color][color=Blue]loop[/color]
any idea approximately how long this loop will take per cycle
the other route I was thinking about taking is using a serin with timeout as the input is coming from another picaxe.
the timeout doesn't have to be super accurate but the timeout maybe several seconds. max would be around 16s due to word variable limitations and affects of increased clock speed.