←back to thread

136 points colinbartlett | 5 comments | | HN request time: 0.41s | source
Show context
WalterBright ◴[] No.43949649[source]
Back in 1978, I made my own keyboard for a single board 6800 computer I designed, also because I could not afford a keyboard.

I went to a surplus store and bought an EBCDIC keyboard for a couple bucks. I unsoldered all the keys from the circuit board. I took a plastic board, and using the old circuit board, drilled holes in it. Inserted the keys in the holes, and then wired it up in an 8x8 grid pattern. The two 8 bits gave 64 possible keys, which was enough, connecting those to an I/O port enabled recognizing which key was down.

It worked fine as long as you were careful not to press more than one key at a time.

I don't recall what I did with that computer. It's all gone, including the design notebook for it.

replies(3): >>43950004 #>>43951328 #>>43951581 #
Dylan16807 ◴[] No.43950004[source]
Could the code subtract out the previous key for two overlapping key presses, or was it a very strict one at a time?
replies(2): >>43950134 #>>43950343 #
1. WalterBright ◴[] No.43950343[source]
Many keyboards at the time could not do N-key rollover, including mine :-)

Subtracting wouldn't work, as more than one combination of keys would produce the same 16 bits of signal.

replies(1): >>43950394 #
2. Dylan16807 ◴[] No.43950394[source]
No, no, I didn't say N, I said two.

If you're holding one key, you have 1 bit set on each bank. If you press a second key, you now have an additional row bit and/or an additional column bit. You can tell what the new key is unambiguously. If it's still one bit on an axis then that bit is correct. If it's two bits then the new bit is correct.

You only get problems when you have three keys held at the same time, or if multiple keys change state simultaneously.

replies(1): >>43950519 #
3. WalterBright ◴[] No.43950519[source]
Consider a grid:

    -+-+-- A
     | |
    -+-+-- B
     | |
     C D
The keys AC and BD pressed simultaneously are indistinguishable from BC and AD.
replies(1): >>43950531 #
4. Dylan16807 ◴[] No.43950531{3}[source]
Yes, I mentioned the timing.

But allowing for one key and then a second key before you release the first one is a pretty big improvement for natural typing.

replies(1): >>43950813 #
5. WalterBright ◴[] No.43950813{4}[source]
Since it was polling the keyboard, among other tasks, the timing of when it looked was not entirely predictable. I was pushing the 6802 at its limit.

At least the keys did not need debouncing, they were nice keys.

The code listing has disappeared, too.