PS/2 keyboard adapter for VIC20 and C64

Disk drives, Monitors, SuperCPU etc.
levoman
Member
Member
Posts: 22
Joined: Wed Oct 06, 2021 9:36 am
Location: Milton keynes
Contact:

PS/2 keyboard adapter for VIC20 and C64

Post by levoman »

Banman pointed me to a project that he would like to create that enables the use of a PS/2 keyboard on either the C64 or VIC20 .

https://github.com/Hartland/C64-Keyboard

It uses an MT8808 switch matrix ic to recreate the matrix of the keyboard from the scan codes of the PS/2 interface. I have already re-created the schematic to use an atmega88 and the software is readily available to program it. Just need Banman to breadboard it up so that it can be verified as working. Gerber files will be available , and indeed have already been produced.

It will be a through hole product that will be easy to make yourself.

Anybody interested?


banman
Member
Member
Posts: 419
Joined: Sat Jun 15, 2019 12:21 am
Contact:

Re: PS/2 keyboard adapter for VIC20 and C64

Post by banman »

Hi levoman,

I'll get on it! Thanks.

I had a go at uploading the code and it appears to fit on to a Atmega88 chip including the required libraries.

With some changes to the keyboard code I believe it could possibly be used on a C16 computer. The C16's keyboard matrix is wired slightly different to the Vic20 and C64.
levoman
Member
Member
Posts: 22
Joined: Wed Oct 06, 2021 9:36 am
Location: Milton keynes
Contact:

Re: PS/2 keyboard adapter for VIC20 and C64

Post by levoman »

Indeed , the output pins of this circuit could be matched to replace any matrix keyboard of up to 64 keys!

PS/2 to spectrum or ZX80 anyone??
levoman
Member
Member
Posts: 22
Joined: Wed Oct 06, 2021 9:36 am
Location: Milton keynes
Contact:

Re: PS/2 keyboard adapter for VIC20 and C64

Post by levoman »

The project is now off the ground and the software has proved to be fine , Just sorted out a problem with the MT8808 footprint for the PCB and awaiting arrival of some redesigned PCB's . Once the PCB has been confirmed to be OK it will be good to go!

https://www.pcbway.com/project/sharepro ... board.html
User avatar
eslapion
Active Member
Active Member
Posts: 1215
Joined: Mon Jul 20, 2015 10:11 am
Location: Canada
Contact:

Re: PS/2 keyboard adapter for VIC20 and C64

Post by eslapion »

banman wrote: Mon Oct 18, 2021 3:15 am With some changes to the keyboard code I believe it could possibly be used on a C16 computer. The C16's keyboard matrix is wired slightly different to the Vic20 and C64.
Getting replacement keyboards for the C128 / C128D is incredibly difficult. However the keyboard matrix on these machines is a little more than 8x8.

A PS/2 to C128 conversion system would be incredibly useful.
Wealth, like happiness, is never attained directly. It comes as a by-product of providing a useful service. -Harland D. Sanders
banman
Member
Member
Posts: 419
Joined: Sat Jun 15, 2019 12:21 am
Contact:

Re: PS/2 keyboard adapter for VIC20 and C64

Post by banman »

Hi eslapion,


The mt8808, I believe has a bigger brother an mt8816.

I wonder if this might be of some use?
levoman
Member
Member
Posts: 22
Joined: Wed Oct 06, 2021 9:36 am
Location: Milton keynes
Contact:

Re: PS/2 keyboard adapter for VIC20 and C64

Post by levoman »

c128 keyboard is mainly an 8x11 matrix which would fit on the MT8816 ( 8x16 matrix ) , just leaving the 40/80 column mode switch , the caps lock switch and the restore key to be handled directly by the AVR.

I could work it in theory however i do not have a C128 to test it on ( not that i don't want one , i just don't have one! ).

It could be emulated with a strobed supply on one side of the matrix and resistor to LED to GND on the other side to show which key would be functioning , but this does not guarantee it working.

Give me a bit of time to get some components and ' play around ' and i will give it a go!
User avatar
eslapion
Active Member
Active Member
Posts: 1215
Joined: Mon Jul 20, 2015 10:11 am
Location: Canada
Contact:

Re: PS/2 keyboard adapter for VIC20 and C64

Post by eslapion »

@levoman

On the PC keyboards, there is the NUMLK key which could be used for the 40/80 column mode.
Wealth, like happiness, is never attained directly. It comes as a by-product of providing a useful service. -Harland D. Sanders
banman
Member
Member
Posts: 419
Joined: Sat Jun 15, 2019 12:21 am
Contact:

Re: PS/2 keyboard adapter for VIC20 and C64

Post by banman »

Hi levoman and eslapion,

Apologies for interrupting this fascinating discussion regarding c128 keyboards.

I can confirm that PS/2 keyboard adapter for VIC20 and C64 works for the 2 NTSC Short board Vic 20 machines I have with an AT style keyboard.

No modifications needed to board.

It works on an Atmega8 with the internal oscillator set to 8 mhz no problems. I cannot type faster than the Vic 20 displays text on the screen.


I was very hasty and wanted to see if it worked so l used the internal oscillator. I will of course continue construction of the PCB to reflect an external crystal oscillator.

One will note that it is very important to make sure the pin 1 orientation of the two IC chips are not in the in the one direction. The Mt8808 is orientated North and the Atmega8 heads South.
I am sure this is done to keep the PCB board design tidy and easy to trace down faults. I know when I started to veroboard my own version it was an absolute wiring mess.

I will say this is a great project for beginners wanting to push their skills to a new level. It looks great attached to the mainboard too.

Thank you levoman for bringing back 2 Vic 20 machines. :D
Attachments
IMG_20211128_192954.jpg
IMG_20211128_193208.jpg
IMG_20211128_193317.jpg
levoman
Member
Member
Posts: 22
Joined: Wed Oct 06, 2021 9:36 am
Location: Milton keynes
Contact:

Re: PS/2 keyboard adapter for VIC20 and C64

Post by levoman »

You're welcome @banman.

I will make sure to put an extra indicator for pin 1 on each chip to help stop mistakes. The orientation of the chips was done to make the routing of the board simpler.

I will send the details for the C16 and the measurements i need from it.
Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 5 guests