The ZX-Spectrum ZXMMC Interface's page
The RS-232 port (embedded in the larger CPLD) does not include a voltage level translator and inverter, which is needed in order to operate with standard rs-232 equipments such as a PC serial port. The 4-pin zxmmc's connector provides a Ground pin (1) and TX (3) / RX (4) pins (3.3V logic level). Pin n. 2 (was DTR) is now used as 'Kempston Enable' input.
How to translate 0-3.3V level to RS-232 compatible levels? For this purpose you may consider the option of building the fabulous SerialSucker device, which 'sucks' :-) power from the rs-232 line. The idea is not new: negative voltage comes from the host's TX pin, which is normally LOW, and is stored into C1. Positive supply comes from host's DTR pin, which is driven high when port is opened on host PC, and is limited to 5,6V by D3. This is quite important, because the high level of ZXMMC's TX pin is just 3.3V: should an higher supply voltage be applied to TR2 emitter, the transistor would turn ON when it really should not. R4/R5 ensures that TR2 VBE is less than 0.6V (approx 0.4V) when ZXMMC's TX line is high: the TR2 will then be OFF and output voltage will be approx -4.5V (from C1, through R6).
The device works fine at 115,2Kbit/sec in HALF DUPLEX: it's not possible (and quite pointless) to send AND receive at the same time.
A very small pcb has been designed for the Serialsucker device
and can be easily manufactured at home.
SerialSucker PCB assembly. The device measures just 20 by 13 millimeters
Assembly and placement on zxmmc pcb
RS-232 test software can be found here (this is the same file downloadable from the SPI software page). Program name is 'rs232t.asm'. It provides the following functions:
USR 40000: waits for a single character and returns it in BC
USR 40100: Sends a single 'A' ($41) character
USR 40200: As 40000, but it also sends back the received character.
IMPORTANT: The ULA will suspend system clock (messing up rs-232 communication) if the I/O port is accessed with the MSB address ranging between $40 and $7F, as she will think we are trying to access contended memory. For this reason, sending a character by the basic command OUT 127,n will not always work properly (it depends on what ULA is doing at that particular moment). The provided software examples will work anyway as they access the I/O port using the whole 16 bit address.
The basic program
10 PRINT CHR$ USR 40000;
20 GO TO 10
will display received characters on the ZX-Spectrum screen.
Back to Main Page