I think it, i tinker it, i make it
—-
Recent updates:
I think it, i tinker it, i make it
—-
Recent updates:
This is a derivative project of USB Digger Joystick, please refer to main project page to further details.
The firmware is not the same, the parent project use an Atmel atMega 328p but this project an Atmel atMega8.
The main targets of this project are:
Connecting the interface to a Windows PC, Linux or Mac it is recognized as a generic USB keyboard, no drivers needed for working, via joystick commands these keys are emulated:
JOYSTICK COMMAND | EMULATED KEY |
---|---|
UP | CURSOR UP |
DOWN | CURSOR DOWN |
RIGHT | CURSOR RIGHT |
LEFT | CURSOR LEFT |
FIRE | SPACE BAR |
Only few things are necessary to make the USBASP target hardware device compliant to be an miniUSBDiggerJoystick.
Two header connector are soldered in place of JP3 and JP2 empty pads:
The following instruction regarding compile and burn operations, are based on Ubuntu 12.04 environment.
Compiling is not quite necessary, beceause the firmare is available as hex compiled, if you don't want compile the source itself, jump to the burn section.
Dependencies
sudo apt-get install avr-libc gcc-avr
Compile
make
Rename the hex file
mv main.hex 2014_09_16_miniUSBDiggerJoystick.hex
I have burned the firmware with avrdude, using an USBASP as programmer and another USBASP as target device, the target will be the miniUSBDiggerJoystick device.
Installing avrdude
sudo apt-get install avrdude
Burn the firmware
On the target device, close the reset jumper (JP2), connect the USBASP programmer and the target via ribbon cable (flat cable)
Insert the programmer into an USB port in the PC
from the firmware directory, launch
sudo avrdude -c usbasp -p atmega8 -B 1 -U flash:w:2014_09_16_miniUSBDiggerJoystick.hex
an output like this will be printed:
avrdude: set SCK frequency to 750000 Hz avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.01s avrdude: Device signature = 0x1e9307 avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: erasing chip avrdude: set SCK frequency to 750000 Hz avrdude: reading input file "2014_09_16_miniUSBDiggerJoystick.hex" avrdude: input file 2014_09_16_miniUSBDiggerJoystick.hex auto detected as Intel Hex avrdude: writing flash (1964 bytes): Writing | ################################################## | 100% 0.44s avrdude: 1964 bytes of flash written avrdude: verifying flash memory against 2014_09_16_miniUSBDiggerJoystick.hex: avrdude: load data flash data from input file 2014_09_16_miniUSBDiggerJoystick.hex: avrdude: input file 2014_09_16_miniUSBDiggerJoystick.hex auto detected as Intel Hex avrdude: input file 2014_09_16_miniUSBDiggerJoystick.hex contains 1964 bytes avrdude: reading on-chip flash data: Reading | ################################################## | 100% 0.31s avrdude: verifying ... avrdude: 1964 bytes of flash verified avrdude: safemode: Fuses OK avrdude done. Thank you.
Fuses must be setted as:
hfuse: 0xc9 lfuse: 0xef
Set the fuses with the command
sudo avrdude -c usbasp -p atmega8 -B 200 -U hfuse:w:0xC9:m -U lfuse:w:0xEF:m
Now you you can disconnect the programmer from the USB port, remove the ribbon cable and the jumper on reset (JP2) from the target.
If you want verify the burn procedure of the firmware in target, open a terminal and monitor the syslogs with this command:
tail -f /var/log/syslog
when you insert the target device (that is become miniUSBDiggerJoystick) you read this on the terminal window:
Sep 21 23:36:28 yourpc kernel: [ 5955.880147] usb 5-2: new low-speed USB device number 10 using uhci_hcd Sep 21 23:36:29 yourpc mtp-probe: checking bus 5, device 10: "/sys/devices/pci0000:00/0000:00:1d.0/usb5/5-2" Sep 21 23:36:29 yourpc kernel: [ 5956.072636] input: http://itink.it miniUSBDiggerJoystick as /devices/pci0000:00/0000:00:1d.0/usb5/5-2/5-2:1.0/input/input8 Sep 21 23:36:29 yourpc mtp-probe: bus: 5, device: 10 was not an MTP device Sep 21 23:36:29 yourpc kernel: [ 5956.076622] generic-usb 0003:16C0:05DC.0002: input,hidraw1: USB HID v1.01 Keyboard [http://itink.it miniUSBDiggerJoystick] on usb-0000:00:1d.0-2/input0
A DB9 male connector is used to connect a joystick to the device. Personally i had recovered the connector from a trashed PC cabinet, this connector has already the flat cable and the IDC 10 pin connector. Only few modifications are needed, because in the PC this connector is normally used as serial port connector, for work with the miniUSBDiggerJoystick you must desolder the wires on the connector and resolder them respecting the following schematic.
FUNCTION | DB9 CONNECTOR | USBASP |
---|---|---|
GND | 8 | 8 |
FIRE | 6 | 2 → JP3 |
UP | 1 | 1 |
DOWN | 2 | 5 |
LEFT | 3 | 7 |
RIGHT | 4 | 9 |
Note: the fire button (pin No.6 on the DB9 joystick connected) is connected to pin No.2 of the 10 pin USBASP header, the JP1 voltage selector jumper must be removed, and a jumper wire must be connect JP1 to JP3, this connect directly fire pin No.6 of the DB9 connector to the pin 25 of the atMega8 MCU
The firmware is based on “USB powerpoint presenter” "USB powerpoint presenter" by Guido Socher
The software (the sources and the firmware binary), is released under GPL in execptions of the V-USB librearies, there are released by Objective Development Software GmbH under a proprietary OpenSource license, contained in the source directory of USB Digger Joystick project, you can find it in firmware/usbdrv/License.txt
The hardware and the software modifications are released by the author Alessio Cavalieri AS IS, without any warranty, the author is not responsible for malfunction and/or damages to devices connected to interface USB Digger Joystick, assemble and use at your own risk.
The joystick are connected to the interface with these pins, via a DB9 male connector:
PIN | FUNCTION |
---|---|
1 | UP |
2 | DOWN |
3 | LEFT |
4 | RIGHT |
6 | FIRE |
8 | GND (GROUND, 0V) |
This is the USBASP programming interface pinout:
PIN | FUNCTION |
---|---|
1 | MOSI |
2 | VTG |
3 | N/C |
4 | GND |
5 | /RES |
6 | GND |
7 | SCK |
8 | GND |
9 | MISO |
10 | GND |
For contact me, write a mail to info at itink.it