- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello community,
I downloaded the adjustable matrix keyboard developed by Bob Marlowe, thanks to that.
heres the link:http://www.cypress.com/forum/psoc-community-components/component-creation-part-1
There i used the "PortComponent2:
After updating all components, the errors showed by creator were gone. But now comes the problem:
I adjusted the keybaord to a 4x4 matrix and attached a LCD and a to my PSoC 5lp 059,
If I press key 1 on my keypad, nothing happens, the other ones are doing fine, except that the last row is showing the same keys as the third row.
My keypad looks like:
123A
456B
789C
*0#D
I ajdusted the translation table in main.c to a 4x4 matrix. Now like described: key 1 nothing happens and for example key 0, i get an 8 like the row above.
Do I have to change something else in the code?
Thanks in advance,
Alexander
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As usual: Can you please post your complete project, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is not quite polite to hijack the thread of someone else. StudentA askes some questions and I will try to help him in this thread. If you have any issues, please open a new topic in the right forum and give us some information, no need to shout.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
problem update:
I changed the ports of the keyboard, because port 0 on my psoc had some trouble with my lcd some weeks ago.
Result, the last row is now working fine. 0 and D are displayed and * and # do what they are meant to do.
So the only problem left is why the first key, in my case the 1, is not displayed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Except placing code into generated files (which gets overwritten at next build) I cannot see any misplaced lines.
Set a breakpoint into line 201 of MyKeypad.c and press any key.
Check cable connections.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Bob,
I have the same problem: the first key in the Translation_Table not recognised at a 4x4 MAtrix Keypad.
(all other keys works perfectly !)
I have a different pin layout:
CYCODE char8 Translation_Table[MAXKEYVALUE ] = {
'D', 'C', 'B', 'A',
'#', '9', '6', '3',
'0', '8', '5', '2',
'*', '7', '4', '1'
};
In my case the first and the only problematic key is a 'D' in my case (D is does not matter specifically, the first one status is the important).
I debuged your code and found the followings:
background -I checked all other keys -the result under CY_ISR(MyKeyPad_1_Debounce):
'Key' NewKey value (in decimal)
'1' 15
'4' 14
'7' 13
'*' 12
'2' 11
'5' 10
'8' 9
'0' 8
'3' 7
'6' 6
'9' 5
'#' 4
'A' 3
'B '2
'C' 1
'D' 0
So, I suspect that since the only button with NewKey value 'full' zero (0b0000 0000) is the 'D' - all the others has some non-zero value (contains at least one 1 in binary )- this could be the problem -see later.
As a result your if condition when you check 'Nothing has happened' allways return at 'D' keys (NewKey and Debounced_Keys are 0) as well unfortunately, see:
if ((uint8)((~NewKey) & (~Debounced_Keys))== 0xffu) // Nothing has happened
{
Debounced_Keys = NewKey;
return;
}
As it allways return (falsely), never will hit any other checks (Any key released, Key pressed seen first time, etc)
You would be kind to comment my findings.
Any quick workaround for this problem (the +1 and -1 'solution' recommended by Anonymus seems like to be not serious) ?
Thanks in advance,
Best Regards,
Péter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
seems that my joy about solving the first problem was too early. I checked the internal connections of my keypad and the connection to the PSoC several times. the problem with '1' is still present. If I now press for example 'A' i get 3A, like the buttons are somehow linked.
what do you exactly mean by breakpoint, how is the code for that.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please use Google to get explained what a 'Breakpoint' is. Read in Creator help about debugging.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
i found and used the breakpoint at the recommended site but not further findings.
I really dont want to offend you since you are the author of this programm 🙂 but did you try the file I uploaded by yourself? Maybe I did something wrong and somehow changed the code?
I am really appreciating any help since I have no idea what could be wrong.
Alex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content