New component creation

A forum where Flowcode v7 user created components can be shared, discussed and reviewed.

Moderator: Benj

keithh534
Posts: 54
Joined: Thu Nov 23, 2017 12:21 am
Has thanked: 15 times
Been thanked: 12 times
Contact:

New component creation

Postby keithh534 » Thu Nov 23, 2017 12:27 am

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.

johnsondav
Posts: 186
Joined: Thu Jun 28, 2012 7:29 pm
Location: Durham
Has thanked: 92 times
Been thanked: 181 times
Contact:

Re: New component creation

Postby johnsondav » Thu Nov 23, 2017 12:39 pm

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

User avatar
Benj
Matrix Staff
Posts: 14157
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4080 times
Contact:

Re: New component creation

Postby Benj » Thu Nov 23, 2017 2:02 pm

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.

keithh534
Posts: 54
Joined: Thu Nov 23, 2017 12:21 am
Has thanked: 15 times
Been thanked: 12 times
Contact:

Re: New component creation

Postby keithh534 » Thu Nov 23, 2017 8:20 pm

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

Docara
Posts: 283
Joined: Sun Jun 23, 2013 1:29 pm
Has thanked: 21 times
Been thanked: 58 times
Contact:

Re: New component creation

Postby Docara » Thu Nov 23, 2017 8:54 pm

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/products/interface/controllers-expanders/MAX7360.html

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

Matt

User avatar
Benj
Matrix Staff
Posts: 14157
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4080 times
Contact:

Re: New component creation

Postby Benj » Fri Nov 24, 2017 11:57 am

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.
These users thanked the author Benj for the post:
keithh534 (Mon Jan 08, 2018 2:10 am)
Rating: 5.56%