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.

Modified library for 4x3 keyboard mikroc, pic16f877

Status
Not open for further replies.

J Pancake

Newbie level 2
Joined
Apr 2, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,296
Hi

Im really new at this so very thankful for any help.

Im using a pic16f877 and want to use a 4x3 keyboard. I understand that mikroc has a library to handle keyboards (interrupts) but it is made for 4x4 types. The example that microc has in it's example folder is also a 4x4.
They use this line to define the module:

// Keypad module connections
char keypadPort at PORTB;
// End Keypad module connections


But is doesnt work because i dont use all of B0-B7. B3 isnt doing anything on my set up.

Question is: How can i define the module connections so it fits my 4x3? What does this "char keypadPort at PORTB;" line really do?

Thank you in advance!
 

Is my question put in a stupid way or is it no one out there with any clue?
 

Is my question put in a stupid way or is it no one out there with any clue?
There is nothing wrong with your question, but it does seem strange that you post it here, rather than on the MikroE forum, which is dedicated to MikroC.

I have little experience with MikroC or with keypads, but I reckon 4x3 keypad will work exactly like a 4x4 keypad, except that one row of keys will never activate (since the keys do not exist).

You need to be sure that any pull-up resistors, or pull-down resistors are provided as needed, including one on B3 if required.

What does this "char keypadPort at PORTB;" line really do?
I do not know the details, but presumably it does the obvious thing and tells the keypad library that you are using PORTB for your keypad. I guess ports C and D would be alternative options.

Have you consulted the compiler help files? there is usually loads of useful information there.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top