i2c Keypad

Please add any feature requests for Flowcode version 7 here

Moderator: Benj

Post Reply
ylanchec
Posts: 54
Joined: Mon Jan 14, 2013 10:14 pm
Has thanked: 2 times
Been thanked: 2 times
Contact:

i2c Keypad

Post by ylanchec »

Hi,

In the current version, there is no i2c keypad...

Is it in the roadmap ?

Best regards

Yannick
Attachments
I2C_Keypad.fcfx
(11.78 KiB) Downloaded 314 times
I2C_Keypad2.png
(374.09 KiB) Downloaded 722 times
i2c_keypad_4x4.jpg
i2c_keypad_4x4.jpg (203.92 KiB) Viewed 8076 times

User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times
Contact:

Re: i2c Keypad

Post by Jay Dee »

I have also been doing my own thing with I2C ( PCF8574, PCF8574A) Keypads, combined with an I2C LCD it is a great 2wire+power debugging tool I add to most projects.
If a Matrix Component was built to for I2C reading of generic keypads, it would be handy to be able to select the I/O assigned to the Rows and Cols.. since it can vary depending on what hardware your using.
J.

ylanchec
Posts: 54
Joined: Mon Jan 14, 2013 10:14 pm
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: i2c Keypad

Post by ylanchec »

Yes Jay Dee, it will be very usefull to have basic things working on i2c, and on the same channel too.

If i use the i2c keyboard from FC7 and a i2c sensor, i'm not sure that it will work on the same channel.

The i2c keypad (with config of row + col + key) is very important because the normal keypad ask 8 wires !!!

Happy New Year 2017

User avatar
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: i2c Keypad

Post by Benj »

Hello and Happy New Year,

The PCF8574 looks interesting and similar to the MCP23S17 which I've played with previously.

To do this properly we need a way of adding external I/O pins which the components can then control directly via abstraction.

This in theory then allows all components to work via I/O expanders, makes the MIAC system run smoother and also allows Arduino style pin mapping to be much easier.

We have a plan for this but it's a big addition and is currently pencilled in as a version 8 feature.
If i use the i2c keyboard from FC7 and a i2c sensor, i'm not sure that it will work on the same channel.
This should be fine. Initialise both components and then call the individual macros as needed. All components will run at the speed and bus settings as imposed by the properties of the last component to be initialised.

For info SPI should also work fine like this as long as the slave devices each have their own unique chip select pins.

ylanchec
Posts: 54
Joined: Mon Jan 14, 2013 10:14 pm
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: i2c Keypad

Post by ylanchec »

Hi Benj !

And happy new year too !

So you plan to make this component in the next version ?

But what is the release date for fc8 ?

Best regards

Yannick

User avatar
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: i2c Keypad

Post by Benj »

Hi Yannick,

As I see it, It's probably not simply an extra component its a substantial engine upgrade.

You would add the PCF8574 or MCP23S17 component and that would essentially provide extra I/O pins to your target device which you could then select in the keypad component, the LCD component or any other component using simple digital I/O, the fact that your using an I/O expander would become transparent to your Flowcode program.

Pencilled in for v8 as we still have a lot planned or in progress for v7. v8 is likely at least a year down the road.

ylanchec
Posts: 54
Joined: Mon Jan 14, 2013 10:14 pm
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: i2c Keypad

Post by ylanchec »

Hi Benj,

You have a PCF8574 in FC7 ? where ? and how to tell tu use the pins for the keypad ?

Do you have an example ?

Thank you

Yannick

User avatar
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: i2c Keypad

Post by Benj »

Hi Yannick,

Not currently but it should be possible to control the PCF8574 using the Master I2C component.

Using the PCF8574 as a keypad should be as easy as setting one of the column pins high and then reading the row pins. If any of the row pins are high then you know that the switch is pressed at the current column and row address. Repeat for all columns or until you find a pressed switch.

ylanchec
Posts: 54
Joined: Mon Jan 14, 2013 10:14 pm
Has thanked: 2 times
Been thanked: 2 times
Contact:

Re: i2c Keypad

Post by ylanchec »

Hi Benj,

In the fc7 file "i2c_keypad.fcfx" (top of discussion), i use the i2c component, and it works with the pcf8574 ...

but i havent any keypad to simulate in fc7.

Best regards.

Yannick

Post Reply