17 #ifndef _ADAFRUIT_MCP4728_H 18 #define _ADAFRUIT_MCP4728_H 21 #include <Adafruit_BusIO_Register.h> 22 #include <Adafruit_I2CDevice.h> 25 #define MCP4728_I2CADDR_DEFAULT 0x60 27 #define MCP4728_MULTI_IR_CMD \ 29 #define MCP4728_MULTI_EEPROM_CMD \ 31 #define MCP4728_FAST_WRITE_CMD \ 68 MCP4728_VREF_INTERNAL,
91 TwoWire *wire = &Wire);
99 bool fastWrite(uint16_t channel_a_value, uint16_t channel_b_value,
100 uint16_t channel_c_value, uint16_t channel_d_value);
106 Adafruit_I2CDevice *i2c_dev;
channel
Example enum values.
Definition: Adafruit_MCP4728.h:76
enum gain MCP4728_gain_t
Example enum values.
bool begin(uint8_t i2c_address=MCP4728_I2CADDR_DEFAULT, TwoWire *wire=&Wire)
Sets up the hardware and initializes I2C.
Definition: Adafruit_MCP4728.cpp:52
Definition: Adafruit_MCP4728.h:45
bool fastWrite(uint16_t channel_a_value, uint16_t channel_b_value, uint16_t channel_c_value, uint16_t channel_d_value)
Set the values of all four channels simultaneously with minimal delay or configuration.
Definition: Adafruit_MCP4728.cpp:116
Adafruit_MCP4728()
Instantiates a new MCP4728 class.
Definition: Adafruit_MCP4728.cpp:42
enum channel MCP4728_channel_t
Example enum values.
Definition: Adafruit_MCP4728.h:43
bool saveToEEPROM(void)
Saves the DAC's input register settings to the internal EEPROM, makeing them the default values when ...
Definition: Adafruit_MCP4728.cpp:149
Class that stores state and functions for interacting with the MCP4728 I2C Digital Potentiometer...
Definition: Adafruit_MCP4728.h:87
Definition: Adafruit_MCP4728.h:41
gain
Example enum values.
Definition: Adafruit_MCP4728.h:56
vref
Ex.
Definition: Adafruit_MCP4728.h:66
#define MCP4728_I2CADDR_DEFAULT
MCP4728 default i2c address.
Definition: Adafruit_MCP4728.h:25
enum vref MCP4728_vref_t
Ex.
pd_mode
Power status values.
Definition: Adafruit_MCP4728.h:40
Definition: Adafruit_MCP4728.h:47
bool setChannelValue(MCP4728_channel_t channel, uint16_t new_value, MCP4728_vref_t new_vref=MCP4728_VREF_VDD, MCP4728_gain_t new_gain=MCP4728_GAIN_1X, MCP4728_pd_mode_t new_pd_mode=MCP4728_PD_MODE_NORMAL, bool udac=false)
Sets the input register for a given channel to the specified settings.
Definition: Adafruit_MCP4728.cpp:78
enum pd_mode MCP4728_pd_mode_t
Power status values.