A weblog focused on interesting circuits, ideas, schematics and other information about microelectronics and microcontrollers.
USB game controller with 12 inputs
For some projects, a circuit making it possible to connect 12 buttons (including 4 directional buttons) to a PC using an USB port is very useful.
The firmware implements a standard USB joystick with 4 directional buttons and 8 general purpose buttons.
No drivers required, because the USB standard defines device classes. Here the human input device (HID) is used, which allows to tell to the computer that the connected USB device is a joystick and has 2 axis and 4 or 8 buttons. Another nice thing about this is that the adapter should work with all operating systems supporting HID devices.
This project uses an ATmega8 microcontroller from Atmel. This microcontroller does not support USB in hardware so I used the software-only usb driver from Objective Development. This driver allows an AVR microcontroller such as the ATmega8 to talk USB with minimal external components. As a result, the interface can be built cheaply and easily.