My DOS USB Gamepad Project

The section is dedicated to my quest to get my Logitech Precision Gamepad working, in DOS. Hopefully this information will be useful in helping someone else with one of their projects.

I started this project, back in 2008, for four reasons:

While DOS has no built-in USB stack, there are few hardware devices that has one built-in. After trying three different hardware devices, and two different software TSRs I finally had something that was mostly-working. Therein lies the problem: I was depending on having a working game controller to control my Car-Computer's music player. I never knew if the controller was going to work, and half the time it didn't.

In the summer of 2018, I found a hardware-based USB host controller that I hadn't tried before. It's made by Hobbytronics, over in the UK. Their USB host controller board can receive input from a gamepad then output the results to a serial port. By dealing all of the low-level USB communication it makes it a lot earier for people to interface USB devices in their microntroller programs.

The serial interace on a PC isn't that much different than what one finds on a microntroller. The only meaningful difference is that PCs follow the RS232 standard, which operates at higher voltage levels. With that in mind, I ordered the "USB Joystick" version of the USB host, an RS232 level converter and some header pins.


I started with mounting a power connector and the RS232 level converter to a project box.

[Project Box]

Next, I cut a hole for the USB connectors and attached some standoffs for mounting the USB host board.

[Level Converter]

Next, I soldered headers to the USB host and soldered power wires to it.

[Soldering header and power wires]

This is what it looks like with both boards mounted. From there is a simple matter of wiring the two board together, using a ribbon cable. Since the flow-control lines aren't used there are only four connections: 5v power, ground, receive, and transmit.

[Both circuit boards mounted]


Next I tested things out from my desktop PC, using a terminal program. At the time I wasn't getting any response, at all, from the USB Host Board. After confirming that the wiring was correct, the only other things that could go wrong were the Host Board and the RS232 level converter. Fortunately, I had a spare level converter, left over from a previous project.

[Spare RS232 level converter]

Next, I remove the back-shell from the level converter and mounted the circuit board, that was inside, to the project case. I still needed a way to join the cables together. This was done by soldering a connector and some hearder pins to an old piece of perf-board.

[Mounting the spare RS232 level converter]

This is what it looks like with the connectors joined together.

[Joining the cables]

Finally I used some hot glue to attach the perf-board to the bottom of the project box.

[Project case with everything attached]

Parts Used

USB Host Controller Board V2.4 - Preinstalled Software Option: USB Joystick HobbyTronics $17.40
36 Way Single Row Header 0.1 inch pitch HobbyTronics $0.24
Ribbon Cable - Came with the defective RS232 level converter HobbyTronics
RLC_1:RS232-TTL level converter in a DB9 backshell $24.95
Connector Header Through Hole 6 position 0.100" (2.54mm) 0022272061 Digi-Key Electronics $0.47
Project Box 1591XXLBK Digi-Key Electronics $5.56
Power Jack 2.1x5.5mm 54-00063 Digi-Key Electronics $2.04
Cable Assembly 2.1mm ID, 5.5mm OD Jack to Plug (2) Round 0.98' Adafruit 1351 Digi-Key Electronics $2.95
Nuts 4-40 x 6mm long Part of a PC screw kit that I already had
Screws 4-40 x 3/16" long Part of a PC screw kit that I already had
Perfboard 0.1 inches (2.54 mm) spacing Already had

Last Update: 9-29-2018