Is serial from the cassette ports possible?

Discussions about Sinclair ZX80 and ZX81 Hardware
gbejniet
Posts: 5
Joined: Sat Jul 31, 2021 6:10 pm

Is serial from the cassette ports possible?

Post by gbejniet »

Hi all. Inexperienced question here I'm afraid. I wondered how practical it would be to do the following: have code write data to MIC and adapt it electrically in such a way as to create a usable serial data signal (to be read by a receiving UART)? And vice versa - to convert incoming data such that EAR could be read?

I have seen "loadsave" which employs some sort of hack between RS232 and the cassette ports to do the converse - generate serial signals that can be interpreted by LOAD and again vice versa.

I'm aware that writing to the cassette port generates a pulse rather than a continuous voltage - I believe - so I can see how this might be challenging to make work.

Also obviously there would be no flow control and FAST mode only. I know it's Heath Robinson but perhaps interesting if you like bit-banging? The Memopak RS232 IF seems as rare as hen's teeth, so I think this is why I went down this rabbithole.

Any thoughts appreciated - like my previous Q on composite mods, even if just to explain it's not possible.
User avatar
1024MAK
Posts: 5534
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Is serial from the cassette ports possible?

Post by 1024MAK »

Serial input is possible without too much difficulty, as if needed, a connection can be made to the ULA pin. it is also possible to borrow the ULA UK/USA detection input.

Serial output is a bit more tricky, as the ZX81 borrows the video output pin on the ULA to produce the tape (Mic) audio output. This output has three levels. It’s a combination of the video information and the sync pulses. It may be possible to get a serial output, but I suspect the range of baud rates will be a bit limited.

Note that if using the actual Mic output, it is at a very low level.

For both input and output, unless direct connections are made to the ULA side of the relevant circuit, filtering capacitors will further reduce the range of baud rates available.

By the time you have got circuitry to deal with these problems, it may be easier to use the expansion port with either a UART or simple 74 logic series latch and input buffer chips (for a bit banged serial port).

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Spring approaching...
User avatar
XavSnap
Posts: 2195
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Is serial from the cassette ports possible?

Post by XavSnap »

More infos on a RS232 C? (12/5v?) simple wiring diagram:

Issue Two ******************************* October 1996
The International ZX81 Magazine
*******************************

Hello Dear ZX81 Friends,

Welcome to this second issue of The International ZX81 Magazine.
Isn't it great, this feeling that people all over the world are using the
same computer you use, even in this age of modern technology with systems
which work a 1000 times faster than this little black beauty you have.
The question is... what do you all need it for, this absurd power, with
layers of many megabytes which takes a livetime to develop and understand,
I'm all for simplicity.
ZX81PIO.jpg

Have a look to the include zip:
int_zx81_mag_2.zip
(42.66 KiB) Downloaded 154 times
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
mrtinb
Posts: 2004
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: Is serial from the cassette ports possible?

Post by mrtinb »

I've never seen this online magazine before. Is there anywhere you can download all the published issues?
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
User avatar
XavSnap
Posts: 2195
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Is serial from the cassette ports possible?

Post by XavSnap »

Hi,
The wiring diagram was designed to the Zx Spectrum (25 pins socket); the right 23 pins is suitable to the ZX81 too:
Zx81_PIO_1.jpg

ZX81/Spectrum wiring diagram:
http://abandon.pcbs.free.fr/ZX81_Intern ... 81_PIO.jpg

Download: (Kicad/gerber projects)
http://abandon.pcbs.free.fr/ZX81_International/
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
1024MAK
Posts: 5534
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Is serial from the cassette ports possible?

Post by 1024MAK »

Given there are some spare unused sections of the chips, RTS, CTS could also be implemented very easily ;)

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Spring approaching...
User avatar
XavSnap
Posts: 2195
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Is serial from the cassette ports possible?

Post by XavSnap »

