New component creation
Moderator: Benj
-
- Posts: 55
- Joined: Thu Nov 23, 2017 12:21 am
- Has thanked: 15 times
- Been thanked: 12 times
- Contact:
New component creation
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.
-
- Posts: 188
- Joined: Thu Jun 28, 2012 7:29 pm
- Location: Durham
- Has thanked: 86 times
- Been thanked: 186 times
- Contact:
Re: New component creation
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
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
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: New component creation
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 55
- Joined: Thu Nov 23, 2017 12:21 am
- Has thanked: 15 times
- Been thanked: 12 times
- Contact:
Re: New component creation
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
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
-
- Posts: 315
- Joined: Sun Jun 23, 2013 1:29 pm
- Has thanked: 28 times
- Been thanked: 61 times
- Contact:
Re: New component creation
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
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
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: New component creation
Hi Keith,
https://www.youtube.com/watch?v=xhvrwILJA38
Also there is content on the wiki to help.
https://www.matrixtsl.com/wikiv7/index. ... a_Property
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.
This video should help to show you how to do this.1) creating the various pin properties
https://www.youtube.com/watch?v=xhvrwILJA38
Also there is content on the wiki to help.
https://www.matrixtsl.com/wikiv7/index. ... a_Property
Creating the macro is fairly straight forward, create a macro as you would normally containing the following code.2) creating the macro to perform the multiplexing and check for key presses.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel