[sdiy] usb keyboard matrix hack

Colin Hinz asfi at eol.ca
Wed Aug 11 06:39:17 CEST 2004


On Wed, 11 Aug 2004, Dave Krooshof wrote:

> >>  How would you suggest throwing the voltage to 0 when the switch is off?
> >>
> >A 10k resistor to ground (known as a pull down resistor).
> >
> I tried that, but now the keyboard says "89+" to the computer
> when I want it to say "7".
>
> I only have one connection for testing. When I switch everything
> on, the keyboard repeats "777777777777".
>
> The keyboard has a fas sequencer. It checks row by row
> with this sequencer, and responds to connections to certain
> pins to figure out in which column the pressed key is.
>
>  From the diagram I drew of the matrix, I can see the
> circuit responds to slow, thus skipping the 7.
> 8, 9 and + are the next columns. So using the resistor
> isn't speedy enough! or the SN74LS08N is too slow.

Standard LS-TTL logic doesn't work well with pulldown resistors.
You'll get a crappy logic low voltage level, and the rise and fall
times will be sub-optimal. This is why you will see, in old logic
circut compendia, switch closures to GND and pullup resistors on
the inputs ALWAYS, even if this would require extra inverters.
CMOS logic doesn't suffer this limitation -- and it took AGES for
me to get used to the idea of a 10k pulldown.

LS-TTL is certainly fast enough to use in a keyboard decoding
circuit, as there's no sense in scanning faster than the debounce
logic will respond. Chances are the scanning is being done by a
tiny USB-enhanced microcontroller, which certainly won't be running
in the many-MIPS range.

The other possibility is that the circuit is expecting a higher
logic high voltage than LS-TTL is providing, though this is rare
except when the LS-TTL outputs are really loaded down.

- Colin Hinz
  Toronto, Canada




More information about the Synth-diy mailing list