When you perform a D/A conversion, you are essentially taking a digital value and converting it to a voltage value that you send out to the specified analog output. This output code can be translated to an output voltage using one of the equations described in the hardware manual.
The Universal Driver function for performing a D/A conversion is dscDAConvert().
Call dscDAConvert() and pass it BYTE and DSCDACODE values for the channel and output code - this will generate a D/A conversion on the selected channel that will output the new voltage that you set with the output code.
NOTE: Once you generate a D/A conversion on a specific output channel, that channel will continue to maintain the specified voltage until another conversion is done on the same channel or the board is reset or powered down.
... DSCB dscb;<br> BYTE channel;<br> DSCDACODE output_code; ... /* Step 1 */ channel = 0;<br> output_code = 4095;<br> if ((result = dscDAConvert(dscb, channel, output_code)) != DE_NONE) return result; ...
This page was last modified 00:50, 30 Jan 2004.
Copyright (c) 2004 Diamond Systems. All Rights Reserved.