Help with RS-232 Interface to PC
mynet43
Posts: 644
I'm designing a Propeller board to interface to a standard PC, using a DB-9 connector.
If possible, would someone please provide sample wiring and setup code for communicating at 57600 baud?
I will probably be using pcFullDulpexSerial4FC as the driver, although any recommended driver is OK, as I'm probably only using a single port. I'm familiar with the program, just not the wiring and setup.
It's not clear to me whether I can ignore things like the CTS and RTS lines.
Thank you for your help.
Jim
If possible, would someone please provide sample wiring and setup code for communicating at 57600 baud?
I will probably be using pcFullDulpexSerial4FC as the driver, although any recommended driver is OK, as I'm probably only using a single port. I'm familiar with the program, just not the wiring and setup.
It's not clear to me whether I can ignore things like the CTS and RTS lines.
Thank you for your help.
Jim
Comments
Don't bother with handshaking, it isn't used much these days. If you are sending a lot of data, use circular buffers with XON/XOFF flow control instead of hardware handshaking, and CRC error correction.
That helps.
Also, when using a DB-9, do I connect TX to pin 1 and RX to pin 2 from the MAX chip, or is it reversed?
And, is it possible to use the Prop Plug pins to drive the MAX chip? I'm running out of pins.
Jim
that's what Parallax serial terminal, PropTerminal, ViewPort does all the time.
best regards
Stefan
You can do what you describe, but if you already have a USB cable hooked up to download your program, it is pretty easy to use this, almost seamless as the interface. The serial debug output works great at 115200 baud. You just load in the right object and then you call the routines and it spits the data into the PC. You can view it in the Parallax serial terminal, and then if you want to get it into your own programs, such as in VBexpress it is really very easy to do. The first trick is to get the serial debug object into your code and have it write strings out. See the programming in spin book for an example. You then run the serial terminal and it should display the data. If you can download your program this will work almost first time. You can jump between the propeller tool and the serial debugger and VBexpress custom programs easily without unhooking cables.
Walt,
FullDuplexSerial will work for you. I have a modified version on the obex that extends the buffers above 16 bytes.