(SOLVED) 7i73 & matrix_kb - setup help needed

More
29 Dec 2022 18:12 #260505 by spumco
I'm having trouble getting my keypad working and could use some guidance.

LCNC 2.9
7i76ED & 7i73

4x8 keypad, no LCD: (W5 down, W6 up, W7 down)
Encoder & no analog software mode: sserial_port_0=00xxxx

keypad is a hand-wired grid of momentary NO switches in rows and columns. No diodes or resistors.
Rows connected to 7i73 pins 7-10 (KEY4 - KEY7)
Columns connected to 7i73 pins 11-18 (KEY8 - KEY15)

Main HAL:
loadrt matrix_kb                    config=4x8
...
addf [HMOT](CARD0).read         servo-thread
...
addf matrix_kb.0                servo-thread
addf [HMOT](CARD0).write        servo-thread

IO HAL
net keypad              <=  [HMOT](CARD0).7i73.0.1.keycode
net keypad              =>  matrix_kb.0.keycode
...
net BTN-FRO-DEC         <= matrix_kb.0.key.r0c0
net BTN-FRO-RESET       <= matrix_kb.0.key.r0c1
... (remainder of key to signal connections)

I'm not getting a response from any keypress in halshow.

Tried switching to "s" option (config=4x8s) and could see the 7i73 rows blinking in halshow, but that didn't change the lack of button response.

7i73.0.1.keycode and matrix_kb.0.keycode stay at "64" regardless of loadrt config or button presses.

Suggestions for troubleshooting?

Thx,
Ralph
 

Please Log in or Create an account to join the conversation.

More
29 Dec 2022 18:50 #260507 by PCW
You might "halscope" the keycode as the changes only last one servo thread period

Please Log in or Create an account to join the conversation.

More
29 Dec 2022 22:15 #260512 by spumco
There's no change to matrix.0.keycode or ...7i73.0.1.keycode in halscope.

Please Log in or Create an account to join the conversation.

More
29 Dec 2022 23:41 #260519 by PCW
Are you sure you have:

1. The correct jumpering for a 4x8 keypad
(W5,W6,W7 = DOWN.UP,UP)

2. You cycled power on the 7I73 after changing the jumpers

3. You are using the correct P1 pins (KEY4..7 are the row outputs for 4X8 mode and KEY8..18 are the column inputs)

I can see the change in the keycode just by setting the jumpers
and shorting P1 pins 9 and 11 (KEY6 and KEY8)

Please Log in or Create an account to join the conversation.

More
30 Dec 2022 00:27 #260525 by spumco

Are you sure you have:

1. The correct jumpering for a 4x8 keypad
(W5,W6,W7 = DOWN.UP,UP)

2. You cycled power on the 7I73 after changing the jumpers

3. You are using the correct P1 pins (KEY4..7 are the row outputs for 4X8 mode and KEY8..18 are the column inputs)

I can see the change in the keycode just by setting the jumpers
and shorting P1 pins 9 and 11 (KEY6 and KEY8)
 

I have the jumpers DOWN-UP-DOWN for a 4x8 and no LCD.

Power has been cycled multiple times since setting the jumpers.

I believe I'm using the correct pins on P1.
Rows connected to 7i73 pins 7-10 (KEY4 - KEY7)
Columns connected to 7i73 pins 11-18 (KEY8 - KEY15)


I've tested continuity in case I had some crossed wires (i.e. column shorted to a row) and there are no shorts.

When you write "...change in keycode just by shorting P1-P9 to P1-P11", do you mean in halshow or halscope?

If in halscope, can you please let me know your exact setup/settings so I can duplicate?  I'm really very shaky with halscope.

 

Please Log in or Create an account to join the conversation.

More
30 Dec 2022 00:45 - 30 Dec 2022 00:55 #260526 by spumco
In halshow with nothing physically connected:

hm2_7i76e.0.7i73.0.1.input-00 through input-07 are low
hm2_7i76e.0.7i73.0.1.input-08 through input-15 are high
hm2_7i76e.0.7i73.0.1.output-00 through output-17 are low

EDIT
Also found the following info in halshow parameters if that helps figure out what I'm doing wrong:
Warning: Spoiler!
Last edit: 30 Dec 2022 00:55 by spumco.

Please Log in or Create an account to join the conversation.

More
30 Dec 2022 01:42 #260528 by PCW
Those parameters match mine.

Here's what I get on halscope when I short P1 pins 9 and 11: ( you could try the same thing, copying my halscope settings)


 

The keycode sequence is is  64 (idle), 208 (Keypressed) 144 (key released) 0 (all keys up)
Attachments:

Please Log in or Create an account to join the conversation.

More
30 Dec 2022 02:40 #260529 by spumco
Here's my halscope.  No difference when shorting or disconnecting 9 & 11:
 

I see that your 7i73 is identified as 7i73.0.0.keycode, while mine is 7i73.0.1.keycode.

Have I done something wrong with the address?

 
Attachments:

Please Log in or Create an account to join the conversation.

More
30 Dec 2022 03:09 #260532 by PCW
The number is different because My 7I73 is connected to the first (and only)
sserial chan (0) on a 7I96S, on a 7I76E, the expansion sserial channel is
channel 1. This only affects the pin/parameter names.

Is it possible you have the pins numbers wrong?

P1 pin 9 is the 5th pin from the top outer edge of P1 and pin 11 is
6th pin from the top outer edge of P1.

Please Log in or Create an account to join the conversation.

More
30 Dec 2022 03:38 #260536 by spumco

Is it possible you have the pins numbers wrong?

P1 pin 9 is the 5th pin from the top outer edge of P1 and pin 11 is
6th pin from the top outer edge of P1.
 


I doub it, but anything is possible at this point.

I'm using 40p & 34p ribbon cables to screw terminal breakout boards.  The breakout terminals are numbered 1-40 and 1-34.

I'll pull the ribbons and start checking continuity between the 7i73 pins and the BOBs and make sure the screw terminals are correct.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.195 seconds
Powered by Kunena Forum