[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Read full 8-bit character from serial port (reprise)



An update:

(I made a new post on this topic this morning and it hasn't shown up,
so I'm assuming it got lost somewhere.  If it does show up, this will
be a bit of a repeat)

Working with the ADTpro serial code I now have Forth setting up the
serial port, with baud rates up to 57600, and I can send full 8-bit
data out at that speed.  However, reading characters just hangs unless
I just sent a few characters, in which case it returns the characters
just sent.

For example,

0> B9600 initPort    \ setup for 9600, 8N1
0> 65 m> 66 m> 67 m>    \ send ABC, which is received just fine
0> m< emit             \ get a character, outputs "A"
0> m< emit             \ outputs "B"
0> m< emit             \ outputs "C"
0> m< emit             \ hangs, characters sent from the other
computer do not appear

So, this leads me to two questions:

1.  Why are the sent characters still in a buffer where they can be re-
read?
2.  Why the lack of input characters.. is there a mode switch that
needs to be made?

As background, I'm using the send/receive character routines from
ADTpro (link to the source a few posts above).  The output a character
code is unchanged, the input code does not look for ESC and stores the
received character in a zero page location so Forth can pick it up.  I
looked through the rest of the ADTpro code, for the client, and failed
to see where data is sent.

If anyone has any ideas I'm all ears.  I'm half-way to my goal and
don't want to get stuck now!

Ron