←back to thread

136 points colinbartlett | 9 comments | | HN request time: 1.442s | source | bottom
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 #
1. 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 #
2. throwanem ◴[] No.43950134[source]
If I had to guess, the sixty or so diodes required for an NKRO matrix might have blown the money budget for the project, about like trying to do that kind of work in an interrupt handler would blow the cycle budget for any interesting program even had it been possible. Typing more slowly is free.

Hard to say. I would need to look up component prices for a few years prior to my birth, and it would take me a few minutes to find that archive of 70s Radio Shack catalogs again - though I believe it was actually posted here, so. Of course anyone serious enough to be building an entire computer in those days, brilliant keyboard hack and all, probably wouldn't be sourcing a jellybean part like 1N400x signal diodes one by each...

replies(1): >>43950371 #
3. 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 #
4. WalterBright ◴[] No.43950371[source]
The keys I used weren't jellybean. They were excellent keys. They were in the surplus bin because EBCDIC keyboards were already obsolete by then.

I had very little money at the time, and scrounged for parts.

replies(1): >>43950510 #
5. 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 #
6. throwanem ◴[] No.43950510{3}[source]
By "jellybean" I meant the sort of small signal diodes one might use to prevent aliasing in a keyboard matrix. I know where I'd have gone to get those in my twenties, but not really how I'd have afforded that many for one project, even at the (very) small discount they might have given me on an order of that size.

Unfortunately, now that I've finally reached a point of being able to really effectively use such a resource as that store, in its place now stands a Sonic drive-in. So it goes.

7. WalterBright ◴[] No.43950519{3}[source]
Consider a grid:

    -+-+-- A
     | |
    -+-+-- B
     | |
     C D
The keys AC and BD pressed simultaneously are indistinguishable from BC and AD.
replies(1): >>43950531 #
8. Dylan16807 ◴[] No.43950531{4}[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 #
9. WalterBright ◴[] No.43950813{5}[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.