Main > Main Forum
Keyboard Emulator
seaner:
--- Quote from: slinger on March 19, 2003, 06:11:43 pm ---
I'm acutally not using a matrix, there are currently 4 common line and 8 data lines (4x8=32) each common line is turned on the the data is scanned seperately then turned off and the next common line is turned on, and so on.
--- End quote ---
you may find you have ghosting problems without using switching diodes on each input. think what happens if you have the following:
outputA-------X-------X (X closed, O open)
| |
outputB-------X-------O
| |
inA inB
if you drive outputB and read inA, inB, you fill find active signals at both inputs. You need to stop the current from flowing back onto parallel output lines by placing a diode in series with every switch like this:
output -------------X-----------X
| |
A A
| |
inA(bus) inB(bus)
(assuming you are driving active-low, diodes reversed otherwise) This lets the low voltage flow out of the switch towards the inputs, but stops it from flowing onto adjacent output lines from the input bus.
Not sure if you considered this or not (and I haven't read far enough down the page to see if this was pointed out by someone else).
I have a full 7x8 matrix working fine.. only downside is I had to mount 56 diodes :)
slinger:
When I finally get the board done and I find out this is happeneing, then I'll add them to the buttons.
Ron
slinger:
--- Quote from: seaner on March 21, 2003, 01:43:16 pm --- The PS/2 protocol was the trickiest part of the whole thing. I haven't coded up a host-side stack (to interface to another keyboard), but I did put a second ps/2 jack on the board just in case I decide to run pass-thru in the future.
Yes the PS/2 protocol was the hardest part to do and I also have set up a key in iin hardware and the routines are in software but I'm not polling the key in line I may down the road.
--- End quote ---
seaner:
--- Quote from: slinger on March 21, 2003, 06:43:06 pm ---Yes the PS/2 protocol was the hardest part to do and I also have set up a key in iin hardware and the routines are in software but I'm not polling the key in line I may down the road.
--- End quote ---
Actually, the state machine worked with minimal effort, it was the unexpected 20k pull-down resistor I needed on the Data line. It was causing outbound codes from the PC to get garbled (0 sometimes read as a 1), so I couldn't ever make it past the keyboard test at power-up on the PC. Spent about 8 hours in the lab at work scoping that one out :P
About the diodes, if you find you have problems and you don't want to re-fab a PCB, you can just wire them into the cabling that goes to your switches.
Cheers,
Sean