Helper library for the Microchip MCP4728 I2C 12-bit Quad DAC
- Author(s): Bryan Siepert
- Adafruit’s MCP4728 Breakout: https://adafruit.com/product/44XX
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards: https://circuitpython.org/downloads
- Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
- Adafruit’s Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
creates CV entires
Returns true if the given value is a member of the CV
Channel(dac_instance, cache_page, index)¶
An instance of a single channel for a multi-channel DAC.
All available channels are created automatically and should not be created by the user
Sets the gain of the channel if the Vref for the channel is
Vref.INTERNAL. The gain setting has no effect if the Vref for the channel is `Vref.VDD`.
With gain set to 1, the output voltage goes from 0v to 2.048V. If a channe’s gain is set to 2, the voltage goes from 0v to 4.096V.
gainMust be 1 or 2
The DAC value as a floating point number in the range 0.0 to 1.0.
The native 12-bit value used by the DAC
The 16-bit scaled current value for the channel. Note that the MCP4728 is a 12-bit piece so quantization errors will occour
Sets the DAC’s voltage reference source. Must be a
Helper library for the Microchip MCP4728 I2C 12-bit Quad DAC.
- i2c_bus (I2C) – The I2C bus the MCP4728 is connected to.
- address – The I2C slave address of the sensor
Saves the currently selected values, Vref, and gain selections for each channel to the EEPROM, setting them as defaults on power up
Syncs the driver’s gain state with the DAC
Syncs the driver’s vref state with the DAC