We are connecting our UART 1:1 to the 9 pin male connector at the PC,
maybe with an extention cord.
No Null_Modem_cables, gender_changers etc.
The MAX232 contains a charge pump to convert the +5V supply voltage
into ca. +10V and ca. -10V.
It also contains two level translators for converting TTL level signals
into ca. +8V/-8V for sending them from the UART into the RS232 connector.
And another two level translators (basically Schmitt triggers)
for converting signals from the connector to TTL level and sending
them back to the UART.
Note, that all the level converters are inverting the signal.
Typical values for the capacitors connected to the charge pump are
2.2 to 10 uF.
(There also is a version of the MAX232 that runs with 100 nF capacitors.)
The four 100 Ohm resistors between MAX232 and the connector are added
for paranoia only, to be on the safe side when something goes wrong
when wiring the signals to the RS232 connector.
Another good idea might be to add some jumpers into the TX line,
to disconnect it from the UART circuitry and feed it from the RX line,
what would allow a 'loop_back' test mode between PC and MAX232
to check that the wiring between them is correct so far.
Note, that MAX232 might be limited to ca. 120 kBaud.
And: the faster the Baud Rate, the shorter the RS232 cable.
There also are a few other (faster) level converter ICs,
like the MC1488/MC1489, but they probably would require more
than just one single +5V supply voltage...
To know what we are doing here, we remember back what a 9 pin
male RS232 connector at a PC looks like:
Now to describe the signals as seen from the PC:
DCD <- Data carrier detect. Modem to PC: there is something comming down the phone line... RXD <- Serial data in. Modem to PC: Data. TXD -> Serial Data out. PC to Modem: Data. DTR -> Data terminal ready. PC to Modem: 'Hi, I'm there.' DSR <- Data set ready. Modem to PC: 'Hi, I'm there.' RTS -> Request to send PC to Modem: 'I have Data ready to transmit.' CTS <- Clear to send. Modem to PC; 'I am ready to receive Data from you.' RI <- Ring indicator. Modem to PC: 'rrring ...somebody called me.'
In our example, DTR, DSR, DCD are wired together to make the Terminal
program (running on the PC) think that we have a modem up and running.
CTS is set active by the MAX232, telling the PC 'Hi, I'm ready to receive Data.'
Nevertheless: better turn off all hardware/software handshake/flow_control
in your terminal program for the first test runs...
[HOME] [UP]/ [BACK] [1] [2] [3] [4] [5] [6] [7] [8] [9] [NEXT]
(c) Dieter Mueller 2007