Shop OBEX P1 Docs P2 Docs Learn Events
rts with serial comm to pc — Parallax Forums

rts with serial comm to pc

DavidicusDavidicus Posts: 20
edited 2008-04-29 18:48 in BASIC Stamp
Hi,

I would like to use the BS2 as a serial stream buffer.· Let me explain:

One computer outputs a serial stream of ASCII text on its serial port. I have no control over this stream, it just keeps coming.

A second computer is only able to access the data on a polled basis, maybe every 2 seconds or so.

The issue is that during the time the second computer is processing the data from the previous poll, I lose characters from the first computer's stream.

My solution:· I figure I can use the BS2 to store characters received from the first computer and·have the second computer poll the BS2 for the current characters it has stored.· Then, the BS2 would dump its memory and begin storing the current characters in the stream, ready to be polled again.

Does this seem like a viable solution?

Comments

  • DavidicusDavidicus Posts: 20
    edited 2008-04-29 18:36
    Sorry. Here's more info:

    My thinking is that I can have the stamp loop through a serin command and a serout command. The serin command would receive the data from the first computer and the serout command would check to see if an rts pin was high (ie - the second computer is ready for the data stream.

    One question: Can I hook up the rts from the second computer's serial port directly to a BS2 pin or do I need to buffer it somehow?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-29 18:37
    The BS2 won't be able to do this. The problem is that the BS2 can't receive characters while it's looking for or responding to the poll from the 2nd computer. You need a serial buffer like those from Protean Logic (www.proteanlogic.com/product_periph_rs232.shtml).
  • DavidicusDavidicus Posts: 20
    edited 2008-04-29 18:48
    You rock, Mr. Green!!

    I sure appreciate you sharing your knowledge on these forums. I see your name pop up constantly with good info. Thank you!!

    In your experience, do these buffers drop any characters while they are outputting their currently stored information? In other words, while the BS is getting the data, does the buffer continue storing new characters?
Sign In or Register to comment.