SLVAFL2 July   2024 TCA6416A , TCA9555

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2How to Configure Push-Pull IOs for Open Drain
  6. 3What Differences are There Between the Dedicated Open Drain IO Expanders and This Method?
  7. 4Summary
  8. 5References

How to Configure Push-Pull IOs for Open Drain

In a normal push-pull setup, the user can first set the configuration register to be an output then afterwords write to the output register to set the register as an output high or output low. Setting up an open drain configuration is actually very similar.

The following example walks through how to set up using TCA9539 (16-bit IO expander). The command byte table for TCA9539 is provided in Table 2-1 for reference. Examples from this point on can assume TCA9539's device address pins to be tied to Vcc and therefore can have an I2C 7-bit target address of 0x77h. An external pull up resistor can be tied to P07 and P17 to allow for the signal to rise to Vcc, otherwise the toggling can possibly not be visible from a oscilloscope perspective.

Step 2 and step 3 examples show bits P07 and P17 alternate as open drain output low and high impedance while the other pins (Px6-Px0) alternate relative to the 7th bit (if Px7 is high impedance then Px6-Px0 can open drain out lows and if Px7 is open drain output lows then Px6-Px0 can be high impedance).

Table 2-1 Command Byte
Command Byte Register Power-up default Comments
0x00h Input Port 0 XXXX XXXX Not used in this application note
0x01h Input Port 1 XXXX XXXX Not used in this application note
0x02h Output Port 0 1111 1111 Defaults as 1’s, 0 = output low
0x03h Output Port 1 1111 1111 Defaults as 1’s, 0 = output low
0x04h Polarity Inversion Port 0 0000 0000 Not used in this application note
0x05h Polarity Inversion Port 1 0000 0000 Not used in this application note
0x06h Configuration Port 0 1111 1111 Defaults as input, 0 = output
0x07h Configuration Port 1 1111 1111 Defaults as input, 0 = output
  1. Write to the output register to set the pins that need to be open drain to be a logic low, this won't actually make the pins output low until the configuration registers are set to output.
    • This step can be thought as initializing the device to be used for open drain.
     Initialize Output Port
                        Example Figure 2-1 Initialize Output Port Example
  2. Write to the configuration register to make the p-port pins either drive low or high-Z.
    • For this example, P07 remains a high impedance input while P06-P00 output low and P17 outputs low while P16-P10 main high impedance.
     Setting the Configuration
                        Registers Example Figure 2-2 Setting the Configuration Registers Example
  3. Write to the configuration register to change the p-port pins either drive low or high-Z.
    • For this example, P07 is changed to be an outputs low while P06-P00 change to high impedance inputs and P17 is set as a high impedance input while P16-P10 are output lows.
     Flipping Configuration
                        Register Example Figure 2-3 Flipping Configuration Register Example