Communicate with MCP4725(DAC) through I2C
Show older comments
Hello,
I want to use a MCP4725(DAC) to generate an analog voltage output. And I use the I2C Master Write block in simulink to communicate with the MCP4725 through the I2C pins on an Arduino Mega 2560 board. I could successfully connect to the MCP4725 through I2C communication. I would like to use the I2C Master Write block in simulink to input data to the MCP4725, but I am confused with the format of the data input of the block. I read the documention of the I2C Master Write block and the datasheet of MCP4725. The documentation indicates that the data input should be a [N by 1] or [1 by N] array. My question is how a [N by 1] or [1 by N] array relates to the desire bytes data input into the MCP4725? The pictures below are part of the simulink model I built and part of the datasheet of MCP4725.
I appreciate any help or suggestion with my question.
Best regard,
Lin


Answers (0)
Categories
Find more on Arduino Hardware in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!