Welcome

...and in with the new

While USB-capable microcontrollers aren't that uncommon anymore, they usually are a bit harder to come by than their ordinary counterpart; besides, they normally come in TQFP-packages which usually mean you have to design a PCB around it. I wanted a DIP-part, though, so I could easily solder to it. I could have gone for a Microchip PIC; there are a few of these which support USB, but I basically can't get along with the PICs weird architecture and lack of open compilers. There's a different solution, though: after some groundbreaking work done by Igor Cesko, Objective Development created a nice library that can do software low-speed USB in most of the AVRs. I decided on using that: I didn't need more than low-speed for this device.

So for the hardware, I decided on an ATMega88. It's a chip which has 8KB of flash, which should be plenty for this use, and comes in DIP-format so it's easy to solder in dead-bug-style, that is: upside down with wires running to it. It even has the A/D-converter I needed for the analog joysticks and switches, and enough IO to directly connect everything to it.

If you want to know the connections, I've made a note of them. Aside from these connections, all you need is an 20MHz crystal connected to the correct pins of the ATMega88. The final thing missing now is a small correction on the PCB of the Xbox-controller: while the resistors etc that were in place for the ST chip will work for the AVR too, the ST was a high-speed device while the AVR is a low-speed one. That means the 1.5K pullup needs to be moved from the USB D+-line to the USB D--line. See the image for how to archieve that: the 1.5K-resistor was above C6 and is moved to between the yellow wire and the black unit next to R4.

By the way: the AVR works on 5V now. That's no problem for the AVR, but officially, the USB-lines are 3.3V-only. While my build violates that, I haven't noticed any odd behaviour or breakage, so I kept it that way. If you want to be 100% sure you don't break anything, insert voltage-limiting stuff in the USB-line. See the avr-usb wiki for more info.

« Prev 3 Next »


© 2006-2022 Sprite_tm - Contact