Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

USB to PS/2 adapter, how does this work?

Status
Not open for further replies.

neazoi

Advanced Member level 6
Advanced Member level 6
Joined
Jan 5, 2008
Messages
4,155
Helped
13
Reputation
26
Reaction score
15
Trophy points
1,318
Location
Greece
Activity points
37,164
I have an MCU project that accepts PS/2 keyboard. I want to investigate if I could use USB keyboards as well with it using these USB to PS/2 adaptors.

I think that the conversion from USB protocol to PS/2 is done inside the keyboard and the keyboard detects somehow if it has been connected to a USB or USB to PS/2 adaptor. But I may be wrong.

So how does this system work and is there any way to let the keyboard work? My project uses only pins 1,3,4,5 of the PS/2. Pins 2,6 are left unconnected.
 

Conversion is done inside the USBtoPS/2 adapter. Both under serial category , the adapter does the PS/2 format protocol conversion .
 

Hi,

I'm pretty sure that most of the PS/2 to USB adapters, that come with a keyboard, are just passive connectors. The intelligence is in the keyboard. This is a rather simple and low cost solution.

Maybe there are
PC(PS/2) --> [PS/2 adapter to USB type A] --> keyboard(USB).
Where you may connect any USB keyboard. But I expect them to be rather expensive. They need to include all the USB_host requiremens, like timing control, bus control, being prepared for a variety of USB keyboards, power supply, USB_device_speed_detect...and handling....

If you have an adapter by hand you may use a Ohmmeter to check the internal connections.
Passive connections are very low ohmic.
While true data signal should be rather high impedance when not powered. (The shown value will depend on DVM measure method)

Klaus
 
  • Like
Reactions: neazoi

    neazoi

    Points: 2
    Helpful Answer Positive Rating
I agree with KlausST. Most newer USB keyboards since 2010 are no longer combo devices supporting PS/2 protocol. You need to search for keyboards that explicitly specify USB and PS/2 support. Apparently major manufacturers are gradually cleaning up their portfolio. E.g. Cherry had a cheap "eVolution Stream" model with PS/2 support, it's still available at distributors. Now they have only the professional G80-3000, but it's more expensive. There's also Fujitsu KB410 PS2. No PS/2 keyboards from Logitech any more.

Early combo devices had PS/2 plug and a passive adapter to USB, recent have USB A plug and passive adapter to PS/2.
 
  • Like
Reactions: neazoi

    neazoi

    Points: 2
    Helpful Answer Positive Rating
Most newer USB keyboards since 2010 are no longer combo devices supporting PS/2 protocol. You need to search for keyboards that explicitly specify USB and PS/2 support.

Well this are great news for the project. If the intelligence is inside the keyboard, then USB keyboards can be used with this project IF they support the PS/2 protocol.
I guess the simplest thing is to try them in a real PC with PS2 support and if they work then try them in the project.

I wonder if the intelligence is included in some PCs as well so they detect USB keyboards in their PS2 port.
 

I guess the simplest thing is to try them in a real PC with PS2 support and if they work then try them in the project.
Yes.

I wonder if the intelligence is included in some PCs as well so they detect USB keyboards in their PS2 port.
Unlikely. What should be the purpose?
 

Unlikely. What should be the purpose?

The purpose would be that every USB keyboard could work in the PS/2 port.
I wondered so, because if that was the case, then USB keyboards (not-combo) would work in a PC PS/2 but not in my project.
 

I see what you mean. But that's not the way PCs are designed.
 

You need to search for keyboards that explicitly specify USB and PS/2 support.

I have tested it. I took a USB keyboard that I had connected to a PC through a usb to PS/2 adapter and pluged it in the project. It has been powered up (three leds are on in the beginning and then off) but nothing is being done. The keyboard does not respond to it's own commands even, like caps lock should cause the caps lock led to go on, which doesn't.

Remember in post #1 I have not connected all the pins. Perhaps that's the problem? The pinout in these USB to PS/2 adapters could help to see what's going on inside.

- - - Updated - - -

I have seen this **broken link removed** and it is straight forward.

- - - Updated - - -

I have tested it. I took a USB keyboard that I had connected to a PC through a usb to PS/2 adapter and pluged it in the project. It has been powered up (three leds are on in the beginning and then off) but nothing is being done. The keyboard does not respond to it's own commands even, like caps lock should cause the caps lock led to go on, which doesn't.

Remember in post #1 I have not connected all the pins. Perhaps that's the problem? The pinout in these USB to PS/2 adapters could help to see what's going on inside.

- - - Updated - - -

I have seen this **broken link removed** and it is straight forward.

UPDATE, I have tested another USB keyboard and it works perfectly ok with this USB to PS/2 adapters. SO I confirm, it is a keyboard internal electronics issue indeed.

However both keyboards worked on the PC with a USB to PS/2 adapter, whereas only one of them worked on my project, which is weird.
 

The LEDs on a standard keyboard are controlled by software in the BIOS. They usually flash when an initialization code is received but there is no obligation for them to do that.
For example, when 'NumLock' is pressed, the keyboard sends a command to the BIOS which sends a command back to turn the LED on. If there is no communication it won't work.

PS/2 keyboard protocol is the same as used in the days of 5-pin DIN, it uses two open-collector lines, clock and data. USB needs two data lines and regenerates the clock itself so they are not inherently compatible. Beware that some USB to PS/2 (and reverse) adapters actually have a controller built into them, a direct connection wouldn't work.

Brian.
 

The LEDs on a standard keyboard are controlled by software in the BIOS. They usually flash when an initialization code is received but there is no obligation for them to do that.
For example, when 'NumLock' is pressed, the keyboard sends a command to the BIOS which sends a command back to turn the LED on. If there is no communication it won't work.

PS/2 keyboard protocol is the same as used in the days of 5-pin DIN, it uses two open-collector lines, clock and data. USB needs two data lines and regenerates the clock itself so they are not inherently compatible. Beware that some USB to PS/2 (and reverse) adapters actually have a controller built into them, a direct connection wouldn't work.

Brian.


I have 3 of these converters, 2 of them are actually for mouse. They all worked with one of the two keyboards. In the other keyboard none of them worked. If they had a converter inside them, I would expect them to work with both USB keyboards, not just one of them, as far as I can understand.

Are these USB keyboards marked as "combo" by the manufacturers? I am asking so I can describe them better to people interested in building this project.
 

Mouse protocol and keyboard protocols are slightly different. When a computer starts up it sends some characters to the mouse and keyboard to check for a response. If I remember correctly, the keyboard should respond to command '0x55' with '0xAA', I think the mouse should respond with 'M' followed by some data about it's capabilities (number of buttons, scroll wheel etc.). It could be that your converter is not aware of all the combinations of commands and responses.

Brian.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top