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.

PCF8575: Clarification of Individual Pin's Input and Output Mode

Part Number: PCF8575

I have a few questions:

First, what's the default mode of all the pins P0-P7 and P10-P17 after powered up.

Second, it is about the pins' mode. Based on the description in section 8.4, Device Functional Mode, of its data sheet, if I use I2C to write 3 bytes to it: 

  1. 0100 A2A1A0 0
  2. xx1x xxxx
  3. xxxx xxxx

Pin5 will become HIGH. For the rest pins, if I don't want to change their High/Low status, it seems I must read their status and write back the same values in step 2 and 3.

Is this correct?

Third, use pin5 as an example. Let's say, if in step 2, I write xx0x xxxx, pin5 will be pulled LOW by PCF8575. This is in output mode, isn't it? 

Then how to switch it to input mode? By external circuit? I wonder since pin5 is already pulled down by 8575, how can external circuit pull it HIGH?

  • This device does not have input or output modes. The outputs pull stronly down and weakly high, so to allow an external device to override the voltage, a pin must be in the high state.

    Section 8.1 says:

    The device features a 16-bit quasi-bidirectional input/output (I/O) port (P07–P00, P17–P10), including latched outputs with high-current drive capability for directly driving LEDs. Each quasi-bidirectional I/O can be used as an input or output without the use of a data-direction control signal. At power on, the I/Os are high. In this mode, only a current source (IOH) to VCC is active. An additional strong pullup to VCC (IOHT) allows fast-rising edges into heavily loaded outputs. This device turns on when an output is written high and is switched off by the negative edge of SCL. The I/Os should be high before being used as inputs. After power on, as all the I/Os are set high, all of them can be used as inputs. Any change in setting of the I/Os as either input or outputs can be done with the write mode.