Shop OBEX P1 Docs P2 Docs Learn Events
serial port on a homework board? — Parallax Forums

serial port on a homework board?

ArchiverArchiver Posts: 46,084
edited 2004-02-02 15:55 in General Discussion
Does anyone know if you can use the builtin serial/rs232 port on the
Homework board to accept/send serial data that is not in the IDE? If
so, could you point me to any examples? Thanx in advance.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2004-02-02 12:38
    Yes, it can. DEBUG and DEBUGIN are special versions of SEROUT and SERIN.
    The only caveat is that the port echoes everything sent to it, so you
    external application has to deal with that.

    -- Jon Williams
    -- Applications Engineer, Parallax
    -- Dallas Office


    Original Message
    From: neverenouph2002 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=117W6RY0M1hca6Mu1XmY_LbU3ehSbMaOA4KKfAwyq5VvpJyPztVacOrzNKMxZV95psWiGG_i1Lp_465eOVlK8sBnfA]neverenouph2002@y...[/url
    Sent: Sunday, February 01, 2004 8:41 PM
    To: basicstamps@yahoogroups.com
    Subject: [noparse][[/noparse]basicstamps] serial port on a homework board?


    Does anyone know if you can use the builtin serial/rs232 port on the
    Homework board to accept/send serial data that is not in the IDE? If
    so, could you point me to any examples? Thanx in advance.
  • ArchiverArchiver Posts: 46,084
    edited 2004-02-02 15:55
    In the 'files' area, see AlDemo\BS2_VBDemo.zip

    This is a simple but complete demo, including
    instructions, of how to interface the VB IDE
    with the BS2.

    Basically, if you do:
    MAIN:
    SEROUT 16, 16384, [noparse][[/noparse]"Hello!",13]
    goto MAIN

    The BS2 will send data out the built-in
    serial port.

    MyData VAR BYTE(10)

    SERIN 16, 16384, [noparse][[/noparse]MyData]

    ' The above will wait for 10 bytes, from
    ' the serial port (you can use Hyperterm) and
    ' put them in 'MyData'.

    ' And yes, anything you send to the BS2 from
    ' the PC will be 'echoed' by the BS2, so your
    ' PC side app needs to know this and toss the
    ' echo.


    --- In basicstamps@yahoogroups.com, "neverenouph2002"
    <neverenouph2002@y...> wrote:
    > Does anyone know if you can use the builtin serial/rs232 port on
    the
    > Homework board to accept/send serial data that is not in the IDE?
    If
    > so, could you point me to any examples? Thanx in advance.
Sign In or Register to comment.