SimplyCool

 

  #1 (permalink)  
Old 06-04-2016, 09:19 AM
Junior Member
 
Join Date: Jun 2016
Posts: 2
Cool Custom-made Footswitch firmare

Hi everyone !

I was quite disappointed to discover that my 3-button footswitch was not able to handle keys like "Ctrl" or "Shift" out of the box. Then I found the alternate driver that allows to bind them.

But I was disappointed again to find that the Footswitch was not handling correctly simultaneous presses. I wanted, for one, to be able to make "word-by-word" selection ( Ctrl+Shift+Left or RightArrow).

It was obviously a firmware issue and not a USB limitation, because regular keyboards are able to do that. So I opened my Footswitch, and noted that it uses a Silicon Labs C8051F321 microcontroller. I bought a devkit from Silicon Labs, and made my own Firmware. Then I flashed my Footswitch, and everything seem to work !

Here's the firmware source code : https://github.com/Gugli/UsbDev8051
- I compiled it using Keil (the shareware version provided with SiliconLabs devkit).
- Supports multiple keys, whether they are modifiers (Ctrl/Shift) or regular keys.
- It also allows to bind mouse clicks instead of/along keypresses. No Autohotkey required . The device is "seen" as a compound USB device "containing" one mouse and one keyboard. You can for example bind "Ctrl + Right Click" if so you want.
- For now, it can not be configured once it has been flashed (you have to change the code to choose which key you want). If people start using it, I may invest the time to implement that feature too. I'll have to write a new "driver app" then, (or at least the specs for other people to write one). Hopefully it could be better than the actual one.
- If people want it, I could also bind mouse moves (absolute or relative), but I don't think many people would use it.

If you want to use this, you'll need a Silicon Labs C2 cable. You can find the pins here : https://www.silabs.com/Support%20Doc...ug-Adapter.pdf
You'll have to connect the pins
2 - Ground
4 - C2D
7 - C2CLK
10 - 5Vin
from the cable to your footswitch, as shown in the picture linked below.

Pictures here : http://imgur.com/a/TXjRc

Happy hacking !

Last edited by Gugli; 06-04-2016 at 03:40 PM. Reason: Adding pictures
Reply With Quote
Reply

Tags
firmware, footswitch

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0
Template-Modifications by TMS
Copyrights by Scythe EU GmbH - All rights reserved - 2007

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61