Zx Spectrum interface

Hi everyone !

I am trying to figure out id it is possible to link a zx spectrum to pc through arduino.
The ideea is to send code from speccy to pc and from pc to speccy. I attached to this post a working schematics that uses an I8251 usart , a max 232 (logic level converter between serial to parallel), 74ls138 a multiplexer, and 74hc4060 which is a
14-stage binary ripple counter with oscillator. Since Arduino already has tx and rx i was thinking emulating that circuit eith arduino. Do you think is possible?

Any advice will be helpfull.

Thanks in advance.

Your project has two parts: One is the serial communication. This is as you guessed already solved with the Arduino. The other is interfacing with the Zx Spectrum bus. My recollections aren't that good how it worked, but I guess it had some address decoding for IO-ports (is that the function of the 74LS138) and putting data on the bus or reading from it, making sure to turn the output into tri-state mode when you don't need it. If you manage that part - there should be enough schematics around how to do it properly, the project is mostly done. You might be able to do that with an Arduino alone, worst case you will need a little help from a decoder or a bus-latch.

Korman

You won't be able to emulate a bus interface just on the Arduino as the timing will be too fast for an interrupt handler to catch. (bus cycle time around 1us, need to detect address match and read/write 8 lines...)

The simplest bus interface is something like a latching (bidirectional?) bus driver chip plus that 138 to do address decoding - if the CPU doesn't write or read from such a 'port' too frequently an interrupt from the address decode line to the Arduino would allow it to read what was written to the port (or alternatively set up contents on the port for the cpu to read...) asynchronously to the bus cycle.

But this is about as complex than the UART circuit in the first place isn't it?

What about using the cassette interface to the spectrum?

Basically a modem. I don't know what format the warbling is in on a spectrum, but I think most home computers used pulses of tone, with different durations for 1's or 0's A scope will soon tell you.

So you would have to do some amplification and low pass filtering into the Arduino and then use pulseIn and compare the duration, building up the bits, that could then just talk over USB to your computer.

Si.

The solution may be much simpler than you realise. Sinclair released an expansion unit called Interface 1 which includes a full bi-directional RS232 serial port that supports baud rates from 50 to 19,200

Imgur

It has a standard 9pin connector as well. Here is a link to the complete manual.

ftp://ftp.worldofspectrum.org/pub/sinclair/books/MicrodriveAndInterface1Manual.pdf