I have a pic16f84 microcontroller circuit ,I wan to put a keyboard for it to receive a password to work,but I 've used all R0-R7 except R3 ,how can I do that and what part of program should I add to mine?
I have a pic16f84 microcontroller circuit ,I wan to put a keyboard for it to receive a password to work,but I 've used all R0-R7 except R3 ,how can I do that and what part of program should I add to mine?
I 've already used all my I/O pins except (RA3 & RB7) ,and I want a 4*3 keyboard . I think I should have a swithching in my I/O pins between keyboard and my LCD. how can I do this switching in hardware and whitch part of program should be added ?
You could interface a standard AT keyboard, which would require only 2 pins. Or you could switch to a PIC with more I/O pins (Maybe the 16F628 or even the 16F87x series). Multiplexing I/O pins alternatively often involves using D-latches, such as the 74573.
I 've already used all my I/O pins except (RA3 & RB7) ,and I want a 4*3 keyboard . I think I should have a swithching in my I/O pins between keyboard and my LCD. how can I do this switching in hardware and whitch part of program should be added ?
thank you very much for your quick and good solution ,
I prefer to add a pic16f84 on my board,then I need a program for it and connect perfectly to my first PIC.
I 'll thank you if you help me in writing a program(ofcourse compatible with PIC16F84) whitch accept a password by a keyboard ,then compare it and if it was true gives a 1 in one output pin ,then I can change my program to check if a right password is enterd begin its work.
Using a resistor matrix with your keypad, you can interface a 4x3 or even larger ones using a single A/D channel. I've done it before with a 4x4 matrix keypad and it works very well. IIRC, microchip has an application note on how to do it. It consists of using a small grid of resistors to create unique voltage divider values for each key. With each unique divider, you get a unique value with the A/D.