background preloader

V-USB - A Firmware-Only USB Driver for Atmel AVR Microcontrollers

V-USB - A Firmware-Only USB Driver for Atmel AVR Microcontrollers
V-USB is a software-only implementation of a low-speed USB device for Atmel’s AVR® microcontrollers, making it possible to build USB hardware with almost any AVR® microcontroller, not requiring any additional chip. V-USB can be licensed freely under the GNU General Public License or alternatively under a commercial license. A comprehensive set of example projects demonstrates the wide range of possible applications. Features For a comparison to other USB solutions for microcontrollers please click here. Hardware This diagram shows a typical circuit for a bus powered device (click the image to enlarge). D1 and D2 are a low cost replacement for a low drop 3.3 V regulator chip, such as the LE33. For a prototyping board, please see metaboard. Documentation Resources Download the V-USB package containing a short description and several simple code examples.

How to program an AVR This page explains how to program an AVR microcontroller with the 6 Pins ISP interface. (ISP means In System Programming). ISP 6 Pins pinout: avr_isp-pinouts.html Up An adapter cable between a computer and the ISP connector is needed. Atmel AVR ISP Atmel ISP mkII Examples using UISP: First of all, please note that in the following examples, /dev/avr is a symbolic link to the serial port device where the programmer is connected. Programming the fuses bytes on an atmega8: # uisp -dprog=stk500 -dpart=atmega8 -dserial=/dev/avr --wr_fuse_h=0xc9 --wr_fuses_l=0x9f Programming an hex file into an atmega8: # uisp -dprog=stk500 -dpart=atmega8 -dserial=/dev/avr --erase --upload --verify if=n64_to_wii.hex Note: --erase is for erasing the flash memory BEFORE programming the new file. Examples using AVRDUDE and an USB ISP mkII: Programming the fuses bytes on an Atmega8: # avrdude -p m8 -P usb -c avrispmkII -Uhfuse:w:0xc9:m -Ulfuse:w:0x9f:m Programming an hex file into an atmega8:

5 transistor PIC programmer *Schematic added to step 9! Make your own PIC programmer for your computer's parallel port. This is a variation of David Tait's classic design. It is very reliable and there is good programming software available for free. I like IC-Prog and PICpgm programmer. Best of all, it uses just two voltage regulator and 5 transistors! *** I added a pic of the final result, and pics of my new mini-programmer with a clear top. ** This is a new variation and it didn't work 100% correctly on the first attempt. You need:A male DB25 socket4x NPN transistors, such as the 2n39041x PNP transistor, such as the 2n39061x 7805 voltage regulator1x LM317 voltage regulator (and appropriate resistors to make 12.5V)1x 10k SIP resistor network 4x 10k resistors1x 22k resistor* update for step 31x 5k resistor1x 1k resistor* update for step 31x machined-pin chip socketsoldering iron, protoboard, wraping wire, wrapping tool, glue gun.

USB Devices Compatibility List Anyone is free to edit this list though you must create an account first. Vandals will be banned and their IP blocked from further edits. [edit] PLEASE READ ME (Guidelines) 1. 2. 3. 4. 5. [edit] How to test Finding your device's USB ID: Every USB device ever made has its own unique Vendor ID and Product ID, two four-digit hexadecimal numbers that together identify a particular model made by a particular company. Windows: Plug the device into your computer. In this case, the Vendor ID is 05E3 and the Product ID is 0715. For ease of use finding you VendorID and ProductID numbers in Windows, you can download USBDeview at and check the corresponding columns at the programs listing. Linux: Plug the device into your computer, wait about 8 seconds (to be safe), then: $ less /proc/bus/usb/devices For every USB device in your system (including your root hubs!) Note "Driver=usb-storage". Another way to do this in linux: $ lsusb GeeXboX: 1. 2. 3. 4. 5.

Creating a better Xbox 360 controller And... Done!! IT was a massive pain in the ass, the research took hours while I looked for the best solder points for every button. After that there was all the scratching to remove the green, then the pre-soldering, the soldering, and throughout it all I had to concentrate on making sure I could still close the damned thing later. =D But it worked, first try. Now though I'm not so sure the Competition Pro is the right choice, but that's fine. Now, the pics! Here's where i had planned to drill the hole. You can see here the hole is pretty much complete. This PCB is really a tiny bit of work. Here I've labelled the vias for each connection on the other side. And these are the last of the buttons. Here you can see I've scratched away the green, and applied fresh solder to the vias. And here I've pre-soldered the points on the other side. The wires... Routing them next to the analogue stick is really the only option. A dab of hot-glue keeps the wires from pulling off the PCB. 1. 2.

Controller Theory! An analogue device determines the signal's status in a slightly different manner. Most analogue devices are always returning a signal, but the strength of the signal determines it's status. If you look at the diagram, you can see how the signal is stronger when the device is moved all the way to one end, and weaker when not moved so far. Since all the systems connected to these controllers are digital, any analogue controller will need to have an Encoder - something to encode the analogue signal into a digital one. A basic encoder simply employs an Analogue to Digital Convertor (ADC) which is usually a chip which changes the signal (4.2v) to a digital value.

PSX Controllers It should also be noted that this is a bus of sorts. This means that the wires are all tied together (except select which is seperate for each device). For the CLK, ATT, and CMD pins this does not matter as the PSX is always the originator. The PSX Controller Signals All transmissions are eight bit serial LSB first. The logic level on the data lines is changed by the transmitting device on the falling edge of clock. When the PSX wants to read information from a controller it pulls that devices ATT line low and issues a start command (0x01). This would look like this for a digital controller ATT -______________________________________________________________ | Byte 1 | | Byte 2 | | Byte 3 | CLOCK ---_-_-_-_-_-_-_-_-----_-_-_-_-_-_-_-_-----_-_-_-_-_-_-_-_----- 0xFF 0x41 0x5A DATA -------------------------__________--__----__--__----__--__---- 0x01 0x42 CMND -----_____________-----__--________--__------------------------ ACK --------------------__-------------------__-----------------__-

Game Stick Adaptor! A controller is simply a set of switches, and in the case of the PSX and Saturn, a switch to 'compress' the data into fewer lines. A PSX controller, for example, has nine wires to the console, and 14 buttons on the pad. There's more Controller Theory here. Essentially what I've done is replace the switches on the original board the switches in my joystick controller. The new joystick's cable is basically an extension cord for the switches. The original cable is still in use in order to preserve the factory connector, however the cable has obviously been shortened considerably. To complete the adaptor, I threw the entire mess inside an Atari 8-bit computer cartridge case, whose guts I had unceremoniously removed.

Related: