DAC, is a unit with the ability to convert digital signal to analog signal (voltage waveform signal) with support for audio waveform and more. It integrates a 12-bit high resolution DAC chip named MCP4725 which has an on-board non-volatile memory (EEPROM). The unit communicates with the M5Core using the I2C protocol.
The DAC input and configuration data can be programmed to the EEPROM in order for the data to be saved after reboot or system shutdown.
The device I2C address is 0x60 by default unless changed manually.
1.EasyLoader is a simple and fast program burner. Every product page in EasyLoader provides a product-related case program. It can be burned to the master through simple steps, and a series of function verification can be performed.
The code below is incomplete (just for reference). To get the complete code, please click here
Perform DA conversion and output voltage, up to 3.7V
output voltage save Output voltage 0-3.3, and confirm whether to save to EEPROM
output voltage with raw data save Output voltage 0-4096, and confirm whether to save to EEPROM