I am using the Adafruit_MCP230xx.py library with some recently purchased chips which works fine with 1 exception. How do I check to see if a output port is set? I can read the input ports ok but don't see a way to check which way the output ports are set.
Thanks
Bill Bell
Read output port on MCP23017
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
-
- Posts: 306
- Joined: Wed Jun 12, 2013 5:01 pm
Re: Read output port on MCP23017
Read the LAT register in the MCP23O17 to read what the port has been set to.
-
- Posts: 3
- Joined: Sat May 24, 2014 3:05 pm
Re: Read output port on MCP23017
How do I read the LAT register? I don't see anything in the MCP230xx library that refers to that.
-
- Posts: 3
- Joined: Sat May 24, 2014 3:05 pm
Re: Read output port on MCP23017
I figured this out. You have to use the i2c module to read the GPIOA & GPIOB registers.
Please be positive and constructive with your questions and comments.