Regular Hackaday reader [Osgeld] is at it again with this USB conversionĀ for an NES controller. This is a ubiquitous hack that we started seeing very early on, sometimes involving an adapter kit, and other times including things like a thumb drive and USB hub. But this time around is truly a bare-bones version. He’s using an Arduino but it’s really just an AVR ATmega168 running the bootloader. We’d wager this can be done with an ATmega8 just as easily. Grab a couple of diodes (we never seem to have the 3.6v zener diodes around when we need them), a couple caps and resistors, a crystal and you’re in business. The hack wires each button to a pin and implements a keyboard HID that can be mapped for any purpose you desire.
hid80 Articles
Working With The AT90USBKey
The Genearic HID tool is meant as an easy way to create your own human interface devices. The project has the added benefit of showing us how to hack the hardware on the AT90USBKey developement board. The AVR-based device, which we saw used to make an SNES cartridge reader, comes in at just over $30 but with a few caveats. First, the breakout pads for the pins are not 0.1″ pitch and require some creative soldering to get at them easily. But the walk through also covers converting the board to run at 5v when in USB host mode, and altering the populated components to reclaim pins on the AT90USB1287 chip. The fun isn’t limited to this board, there’s also a home brew alternative based around the same chip.
[Thanks Juan]
HID Crafting With A PIC And A Joystick
[Amr Bekhit] converted his gameport joystick to use as a USB joystick. Much like a universal USB joystick interface, this uses an additional microcontroller to talk to the serial bus while monitoring the controls on the stick. [Amr’s] discussion about creating HID descriptors is clear and easy to understand. What he’s laid out can be translated to any custom HID your heart desires. Give it a try with that old peripheral that’s been gathering dust in the corner.
USB VU-meter
[youtube http://www.youtube.com/watch?v=jsg24MGNpRc&feature=player_embedded%5D
WaitingForFriday’s [Simon Inns] is quite possibly the USB interface and PIC master. This week he let us know about his VU-meter repurposed as a computer performance monitor using a PIC18F2550 and his open source USB Generic HID communication class. With PWM the meter’s needles and RGB LED can be accurately set and even dampened for CPU usage, network usage, HDD utilization, and even memory usage. Oddly enough, in his software we didn’t find the ability to use the device as a VU-meter – go figure.
PIC USB Host Shortcuts
[Simon Inns] is still hard at work making USB connectivity for PIC microcontrollers easier for the hobbiest. He’s released a framework for PIC based USB devices under Windows. It includes the firmware needed for USB compatible 18F PIC chips as well as a C# class library and example programs for the Windows side of things. This goes quite a bit further than his PIC-USB tutorial but with little added effort on your end of things.
We do our USB prototyping on a breadboard just like [Simon] did in this example. He’s got a nice little USB-B connector breakout that is easy to plug into the breadboard. If you prefer to have a more stable development area, check out the one he designed. It’s a single-sided PCB made for through-hole components with just a handful of jumper wires.
C64 USB Keyboard
[Maarten] told us about a C64 USB keyboard that was modified to be used as a standard input device. An interesting aspect of the project is the use of V-USB (formerly known as AVR-USB). V-USB is a software only approach to slow speed USB HID. In essence this is a two fold mod, The C64 keyboard is patched to a PC, and an off the shelf AVR is software-hacked to bit bang the USB communications. The author notes an initial problem with multiple key presses that was later corrected in the application. For the other side of the spectrum, we had covered the C64 twittering client, and a commodore 64 laptop.
CUIduino, Arduino With True USB Support
The CREATE USB Interface (CUI) was a project that came out of UC Santa Barbara around the same time the Arduino was being developed. It has a USB port, a PIC18F4550, and a prototyping area. It was designed to enable easy interfacing with the real would through many A/D inputs and general I/O ports. It supports both OSC and MIDI-over-USB natively. The biggest difference between the CUI and the Arduino is its USB support. The Arduino uses an FTDI chip to create a serial interface to its onboard AVR. The CUI’s PIC has native support for USB. That means you can have the CUI appear to be any USB HID device you want: keyboard, mouse, game controller, etc.
The Arduino has a friendly development environment and a large following though. CUI create [Dan Overholt] decided to add an ATmega168 to his board to get the best of both worlds, the CUIduino (scroll down). It can be programmed just like any other Arduino compatible device, but the having the CUI parent means your Arduino project can behave like a native USB HID gadget.
[Thanks Peter]