Changes between Version 7 and Version 8 of starkadroid
- Timestamp:
- Dec 6, 2011, 8:41:14 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
starkadroid
v7 v8 9 9 10 10 = Hardware = 11 [http://pulkomandy.ath.cx/projects/avrstuff/browser/starkadroid/circuit Kicad project] 12 13 This is loosely based on the [wiki:ak2tousb]. What hapenned : 14 * Removed the ps/2 port 15 * added 2 6-bit ports to make a matrix keyboard driver. 16 * removed the debug led, added 5 'misc' pads on the PCB for future extension. 11 the base board is the [wiki:vusbdev]. 17 12 18 13 The device expects the buttons to be connected in a matrix, that is, each button is at the intersection of two different wires. … … 38 33 I wired the diodes on a piece of protoboard. 39 34 35 Wires 1 to 6 are port B, 7 to 12 are port C. 36 40 37 This wiring scheme require your buttons to have two free wires. If this is not the case, for example if your control panel has a single ground connected to all buttons and only one wire for each of them, you can still get it working with some TTL logic. 41 38 … … 44 41 * plug your buttons to A (input) pins 45 42 * plug a wire in the 7..12 range to the 1G and 2G pins 46 * plug wires from the 1..6 range to Y (output) pins matching the A you used.43 * plug wires from the 1..6 range to Y (output) pins matching the A you used. 47 44 48 45 This does not conflict with the diode system above and if needed, you can mix both on the same card. For example, we use diodes for the buttons, but a buffer for the coin mechanism. 49 46 50 47 = Software = 51 [http://pulkomandy.ath.cx/projects/avrstuff/browser/ starkadroid/codeSource code]48 [http://pulkomandy.ath.cx/projects/avrstuff/browser/V-USB_Dev/firmwares/starkadroid Source code] 52 49 53 The bootloader is the same as for ak2usb. See there for infos.50 The bootloader is the same as for [wiki:ak2usb]. See there for infos. 54 51 55 The software is really straight forward. It scans all the lines on PORTB and reads t e 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.52 The software is really straight forward. It scans all the lines on PORTB and reads the 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. 56 53 57 54 = Upgrade = 58 55 Here are instructions on how to upgrade the firmware : 59 56 * You need a PC with windows or linux, or another OS that can run avrdude. 60 * You need another keyboard to control the computer while the adapter is in upgrade mode61 57 * You need AVRDude ( http://savannah.nongnu.org/projects/avrdude ) or another software that can handle 'usbasp' programming (extreme burner is another example) 62 58 * You need the latest firmware .hex file 63 59 64 60 Now how to actually do it : 65 * Unplug the adapter from the computer 66 * 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 67 * Close the jumper 68 * Plug in the adapter again. It should be detected as 'usb asp', not 'starkadroid'. 61 * Unplug the VUSBDev from the computer 62 * Set the leftmost dipswitch to ON to enter firmware upgrade mode. 63 * Plug in the adapter again. It should be detected as 'usb asp', not 'starkadroid' or anything else. 69 64 * Run the firmware upgrade command : 70 65 {{{ … … 72 67 }}} 73 68 * Wait for it to finish. It is not too long. 74 * Unplug the adapter 75 * Open the jumper 76 * Replug the adapter. 69 * Close the dipswitch again. The adapter enters application mode immediately. 70 * The computer may not detect it, so you may need to unplug & replug the VUSBDev once more. 77 71 78 72 And you're done! 79 73 80 74 = Future plans = 81 * I may add some output on the free pins to drive some lights or whatever.82 75 * It is possible to have even more inputs by using some demultiplexers on the output side of the matrix. With 6 bits one can have 64 lines of 6 buttons each, for a total of 384 buttons ! However, the scanning is going to take more time, and I'm not sure it's possible to make an usb hid report that big (48 bytes). 76 * Allowing a QEI input would be nice (for a spinner).