ULA 'TAPE IN' Expected Voltages?

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
Flatulentia
Posts: 93
Joined: Sun May 14, 2023 3:58 pm
Location: Cambridgeshire, UK

ULA 'TAPE IN' Expected Voltages?

Post by Flatulentia »

TL;DR? A possible answer to what voltages the TAPE IN pin expects is here... viewtopic.php?p=51213#p51213

I'm designing a tiny amplifier board to go inside my Issue One ZX81 in place of C10 and was wondering if anyone can tell me the minimum and maximum voltages the pin considers to be a '1' or a '0' respectively.

The plan is to DC-couple my amplifier via R33, and I'd like to bias the output to sit as close as possible to halfway between these two voltages.

Apologies for having to ask as I'm sure Mark has already stated these voltages somewhere, but I can't seem to find them again.
Last edited by Flatulentia on Fri May 26, 2023 1:00 pm, edited 2 times in total.
ZX81 with ZiLOG Z84 CMOS Z80, 32KB battery-backed Toshiba 55257 SRAM with charge status LED, Wilf's "Why Wait?" mod and switch-mode 5V regulator. 50/60Hz mode switch, composite video output with Zigg's back porch mod and 1080p60 HDMI output.
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: ULA 'TAPE IN' Expected Voltages?

Post by 1024MAK »

The best I can offer are the details here. Read some of the other posts in the topic for context, as these were measured on the external circuit, not in the Zeddy.

I’ve given full details on the ZX Spectrum before (I can’t remember if this was on this forum or another forum), as these are published in the book “The ZX Spectrum ULA: How to design a microcomputer”.

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

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
Flatulentia
Posts: 93
Joined: Sun May 14, 2023 3:58 pm
Location: Cambridgeshire, UK

Re: ULA 'TAPE IN' Expected Voltages?

Post by Flatulentia »

Thank you.
ZX81 with ZiLOG Z84 CMOS Z80, 32KB battery-backed Toshiba 55257 SRAM with charge status LED, Wilf's "Why Wait?" mod and switch-mode 5V regulator. 50/60Hz mode switch, composite video output with Zigg's back porch mod and 1080p60 HDMI output.
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: ULA 'TAPE IN' Expected Voltages?

Post by 1024MAK »

I posted a simple (mostly BASIC) test program for the tape input here ;-)

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

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
Flatulentia
Posts: 93
Joined: Sun May 14, 2023 3:58 pm
Location: Cambridgeshire, UK

Re: ULA 'TAPE IN' Expected Voltages?

Post by Flatulentia »

That's the one I remembered seeing before but couldn't track down.

I'll publish the schematic here if it comes to anything. It's just a simple two-transistor circuit with a handful of cheap discrete components so may appeal to some as it should only take a few minutes to knock up on perf-board and fit comfortably inside a ZX81.

Thanks again.

EDIT: Before that, I'll try another mod I found by going through old posts here first and replace C10 with a 100nF and R33 with a 3K3. I'm trying to load anti-phase stereo recordings from a Nokia G10 smartphone and it seems to be very nearly there with the standard values, so maybe it doesn't need as much help as I think.

By "nearly there" I mean the ZX81 locks up while loading at full volume rather than behaving as though it's heard nothing. I can't see the loading bars due to having to use an HDMI converter to get a picture, so I'm flying blind here. :)
ZX81 with ZiLOG Z84 CMOS Z80, 32KB battery-backed Toshiba 55257 SRAM with charge status LED, Wilf's "Why Wait?" mod and switch-mode 5V regulator. 50/60Hz mode switch, composite video output with Zigg's back porch mod and 1080p60 HDMI output.
User avatar
Flatulentia
Posts: 93
Joined: Sun May 14, 2023 3:58 pm
Location: Cambridgeshire, UK

Re: ULA 'TAPE IN' Expected Voltages?

Post by Flatulentia »

I have a cunning plan that I'll probably try out tomorrow.

If I connect the TAPE IN pin to ground via a small signal Schottky diode with the cathode facing the TAPE IN pin, the whole audio signal at the pin will be positive-going with respect to ground thanks to C10. This would act as a simple level shifter pushing more of the input signal voltage swing up into the window where the TAPE IN pin is looking... or is there an internal protection diode on the TAPE IN pin that does this already?

If this worked, it would roughly double input sensitivity without changing any other components.

