Shop OBEX P1 Docs P2 Docs Learn Events
Read ascii from rs 232 — Parallax Forums

Read ascii from rs 232

GregGreg Posts: 5
edited 2005-12-17 18:11 in BASIC Stamp
Hi everyone

I am quite a novice with stamps and I need your quidance...

I would like my stamp to read ASCII or binary characters from a device that has an rs232 port...

how can I do it??

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-12-17 00:41
    Sure, you should be able to do that. Do you know what the stream looks like? And the baud rate? The BASIC Stamp can do some ASCII to numeric conversions on-the-fly for you if the baud rate is 9600 or lower.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • GregGreg Posts: 5
    edited 2005-12-17 11:03
    Hi again

    Thank you for your reply...

    The maker of the device said:
    The unit can be easily configured for communication in an ASCII or Binary protocol. A selectable
    baud rate can be set from 600 baud to 76.8k baud with hardware RTS and CTS handshaking. The
    ASCII implementation is easy to use and debug with standard programming tools while the Binary
    version is a more efficient for method for transferring information between the two systems.

    They told me it uses ‘transition-based broadcasting’.
    Enabling the Transitions (2 segments)
    Programming the Command / Request Enables (4 segments)

    Although I have a good knowledge of automatic control I cannot say that I make any sence of the above...

    Can I use such information with my BS to make a simple controller?? and If yes can you suggest me a way??

    Thank u in advance
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-12-17 13:57
    Okay, what I think you'll want to look into is our RS-232 DCE AppMod -- this will let you add an extra RS-232 port with flow control pins to your BASIC Stamp project.· By using flow control, the BASIC Stamp will be able to let the external device know that it's ready for new information.· This is important as the BASIC Stamp doesn't have serial buffers.

    Here's a link to that product: http://www.parallax.com/detail.asp?product_id=29120

    You might want to download and have a look at the docs -- a schematic is included in the event you want to "roll your own."

    As far as the information you have, I think the term "transition based braodcasting" means that when something changes it sends a message -- this is why it's important to use flow control; you want to make sure the BASIC Stamp is ready to receive a message before your device sends it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • GregGreg Posts: 5
    edited 2005-12-17 18:11
    Thanx again Jon

    I 'll do some studying and I'll get back if I have more questions..
Sign In or Register to comment.