Skip to content

PCF8575

16-bit quasi-bidirectional I²C I/O expander — the 16-bit PCF8574.

Live catalog

Prefer labwired_describe with the catalog id over guessing pins or addresses.

Status at a glance

Aspect Status
Catalog id pcf8575
Bus I²C
Address 0x20 (A2/A1/A0 select 0x20–0x27)
Source configs/devices/pcf8575.yaml (declarative, no Rust model)
Datasheet TI PCF8575 SCPS121I, §8.1 Overview, §8.3.3 Address Reference, §8.4 Figures 8-6 / 8-7
Tier smoke-proven (register-level tests: crates/core/tests/everyday_sensor_set.rs)

Pins / attachment

Pin / net Role
SDA / SCL I²C
P00..P07, P10..P17 Output pads, bound through the optional p00_pin..p17_pin keys
INT Not modelled
VCC/GND Power (digital twin)

Support matrix

Behavior Status Notes
No register pointer; data in byte pairs (port 0, then port 1) ✅ The pins move after the second byte of each pair
Repeated pairs overwrite; odd trailing byte dropped ✅
Read returns port 0, port 1, alternating ✅
Power-on port 0xFFFF ✅
External pad levels reaching the readable port ❌ Same gap as PCF8574 — use the port stimulus
INT output ❌
Strong pull-up pulse, drive limits ❌ Bench

Stimulus

Host inputs: port (0–65535, P07–P00 in the low byte).

How to run

  1. Place the part and an MCU in Playground, or add it to a system YAML:
    external_devices:
      - id: "expander"
        type: "pcf8575"
        connection: "i2c0"   # the bus id your chip system uses
        config:
          p00_pin: "PC0"
          p17_pin: "PC1"
    
  2. Agent: labwired_list → labwired_describe id=pcf8575 → wire → labwired_validate → labwired_run / labwired_verify.
  3. Register-level smoke: cargo test -p labwired-core --test everyday_sensor_set — power-on 0xFF 0xFF, and a written pair 0x34 0x12 read back as 34 12 34 12. The same file's negative control proves the check fails against a part that answers only 0x00 or only 0xFF; pcf8575_tracks_stimulus covers pairing, odd bytes and the 16 pad drives.

Limitations

  • The datasheet says every transfer must be an even number of bytes. A trailing odd byte is dropped at STOP and never reaches the pins.

See the YAML header for the full datasheet trace and every named approximation.