Thoughts?
ZX81 with ZiLOG Z84 CMOS Z80, 32KB battery-backed Toshiba 55257 SRAM with charge status LED, Wilf's "Why Wait?" mod and switch-mode 5V regulator. 50/60Hz mode switch, composite video output with Zigg's back porch mod and 1080p60 HDMI output.
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: ULA 'TAPE IN' Expected Voltages?

Post by 1024MAK »

The ULA is bipolar technology, not NMOS or CMOS, so I doubt that there is a protection diode.

However, it would be wise to include a diode to protect against possible input voltages above +5V.

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

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
Flatulentia
Posts: 93
Joined: Sun May 14, 2023 3:58 pm
Location: Cambridgeshire, UK

Re: ULA 'TAPE IN' Expected Voltages?

Post by Flatulentia »

I got my oscilloscope back. Yay!

The ULA is already applying a DC offset of sorts to the input signal via some means.

An EAR input signal of 750mV pk-pk (AC-coupled as C10 is there) appears at the TAPE IN pin as 280mV pk-pk with the bottom of the waveform sitting around 200mV above ground. With no input signal, the TAPE IN pin sits at +600mV with respect to ground. That's just below the highest voltage TTL logic is supposed to always see as a '0', so there may be some significance to this.

As we know that the series resistance is 4K7 (R33), we can infer by the drop from 750mV to 280mV that the input impedance of this particular TAPE IN pin is approximately 2K8.

The input signal is a .p file converted to WAV with OTLA then anti-phase stereo with Audacity and played back from my smartphone headphone socket with the volume set to maximum.

If I proceed with the internal amplifier idea powered from the ZX81's 5V rail, I could capacitively couple the amplifier output with the output clamped with a backwards Schottky diode to ground so the output grows from 0V upwards as the amplitude increases. That would guarantee that the output comes as close as is easily possible to falling inside the required voltage range window. The output could never exceed 5V as that's limited by the amplifier supply rail.

This is, of course, assuming that a 5V pk-pk signal on the input side of the 4K7 is enough for successful loading. If it isn't then I can reduce the value of R33 a little to increase the voltage swing at TAPE IN, and this would be no more risky than just inputting a larger signal in the first place in terms of current flow in the TAPE IN pin.

IIRC, my old "shoebox" mono cassette recorder ran from a 6V supply internally meaning that the output swing on its EAR socket probably clipped at around 5V pk-pk anyway, so I suspect that 5V pk-pk should be enough.

I'll experiment over the next few days and see what I can come up with.
Last edited by Flatulentia on Tue May 23, 2023 5:36 pm, edited 1 time in total.
ZX81 with ZiLOG Z84 CMOS Z80, 32KB battery-backed Toshiba 55257 SRAM with charge status LED, Wilf's "Why Wait?" mod and switch-mode 5V regulator. 50/60Hz mode switch, composite video output with Zigg's back porch mod and 1080p60 HDMI output.
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: ULA 'TAPE IN' Expected Voltages?

Post by 1024MAK »

With a Spectrum, the tape pin on it’s ULA has an internal voltage divider. This gives a no signal voltage of approximately 0.6V. The signal is internally fed to a single stage transistor amplifier.

The 2000 series CML ULA (as used for the ZX81 and TS1000) peripheral cells had the following available for the designer to use:
  • 200Ω, 1kΩ, 2kΩ, 3kΩ, 5kΩ and 5kΩ resistors
  • 16kΩ (pull-up) resistor
  • voltage divider of 400Ω and 4kΩ resistors
  • Two general purpose NPN transistors
  • NPN uncommitted transistor (rated at 5mA)
  • NPN common emitter transistor (rated at 16mA)
  • Two NPN transistors with collectors commoned (rated at 5mA and 16mA).
  • Connections available: pin bond pad, VS supply (0.84V to 0.95V), +5V/VCC, 0V/GND, input to matrix cell(s)
See also http://www.zxdesign.info/cassette.shtml

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

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Looking forward to summer later in the year.
User avatar
Flatulentia
Posts: 93
Joined: Sun May 14, 2023 3:58 pm
Location: Cambridgeshire, UK

Re: ULA 'TAPE IN' Expected Voltages?

Post by Flatulentia »

Thanks for the additional info.

If the ZX81 ULA is similar, this gives me a much clearer picture of what may be happening internally.
ZX81 with ZiLOG Z84 CMOS Z80, 32KB battery-backed Toshiba 55257 SRAM with charge status LED, Wilf's "Why Wait?" mod and switch-mode 5V regulator. 50/60Hz mode switch, composite video output with Zigg's back porch mod and 1080p60 HDMI output.
Post Reply