PDA

View Full Version : Serin2 multi wait?



cburtis
- 24th November 2007, 06:52
Is it possible to have multiple waits in a serin2 command? Looking for this OR that.
Something like this;
SerIn2 modem_in, 396, 500, loop, [wait($80) or wait($40),length,STR idstring\length]
I know the syntax is insane but I wasn’t sure how else to ask.

Thanks in advance for the help!

Chris

mister_e
- 24th November 2007, 17:28
Nope, there's no such existing things, but i think you could use something like this


SerIn2 modem_in, 396, 500, loop,[ByteA]
if ByteA=$80 or ByteA=$40 THEN
SERIN.. the rest of the process
endif

Probably i would prefer to use the hardware USART to prevent some data lost... like length
HTH

cburtis
- 24th November 2007, 19:08
Steve,

Great idea, that should do the trick.

Thanks!

Chris