RS-232 cross device communication
Chicago Mike
Posts: 88
This is really two questions. But here it goes. I'm trying to use my BS2 to receive data from a device sending out serial packets·randomly. It works great with a small test program, but I'm obviously worried about losing my data when the BS-2 program is larger. (It will not always be looking for SerIN). Anyone know of an easy buffering method to get around this? Or is just setting up a sync method (Send a request from the stamp for a response packet with the real data), just the best way. I've heard of buffering, and I'm curious.....
Also I've seen some strange wiring diagrams regarding using resistors to temper the input line to the stamp from other serial devices. Anyone have recommendations on this for serial in and out. (Should I still be using a standard 220Ohm on both), or should I be using something higher. Is SEROUT really sending a true RS-232?. I've gotten mixed reviews on this. (Obivously the voltage is lower... 5 compared to 12).
Also, my other device is only 9600 baud. I'm sending a limited amount of data. I understand the BS2 is really not made to go this fast. Really? Would a buffer arrangement improve this?
Any help would be great! Thanks!
Also I've seen some strange wiring diagrams regarding using resistors to temper the input line to the stamp from other serial devices. Anyone have recommendations on this for serial in and out. (Should I still be using a standard 220Ohm on both), or should I be using something higher. Is SEROUT really sending a true RS-232?. I've gotten mixed reviews on this. (Obivously the voltage is lower... 5 compared to 12).
Also, my other device is only 9600 baud. I'm sending a limited amount of data. I understand the BS2 is really not made to go this fast. Really? Would a buffer arrangement improve this?
Any help would be great! Thanks!
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Now, to SEND true, +- 12 volt RS-232 signals, you'll need a driver chip, like the MAX232. This converts the BS2 0 to +5 volt levels into the RS-232 +- 12 volts. But it does no buffering, as in recieving multiple bytes while the BS2 is doing something else.
Also note the BS2 is a single-tasking device. It can't send data in a SEROUT, and also listen at the same time for data in a SERIN. So the 'handshake' sync method you mention would be a good solution for this.
The curious thing I've seen done on other websites is that the connection from the TX pin of the other device to the RX pin on the stamp in a straight connection, but has a 2.2K resisitor to ground on this run.
TX
+
RX
|
Z2.2K
|
GND
I can't quite figure that one out...... It works, but I'm not exactly sure what the 2.2K is doing here.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax