I/O interface.

Discussions about Sinclair ZX80 and ZX81 Hardware
Post Reply
Whitey
Posts: 22
Joined: Sat Jan 21, 2023 10:28 pm

I/O interface.

Post by Whitey »

So today has been a game of several stages. 🙄
Whilst tidying up the wespi and composite mod wiring I broke the composite mod board. 🤬
I've gone back to the transistor mod temporarily but my TV isn't a big fan.
On the upside the new membrane keyboard with the embedded switches arrived from Germany and is excellent. I highly recommend it.
Now onto the homebuilt interface. It's built, wiring triple checked but it's acting wierd.
It's memory mapped to above address 8192.
If I poke 8192,0 it clears the led's. If I poke individual numbers in it works perfectly and will light up any combination I desire. As soon as I use a loop to count up from 1 to 255 it periodically hangs crashing the machine. It does variations of this in both machine code and basic. Basic doesn't make it past 8 loop iterations normally. Machine code needs a delay to be able to see what's happening with the leds and depending on the delay value between count updates I get anywhere between 30 and 150 loop iterations.
It's certainly got me scratching my head.🤷‍♂️
2ECEDAB3-1569-441C-8867-64773DD5CC31.jpeg
This is the schematic.
The video of it doing its thing here
https://youtu.be/3VxNlJQT5mU
Whitey
Posts: 22
Joined: Sat Jan 21, 2023 10:28 pm

Re: I/O interface.

Post by Whitey »

During my latest testing I wrote a simple basic program to poke 8192 starting at 0
Then increment by 1 (using a let statement)
Pause for 30 then poke the new number. Repeat forever.
Now I'm getting to 224 everytime before it hangs.
I'd be inclined to suspect my wiring if it wasn't for the fact I've poked on and off each led in turn successfully and continuity checked against each line of the schematic to check it goes where it should and isn't shorted to anything it shouldn't be.
The only substitution was an 1n4001 I did have for a 1n4148 I didn't on the romcs line.
The fact it's working to the point it is leads me to think it's not that.
User avatar
1024MAK
Posts: 5118
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...

Re: I/O interface.

Post by 1024MAK »

A 1N4001 is too slow. It needs to be a signal diode, as these switch on and off a lot faster than a rectifier diode (1N4001 family) designed for use in 50Hz to 120Hz mains frequency applications.

Also, there are a number of option links shown, are these wired for a ZX81 / memory mapped device? Please describe.

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.
Whitey
Posts: 22
Joined: Sat Jan 21, 2023 10:28 pm

Re: I/O interface.

Post by Whitey »

Hi Mark,

Perfect. I did wonder and I'd already ordered some 1n4148's just in case so hopefully that will solve my problem.
I'm using the zx81 memory mapped version so just the link A to B

I hadn't picked up on the switching time difference and the fault feels timing related because both the inputs and outputs work and various length pauses effect how successfully it will run in continuous mode.
Fingers crossed the diode sorts it.

And thanks for the feedback. 👌
Whitey
Posts: 22
Joined: Sat Jan 21, 2023 10:28 pm

Re: I/O interface.

Post by Whitey »

BOOM! Big thanks to mark and those that suggested the diode substitution was the issue with my homemade interface. Spot on. The postie delivered 50x 1n4148's today and we're in business. The prototype wiring is the first time in 35 years and somewhat hilarious. I'm tempted to make the PCB now I know this works. The first program is a basic for-next loop and pokes the values between 1 and 255. The second uses a short pause so you can actually see the individual changes. Next mission will be a pure machine code version to see if it can cope with full speed out of the bus.

https://youtu.be/TGqxm7dTLbA


B0843B54-7EA2-403F-89B9-8562303E388B.jpeg
BF8B497A-D6A6-4CF0-A033-31CCF5CF6E3E.jpeg
Post Reply