Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Converting one keyboard matrix to another?

Status
Not open for further replies.

Llamarama

Member
Hello everyone, I have an old keyboard that I want to use with a zx spectrum, however this keyboard uses an 8*7 keyboard matrix, and the spectrum uses a fairly unique 5*8 with some scan codes using multiple key presses (e.g. delete = symbol shift + 0).

Can anyone suggest the best way to translate the current matrix into the x spectrum matrix?

The only ideas I've come up with so far are too use an eprom which could be too slow, or to use a large microcontroller, but I'm completely in the dark about programming anything more complex than a bunch of for loops.

Any advice would be greatly appreciated, thanks, Mike.
 
Why would an EPROM be too slow? - it's a classic hardware method of doing a lookup table, and runs at hardware speeds - certainly MUCH faster than a Spectrum, and infinitely faster that slow keyboard scanning.
 
A look up table would be the easiest option, and thinking about it even the old 200ns eproms I have should be more than fast enough. Now all I have to do is figure out a way of mapping the keys to an address.
 
Now all I have to do is figure out a way of mapping the keys to an address.

I do not think there are options there... To one specific key pressed down, there should be a specific output which translates to a specific address (maybe adding/substracting a fixed value to each one).

If I understand this right, that unique equivalence allows to build the whole LUT.

Would you later post the outcome, once working? Interesting.
 
I've had a look through my parts box and i've found a couple of 74C922 matrix keyboard encoders, i'm going to try and copy the internal circuitry as per the datasheet but stretch it to the size of matrix I need. The main issue will be stopping the column counter once a key press is detected.
 
Hello everyone, I have an old keyboard that I want to use with a zx spectrum, however this keyboard uses an 8*7 keyboard matrix, and the spectrum uses a fairly unique 5*8 with some scan codes using multiple key presses (e.g. delete = symbol shift + 0).

Can anyone suggest the best way to translate the current matrix into the x spectrum matrix?

The only ideas I've come up with so far are too use an eprom which could be too slow, or to use a large microcontroller, but I'm completely in the dark about programming anything more complex than a bunch of for loops.

Any advice would be greatly appreciated, thanks, Mike.
Maybe time to upgrade to a 386 or maybe 486? I hear some of the newer fangled computers have something called a Floppy disk drive??? I doubt it will catch on, you cant beat good old magnetic tape ;) :D

the sarcasm is purely because I consider this a Commodore house as we have two of them in the house, my dad wouldnt let a spectrum near the place when he was alive, or a BBC micro :D
 
Who needs floppy disks when you have 48K of RAM, 3.5MHz and separate tape in and tape out ports! Features for the asks if features! :D

The first computer I ever used was an Amstrad something (maybe a 464+) but my dad had a Dragon 64 and when I was in primary school in the mid-90s we still used old BBC micros and that turtle robot that used to draw on paper (or in my case, paper then the carpet!)

This whole keyboard business is so I can use a proper keyboard with this Russian zx spectrum clone kit I got for Christmas, and it comes with a dual floppy drive controller! :)
 
Who needs floppy disks when you have 48K of RAM, 3.5MHz and separate tape in and tape out ports! Features for the asks if features! :D

The first computer I ever used was an Amstrad something (maybe a 464+) but my dad had a Dragon 64 and when I was in primary school in the mid-90s we still used old BBC micros and that turtle robot that used to draw on paper (or in my case, paper then the carpet!)

This whole keyboard business is so I can use a proper keyboard with this Russian zx spectrum clone kit I got for Christmas, and it comes with a dual floppy drive controller! :)
Dual floppy!! I do apologize for my comments, you didnt mention in the first post you were a power user :D.

My dad had a PET 80 and VIC 20 and C 64, we still have them somewhere, I love the old stuff. Dual floppy........show off :D
 
My guess is 4 shift registers and a small uC. or simply shift registers to make up the lack of pins on uC (be aware there is 1 input and one output register per matrix)

the table could be done with if statements or a select statement, not much code at all

plus then a few small subs for polling, and poll responses
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top