Arduino to Max232 to Modem

Hi there, I'm working on getting an arduino talking to a modem.

I've got a pre-built Max232-based adapter, and I've successfully used this to talk to my PC using SoftwareSerial just fine.

I've also used my PC to talk to the modem and dial out, just fine.

However, when I attach the arduino to the modem, it does not work. Everything is happening at 9600bps - I've confirmed the modem can be communicated to at this speed - all the hyperterminal settings match identically. I've tried with the rx/tx swapped as well, no help.

Does anyone have any hints about what may have gone wrong? This is for a project I really need to get working quickly. Thank you very much :-)

The modem may be more picky about the handshaking lines than your PC is. Are CTS, RTS et al signals at the correct levels?


Rob

Hi Graynomad, thanks for responding.

I’m not using any flow control at all, the interface I have to the max232 chip is through 6 pins: ground, vcc, tx, rx, rts, cts. Only those first four are connected. I’ve tried with rts tied to cts, and with both left hanging.

I'm not using any flow control at all

You aren't but what does the modem expect? I haven't used a modem for 20 years but they used to have a DB25 connector with a lot of signals that had to be tied correctly IIRC.

I've also used my PC to talk to the modem and dial out, just fine.

Through the same adapter?


Rob

When talking to the modem from the PC, I am also using no flow control. The modem just uses a DB9 connector.

I have not used the max232 adapter between my PC and the modem as my PC already outputs rs232 signal levels. I have tested the adapter between my PC and my TTL-logic-level arduino - using no flow control (as with modem) and 9600 (as with modem) and all other settings the same.

However, I think the problem may be that the modem is wanting the other pins tied to various values; which the PC quietly does for me but the max232 adapter does not. When the max232 is tested with the PC, the PC quietly doesn't mind that it is not setting these things.

I think the problem may be that the modem is wanting the other pins tied to various values; which the PC quietly does for me but the max232 adapter does not. When the max232 is tested with the PC, the PC quietly doesn't mind that it is not setting these things.

Exactly what I was getting at.


Rob

Thanks Graynomad,

Hey some of us here at work are chatting about this problem - is there any clock signal used in serial applications like this?

I know RS232 doesn't really define much more than logic levels, but in what one would call "serial" (i.e. DB9 connector, RS232, like you find in old modems and joysticks and GPS devices), must there be a clock signal? I thought it was possible for everything to be optional except rx and tx, and the voltage references, is that correct?

is there any clock signal used in serial applications like this?

No, by definition async doesn't have a clock, the clock is reconstructed from the data by syncing on the falling edge of the start bit.

I thought it was possible for everything to be optional except rx and tx, and the voltage references, is that correct?

Yes, at the lowest level that's all you need. For the things we do these days and the speeds we have access to we tend not to bother with hardware handshaking. It's cheaper to implement some form of software handshaking as that doesn't need extra wires.

Older devices (and modems in particular) had a shitload of handshaking signals all of which I've totally forgotten about. If you look at the pinout for the original RS-232 DB25 connector it's mostly signals.

I just noticed that there are two clocks, I don't recall ever using them, they were probably used to clock the modulator/demodulator or the UART chip. They certainly aren't required for simple async comms.

You're using a DB9 so there are fewer of course, whether or not you have to implement any of them depends on your application I guess but I would think just tying CTS to RTS and DTR to DSR would do.


Rob