??? 01/31/08 16:46 Read: times |
#150108 - that won't work ... and that's now how it works Responding to: ???'s previous message |
Jan Waclawek said:
Richard Erlacher said:
Debouncing? I'd have thought that the 8042 or whatever takes its place handles that, as it's not possible for it to produce an unambiguous output if it doesn't properly debounce the scan. OK it's not 8042, that was/is on the PC side... If there was ever an intel microcontroller in the AT keyboard (there might have been in the original PC keyboard, maybe an 8048), which I doubt (by that time there were undoubtedly much cheaper microcontrollers available for that purpose), it certainly did debounce the key matrix input itself. However, for a real-world application, the prudent engineer rarely lets an input coming into the box from outside, especially from a not-so-well-defined-electrically output as the keyboard is, debounced - or, read it "de-spiked", if you want. Once in a while, I've had to open up keyboards in order to clean them. In all those cases, so far, I've found an 8042 inside, and very little other electronics. There's no reason another MCU wouldn't work, but that's what they seem to have preferred. I never did figure out why that was. The 8042 is a bus-oriented peripheral controller rather than being a fully standalone MCU. IBM probably got a really good buy on them. ---
Btw. your remark reminded me that this might be one of the simplest solutions of your problem - pick an 8042 from any old PC motherboard, wire it up onto the bus of the host processor, and you're done. It does not spit out the scancode, you need to ask for it; but it's a simple read from a memory (or I/O if it's a separate address space) position. If only the 8042 were not ROM-based ... <sigh> ... not that it couldn't do that if on used, say, an i8742. What I want is a simple parallel 7-bit-ASCII-with-strobe output. Over the past 15 years it's become increasingly difficult to find those "plain-old-ordinary" keyboards that were used in the days of the Z80, 6800, and 6502, when people built their own systems and didn't want to buy a terminal. Jan No matter what sort of keyboard-scanning MCU it uses, the on-board scanning MCU has to debounce its scan in order to ensure that its output is unambiguous. The PC keyboard protocol generates a make code and a break code for each key. Those are debounced at the keyboard. If one were to follow your reasoning, it would mean that each and every communication between any microcontroller-based device would first have to be debounced. That's just not the case. RE |