??? 05/28/06 22:58 Read: times |
#117205 - really, you can't have it both ways Responding to: ???'s previous message |
Scanning is an ongoing process if you don't want to miss a keystroke. You can, of course, use external hardware, but most people want to avoid that by scanning from the MCU. If you just scan every 1/60 second, that is probably frequently enough. 1/30 is probably frequently enough too. It's up to you. However, if you don't want to miss a keypress, you have to do it all the time.
There are external keypad scanners, e.g. the NSC 74C922 and 923 for 16- and 20-key keypads, respectively, but the added cost can be a problem when you get to review. They often are priced considerably higher than a dedicated 805x would be. They do, however, generate a strobe which will serve as an interrupt, and then present the code representing the key they've sensed pressed. A pair of priority encoders can be pressed into service, too, or you can build a hardware scanner. I always believed the purpose of MCU's, however, was to reduce the clutter of hardware. RE |