Andre said: > I put together prototype project using keypad with > individual diodes added to each key and wrote the code > every things working fine now other group took my project > and took all diodes off "bypassed" and same project is > working fine too I do not see any problem. My question is > what's the real reason to use diodes with keypad? Diodes allow "N-key rollover". Gargoyle knows. If you have a matrix ABCD.... x 1234 ....then pressing A1, A2, B1 simultaneously will produce a "phantom contact" at B2 which is indistinguishable from the real thing. While it's presence as a phantom can be inferred it cannot be proven as it occurs simultaneously in this case with B1 and you could instead have a real B2 and a phantom B1. Diodes prevent this. Another possible way is to have resistive contacts of resistance R and note that the phantom path has resistance 2R but I have never heard of that method being used. Diodes are cheap and easy for what they give. Diodes are needed any time you want 3 or more keys to be able to be pressed randomly and simultaneously. Russell McMahon -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist