i m doing my first electronic project using pic16f877a and keypad and lcd.my code works well.(when i press a button , that key will display on lcd) but i still dont understand how pic understand which key is pressed. is there interrupts involved with that procedure. ( in my code lcd at portB and and keypad at portd)
i don't know the pic microcontroller
but i think that the logic behind it will be same as avr.
the main logic is that microcontroller use 4keys as input and other 4 keys as output.
it continuously scan the input port
which ever key will be pressed it will detact 1 at that input pin as all column pins are connected to vcc.
simple
if you find it helpfull then please press the helpful symbol below it
The ports feed as input to the pic, the pic will test for all ports at high rate, normally a keypad will be 4 or 5 inputs, the pic uses the code btfss/btfsc depending on your configuration.... it basically works like a switch.
for detecting, the keypad uses the technique of rows and columns.
dear all
for interfacing 4*4 keypad with avr microcontroller we required 8 pins of microcontroller.
can anybody tell me that is there any way to connect it using 2 or 3 pins (like as serial comm.)?
dear all
for interfacing 4*4 keypad with avr microcontroller we required 8 pins of microcontroller.
can anybody tell me that is there any way to connect it using 2 or 3 pins (like as serial comm.)?
dear all
for interfacing 4*4 keypad with avr microcontroller we required 8 pins of microcontroller.
can anybody tell me that is there any way to connect it using 2 or 3 pins (like as serial comm.)?