|Top Previous Next|
Provides an analog output using the integrated digital-to-analog converter (DAC).
The WebCell has a dedicated pin for analog output. The analog output value can range from zero to the value of the voltage reference by setting the value property to a number in the range 0 to max. The voltage of the output pin can be computed as follows:
V = Vref * Cell.DAC.value / Cell.DAC.max;
where Vref has been assigned the actual reference voltage. Alternatively, given a desired voltage the value to set can be computed as follows:
Cell.DAC.value = Vtarget * Cell.DAC.max / Vref;
where Vtarget has been assigned the desired output voltage and Vref has been assigned the actual reference voltage.
To select the reference voltage, use the reference property. If an external voltage reference is used, it should be in the range 1.0V - 2.6V.