Arduino based TZX and TAP (currently only ZX spectrum and Amstrad CPC flavour) file player.
(Excuse the badly written code, I'm working on that ;) )
- Arduino (I used a Nano, but this should work on any Nano compatible.)
- SD Card module
- 16x2 I2C LCD
- Small audio amplifier. (I used an LM386 module, but any headphone type amplifier should work.)
- 5 x Buttons (Micro switches are the best, but any should work.)
Not All Libraries Are Equal!
With so many variations on the SD, LCD I2C and TimerOne libraries I thought I'd include them here. So to prevent any hair pulling moments use these versions of the libraries.
All buttons and the motor control pull the pin to GND.
Arduino pins:
D6 -> MOTOR CONTROL (Connected to one side of the 2.5mm socket. Only used on some CPC models.)
D7 -> BUTTON (ROOT)
D9 -> Output (To amplifier)
D10 -> SDCS (SD Card chip select)
D11 -> MOSI (SD Card MOSI pin)
D12 -> MISO (SD Card MI/MISO pin)
D13 -> SCK (SD Card SCK pin)
A0 -> BUTTON (DOWN)
A1 -> BUTTON (UP)
A2 -> BUTTON (STOP)
A3 -> BUTTON (PLAY)
A4 -> LCD SDA
A5 -> LCD SCL
LCD pins:
SDA -> Arduino A4
SCL -> Arduino A5
VCC -> 5V
GND -> GND
SD Card pins:
5V -> 5V
GND -> GND
SDCS -> D10 Arduino
MOSI -> D11 Arduino
MISO -> D12 Arduino
SCK -> D13 Arduino
Wire up as above, and program the Arduino using the IDE.
Copy some TZX/TAP/CDT files onto a FAT32 formatted SD Card, plug it into the TZXDuino and power it on.
I suggest to format SD Card with this tool to ensure maximum compatibility.
SD Memory Card Formatter 5.0 for SD/SDHC/SDXC
CAUTION: Formatting will cause complete data loss on SD Card. Make sure to backup the SD Card before formatting
Button functions:
- UP/DOWN - No playback: move through the files
During playback: Works as PREVIOUS/NEXT file. - PLAY - On file: starts playback.
On directory: open directory. - STOP - During playback: stops playback.
No playback: up a directory. - ROOT - During playback: restart playback.
No playback: set TSX Baud Rate
To get files to load first time you'll need to adjust the volume until you get a strong signal on the Spectrum / CPC.
Once you've got a strong signal you should able to load most files as if you were using a normal tape.
Starting with the Arduitape WAV playing project. I've moved to playing TZX and TAP files directly without needing to convert them to a WAV file first.
Code: Andrew Beer
Testing: Duncan Edwards
Code update: Jujan