Maximum Number of Buttons

Status
Not open for further replies.

denderli

New member
I'm just getting started with this as a hobby and I have a question, but haven't been able to find an answer. From an engineering perspective, how many buttons will a USB device support?
 
Last edited:
This is not a Eng101 question per se, rather it is a noob question.

I know it seems like a vague question, but since I'm new to all of this, it is a question based off of ignorance. I've scoured the web for any shred of documentation but have not been able to find anything. I would just like to know what the limitations are on the number of buttons a single USB device could accomodate and be able to address them all either independently or by using some type of matrix encoding.

I'm interested in starting a project that would need to have 200 buttons minimum, or a 20 x 10 matrix.
 
Last edited:
This question is indeed vague, even with the extra text.

With enough design work, using enough special circuitry and a custom protocol (also with custom software on the PC to receive the data), a single USB device could support millions of buttons.

A 20x10 matrix should be pretty achievable with a Teensy++ 2.0, using 30 of the 36 pins that are exposed on the outside edges. The Keypad library should be able to handle this.

http://www.pjrc.com/teensy/td_libs_Keypad.html

On the USB side, you'll need to transmit the data to the PC using some protocol. A USB keyboard only supports about 100 unique key codes corresponding to the keys on a normal keyboard. You'll need to do something like use Serial and transmit multi-byte messages, or as a USB keyboard type send more than 1 keystroke for each button.

Generally, you can get better and more helpful answers if you invest more effort to ask better, more specific questions.
 
Thank you for the response and the informative link. I will do more research on the information that you have provided. I also appreciate not being flamed since I was unable to articulate exactly what I was looking for since I didn't know exactly how else to phrase it.
 
Status
Not open for further replies.
Back
Top