Hi Matrix Team,
I would like say thanks to you guys for added MCP23017 & MCP23S17 modules in Flowcode8. I have tried with both I2C and SPI (MCP23017 & MCP23S17) demo boards, both are not working. MCU is ATMEGA128A. I have attached my code here. I didn't see any error/Warning while compile. please advice.
Note: I just leave it "INTA,INTB" pins as open.
Karthick.
IO Extender with MCP23017 & MCP23S17 issues [SOLVED]
Moderator: Benj
-
- Posts: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
IO Extender with MCP23017 & MCP23S17 issues [SOLVED]
- Attachments
-
- MCP23017.fcfx
- (8.52 KiB) Downloaded 189 times
-
- MCP23S17.fcfx
- (8.69 KiB) Downloaded 192 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: IO Extender with MCP23017 & MCP23S17 issues
Hello Karthick,
Many thanks for letting us know.
I've just looked at the component again and I had accidentally put the register addresses in decimal instead of hex. All seems to be working fine now. You can get the latest fixes now by using the Help -> check for updates menu.
Many thanks for letting us know.
I've just looked at the component again and I had accidentally put the register addresses in decimal instead of hex. All seems to be working fine now. You can get the latest fixes now by using the Help -> check for updates menu.
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: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: IO Extender with MCP23017 & MCP23S17 issues
Dear Ben,
Thanks. Even now I can control only PA0 and PB0 ports in 23017 . Other ports are still not working. Please see the logic analyzer screen shot. I switch each port ever 10ms. Even I have tried individually by port by port,but no output. Please advice.
Also I have tested the SPI 23S17 component and the result is same phenomenon as I2C ? Also I didn't see the external slave address option in component property window for MCP23S17. Please help to check.Thanks
Thanks. Even now I can control only PA0 and PB0 ports in 23017 . Other ports are still not working. Please see the logic analyzer screen shot. I switch each port ever 10ms. Even I have tried individually by port by port,but no output. Please advice.
Also I have tested the SPI 23S17 component and the result is same phenomenon as I2C ? Also I didn't see the external slave address option in component property window for MCP23S17. Please help to check.Thanks
- Attachments
-
- MCP23S17 all port.fcfx
- (10.06 KiB) Downloaded 204 times
-
- MCP23017 with flowcode.PNG
- (106.67 KiB) Downloaded 1343 times
-
- MCP23017 all port.fcfx
- (9.78 KiB) Downloaded 189 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: IO Extender with MCP23017 & MCP23S17 issues
Aha, many thanks for letting us know. I've spotted an additional bug in the WritePortPin macro when using a pin greater than pin0, I was testing previously using the WritePort macro which is working correctly.
The updated components should now be available and hopefully should all be fixed now.
Let us know how you're getting on.
The updated components should now be available and hopefully should all be fixed now.
I've now added this and added a 9th option for don't use if you don't wish the addressing to be switched on.Also I didn't see the external slave address option in component property window for MCP23S17. Please help to check.
Let us know how you're getting on.
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: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: IO Extender with MCP23017 & MCP23S17 issues
HI Ben,
Thanks . All the ports are working now other than PB7. I checked with 2 demo MCP23S17 PCBA's. I just tested only SPI. I will test I2C tomorrow.
Thanks . All the ports are working now other than PB7. I checked with 2 demo MCP23S17 PCBA's. I just tested only SPI. I will test I2C tomorrow.
- Attachments
-
- MCP23S17 all port.fcfx
- (10.06 KiB) Downloaded 199 times
-
- MCP23S17 with flowcode.PNG
- (44.58 KiB) Downloaded 1328 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: IO Extender with MCP23017 & MCP23S17 issues
Many thanks for letting me know.
Port B pin 7 is working well for me with the SPI version (port write and pin write) so maybe check your connections are ok? Strange for two boards to have the same problem? Hmm.
Could it be anything to do with your pull ups that you are enabling? To enable pull ups on all port pins use the value 255 in the parameters for the function.
Port B pin 7 is working well for me with the SPI version (port write and pin write) so maybe check your connections are ok? Strange for two boards to have the same problem? Hmm.
Could it be anything to do with your pull ups that you are enabling? To enable pull ups on all port pins use the value 255 in the parameters for the function.
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: 74
- Joined: Thu Nov 30, 2017 3:21 am
- Has thanked: 4 times
- Been thanked: 9 times
- Contact:
Re: IO Extender with MCP23017 & MCP23S17 issues
Dear Ben,
Now both SPI and I2C (MCP23017 & MCP23S17 ) Flowcode8 modules is working perfectly. Finally I found the solderability issues on my SPI demo board. Now both boards are (MCP23017 & MCP23S17 ) working fine. Thanks for your help.
Now both SPI and I2C (MCP23017 & MCP23S17 ) Flowcode8 modules is working perfectly. Finally I found the solderability issues on my SPI demo board. Now both boards are (MCP23017 & MCP23S17 ) working fine. Thanks for your help.