API Reference

adafruit_dacx578

CircuitPython driver for the Adafruit DAC7578 - 8 x Channel 12-bit I2C DAC - STEMMA QT / Qwiic

  • Author(s): Liz Clark

  • With assistance from Claude AI 3.5 Sonnet

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_dacx578.Channel(dac_instance: DACx578, index: int)

Represents a single channel for the DAC7578.

Parameters:
  • dac_instance (DACx578) – The parent DAC instance

  • index (int) – The channel index (0-7)

property ldac: bool

LDAC setting for an individual channel

property normalized_value: float

The DAC value as a floating point number in the range 0.0 to 1.0.

property raw_value: int

The raw value used by the DAC based on current resolution.

property value: int

The 16-bit scaled value for the channel.

class adafruit_dacx578.DACx578(i2c_bus: I2C, address: int = _DAC7578_DEFAULT_ADDRESS, resolution: Literal[8, 10, 12] = 12)

Driver for the DAC7578 12/10/8-bit 8-channel DAC.

Parameters:
  • i2c_bus (I2C) – The I2C bus the DAC is connected to

  • address (int) – The I2C device address. Defaults to 0x47

  • resolution (int) – The DAC resolution in bits (8, 10, or 12). Defaults to 12

property clear_code: str

Current clear code setting.

Returns:

One of “ZERO”, “MID”, “FULL”, or “NOP”

Return type:

str

property ldac_mask: int

The 8-bit LDAC mask.

Returns:

The LDAC mask value.

Return type:

int

reset() None

Resets the device to its default state.

property resolution: int

DAC resolution in bits (8, 10, or 12).