Page 242 of 285
Re: General Stuff(tm)
Posted: 13 Jul 2025 21:08
by stephen_usher
OK, nope... the data bus is correct.
Re: General Stuff(tm)
Posted: 15 Jul 2025 22:37
by stephen_usher
So, today I decided to try to see what the AY chip was actually seeing on the bus and its signals.
So, used a sacrificial 40 pin socket and stuck pins (attached to wires) into it. At first I hooked these up to the Tektronix 'scope's 16 port data signal port. Erm... they drained all the life out of the ZX81's data bus, even with extra pull-ups. Plan B: try to use the unreliable 16 channel logic analyser.
IMG_4506.jpeg
Well, all the signals looked OK. The data was arriving on the D0-D7 lines and BC1, BC2 and BDIR were correct, along with /A9 (and A8 as that's linked on this board to BC1). So no idea.
After lunch the "care package" from Farnell arrived with the proper 74LS27s. So I removed the temporary fix of the 74LS04 generating A8 by inverting the /IOREQ line from the ZX81 and fitted the new chip. The symptoms changed but it still didn't work. The A8 line generated by the 74LS27 was also too low voltage for the AY chip really as well. *sigh*
After dinner (you can tell how long I'd worked upon this, including compiling my test program for the Spectrum 128K (different I/O port numbers) and checking that it worked correctly) I decided to chage the jumpers to use the other set of addresses, as this would remove the need for the pull-downs on the '27's inputs, but did require adding pull-ups to two of the '30's inputs. Did all this, changed the code to the new addresses and...
Still nothing!
The logic analyser still showed precisely the correct signals going to the chip! This time with all the correct voltages too. But the AY chip was just sitting there.
e.g. here are the traces for setting the mixer register (7) to 0xf8 (I/O ports both output, noise channels turned off and tone channels turned on). First setting the register address and the second sending the data:
IMG_4503.jpeg
IMG_4504.jpeg
All the values and the timings precisely match what's in the AY-3-8910 datasheet! I'm completely stumped.
Re: General Stuff(tm)
Posted: 24 Jul 2025 23:38
by stephen_usher
Literally nothing to see here.... I've been writing Pi Pico code to try to simulate the Sinclair QL's keyboard matrix and have been highly frustrated by the Pi Pico's documentation and finally having to rely upon YouTube videos to explain basic methods which aren't covered by the example code (which is the only real documentation on how to actually put the code together).
Anyway, I seem to have it reading the pins for the scan lines and also decoding ascii sent over the serial port into the QL's rows and columns.
The next task, I think, will be hooking it up to the QL's J11 and seeing if there's any output on the output pins when I sent text via the USB serial.
Re: General Stuff(tm)
Posted: 25 Jul 2025 17:54
by stephen_usher
Something to see this time....
IMG_4524.jpeg
Yay!
Now to handle arrow key control sequences and turn them into key presses.
I had some fun trying to get modifiers such as shift to work. It turned out that I had to send them to the QL on their own before I sent them mixed with the main key code otherwise they didn't work.
Re: General Stuff(tm)
Posted: 25 Jul 2025 18:40
by stephen_usher
I have working cursor keys and break (Ctrl-Space) as well.
I can now design a PCB for this unit. I'll probably make it more generic with more output columns as it could then potentially be used for other systems with more rows/columns. It'll need a second outbound 244.
Re: General Stuff(tm)
Posted: 27 Jul 2025 19:09
by stephen_usher
The PCB hs been designed... and I've managed to get function keys working, which is rather important for the QL as you can't get beyond the boot screen without F1 or F2! :-)
Pico-Keyboard-Matrix-Interface.jpg
I've enhanced the PCB to be more generic. It it should be able to handle, with different software, any 8 bit computer keyboard matrix scanning system as long as it has no more than 8 scan outputs and 12 sensor inputs. So, I should be able to interface this with, say, a Memotech MTX Series machine with it's 10 sense lines, leaving spare lines I can use to simulate the reset keys.
I've added a generic RS232 port so that I can move away from using the USB serial connection and start work on the USB HID software, so I can just use a USB keyboard.
Of course, you don't need to use it to emulate a keyboard membrane. In effect this is just a TTL compatible Pico interface card with 8 inputs and 12 outputs.
Re: General Stuff(tm)
Posted: 29 Jul 2025 11:58
by stephen_usher
Seeing as I'm awaiting the PCBs for the QL keyboard matrix emulator I've switched to another project... the replacement keypad for the Hornby Zero 1.
To recap, the Zero 1 master unit's keypad is a carbon coated rubber mat over PCB type and the carbon paint had worn away. As a contingency I'd designed and got built PCBs to replace the original with a version using SMD tactile switches. In the end I didn't get around to doing the keypad (I wish I had) for the two exhibitions.
I've finally got around to working on this...
IMG_4525.jpeg
After fitting the SMD switches and minimal resistance resistors, LEDs and a cable I was able to test the board. My measurements were perfect so it clipped in and the screw holes for mounting lined up. It also worked first time, but there was a problem. The plastic buttons kept sliding to the side and the protrusions on the base slipped past the buttons on the switches if you pressed the buttons in the "wrong" place.
This morning I came up with a solution... A rubber mat made out of a cut up Marrigold glove.
IMG_4529.jpeg
IMG_4530.jpeg
IMG_4531.jpeg
This has totally transformed the keypad and it's far better than the original with a very positive action.
Re: General Stuff(tm)
Posted: 29 Jul 2025 14:19
by rubber_jonnie
Good stuff.
:girldance:
Though you did just admit to owning Marigolds...
Re: General Stuff(tm)
Posted: 29 Jul 2025 16:40
by PhilC
It's amazing just how many uses there are for marigolds. Got a water leak? all you need is a rubber glove and a hose clip :lol:
Re: General Stuff(tm)
Posted: 29 Jul 2025 21:22
by stephen_usher
rubber_jonnie wrote: 29 Jul 2025 14:19
Good stuff.
:girldance:
Though you did just admit to owning Marigolds...
They were in an unopened bag with a date code of 2013... so not exactly something I use often. :-)