Actually, you should figure this out on your own. If this is for school, then it would benefit you more to use your head. Sorry if this is a disappointment to you, but it is in your best interests. To partialy answer your question, you could get a multimeter, then apply voltage to each of the pins, and see if you can find one pin that will give you the power input.
anything come to mind as to usage? Like, use three pins to drive the column side of the switches (C0 -C2) low/high/low or high/low/high and use four pins to see which row pin (R0 - R3) this signal shows up on, if any. No signal in means no switch pressed.
anything come to mind as to usage? Like, use three pins to drive the column side of the switches (C0 -C2) low/high/low or high/low/high and use four pins to see which row pin (R0 - R3) this signal shows up on, if any. No signal in means no switch pressed.
You should probably take a peek at Nigel's tutorials and other references available on the internet and then get back with us if you're still struggling. Please tell us which PIC you're using? What pins are available on it for connection the keypad? What language are you using? Assembler, C?
I figured out how the keyboard worked on my Commodore64 in the late 80's. A 3x4 keypad is small change indeed. However, I didn't want to tell Pommie outright how it worked. He could have wired up the keypad to his processor using my response as a guide and noodled it out. It's not like I said this was the final solution.
when the user mashes multiple buttons at the same time. This can be eliminated by using a lookup table. Every single button press gets a unique value: 1, 2, 4, 8, etc. Each unique value is used to refer to a particular spot in the table. If you mash two or more buttons, the processor comes up with a value not used in the table. At this point it reports an error and prompts the user to try pressing the key again.
There are other methods, but this one is pretty straightforward.
kenjj
I assume that the curse refers to the fact if you press three keys that are on the corners of a rectangle then the key on the fourth corner appears to be pushed.
My understanding of N key rollover is the ability to detect the sequence in which keys were pressed when multiple keys are pressed. If you try pressing "A" on your PC keyboard and then simultaneously press "B" then release "A" you get the sequence "AAAAAABBBBBB" with the appropriate initial delay and repeat delay. This is achieved in software.
I like the 4*4 keypad on 4 pins method. The only drawback being the inability of detecting two keys and therefore making 2 key rollover produce the wrong sequence.
Hi Mike actually my project is a Programmable door lock and i used PIC16F84A and mikroC if i press the 4 pin code the stepper motor will turn and 1 LED will light actually im having problem at the keypad how can i detect the input and also the schematic for the keypad to PIC because i buy this keypad(see pics below) **broken link removed**
Can't help you with C, but my tutorials include an electronic lock with a HEX keypad, written in assembler. You should be able to include the assembler section, or rewrite it in C if you wanted.