MCP23017 - One I2C transaction for stepper motor control
Posted: Wed May 20, 2026 10:16 am
Hi,
I am using Flowcode with MCP23017 I2C expander to control a stepper motor.
I have two pins on PORTA:
Pin 0 = direction
Pin 1 = step
Currently I use WritePortPin macro in a loop with delays between steps. This creates separate I2C transaction for each step.
According to MCP23017 datasheet, Byte mode (IOCON.SEQOP) allows continuous writing to the same register without sending address each time.
My question: Is it possible in Flowcode to keep I2C transaction open between WritePort/WritePortPin calls, so I can send multiple step pulses with delays inside one transaction? Or is there a way to access raw I2C bus directly while using MCP23017 component?
Thank you
I am using Flowcode with MCP23017 I2C expander to control a stepper motor.
I have two pins on PORTA:
Pin 0 = direction
Pin 1 = step
Currently I use WritePortPin macro in a loop with delays between steps. This creates separate I2C transaction for each step.
According to MCP23017 datasheet, Byte mode (IOCON.SEQOP) allows continuous writing to the same register without sending address each time.
My question: Is it possible in Flowcode to keep I2C transaction open between WritePort/WritePortPin calls, so I can send multiple step pulses with delays inside one transaction? Or is there a way to access raw I2C bus directly while using MCP23017 component?
Thank you