Page 1 of 1

New component creation

Posted: Thu Nov 23, 2017 12:27 am
by keithh534
I'm interested in purchasing a license for v7, but am hesitant until I can figure out hot to create a new component. I've read the post on creating a new component, but my attempts to do so have been unsuccessful. I need to create an 81-key keypad. Any help would be sincerely appreciated.

Re: New component creation

Posted: Thu Nov 23, 2017 12:39 pm
by johnsondav
Hi Keithh534

Welcome to our forum. This looks like a very interesting project, as I am sure others would be interested in using for their projects.

Regards
Dave

Re: New component creation

Posted: Thu Nov 23, 2017 2:02 pm
by Benj
Hello,

The current keypad components work by multiplexing. we use a 3 x 4 array to allow us to sample 12 keys. The current keypad component allows for a maximum of 4 x 4 or 16 keys.

If you had an array of 8 x 8 then you could sample up to 64 keys. There are a number of different arrangements to achieve 81 keys with a bit of redundancy (spare keys) if you needed it. For example 8 x 11 would work quite well.

In creating a new component there is really two jobs.

1) creating the various pin properties
2) creating the macro to perform the multiplexing and check for key presses.

I take it you don't need multiple key presses to be active at the same time? If you do then this technique is not going to work.

Re: New component creation

Posted: Thu Nov 23, 2017 8:20 pm
by keithh534
Hi Benj,

Thank you, but your reply doesn't really address my problem.

It's not that I don't know what needs to be done, but how to do it. If you could give me some general samples of what you're referring to in your "jobs" list, that would be more helpful.

Regards,
Keith

Re: New component creation

Posted: Thu Nov 23, 2017 8:54 pm
by Docara
Hi Keith,

Found this recently MAX7360 from Maxim might be of use to you . I think it is part of a family with I2C interface

https://www.maximintegrated.com/en/prod ... X7360.html

Not used one would be interested to know ow you get on with it

Matt

Re: New component creation

Posted: Fri Nov 24, 2017 11:57 am
by Benj
Hi Keith,
1) creating the various pin properties
This video should help to show you how to do this.
https://www.youtube.com/watch?v=xhvrwILJA38

Also there is content on the wiki to help.
https://www.matrixtsl.com/wikiv7/index. ... a_Property
2) creating the macro to perform the multiplexing and check for key presses.
Creating the macro is fairly straight forward, create a macro as you would normally containing the following code.
Loop through the columns setting a single column high at any one time
Inside this Loop through the rows checking for a valid key press.

Looking at the C code for the existing keypad component should help.