November 23, 2024, 01:15:34 AM

Crossing MOD-RS232

Started by RazZziel, December 17, 2013, 11:56:11 AM

Previous topic - Next topic

RazZziel

I need to communicate with a RS232 device using a MOD-RS232 and a crossed cable (null modem).

Instead of crossing the cable, I tried to cross the MOD-RS232 itself, breaking the pads named 3_TX and 4_RX, and soldering the pads named 3_RX and 4_TX. According to the schematic, this should work, but it doesn't. For some reason, it only works if I use a crossed cable before and after the converter. I'll illustrate the scenarios I've tested:


[CPU] ----straight cable---- [straight MOD-RS232] ----straight cable--- [device]: Doesn't work, shouldn't work
[CPU] ----straight cable---- [straight MOD-RS232] ----crossed cable---- [device]: Works
[CPU] ----straight cable---- [crossed MOD-RS232] -----straight cable--- [device]: *Doesn't work, should work*
[CPU] ----crossed cable----- [crossed MOD-RS232] -----crossed cable---- [device]: Works


There are several other combinations I've tested, but I don't think they're representative. I've checked this behaviour is consistent several times, with several working cables. The device I'm testing with is a MIFARE reader: I send a one-character ASCII command at 9600BPS and receive a short reply.

Does this behaviour make any sense to you guys?

LubOlimex

#1
Hey RazZziel,

I'm not sure I got everything about the cables you are using clear (Are those full RS232 cables, or UEXT cables or two-wire data-only RS232 cables?) but here is some clarification:

3_TX/3_RX and 4_RX/4_TX jumpers only control the pins at the UEXT connector for better compatibility with some Olimex boards (if the host board has TX on UEXT pin 3 and RX on UEXT pin 4 then it won't communicate with the MOD-RS232 module - TX would meed TX and RX would meet RX, so you change the jumpers and the RS232 data communication is possible).

By default pin 3 of the UEXT is TX, pin 4 is RX; if you change the jumpers they'd swap positions.

These jumpers don't control the DB9 connector pins! The DB9 female connector always has RX at pin 2 and TX at pin 3.

P.S. There is always a chance that you haven't cut properly between the pads of the SMT jumpers that were closed by default, ensure you have properly disconnected the initial jumper positions.

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

RazZziel

Thanks for the explanation Lub.

I guess what I have is a conceptual error. I thought the MAX3232 in the MOD-RS232 was only a level shifter, and that it would translate between 3.3v TTL to 12v RS232 in any given pair of pins, regardless of whether the pins are named "TX" or "RX". If this was true, then crossing RX and TX before or after the MAX3232 would be equivalent. If it's not true, which seems to be the case, then it's not true anymore.