VOGONS


First post, by Darmok

User metadata
Rank Newbie
Rank
Newbie

For some of the devices I developed, I needed the ability to connect a couple of keyboard key controllers to the computer along with the keyboard. The electrical interface allows parallel connection of several keyboards, but the exchange protocol is designed strictly for the use of two controllers; one keyboard controller on the motherboard and one controller in the keyboard. Direct parallel connection of two keyboards leads to their inoperability. To circumvent this limitation, it was necessary to develop a special hardware solution - Keyboard Port Tripler.

Keyboard Port Tripler can be useful for those who develop homemade specialized keyboards, gamepads and other devices intended for use with older computers that do not have USB ports and support for USB keyboards in the BIOS code. Particularly interesting is the possibility of using such devices that simulate a keyboard for old DOS games. Therefore, I decided to publish my development in the hope that it will be useful to those who create homemade devices.

Despite the simplicity of the Tripler's electrical circuit, its operating principle is not trivial. A detailed description of it would require a lot of words and timing diagrams, so for those who like to understand the details, I suggest carefully studying the excellent article by Adam Chapweske “PS/2 Mouse/Keyboard Protocol” ( https://oe7twj.at/images/6/6a/PS2_Keyboard.pdf ). The protocol does not determine the reaction of keyboard key controllers to non-standard packets and, as I expected, they ignore them; this fact has been verified experimentally.

Tripler has three ports: one master port and two slave ports. The master port is designed to connect a standard system keyboard. For Tripler to work, it is important that the keyboard is connected to the master port; without this, keyboards connected to the slave ports will not work. A keyboard connected to the master port works exactly the same, without any restrictions, as a keyboard connected directly to a port on the motherboard. Keyboards connected to slave ports have limited functionality because they cannot receive commands from the keyboard controller on the motherboard. In practice, this means that the LED indicators on them will not light up and the typematic rate cannot be changed for them. Otherwise, these keyboards work the same as a keyboard connected to the master port.

All three keyboards can work simultaneously. For example, you can hold down keys on all three keyboards and the controller on the motherboard will receive key codes from all three keyboards. Of course, we are talking about pseudo-simultaneous operation, but the additional delays are so small that they are imperceptible.

When a keyboard is connected to a port on the motherboard, a current of about 1 mA is switched along the KBCLCK and KBDAT lines. When using Tripler, a current of 1.5 mA is switched via the KBDAT line, regardless of the number of slave ports; a current of 1 mA is switched via the KBCLCK line, plus 0.5 mA for each slave port. The controller outputs on the motherboard are usually buffered by gates of some type of 74 series IC, and therefore are capable of switching a current of at least 16 mA. The load capacity of the outputs of the keyboard key controllers is unknown, but it can be assumed that the controller outputs use transistors that are not inferior to those that control the LEDs, that is, presumably at least 5 mA. If there is an urgent need, the number of slave ports can be increased, but the increase in capacitive load on the KBCLCK line should be taken into account, and you may also encounter a limitation on the power current consumption from the port on the motherboard (100 mA maximum according to the IBM specification). To connect homemade devices, you should use a shielded cable of the shortest possible length. My tests have shown that three standard keyboards with a standard connecting cable length work reliably when connected at the same time.

Attachments

  • front.jpg
    Filename
    front.jpg
    File size
    324.03 KiB
    Views
    69 views
    File license
    Public domain
  • top.jpg
    Filename
    top.jpg
    File size
    358.16 KiB
    Views
    69 views
    File license
    Public domain
  • diagram.GIF
    Filename
    diagram.GIF
    File size
    51.06 KiB
    Views
    69 views
    File license
    Public domain