II.3 Tailoring the Cables

Application programs are uploaded to the target system over a serial interface. The serial ports of the PC may have 9-pin or 25-pin male D-Shell connectors. Suitable RS-232 cables for the MCS-51 board can be tailored as follows:

RS-232 cable with 25-pin female D-Shell connector
RS-232 cable with 25-pin female D-Shell connector


Shortening the modem control signals is absolutely required for batch operation under MS-DOS! If the CTS-, DSR-, or DCD-input is not set to logic low (+12V), the PC will hang during character output to the serial port.
For shell script operation under Linux, only the Tx-, Rx-, and ground lines are required, and the handshake inputs may be left open. The same is true for interactive operation with most terminal emulation programs. (For further information refer to the documentation of your terminal emulation program.)
If there is a spare RS-232 line receiver on your MCS-51 board, it can be employed as a reset input! In this case, the target system can be reset in batch (or script) files with the reset program provided, and from terminal emulation programs (by dropping the DTR output with the hang-up function).

RS-232 cable with 9-pin female D-Shell connector
RS-232 cable with 9-pin female D-Shell connector


If you own a 9/25-pin mouse adaptor with all pins connected, the 9-pin version of the cable should be preferred!
If your MCS-51 board has no spare RS-232 line receivers, but a TTL reset input (or you can establish one), the target system can also be reset in batch (or script) files over a printer port of the PC. For this, a suitable reset cable must be tailored as shown below:

Reset cable with 25-pin male D-Shell connector
Reset cable with 25-pin male D-Shell connector


In practice, only one of the two reset lines will be required. When the reset program is invoked, a positive reset pulse appears at D0 (8031, 8032), and a negative pulse at D1 (80C535, 80C537). For detailed information on the reset program, refer to chapters III.2 Batch File Operation under MS-DOS, and III.4 Shell Script Operation under Linux.