You are very strong, really very well your program And me I am not able to make this program thank you
You are very strong, really very well your program And me I am not able to make this program thank you
Hi there, I'm trying to use your code on a 16F648A, and getting unexpected results. I've read the spec sheet till I'm blue in the face and well, maybe I've missed something. But I thought I'd ask if you've done anything other than hook the outputs of the PIC to the Keypad and then hook into the inputs. ie, have you got any resistors or anything else inline? I seem to be getting some keys read sometimes with little or no rhyme or reason.
There is a pull up resistor from the MCLR to power and that is really the only necessary external "stuff" needed to play with it. The finished circuit has filter caps, xsistors, relays, etc. to make it functional. I used a standard 12 key keypad and the only thing I can think of is to make sure you have your rows, columns correct on the keypad. The keypad matrix code was picked up from the web, all I did was put in the stuff to lock, unlock the door. Start by removing all the extraneous code to the keypad and see if it returns the correct key sequence every time. You might need a debounce, although I have not found the need. This basic code has been running for several years with no issues at all. I did find that once I powered up the chip initially I had to do a chip clear by grounding the MCLR pin momentarily. I put a switch on the board to do that. I think it's because the power isn't real clean and I never bothered to put a cap and resistor on the chip to hold it down while the power stabilized. Other than that nothing comes to mind.
Thanks very much for the response. I had a dodgey switch arrangement for the program switch and it was letting that pin float a bit so I changed it out and now it works great. Thanks for posting that code, very handy.
Sorry for the double post but I thought I'd point out that if a would-be intruder applied say 12V or so to a few of the keys on the keypad the poor PIC would writhe in pain a bit then squirt some output to the garage door relay and Bobs your uncle... you're in. (assuming there are no measures taken to stop excess voltage being applied to any of the pins). I'm thinking I'll put a bunch of zeners inline.
Bookmarks