On 12/27/05, Wouter van Ooijen wrote: > For ease of programming a SR chain seems top for me. You might want to > look at SRs that have a delayed output, to avoid clock skew problems. > You will need a pull-up for each switch. But an 8x8 matrix is only a > little bit more work. But you will need a diode on each switch to be > able to detect multiple key presses correctly. Ok, I'll admit it, I never really understood the need for diodes. If I'm controlling the scan, how do they help? Assume that I'm driving columns and reading rows. If I drive column A, then read in all the rows, I know that any high line must be from a column A key, right? Maybe I'm just not visualizing the schematic correctly in my head. I've tried googling around, but I can't seem to come up with an example. Help? > For debouncing: just take care that you scan slower than the longest > devounce time (50ms is a good upper limit if the switches do not > document this). So with a 20 Hz scan frequency you can forget about > bouncing. Doesn't this assume that the keypresses will always happen directly after a scan, so by the time the next scan rolls around it's stopped bouncing? I guess having a low scan rate does ensure that even if a key is bouncing over one scan, by the time the next scan rolls around it's finished bouncing. I currently have a 400Hz interrupt handling my encoders, I was going to add a debounce routine in there. If I can just ditch the debounce though, it'll save me processor time. Josh -- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. -Douglas Adams -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist