Changes between Version 4 and Version 5 of Docs/Prog/Manual/ApplicationLibraries/lib825ev/DAC
- Timestamp:
- 09/20/18 07:46:17 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Docs/Prog/Manual/ApplicationLibraries/lib825ev/DAC
v4 v5 5 5 == Example - Application manually setting DAC output voltage == 6 6 {{{ 7 8 7 const int nDAC = 1; // First DAC card 9 8 … … 13 12 // Setup DAC to not track gross or net weight but be controlled manually 14 13 DACOutputRange outputrange = dacOutput0to10V; 15 16 14 if(SetDACReg(nDAC, dacAD5422Control, 0x3FF0 | (uint16)outputrange, WAIT_ACK) != OK) 17 15 printf("\n\nSetDACOutputRange error\r\n"); 18 16 19 17 float fMaxOutput = 10.0; // Maximum output 10 volts 20 21 18 if(SetDACFloat(nDAC, dacMaxOutput, fMaxOutput, WAIT_ACK) != OK) 22 19 printf("\n\nSetDACFloat max output error\r\n"); 23 24 25 20 } 26 21