Changes between Version 1 and Version 2 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/DAC/GetDAC


Ignore:
Timestamp:
03/21/12 08:18:33 (13 years ago)
Author:
Don Wilson
Comment:

--

Legend:

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

    v1 v2  
    2323
    2424{{{
     25   extern uint16 g_nDACValue16;
     26
    2527   int dac = 1; // number of dac card - not number of slot
    2628
    27    // This sets the DAC output for manual control
    28    int result = GetDAC(dac, dacAD5422Control, WAIT_ACK);
    29    DisplayText(0, 0, "GetDAC control result = " + IntToStr(result));
    30    
     29   // Gets the DAC control register value
     30   if(GetDAC(dac, dacAD5422Control, WAIT_ACK) == OK)
     31   {
     32      DisplayText(0, 0, "GetDAC control result = " + IntToStr(g_nDACValue16));
     33   }
     34   // Gets the DAC high weight register value
     35   if(GetDAC(dac, dacHighWeight, WAIT_ACK) == OK)
     36   {
     37      DisplayText(0, 0, "GetDAC high weight = " + FloatToStr(g_fDACValue));
     38   }
    3139}}}
    3240