MCP23017

jimhook_uk1
Posts: 13
http://meble-kuchenne.info.pl
Joined: Fri Dec 04, 2020 5:22 pm
Has thanked: 1 time
Been thanked: 3 times

Re: MCP23017

Post by jimhook_uk1 »

Hi Ben,
I tried to send you a private message but it seems stuck in outbox.

jimhook_uk1
Posts: 13
Joined: Fri Dec 04, 2020 5:22 pm
Has thanked: 1 time
Been thanked: 3 times

Re: MCP23017

Post by jimhook_uk1 »

Hi,
I'm having a problem with ReadPortPin again. My main project is commercially sensitive and I don't want to put it up in this public forum, but I've replicated the issue in the attached that I used to test a TLC59116 that is also part of my hardware.

Problem:
The ReadPortPin seems to be ignored but the decision is following the branch where LS1 = 1 regardless of value of port pin I'm reading. The TLC branch is working fine in that it is switching the correct LED on.

I am experiencing the same issue on my main project, the ReadPortPin is not working.
Attachments
TLC LED Test.fcfx
(19.66 KiB) Downloaded 14 times

BenR
Matrix Staff
Posts: 746
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 149 times
Been thanked: 235 times

Re: MCP23017

Post by BenR »

Hello,

I'm just looking through your code and it appears your addresses might not be correct.

U16 for example has A0 pulled low and A1,A2 pulled high which should be address 0b110 or 6 but is currently set to 0b011 or 3.

Hopefully this will solve the problem for you.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel

jimhook_uk1
Posts: 13
Joined: Fri Dec 04, 2020 5:22 pm
Has thanked: 1 time
Been thanked: 3 times

Re: MCP23017

Post by jimhook_uk1 »

Some switches are normally closed and normally open contacts.

BenR
Matrix Staff
Posts: 746
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 149 times
Been thanked: 235 times

Re: MCP23017

Post by BenR »

Hello,

The address pins A0-A2 on the U16 device look to be wired direct to 3V3 or GND.

If you like I can alter the component properties with what I beleive are the correct addresses and return the modified firmware back to you.

edit, I've sent you a PM.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel

Post Reply