Hi i've been trying to figure out my mistake for a while now, but i just can't seems to hit a solution.
My Setup
I have an arduino UNO hooked up to a MCP23017 through SDA and SCL pins.
On the MCP23017 i have 8 LED from GPA21 to GPA28 of the MCP.
I know my setup is right as when i compile my code through the arduino IDE, i have the LEDs to lite up according to the data i passed through.
My issue is that i can not reproduce this with my flowchart.
My component address is 0x20 and the register's address on which the LED are is 0x12.
Therefore i used the Initialise Macro, followed by the SendByteTransaction Macro with the following values:
Devide_ID: 0x20
AddrH:0x00
AddrL:0x12
Data:170
After compiling nothing happens. What is most puzzling is that i have a logic analyzer hook to SCL and SDA pins. When compiling with arduino IDE the signals shows but when compiling in Flowcode i have no signal showing up on the bus.
Can anyone help me figure out what i am missing ?
thanks*
Flowcode I2C + Arduino UNO + MCP23017 I/O
Moderator: Benj
Flowcode I2C + Arduino UNO + MCP23017 I/O
- Attachments
-
- Arduino MCP23017.fcfx
- My MCP23017 Flowchart
- (5.29 KiB) Downloaded 377 times
- 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: Flowcode I2C + Arduino UNO + MCP23017 I/O
Hello,
It looks like the SendByteTransaction won't work with the MCP23017 device as the device has only one address byte, rather then the 2 used by the transaction macro.
Here's a slightly different version of your program that hopefully should work correctly.
It looks like the SendByteTransaction won't work with the MCP23017 device as the device has only one address byte, rather then the 2 used by the transaction macro.
Here's a slightly different version of your program that hopefully should work correctly.
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
Re: Flowcode I2C + Arduino UNO + MCP23017 I/O
Hi Benj,
I could finally get back to it.
I tried the new flowchart, unfortunatly it still does not work.
I'm stuck as the data showed in the console when simulating is consistent with the protocol of the MCP23017.
So it should work, but it does not.
The setup still works when compiling using the Arduino IDE.
In another Topic related to the MCP23017 (but with PIC) you mentioned to disable "Extended CPU" i can't seem to find this option for Arduino chip in flowcode.
Could it be the answer ?
I could finally get back to it.
I tried the new flowchart, unfortunatly it still does not work.
I'm stuck as the data showed in the console when simulating is consistent with the protocol of the MCP23017.
So it should work, but it does not.
The setup still works when compiling using the Arduino IDE.
In another Topic related to the MCP23017 (but with PIC) you mentioned to disable "Extended CPU" i can't seem to find this option for Arduino chip in flowcode.
Could it be the answer ?
Re: Flowcode I2C + Arduino UNO + MCP23017 I/O
Hi Benj,
Sorry for the late reply I thought I had already given the feedback.
The new flowchart does not work either although in the simulation it seems to send the right commands.
Today I received a logical signal analyzer, I ll look into it later.
Sorry for the late reply I thought I had already given the feedback.
The new flowchart does not work either although in the simulation it seems to send the right commands.
Today I received a logical signal analyzer, I ll look into it later.
-
- Posts: 444
- Joined: Tue Apr 15, 2014 4:19 pm
- Location: Kajaani, Finland
- Has thanked: 345 times
- Been thanked: 227 times
Re: Flowcode I2C + Arduino UNO + MCP23017 I/O
cortex wrote:,
Sorry for the late reply I thought I had already given the feedback.
Hi, for some reason your earlier message was not showing up on waiting for moderation. Sorry for inconvience it might have caused.
Ill just keep the good work up!