@Martin,
**************************************************************************
* The International ZX81 Magazine Issue 1 March 1996 *
* -------------------------------------------------- *
* Editor: printer and postman: *
* ------- -------------------- *
* (letters, articles, adds, donations,...) (subscribtions outside NL) *
* Martin van der Zwan Peter Liebert-Adelt *
* Moerweg 508 Luetzowstr. 3 *
* 2531 BL, Den Haag D-38102 Braunschweig *
* Netherlands Germany *
**************************************************************************
The ZX Team is your friend...

I have only the issue 1 & 2:
Issue 1 (32kb) : http://abandon.pcbs.free.fr/ZX81_Intern ... _mag_1.zip
Issue 2 (PIO): http://abandon.pcbs.free.fr/ZX81_Intern ... _mag_2.zip
Or
https://www.zx81.nl/dload/misc/zx81_magazine/

@1024MAK
Yes, we can throw the CTS & RTS to the D1 to D6 data bus socket, using the 74LS126...
Thanks Mark, any ideas to update the wiring diagram ?
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
XavSnap
Posts: 2195
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Is serial from the cassette ports possible?

Post by XavSnap »

Hi,

Sorry gbejniet, it's a BUS device, but you can read the ULA/LOAD signal.

Have a look to this device: http://abandon.pcbs.free.fr/ordi5.htm
http://abandonlistings.free.fr/ordi5/hd ... eilles.zip
http://zx81.ordi5.free.fr/n3/download/O ... _03_36.png
http://zx81.ordi5.free.fr/n3/download/O ... _03_37.png


@Mark, the request (RTS) is a sent data, i'm right? :mrgreen:
PIO.JPG
RS232_PIO1.pdf
(112.06 KiB) Downloaded 95 times
Last edited by XavSnap on Tue Jun 04, 2024 10:46 pm, edited 1 time in total.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
1024MAK
Posts: 5534
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Is serial from the cassette ports possible?

Post by 1024MAK »

XavSnap wrote: Sun Jun 02, 2024 5:31 pm Yes, we can throw the CTS & RTS to the D1 to D6 data bus socket, using the 74LS126...
Thanks Mark, any ideas to update the wiring diagram ?
For RTS, the other half of the 74LS74 would be better than using a gate of the 74LS126. Also, so it's the same as the ZX Spectrum 128 and later models, I suggest using data bit 2.
XavSnap wrote: Tue Jun 04, 2024 8:47 am @Mark, the request (RTS) is a sent data, i'm right? :mrgreen:
Yes :-)

RS232

Code: Select all

Pin MODEM (DCE)-Computer (DTE) 
 1  out DCD --> DCD in
 2  out RxD --> RxD in
 3  in  TxD <-- TxD out
 4  in  DTR <-- DTR out
 5      GND --- GND
 6  out DSR --> DSR in
 7  in  RTS <-- RTS out
 8  out CTS --> CTS in
 9  out RI  --> RI in
Pins are for the 9 pin D connector.

Recommended bit allocation (same as ZX Spectrum 128): Edit - see my next post...

Write
Bit 0 TxD
Bit 2 RTS

Read
Bit 6 CTS
Bit 7 RxD

Mark
Last edited by 1024MAK on Tue Jun 04, 2024 6:23 pm, edited 1 time in total.
Reason: Edited
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Spring approaching...
User avatar
XavSnap
Posts: 2195
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.
Contact:

Re: Is serial from the cassette ports possible?

Post by XavSnap »

Hi Mark,
I will take the same Spectrum 128 controls, but i had to data BUS pins D0=D5 to use it withe the ZX81 programs...
232_spectum128.JPG
232_spectum128.JPG (21.38 KiB) Viewed 2633 times
http://www.fruitcake.plus.com/Sinclair/ ... eypad5.htm

The ZX SPECTRUM 128 use 12v (RS232) instead off 5v(RS232c) ... we had to use a voltage converter on a 128 modem.

Many tanks.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply