<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to I/O Expander MCP23017</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/660c3c7987/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/660c3c7987/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/660c3c7987/</id><updated>2020-02-27T16:26:57.863000Z</updated><subtitle>Recent posts to I/O Expander MCP23017</subtitle><entry><title>I/O Expander MCP23017</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/660c3c7987/?limit=25#c1db" rel="alternate"/><published>2020-02-27T16:26:57.863000Z</published><updated>2020-02-27T16:26:57.863000Z</updated><author><name>switcher</name><uri>https://forge.codesys.com/u/switcher/</uri></author><id>https://forge.codesys.com9fe3f843b0b458a77a9bf6bc8c0ca46003cebd50</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Please look at this post for a good start:&lt;br/&gt;
 l &lt;a class="" href="http://forum.codesys.com/viewtopic.php?f=21&amp;amp;t=5744" rel="nofollow"&gt;viewtopic.php?f=21&amp;amp;t=5744&lt;/a&gt; l &lt;/p&gt;
&lt;p&gt;You have to add this declaration in your device configuration file if you like to use also BeforeWriteOutputs method:&lt;/p&gt;
&lt;p&gt;I haven't deep dived in the MCP23017 device datasheet yet. But I saw imediately that you are using wrong device address in your lib. For MCP23017 you have to use 0x20, suppose you have A0-A2 low (usiAddress := 16#20;).&lt;/p&gt;
&lt;p&gt;I hope this helps you further.&lt;/p&gt;
&lt;p&gt;BR&lt;br/&gt;
Zdenko.&lt;/p&gt;
&lt;p&gt;&lt;img alt="IMG: Bild" rel="nofollow" src="http://postimg.com/151000/screen-150073.jpg"/&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>I/O Expander MCP23017</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/660c3c7987/?limit=25#b06f" rel="alternate"/><published>2020-02-27T16:26:55.401000Z</published><updated>2020-02-27T16:26:55.401000Z</updated><author><name>nexus161</name><uri>https://forge.codesys.com/u/nexus161/</uri></author><id>https://forge.codesys.com818e960d24d78d60e20a850d163aec1f88e78b4e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello everybody,&lt;br/&gt;
I want to expand the I/Os of the Raspberry with the following IO Expander(MCP23017).&lt;br/&gt;
I have created the „MCP23017.devdesc.xml“  and a libary „MCP23017.library“  file based on an copy of „SRF02.devdesc.xml“ und „I2C_SRF02.library“. &lt;/p&gt;
&lt;p&gt;The Rasberry indentify the MCP23017 but I can´t access with Codesys and don´t know why!!&lt;br/&gt;
I think I fail because I didn´t use the right Parameters in “AfterReadInputs” and “BeforeWriteInputs”  to activate the chip or port.&lt;/p&gt;
&lt;p&gt;I send you some files and hope you can help me!&lt;br/&gt;
Maybe someone worked on MCP23017 and solved my problem already.&lt;/p&gt;
&lt;p&gt;thankfully&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=663" rel="nofollow"&gt;MCP23017.library &lt;span&gt;&lt;span&gt;[337.29 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=662" rel="nofollow"&gt;MCP23017.devdesc.xml &lt;span&gt;&lt;span&gt;[2.35 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>