Difference between revisions of "Component: IO Expander (MCP23017) (MCP23017) (General Input)"
From Flowcode Help
Jump to navigationJump to searchLine 97: | Line 97: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
+ | |||
+ | |||
Line 105: | Line 107: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===ReadPort=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 128: | Line 131: | ||
+ | ===ConfigureInversion=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 151: | Line 155: | ||
+ | ===ReadPortPin=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 174: | Line 179: | ||
+ | ===WritePortPin=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 202: | Line 208: | ||
+ | ===WritePort=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 230: | Line 237: | ||
+ | ===ConfigurePullups=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 253: | Line 261: | ||
+ | ===ReadRegister=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 271: | Line 280: | ||
+ | ===SetAddress=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 289: | Line 299: | ||
+ | ===WriteRegister=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 312: | Line 323: | ||
+ | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- |
Revision as of 11:51, 3 February 2023
Author | Matrix TSL |
Version | 1.0 |
Category | General Input |
Contents
IO Expander (MCP23017) component
Provides 16 digital input/output pins arranged into two 8-bit ports using a I2C bus connection. Up to eight expanders can be connected to the same I2C peripheral by means of three address pins.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_MCP23017.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_MCP23017.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
ReadPort
ConfigureInversion
ReadPortPin
WritePortPin
WritePort
ConfigurePullups
ReadRegister
![]() |
ReadRegister |
Reads an 8-bit value from a register on the I/O expander device. | |
![]() |
Address |
Register address to write to. Range: 0-15 | |
![]() |
Return |
SetAddress
![]() |
SetAddress |
Allows the slave address to be overridden to allow multiple modules to be controlled using a single component. | |
![]() |
Address |
Range: 0-7 | |
![]() |
Return |
WriteRegister
![]() |
WriteRegister |
Writes an 8-bit value to a register on the I/O expander device. | |
![]() |
Address |
Register address to write to. Range: 0-15 | |
![]() |
Value |
Value to write. Range: 0-255 | |
![]() |
Return |
Initialise
![]() |
Initialise |
![]() |
Return |