Need help 3x4keypad to PIC16F84A microcontroller

Status
Not open for further replies.
juan12345 said:
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!!!

What part of READ MY TUTORIAL didn't you understand?.
 
I agree with Nigel. There are plenty of examples for wiring and writing code for a multiplexed 3x3 or 3x4 keypad on PICLIST, in Nigel's tutorials, and elsewhere. If you had taken time to look at a couple of them you'd realize you don't really connect 5v to any of the lines. Instead you connect the column and row lines directly to pins on the PIC.

Mike
 
directly to PIC? but what will trigger the input if there no current flowing?
you can detect what button is press by ANDING right? but how did you know if its press when there is no current? or is PIC will give but its input not output.
 
Nigel,

I checked out your Keypad Tutorial and it does a very good job of covering the basics. It's obvious you put a lot of time and effort into providing newcomers with a wealth of information in a relatively easy-to-comprehend format.

Unfortunately, there seems to be a problem with your example Keypad code. It seems the four column lines are configured as outputs with one low and the other three high at any given time. I think this must have been an oversight because if you press a switch on the active low column and another switch on that same row at the same time you'll have a short circuit.

Mike
 

To be 'foolproof' I would have added diodes to prevent that, but I wanted to keep it as simple as possible - as I try and do with all the hardware. The PIC is quite 'happy' like this anyway (pretty bomb proof devices) - although I completely agree it's not 'nice'
 
Nigel,

can i ask favor? can you post the diagram of the keypad together with the diode
so i can experiment with it including what type of diodes thank you nigel so it will be fool proof
 
I don't mean to pick 'nits' but you don't need to add hardware (diodes) to make it foolproof, simply modify TRISB so that only one pin is an output (active low) at any given time. Here's a PICList example, though not a very good one;



Mike
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…