Changes between Version 8 and Version 9 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/DAC


Ignore:
Timestamp:
09/20/18 12:41:14 (6 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/ApplicationLibraries/lib825ev/DAC

    v8 v9  
    2626void SetDACVoltage(float voltage)
    2727{
    28    // The DAC output is controlled by a 16 bit register so we multiple the maximum 16-bit value 0xFFFF times output percentage/100 desired.
     28   // The DAC output is controlled by a 16 bit register so we multiply the maximum 16-bit value 0xFFFF times output percentage/100 desired.
    2929   // For example maximum 10 V would be 0xFFFF * (10.0 / 10.0) = 0xFFFF * 1.0 = 0xFFFF, 5V would be 0xFFFF * (5.0 / 10.0) = 0xFFFF * 0.5 = 0x8000
    3030     uint16 value = (uint16)(0xFFFF * (voltage / 10.0));