Shop OBEX P1 Docs P2 Docs Learn Events
Local echo on BS2sx — Parallax Forums

Local echo on BS2sx

ArchiverArchiver Posts: 46,084
edited 2001-01-19 15:07 in General Discussion
I'm trying to get a BS2sx to perform birectional serial
communication with a PC through the built-in serial port
on a Board of Education. I can't seem to turn off local
echo on the device. That is, whenever I send a character
to the serial port, that same character is echoed back to
me. I have a code snippet which exhibits this behavior:

ichar VAR BYTE

mainloop:

' check console serial port for input
SERIN 16, 500, 50, nodata, [noparse][[/noparse]ichar]

IF ichar <> "A" THEN nodata
SEROUT 16, 500, [noparse][[/noparse]"BBB"]
nodata:

GOTO mainloop

Basically, it communicates at 4800 baud 8NT and looks for
the character "A" on the serial port. If it finds an "A",
then it transmits "BBB", or at least it's supposed to. I
find that it always transmits "ABBB". Note that if you try
the code with anything other than a BS2sx, you'll have to
tune the serial parameters. Clues would be appreciated.

Thanks,
sg

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-01-19 03:36
    [font=arial,helvetica]In a message dated 1/18/01 9:25:54 PM Central Standard Time, sg@monsoon.com
    writes:


    I'm trying to get a BS2sx to perform birectional serial
    communication with a PC through the built-in serial port
    on a Board of Education. I can't seem to turn off local
    echo on the device. That is, whenever I send a character
    to the serial port, that same character is echoed back to
    me. I have a code snippet which exhibits this behavior:



    This behavior is caused by the Stamp serial port hardware -- you can't "turn
    it off." ·But now that you know it exists, you simply filter it out.[/font]
  • ArchiverArchiver Posts: 46,084
    edited 2001-01-19 14:24
    --- In basicstamps@egroups.com, jonwms@a... wrote:
    > This behavior is caused by the Stamp serial port hardware -- you
    can't "turn
    > it off." But now that you know it exists, you simply filter it out.

    Sure, I could do that, but I'd still like to know whether this
    is the expected behavior. I've pored through the manual and
    haven't found anything concerning this "feature". If I were to
    move to a different BS2, would I need to include the same
    filtration? I'm trying to make my code as portable as possible.

    Thanks,
    sg
  • ArchiverArchiver Posts: 46,084
    edited 2001-01-19 14:46
    [font=arial,helvetica]In a message dated 1/19/01 8:27:43 AM Central Standard Time, sg@monsoon.com
    writes:


    Sure, I could do that, but I'd still like to know whether this
    is the expected behavior. I've pored through the manual and
    haven't found anything concerning this "feature". If I were to
    move to a different BS2, would I need to include the same
    filtration? I'm trying to make my code as portable as possible.



    Yes, it is expected (the echo is caused by port hardware and has nothing to
    do with the interpreter itself). ·So, yes, your filtration will work with all
    of the BS2 variants (e, sx and p). ·What you will have to change is the SERIN
    and SEROUT parameters for the BS2sx and the BS2p since they run at different
    clock speeds than the BS2 and BS2e.

    -- Jon Williams
    -- Dallas, TX[/font]
  • ArchiverArchiver Posts: 46,084
    edited 2001-01-19 15:07
    Read article 2.24 in the Stamp FAQ at
    http://www.al-williams.com/wd5gnr/stampfaq.htm

    Regards,

    Al Williams
    AWC
    * Control 8 servos at once: http://www.al-williams.com/awce/pak8.htm


    >
    Original Message
    > From: Sunil Gupta [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=mLiWsg7EjnsWXBq52_HKBUbaQnIjRjMMfSErO9Bu1q8YRGgbPEcWsf8zYMmEQSi_Ci_e746GvN0]sg@m...[/url
    > Sent: Friday, January 19, 2001 8:24 AM
    > To: basicstamps@egroups.com
    > Subject: [noparse][[/noparse]basicstamps] Re: Local echo on BS2sx
    >
    >
    > --- In basicstamps@egroups.com, jonwms@a... wrote:
    > > This behavior is caused by the Stamp serial port hardware -- you
    > can't "turn
    > > it off." But now that you know it exists, you simply filter it out.
    >
    > Sure, I could do that, but I'd still like to know whether this
    > is the expected behavior. I've pored through the manual and
    > haven't found anything concerning this "feature". If I were to
    > move to a different BS2, would I need to include the same
    > filtration? I'm trying to make my code as portable as possible.
    >
    > Thanks,
    > sg
    >
    >
    >
Sign In or Register to comment.