Chapter 6
49
RS232 socket
The RS232 socket provided by the SPECTRA interface is fully compatible with the
RS232 port available on the ZX Interface 1. This means that machine code routines
intended to directly drive the ZX Interface 1 RS232 port will operate the SPECTRA
RS232 port without the need for modification. In addition, the ROM facilities provided
by the SPECTRA interface (see Chapter 7) allow the RS232 port to be controlled
directly from BASIC by extending the Spectrum’s ROM with a copy of the
ZX Interface 1 ROM. It is then possible to open text and binary channels using
standard ZX Interface 1 BASIC syntax and hence to run programs originally written to
control the ZX Interface 1 RS232 port. The RS232 socket can be used to connect to a
range of devices, e.g. a serial printer, a modem, a PC to load/save data. For details on
how to control the RS232 port using extended BASIC commands, refer to the
ZX Spectrum Microdrive and Interface 1 Manual [2].
To use the RS232 socket, it must be enabled by setting configuration switch 4 to the
on position. If a ZX Interface 1 is also to be connected then it is necessary to disable
the RS232 socket built into the SPECTRA interface to prevent a conflict and potential
damage to the hardware.
The RS232 port is capable of transmission speeds up to 19200 baud, and typically
sends and receives using 8 data bits, no parity, 2 stop bits and using hardware
handshaking (although the format can be different if you write your own custom serial
driver routines in machine code).
Cable wiring
The SPECTRA interface uses a female DE-9 socket for the RS232 port. This is pin
compatible with the ZX Interface 1 RS232 socket and has the following pin-out:
Front view of the SPECTRA RS232 socket
A custom cable is required to connect the RS232 socket to a serial device. The wiring
needed to connect to a device with a male 9 pin DE-9 connector or a male 25 pin
DB-25 connector is shown below.