Block is used to control the MCP4725 DAC chip
It has 12 bits of resolution and is controllable via I2C. What this means is that it will accept up to 4096 possible inputs to provide an analog output, where an output value of zero is zero and an output value of 4095 is full scale.
Full scale is determined by the reference voltage you supply to the VCC pin. That supply voltage can be anywhere from 2.7 volts to 5.5 volts.
Thus the equation to determine the value of the Least Significant Bit (LSB) is:
1 LSB = VCC Voltage / 4096
What you can see from this is that voltage resolution improves with a lower supply voltage. For example, if you never have to output more than 3.3 volts, you would might what to use a 3.3 volt supply.
MCP4725 Pin Outs
MCP4725 Power Requirements
With no load on the output, the MCP4725 will draw no more than 0.4 mA from the power source. The typical draw is about 0.21 mA.
MCP4725 Output Current Limits
The device can supply no more than 25 mA to a load.
Connecting Your Arduino the MCP4725
Set address of the chip
For each chip, it is possible to specify one of two addresses. This is a short mid-point in the on test points I2C Address Selection in one direction or another. Address chosen depending on the type of chip:
MCP4725A0 - 0x60 ...0x61
MCP4725A1 - 0x62 ...0x63
MCP4725A2 - 0x64 ...0x65
Check the current address of the chip by using the tool "Scanning I2C bus"
Block can be set using the editor
In the settings block, select an existing DAC or create a new one. To create a new DAC, you should press the button with the " + " icon. This will open the window of creating a new DAC
In this window you must specify the name for the DAC, select the corresponding address, and if necessary, write a comment.
When check checkbox "The write enable input" in the block editor it will have the input "En" and the transfer of jobs from the input "Value" to the chip will be made only if there is a log.1 at the input "En".
The value at the input "Value" can have values from 0 to 4095. If the value is less than 0, the chip will be sent to task 0. If the value is greater than 4095 then the job will be dispatched 4095.
If check checkbox "Save in EEPROM DAC" the last task will be stored in the chip and recover from a loss and restoration of power DAC