Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

alphanumeric 3X4 keypad

Status
Not open for further replies.

moahmed ragab

Newbie level 4
Joined
Jul 15, 2013
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
38
Dears,

kindly i want alphanumeric 3X4 keypad code on MikroC Pro.

Best Regards,
 

Make the Keypad's ROW pins connected to PIC as Output , and column pin as Input using TRIS Register
Then using PORT register give a LOW Logic to Rows Pins and HIGH Logic to Columns pins in the main Function


Now use either LCD or Serial Terminal To view the Keypad Out Put and Initialize the same whatever you are using ,

then in While(1)
functions assign a
Code:
 (unsigned char Read_keypad ; ) and make it equal to PORT register like
Suppose you have assigned PORTB pins for keypad interfacing then
HTML:
Read_keypad = PORTB ;
now apply a if condition
(
Code:
if(Read_keypad != High for the column + Low for the Rows
It checks for the row like 1st, 2nd , 3rd and 4th
)
Checking for the Row
1. Make the the particular Row pins as LOW and rest of the pin as HIGH
and now in 1st row suppose there are three keys 1 , 2 and 3
apply logic
Code:
if(1st columns Pin == 0 )
{
Print_LCD ot UART ("Key 1 Pressed"); 
}
if(2nd column pin == 0 ){print ("2" presses);}   if(3rd column pin == 0 ) {print ("key 3 pressed")
}
Now In the same way Check for all Rows means Four checking and for each row there are three checking for Column Pins
This Variable will always read the key presses
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top