Author Topic: How does a controler/pcb works  (Read 865 times)

0 Members and 1 Guest are viewing this topic.

Offline JPG

  • Thread Starter
  • Posts: 1124
  • Location: Canada (Beloeil, near Montreal)
  • Model F is my new passion!
How does a controler/pcb works
« on: Wed, 21 August 2013, 12:49:27 »
OK, I was intrigued about how a pcb and controller work and so I went on google and searched and found some info about how the matrix works and how the controller scans the columns to identity the switches that are actuated. I also learned what's the ghosting and how the diodes prevent it. But I have many more questions so I hope someone will answer them!

1. How much time does it take for the controller to scan all the columns?
2. After the columns are scanned, how long does it takes for the controler to build the signal to send and send it?
3. Do the controller keeps the keys that are actuated in memory so that it can compare them with the result of the columns scan?
4. Where does the latency come from a keyboard (many people say that the 1000hz polling rate means noting since something else is slower, well what is this something else!)?

I may have more questions, but I prefer waiting for some answers before asking them!

Thx to all for taking the time to answer me  :D
IBM F122, IBM XT F X2, IBM AT F (all Soarer converted), Filco Camo TKL Browns

Offline CPTBadAss

  • Woke up like this
  • Posts: 14383
    • Tactile Zine
Re: How does a controler/pcb works
« Reply #1 on: Wed, 21 August 2013, 13:12:47 »
xwhatsit has an amazing guide to how he's getting his own controller to work with a Beamspring board and convert it to USB. And check out Soarer's converter guide to learn a little more. Oh and the HID Liberator thread might work.

Offline dorkvader

  • Posts: 6289
  • Location: Boston area
  • all about the "hack" in "geekhack"
Re: How does a controler/pcb works
« Reply #2 on: Wed, 21 August 2013, 16:06:44 »
I recommend this guide:
http://www.dribin.org/dave/keyboard/one_html/
(the beamspring atricles, while excellent, focus on capacitive circuits, and they are somewhat different than a normal kb matrix circuit)

The controller can scan the matrix super fast, but the issue is that the switches themselves take 5-15ms to "debounce" so faster scanning is somewhat useless as the debounce time takes longer than the scan rate.
Some switches, like capacitive switches, that "actuate" after a specific threshold is passed can be made to scan fast. Even faster are hall effect switches, which can be scanned extremely fast.

For the controller to generate a scancode and send it to the PC I dont know for sure, but I think I remember reading that it was a only few ms or so at most.

1000Hz usb polling is not hte same as scan rate. If the keyboard sends info to the computer at 1000Hz that's great, but the system is still inherently limited by the (relatively) long debounce time of a cherry switch. The controller has to "wait" for the debounce to complete before it can register a keypress, so this is the main limitation.

For this reason, I suspect hall effects are theoretically the best switches for gaming, but I suspect other technologies are good enough that the human component is the real limiting factor.