News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

a usb keyboard to cpc ?????

Started by FRAGKI-2012, 05:00, 07 January 14

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FRAGKI-2012

I am wondering if it is possible to connect a usb keyboard to cpc like the successful  Bruce's project (which I have already made and it works perfectly) AMX Compatible PS/2 and USB Mouse Adapter .
Bruce you are the best!! If you are reading this post, why don't you think of making yourself this project? I suppose its a piece of cake for you.
Do you have any ideas on how to make it?
Would it work if we programme the pic in the existing  project in another code so that it can identify two keyboards?
Is that possible? It is just a thought.......

TotO


Why not dedicating a old PC for the CPC emulation in this case ?
Will cost you "nothing", allow to use keyboard, mouse, and monitor too.
You can store all wanted programs into the hard drive and can be able to write real floppy, if needed.
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Bryce

Hi,
   The AMX mouse PIC could read a USB keyboard, but the CPC can't read the keyboard through the joystick port. To connect a USB keyboard to the CPC, the expansion would need to be directly connected to the AY inside the CPC. It possible, but it would be a messy project with many internal connections and I'm not sure there are many people who would be interested in having one. The CPCs keyboard is already a very good keyboard and in most cases they still work fine even after all these years.

Bryce.

arnoldemu

Quote from: Bryce on 09:38, 07 January 14
Hi,
   The AMX mouse PIC could read a USB keyboard, but the CPC can't read the keyboard through the joystick port. To connect a USB keyboard to the CPC, the expansion would need to be directly connected to the AY inside the CPC. It possible, but it would be a messy project with many internal connections and I'm not sure there are many people who would be interested in having one. The CPCs keyboard is already a very good keyboard and in most cases they still work fine even after all these years.

Bryce.
most of mine are failing.
Are you using the military grade CPC?
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Bryce

You're typing too much :D

Bryce.

Bryce

Soooo, I've taken a look at the schematics and here's the situation:

Doing it the most basic way (ie: a USB version of the CPCKey project) would involve at least 21 separate connections to the mainboard (The CPCKey project needed 29). These connections are mainly to the 74LS145 which produces the keyboard scanning sequence and the AY which reads the key inputs. Unfortunately, none of these ICs are socketed, so it would require direct soldering or IC removal if a plug it in the middle solution was used. The only safer-soldering solution would be to interface to the flat connectors used by the original keyboard, but this would mean replacing those connectors with a header.

Doing it slightly more sensibly you could get the PIC to produce the scan sequence by reading the 4 output bits of the 8255, this reduces the connections by 6, so we are down to 15 connections, but it doesn't solve the direct soldering problem.

Neither solution is neat and both would involve quite a bit of soldering being done by the CPC owner. As well as this, the interpretation and translation of the USB keyboard messages into CPC scan responses wouldn't be instant, so there would be a delay to any key press. Fine for typing, but possibly a pain for gaming.

Bryce.

MaV

That's strange, arnoldemu.
All the CPCs I've worked on so far recently had perfectly fine keyboard membranes. One had a bad AY, but the membrane was fine. The PCW and PC1512/1640 keyboards are manufactured in much the same way, and they are also doing fine.

Nevertheless I'd welcome a good replacement for the keyboard.
Black Mesa Transit Announcement System:
"Work safe, work smart. Your future depends on it."

Munchausen

Bryce - I suppose you could do it by attaching it to the expansion port with an AY, with keyboard, joystick, mouse and audio connections, and disabling the internal AY?


But too much butchery for my liking. TBH I don't like any modification beyond an ABBA switch and maybe things that are socketed (ROMs), or by adding sockets to ICs. Most particularly drilling holes is sacrilege! Unless the CPC is already damaged.

arnoldemu

Quote from: Munchausen on 17:50, 07 January 14
Bryce - I suppose you could do it by attaching it to the expansion port with an AY, with keyboard, joystick, mouse and audio connections, and disabling the internal AY?


But too much butchery for my liking. TBH I don't like any modification beyond an ABBA switch and maybe things that are socketed (ROMs), or by adding sockets to ICs. Most particularly drilling holes is sacrilege! Unless the CPC is already damaged.
yeah some keys stop working. cpcs are stored in our attic room where it can get hot in summer and cold in winter (but not freezing) ;) (because the double glazing in the window has failed).
it can be a little bit dusty. it's not damp I don't think.


My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

gerald

