[sdiy] usb keyboard matrix hack

Scott Gravenhorst music.maker at gte.net
Wed Aug 11 02:51:08 CEST 2004


Dave Krooshof <synthos at xs4all.nl> wrote:
>The 4016 was what I was looking for, but conveiniently enough, I found out
>that the USB keyboard chip is happy with a NAND in stead of a switch as well.
>Good! Got tons of those, so I can spend the night soldering.
>
>But problems are only solved one at the time....
>Next issue is: The NANDs I have (I have a lot, I tried different types)
>want to have a real zero on the input and assume a 1 if the pin is 
>not connected.

A logic input should never be left open.  Ground it to force it to a zero
state.  Connect it to V+ to force a logic 1 state.

>The switches in my joystick are just simple (but VERY rugged) on/off switches.
>
>How would you suggest throwing the voltage to 0 when the switch is off?

Wire the switch from V+ to the input and then a resistor from input to ground.
 When the switch is closed, the input will go high, when open, the resistor
takes over and "grounds" the input.  The size of the resistor depends on the
logic type.  If you're using CMOS, anthing from 1K to 1Meg (or possibly more)
will work, choosing larger means less current used, but also somewhat less
noise immunity.  Speaking of noise, note that you will probably not get a clean
logic transistion when the switch is thown.  It will go on-off-on-off-on-off...
an unpredictable number of times.  Sometimes (like a flipflop reset input) this
might not matter, other times (like a counter's clock input) it matters a lot.
 If it matters, you'll need to research switch debounce using a schmitt trigger.


>groets,
>
>_          >^v<        _
>
>website http://www.dendriet.nl
>

---------------------------------------------------------
- Where merit is not rewarded, excellence fades.
- Hydrogen is pointless without solar.
- What good are laws that only lawyers understand?
- The media's credibility should always be questioned.
- The only good terrorist is a dead terrorist.
- Governments do nothing well, save collect taxes.

-- Scott Gravenhorst | LegoManiac / Lego Trains / RIS 1.5
-- Linux Rex         | RedWebMail by RedStarWare
-- FatMan: home1.gte.net/res0658s/FatMan/
-- NonFatMan: home1.gte.net/res0658s/electronics/
-- Autodidactic Master of Arcane and Hidden Knowledge.



More information about the Synth-diy mailing list