Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need help 3x4keypad to PIC16F84A microcontroller

Status
Not open for further replies.

juan12345

New Member
i need help for my project in electronics i dont what to do im confused

of the circuit diagram of the keypad to PIC16F84A.. i buy a keypad that has

7 pins 3columns and 4 rows thought i need to connect a voltage to the keypad

so that the PIC can detect input? but where to put voltage what pin? im ver

confused!! help me plz... i'll vow if u can solve my problem T_T
 
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.
 
actually i test it i place a voltage in the 4rows but but when i press the number

1 button it has the same power value in 4,7,and * i'm really mess up... please help me
 
The situation you have encountered is due the way that the keys are being connected.

Just use the phase "matrix keypad" in Google and you will get an example right at the first hit.
 
The keypad is arranged as in this attachment.
 
Last edited:
kjennejohn said:
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.

Think about it.
kenjj

Dear friend Kenjj,

You may want to take another look at Pommie's schematic and "think about it" yourself (grin).

Setting more than one pin as an output at opposite states could damage the PIC if the wrong two switches are pressed at the same time.

Regards, Mike
 
Hi Juan,

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?

Mike
 
Why give it all away?

Mike said:
Dear friend Kenjj,

You may want to take another look at Pommie's schematic and "think about it" yourself (grin).

Setting more than one pin as an output at opposite states could damage the PIC if the wrong two switches are pressed at the same time.

Regards, Mike

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.

Later!
kenjj
 
Juan,

Here's a page of references from a PICLIST search. A couple are interesting, like the 4x4 keypad using 4 pins and 8 diodes.

Have fun. Regards, Mike
 
Also known as N-Key Rollover, it happens...

Mike said:
Matt,

Please tell us about "the 3 key curse". I've not heard of that before.

Mike

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
 
Mike said:
Matt,

Please tell us about "the 3 key curse". I've not heard of that before.

Mike

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.

Mike.
 
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.
 
my only problem is the schematic diagram of the keypad to the PIC i dont know where to put +5v in the 7 pins of the keypad. please help me!!!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top