Changes between Initial Version and Version 1 of starkadroid


Ignore:
Timestamp:
Oct 17, 2010, 10:04:34 PM (14 years ago)
Author:
pulkomandy
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • starkadroid

    v1 v1  
     1The Starkadroid is a project I made for building a mamecab.
     2A mamecab is a fake arcade cabinet powered with a PC, and from wich you can play many games.
     3
     4We had some buttons, a PC, and nothing to put in between. The usual solution is to dismantle a PC gamepad or keyboard and solder the arcade buttons on it. But we had two problems with that :
     5 * The mamecab we are building will be used in real world situation with people hitting it violently when they game over. we don't want a wire to break and the whole thing to stop working every two weeks. So soldering on a PCB not made for it is not good.
     6 * There are better uses for gamepads than dismantling them.
     7
     8Anyway, the device exposes itself as a single gamepad with 2 axis and 36 buttons. Not all of them are used, and maybe the report will change a bit in the future. But I was too lazy to do it properly for now.
     9
     10= Hardware =
     11This is loosely based on the [wiki:ak2usb]. What hapenned :
     12 * Removed the ps/2 port
     13 * added 2 6-bit ports to make a matrix keyboard driver.
     14 * removed the debug led, added 5 'misc' pads on the PCB for future extension.
     15
     16The device expects the buttons to be connected in a matrix, that is, each button is at the intersection of two different wires.
     17It's a good idea to put a diode in series with each button to avoid interferences. So it should look like this :
     18
     19(where O is a button and |>|is a diode)
     20
     21wire 1 -----O---|>|------ wire 7
     22wire 2 -----O---|>|------ wire 7
     23...
     24wire 6 -----O---|>|------ wire 7
     25
     26wire 1 -----O---|>|------ wire 8
     27wire 2 -----O---|>|------ wire 8
     28...
     29...
     30wire 6 -----O---|>|------ wire 12
     31
     32This way you can have up to 36 buttons plugged in.
     33
     34= Software =
     35The bootloader is the same as for ak2usb. See there for infos.
     36
     37The software is really straight forward. It scans all the lines on PORTB and reads te result in PORTC for each of them. All of this is put in an HID report descriptor that's then sent to the computer. And then it loops and starts again.
     38
     39= Upgrade =
     40Here are instructions on how to upgrade the firmware :
     41 * You need a PC with windows or linux, or another OS that can run avrdude.
     42 * You need another keyboard to control the computer while the adapter is in upgrade mode
     43 * You need AVRDude ( http://savannah.nongnu.org/projects/avrdude ) or another software that can handle 'usbasp' programming (extreme burner is another example)
     44 * You need the latest firmware .hex file
     45
     46Now how to actually do it :
     47 * Unplug the adapter from the computer
     48 * On the adapter there is a jumper, when the jumper is closed the adpater will enter upgrade mode, when it is open the adapter works as usual
     49 * Close the jumper
     50 * Plug in the adapter again. It should be detected as 'usb asp', not 'starkadroid'.
     51 * Run the firmware upgrade command :
     52{{{
     53avrdude -c usbasp -p atmega8 -Uflash:w:starkadroid.hex
     54}}}
     55 * Wait for it to finish. It is not too long.
     56 * Unplug the adapter
     57 * Open the jumper
     58 * Replug the adapter.
     59
     60And you're done!
     61
     62= Future plans =
     63I may add some output on the free pins to drive some lights or whatever.