Shop OBEX P1 Docs P2 Docs Learn Events
How to Send Data To computer Serial Port — Parallax Forums

How to Send Data To computer Serial Port

ArchiverArchiver Posts: 46,084
edited 2001-11-13 14:00 in General Discussion
Hello,

I am trying to send data to a computer with my STAMP2 SX. I am Using
Serout, and Visual Basic.

I can successfuly communicate, but all I recieve is strange chars.

How do I send a char to the computer? Binary? Octal?

The port settings are correct.

I tried sending, for instance, the letter P. I can't send serout "p"
or the ASCII equiv.

HELP!

Aaron

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-11-13 10:16
    Hi Aaron,

    > I am trying to send data to a computer with my STAMP2 SX. I am Using
    > Serout, and Visual Basic.
    >
    > I can successfuly communicate, but all I recieve is strange chars.

    I have just gone through this whole headache myself with my BSII.

    First thing, are you using pin 16 (standard serial out pin on stamp) or any
    other pin? The reason I ask is that if you look up the values you are
    supposed to be using in the manual I think you will find there are two
    different values for inverted and non-inverted. If you are using pin 16 then
    you will want to use the inverted value, otherwise you will want to use the
    non-inverted value.

    I have been using the ASCII values for the characters I have been outputing.
    For example to out put the character 'A' on pin 1 on my BSII I use the
    following code:
    serout 1,813,[noparse][[/noparse]65]

    Hope this helps,
    Kind regards,
    James Fitzsimons
  • ArchiverArchiver Posts: 46,084
    edited 2001-11-13 14:00
    You might enjoy the example code at
    http://www.al-williams.com/stampcom.zip

    Al Williams
    AWC
    * Floating point A/D
    http://www.al-williams.com/awce/pak9.htm

    >
    Original Message
    > From: quixotic01@h... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=8pCRwtIN1CP7fZCQcoJQzqIwQ1-L5kXNvNMnz4ZkfHwQi7pBQtcGuu5p9dzjqKin6LB9pvG-3Az6CScN3OSQyEc]quixotic01@h...[/url
    > Sent: Tuesday, November 13, 2001 12:57 AM
    > To: basicstamps@yahoogroups.com
    > Subject: [noparse][[/noparse]basicstamps] How to Send Data To computer Serial Port
    >
    >
    > Hello,
    >
    > I am trying to send data to a computer with my STAMP2 SX. I am Using
    > Serout, and Visual Basic.
    >
    > I can successfuly communicate, but all I recieve is strange chars.
    >
    > How do I send a char to the computer? Binary? Octal?
    >
    > The port settings are correct.
    >
    > I tried sending, for instance, the letter P. I can't send serout "p"
    > or the ASCII equiv.
    >
    > HELP!
    >
    > Aaron
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    > Subject and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
Sign In or Register to comment.