Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
i need to display keypad value on uart. please chk embedded c code. i wrote the code but its not working correctly plz chk the code given below:
#define keyport PORTD //keypad connected to PORTD
#define col1 RD0 //column 1
#define col2 RD1 //column 2
#define col3 RD2 //column 3
#define col4 RD3 //column 4
#define TRUE 1 //some defines
#define FALSE 0
const unsigned char character_from_keypad[4][4]={
{'0','1','2','3'},
{'4','5','6','7'},
{'8','9','A','B'},
{'C','D','E','F'}
};
void key_init()
{
TRISD=0x0F; //make Rows as o/p and cols are i/p
keyport=0xFF;
}
use the MM74C922N keypad encoder. its makes it so much easier, because by configuring the debounce and scan time periods you dont have to bother about them. all tht you hav to do is read the data from the IC...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.