• Please review our updated Terms and Rules here

How ZX Spectrum +2 use with RS232 port?

Dinotech

Member
Joined
Aug 27, 2023
Messages
13
I have ZX Spectrum +2 and RS232 adapter (in picture).
Adapter works, but i don't understand - how it can work in "full-duplex", because example code is only to set Basic in "RX', or to "TX" mode.
Maybe someone has experience coding Basic so that the device works with this adapter as a "dumb terminal"?

spectrum_rs232_adapter.jpg
 
If I remember correctly the built in 'RS232' port on the +2 just uses two regular parallel I/O port pins (part of the sound chip?) so the RS232 input and output are effectively 'bit-banged' in firmware. It can only really receive RS232 characters or transmit them, but not both at the same time. For the sort of operation you want you really need to interface a hardware UART such as a Z80-SIO or a Z80-DART or a 6402 (plus an RS232 level converter IC such as the MAX232) to the Spectrum- chips like this can transmit and receive a whole serial byte independently of the system, which then only has to watch a couple of flags to see whether the transmitter part of the UART is ready to accept the next character to send, or to see if there is a received character waiting to be read from the UART's buffer.
 
Correct, the RS232 has the correct line driver voltages, but is a couple of I/O bits on the AY-3-8910 audio chip that it uses for bit banging as you surmise and has no serial chip or shift register.

It also has problems with dropping characters, and you need to respect the handshaking to communicate with it, and best at very low speeds.
 
Back
Top