LabWired The easy way to build hardware
I²C device

NXP PCA9685 PWM/Servo

The NXP PCA9685 PWM/Servo is an I²C device in the LabWired part catalog. Its catalog type is pca9685. It connects to the MCU over I²C. The catalog gives a supply range of 2.3–5.5 V. It has 21 pins. A registered peripheral model runs in the engine: the firmware talks to it over the real bus and gets device-accurate responses.

From the catalog: Declarative I²C kit — model is core/configs/devices/pca9685.yaml (GenericI2cDevice register_file + servo_angle observable), no per-part Rust in the production path. The hand-written Pca9685 struct survives only as a byte-parity oracle.

Key facts

CategoryI²C devices
Catalog typepca9685
InterfaceI²C
Supply range2.3–5.5 V
Pins21
DatasheetNXP PCA9685 16-channel PWM controller datasheet

What LabWired simulates

What is simulated

Simulated device model

How it was validated

Built from the datasheet. Implemented from the part’s register documentation and exercised by automated tests. Nothing physical was ever placed next to it.

NXP PCA9685 PWM/Servo pinout

PinElectrical typeFunction
VCC Power input Supply
GND Power input Supply
SDA Open-drain I²C data (SDA)
SCL Open-drain I²C clock (SCL)
OE Input —
LED0 Output PWM
LED1 Output PWM
LED2 Output PWM
LED3 Output PWM
LED4 Output PWM
LED5 Output PWM
LED6 Output PWM
LED7 Output PWM
LED8 Output PWM
LED9 Output PWM
LED10 Output PWM
LED11 Output PWM
LED12 Output PWM
LED13 Output PWM
LED14 Output PWM
LED15 Output PWM

How to simulate the NXP PCA9685 PWM/Servo in LabWired

  1. Open the Playground at app.labwired.com and place an MCU board.
  2. Add the NXP PCA9685 PWM/Servo (catalog type pca9685).
  3. Connect VCC and GND to the supply and ground of the board. Use a supply inside the catalog range of 2.3–5.5 V.
  4. Connect SDA and SCL to the I²C data and clock pins of the board.
  5. Connect LED0, LED1, LED2, LED3, LED4, LED5, LED6, LED7, LED8, LED9, LED10, LED11, LED12, LED13, LED14 and LED15 to pins that can output PWM.
  6. Connect OE as your circuit needs.
  7. Run the firmware. It finds the part on the I²C bus and reads and writes it as on hardware.

Related I²C devices

All I²C devices · All parts

Further reading

Modelled from NXP PCA9685 16-channel PWM controller datasheet.