pcf8591(4)

pcf85914

Driver for the pcf8591 8-bit a/d and d/a converter

Usage

To compile this driver into the kernel, place the following lines in your kernel configuration file:

device pcf8591 device iicbus

Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):

pcf8591_load="YES"

Overview

The pcf8591 driver supports reading four inputs and setting one output over I2C. The hardware supports configuring the input lines as:

  • four single-ended inputs

  • three differential inputs (one input line is shared between all three inputs)

  • two single-ended inputs and one differential input

  • two differential inputs.

The pcf8591 driver reports data via sysctl(8) entries in the device's node in the sysctl(8) tree:

inputs.%d

The input level of the corresponding input in steps between 0 and 255. Absolute voltage depends on an actual reference voltage.

On an FDT(4) based system the following properties must be set:

compatible

Must be set to "nxp,pcf8591".

reg

The I2C address of pcf8591. It should be in the range from 0x40 to 0x4f (7-bit).

The DTS part for a pcf8591 device usually looks like:

/ {
	...
	pcf8591adc {
		compatible = "nxp,pcf8591";
		reg = <0x48>;
	};
};

Releases

14 releases since FreeBSD 13.1-RELEASE; the text changed 3 times.

  1. 13.1–13.2
  2. 13.3–13.5
  3. 14.0
  4. 14.1–16.0

History

The pcf8591 driver and this manual page was written by Andriy Gapon ⟨[email protected]⟩.

Bugs

The pcf8591 driver does not support changing the input configuration. All input lines are configured as single-ended inputs.

The pcf8591 driver does not support setting the output. It is always disabled (tri-state).

From base 16.0-CURRENT-20261027-61c70dc16a79 in FreeBSD 16.0-CURRENT (2026-10-27). Parsed by carta from the page's mdoc source.