Hi all. In my current project I'm going to be using a large keypad - something around 64 switches most likely. I'm looking for advice on the best way to handle this. I've had a few ideas, though there are some qualifications I should talk about first. The main one is multiple keypresses. Not only does my device need to detect and handle multiple keypresses, but it may have to deal with chaining as well (press A, press B, release A, press C). I might be able to get away without chaining if it's too much hassle. On the software side, I'm looking at setting up 8 status registers, then having a bit set when a key is successfully detected and debounced. When it comes time to perform an action based on the keys, a simple movf keystat1, f will then let me check the Z bit to see if anything has changed. If it has, I can then do an individual bit check. In fact, I might also setup a global "something has changed" register. Each bit will represent one of the 8 status registers. Then I can zero check that global register, then figure out exactly which registers have changed...hmmm... Anyway, here are some ideas I've had: 8x8 matrix. This would likely be the least hardware intensive method. The downside is that handling all the scanning and debouncing states might be a bit intensive. I suppose I could simplify it by just treating it like 4 independant 4x4 matricies. I've never done a matrix this large, it's a bit daunting. Massive shift register. It would be easy to shift in 64 bits. Debouncing might be an issue though. At the very least this might simplify some of the board layout. Undecided on this one. Slave PIC button processors. Using a couple of lower 40 pin PICs, I could make a couple of button processing engines. An advantage to this is that every button gets its own I/O line. The slave handles all the debouncing, and just responds to the master's request for new buttons pressed. Downside is that I'm now developing for more than one processor and the chance of problems goes up. Alright...that's it for now. All comments appreciated! Thanks! 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