#9
An external solution is possible using the expansion and joystick port.
You just need to emulate the PPI port C bits that control the line decoder and drives the proper bit low on the joystick port.
On the extension port you just need IOREQn, WRn, A1, A0, A11, D[3:0]

For a starter, you can have a look there Is there any recent project to connect a PC (PS/2) keyboard to the CPC?
Code/Schematic for an internal version is available in the tread as well as external version discussion.

If you need a true USB version, you will have to replace the uC part with one with proper USB host controller and do the FW for HID device, but the connection to the CPC should be the same.


Bryce

@Gerald: Your link doesn't work, can you correct it?

An external solution cloning the 8255 / AY etc seems like an aweful lot of hardware just to connect a keyboard.

Bryce.

MaV

Quote from: arnoldemu on 18:35, 07 January 14
yeah some keys stop working. cpcs are stored in our attic room where it can get hot in summer and cold in winter (but not freezing) ;) (because the double glazing in the window has failed).
it can be a little bit dusty. it's not damp I don't think.
Is it possible that occasionally high temperature differences will speed up the corrosion of the contacts? :/
Dust should not be the reason however. The CPCs and PCWs I acquired were all cleaned by me, that includes cleaning the individual keys by dumping them in hot water with a mild detergent, and wiping the top of the membrane and almost immediately cleaning it dry. Some of them had a think layer of dust. And all of them are still fine, and my room's temperature is temperate all year round.

Black Mesa Transit Announcement System:
"Work safe, work smart. Your future depends on it."

Bryce

If it's only single random keys and not rows or columns of keys that are failing, then it's most likely just gunk and dirt rather than corroded tracks.

Bryce.

MaV

Quote from: Bryce on 21:49, 07 January 14If it's only single random keys and not rows or columns of keys that are failing, then it's most likely just gunk and dirt rather than corroded tracks.
I can second that. The PC1512's D-key was failing before I cleaned the keyboard. Sometimes it's just as simple as that (fortunately).
However, arnoldemu's problem seems to occur on every one of his CPCs, it seems.
Black Mesa Transit Announcement System:
"Work safe, work smart. Your future depends on it."

arnoldemu

Quote from: Bryce on 21:49, 07 January 14
If it's only single random keys and not rows or columns of keys that are failing, then it's most likely just gunk and dirt rather than corroded tracks.

Bryce.
when I've looked at the membrane they appear clean and ok to me.

One keyboard broke because another computer was leaning on it and pressing one of the keys for a long time. The pressure must have broken a contact.

Others just seem to fail.

Often it's whole lines that are gone. swapping for another that is known to work then works.
So it doesn't appear to be AY related.

One keyboard the keys will work sometimes, maybe more if I apply more pressure. But generally almost 80% of my keyboards are failing.
If I run something I have to copy and paste letters from the startup text, or do a print chr$() and copy that. You can get quite inventive working out how to get the character you want ;)

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Bryce

That's annoying. I have 6 CPCs and all keyboards work error-free. Admittedly the 664 has a brand new membrane :)

Bryce.

arnoldemu

Quote from: Bryce on 11:58, 08 January 14
That's annoying. I have 6 CPCs and all keyboards work error-free. Admittedly the 664 has a brand new membrane :)

Bryce.
I am jealous.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TotO

I suggest that arnoldemu own five 664.  ;D
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

TFM

All leaning and pressing on each other...  ;)




Well, I have about 9 6128 keyboards and two 664. The only keyboard ever made problems was the keyboard of a 6128 I bought from ebay. All others are totally fine. However, I keep em in good shape. They got a protection over the keyboard and are treated with respect.


When I hear the other story about keyboards which are knocking out the keys of others then this is a bloody horror story to me.  :o
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

arnoldemu

Quote from: TotO on 18:26, 08 January 14
I suggest that arnoldemu own five 664.  ;D
just the one.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

@TFM: No not all of them are.

1 was like this.

the others are protected from touching each other.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

TFM

Now I feel way better...  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

FRAGKI-2012

I googlit about and I m thinking about the port of sound that cpc read the tape just next to the joystick port  can be something like this????

TFM

Hmm.... better use the expansion port. In both cases you need own drivers.

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Gryzor

Same here - all my CPCs (including my 2 664s) work fine, and I have to say that I have never come upon a non-working keyboard, only a few that needed cleaning.

Powered by SMFPacks Menu Editor Mod