Read output port on MCP23017

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
W9BEL
 
Posts: 3
Joined: Sat May 24, 2014 3:05 pm

Read output port on MCP23017

Post by W9BEL »

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

waltr
 
Posts: 306
Joined: Wed Jun 12, 2013 5:01 pm

Re: Read output port on MCP23017

Post by waltr »

Read the LAT register in the MCP23O17 to read what the port has been set to.

W9BEL
 
Posts: 3
Joined: Sat May 24, 2014 3:05 pm

Re: Read output port on MCP23017

Post by W9BEL »

How do I read the LAT register? I don't see anything in the MCP230xx library that refers to that.

W9BEL
 
Posts: 3
Joined: Sat May 24, 2014 3:05 pm

Re: Read output port on MCP23017

Post by W9BEL »

I figured this out. You have to use the i2c module to read the GPIOA & GPIOB registers.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”