This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM1806

I have a customer who wants to implement an I2C from a GPIO and needs open-drain capability.  Section 5.28 of the datasheet indicates "Output register, when read, reflects output drive status. This, in addition to the input register reflecting pin status and open-drain I/O cell, allows wired logic be implemented."

However, there is not information on how to configure the GPIO into an open drain mode.  how does one do this?  nothing else is mentioned about the open-drain I/O cell.

  • Hi Ignacio,

    One method to implement an open-drain I2C based on GPIO bit-banging is to switch between configuring the GPIO as an input or an output (i.e. using the DIR register). 

    For example, the GPIO pin would initially be cleared and set to "0".  Then, to transmit a "0", the GPIO would be set to an output (and a 0 driven on the line).  To transmit a "1", the GPIO would be set to an input.  An external pull-up on the line would then pull the line high. 

    Regards,

    Melissa