Problem with background serial

BeanieBots

Moderator
I'm trying to convert a system which uses serin to use background serial but have hit a problem.
It uses a URF/ERF pair and a 28X2 talking to a VT100 terminal.
The following works fine just as expected.

Code:
Do
  Serin C.7,N9600,b0
  Serout C.6,N9600,b0
Loop
However, my attempt at doing background, gives strange results.

Code:
hsersetup B9600_8,%11
Do
  Do:Loop Until hserptr <> ptr
  hserout 0,(@ptrinc)
Loop
It should simply echo back just like the first code but I get wrong characters!
Somebody please point me to the error.

eg I type "1" and get "g" back
"2" > "3"
"3" > "f"
"5" > "e"
"6" > "2"
The results are consistent but I can't see a pattern.
 

lbenson

Senior Member
If you're inverting serial output, do you also need to invert serial input: hsersetup B9600_8,%111
 

BeanieBots

Moderator
If you're inverting serial output, do you also need to invert serial input: hsersetup B9600_8,%111
Umm.... yes you do.
and now that I'm doing just that, it works fine!
Thanks for pointing it out. I'd been looking at everything but the obvious.
 
Top