SPC  Version 0.9.5
 All Files Functions Groups Pages

The DACnVoltage controls the output voltage levels for the analog output pins O0/O1.

DACnMode DAC_MODE_DCOUT uses the DACnVoltage to control the output voltage between 0 and 3.3 volts in steps of 3.222 mV.

For DACnModes DAC_MODE_SINEWAVE, DAC_MODE_SQUAREWAVE, DAC_MODE_SAWPOSWAVE, DAC_MODE_SAWNEGWAVE, and DAC_MODE_TRIANGLEWAVE, the DACnVoltage controls the amplitude from +/- 0 to +/- 1.65 volts.

For DACnMode DAC_MODE_PWMVOLTAGE, DACnVoltage controls the mark to space ratio between 0% and 100%. The average DC value of this waveform thus varies from 0 to 3.3 volts.

DAC0Mode = DAC_MODE_DCOUT; // DC ouput voltage
DAC0Voltage = 500; // set voltage level of O0 to 500*3.222 mV