RS-232 Connection
John Couture
Posts: 370
I'm playing around with a couple of devices that use simple serial commands to communicate (i.e. PDB RS-232, XBee Module, PINK module, SD Card module).· They all have TX and RX pins that work at 5v (which is good for this project).
To save on the number of pins I have to·use to communicate with these multiple devices I was thinking of just tying the RX and TX pins together and using a single pin on the SX processor.· Something like:
XB_IO· Pin RA.0
PK_IO· Pin RA.1
SD_IO· Pin RA.2
HT_IO· Pin RA.3
Do I have to worry about burning out a pin on either the module or on the SX by doing this?· Should I put a diode or resistor in there?
My intent is to be able to use write a program that with send out a message to the appropriate device depending on some header· (i.e. from terminal to PINK, from terminal to XBEE, from terminal to SD Card Reader)· As I master it, the goal would be to lock myself in a room and study Jon Williams program on narrowing it down to a single Serout command to save on program space (I may have to cross over to the DARK side and code in Assembler!· Yikes!).
Thanks all!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture
San Diego Miramar College
To save on the number of pins I have to·use to communicate with these multiple devices I was thinking of just tying the RX and TX pins together and using a single pin on the SX processor.· Something like:
XB_IO· Pin RA.0
PK_IO· Pin RA.1
SD_IO· Pin RA.2
HT_IO· Pin RA.3
Do I have to worry about burning out a pin on either the module or on the SX by doing this?· Should I put a diode or resistor in there?
My intent is to be able to use write a program that with send out a message to the appropriate device depending on some header· (i.e. from terminal to PINK, from terminal to XBEE, from terminal to SD Card Reader)· As I master it, the goal would be to lock myself in a room and study Jon Williams program on narrowing it down to a single Serout command to save on program space (I may have to cross over to the DARK side and code in Assembler!· Yikes!).
Thanks all!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture
San Diego Miramar College
Comments
Then connect the device RX pin to the SX I/O pin you
want to use for that device.
The device must operate in halfduplex only (no simultaneous
transmit and receive) or the communication will fail.
regards peter
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture
San Diego Miramar College