Power Pins
- Vin - this is the power pin. To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V microcontroller like Arduino, use 5V. The MAX3243 can generate the extra high and low voltages and also safely convert the logic levels needed for RS-232.
- GND - common ground for power and logic.
DE-9 Connector
At the edge of the board is the DE-9 connector. It is a 9-pin connector for interfacing directly with RS-232 equipment. Its pinout is as follows:
- Pin 1: DCD
- Pin 2: RXI
- Pin 3: TXO
- Pin 4: DTR
- Pin 5: GND
- Pin 6: DSR
- Pin 7: RTS
- Pin 8: CTS
- Pin 9: RING
UART Pins
- RX - The data input for receiving serial data from the RS-232 line (pin 2 on the DE-9 connector)
- TX - The data output for sending serial data to the RS-232 line (pin 3 on the DE-9 connector)
Flow Control Pins
- DCD - The data carrier detect pin. This output from the DE-9 connector (pin 1) is used to indicate whether a device is connected.
- DTR - The data terminal ready pin. This output from the DE-9 connector (pin 4) indicates that the device has data ready to transmit.
- DSR - The data set ready pin. This input to the DE-9 connector (pin 6) indicates that the connected microcontroller is ready to connect.
- RTS - The request to send pin. This output from the DE-9 connector (pin 7) indicates that the RS-232 device is ready to send data.
- CTS - The clear to send pin. This input to the DE-9 connector (pin 8) indicates that the RS-232 device can send data.
- RI - The ring indicator pin. This input to the DE-9 connector (pin 9) indicates that an incoming call signal has been received; usually with RS-232 modems.
Extra MAX3243 Pins
- VLD - The Valid pin is a line output that will have logic level high when the chip detects signal voltages from the RS-232 device its plugged into. You can use it as a 'connection made' signal.
- OFF - This pin can be set to logic high by the microcontroller to tri-state all the pins for power reduction.
RS-232 Wiring
Making a connection between the adapter and an RS-232 connection on a cable or other piece of equipment may involve more than a compatible cable. The RS-232 standard and various implementations can be tricky, as people found "back in the day".
Below is a mini-FAQ on wiring used for RS-232. Refer to Wikipedia or other sources for more detailed information.
There is likely a mismatch in baud rate or character sizes. First be sure you are transmitting or receiving at the same baud rate on both sides. Then confirm if the interface number of data bits and stop bits is correct.
While more modern equipment will take 8 bit data, one stop bit, older equipment may specify 7 bit data and 1 or 2 stop bits. Also older equipment could specify a parity bit but usually in an 8 data bit, 1 stop bit configuration there is no parity.
In MS-DOS, for example, using RS-232 port COM1 at 19200 baud would be set up at the DOS command line MODE COM1:19200,N,8,1
. Other operating systems may need a similar setup.
From Wikipedia: RS-232 devices may be classified as Data Terminal Equipment (DTE) or Data Circuit-terminating Equipment (DCE); this defines at each device which wires will be sending and receiving each signal. According to the standard, male connectors have DTE pin functions, and female connectors have DCE pin functions. Other devices may have any combination of connector gender and pin definitions. Many terminals were manufactured with female connectors but were sold with a cable with male connectors at each end; the terminal with its cable satisfied the recommendations in the standard.
Thus it could be the wild west out there. Just crossing TX and RX like on a microcontroller might not be enough as the RTS and CTS signals likely need swapping too. The RS-232 solution is either a cable or adapter called a crossover or null modem adapter.
First double check the port you want to connect to is truly RS-232 (some folks use the same connectors for Centronics parallel or other things).
You may see male or female 25-pin DE-25M or 9-pin DE-9M connectors on RS-232 connections. This includes 25 pin on one end, 9 pin on the other. It was common to use adapters from one to another to make the connection. Some cords like for computer to computer communication ("Laplink cables") had both connectors at each end of the cable for maximum compatibility.
If you have a mismatch, there are adapters to go from 9 pin to 25 pin and the other way. Also see above about the possibility of a null modem adapter also in the mix to get the signals to the right pins on each side. It can be a mess. Many folks made their own cables to get from once piece of gear to another.
Text editor powered by tinymce.