Issue with I2C... or is it me?



  • Greetings,

    I have been working with the LoPy4 and the MCP23017 IO Expander. I also have a Saleae Logic 4 that I have hooked up to see the protocol in action. I notice something strange though.

    I initialize using the following:

    from machine import I2C
    
    i2c = I2C(0, I2C.MASTER) 
    i2c.writeto_mem(0x20, 0x00, 0xFF)
    

    The address set on the MCP23017 should be 0x20 as I have the A0 ... A2 pins all biased to ground. But in the Saleae Logic UI it's showing me that instead of writing to the slave at 0x20 it is instead 0x40.

    Screen Shot 2019-06-23 at 11.20.29 PM.png

    What do you think is causing this?



  • Okay I figured out it's me.

    In the settings for the Saleae Logic software I had it set to 8 bit addressing not 7 bit. Duh...


Log in to reply
 

Pycom on Twitter