Class FunctionGeneratorExtensions
Extension methods for Dac63004 class to generate functions.
public static class FunctionGeneratorExtensions
- Inheritance
-
FunctionGeneratorExtensions
Methods
GenerateSawtoothWave(Dac63004, SlewRate, CodeStep, int, int)
Generates a sine wave with the specified parameters.
public static void GenerateSawtoothWave(this Dac63004 dac, SlewRate slewRate, CodeStep stepSize, int lowMargin, int highMargin)
Parameters
dacDac63004The Dac63004 instance.
slewRateSlewRateThe slew rate configuration for X function register.
stepSizeCodeStepThe step size configuration from X function register.
lowMarginintThe low margin of the wave. Value for DAC. From 0 to 4096.
highMarginintThe high margin of the wave. Value for DAC. From 0 to 4096.
Exceptions
- ArgumentOutOfRangeException
Thrown when
lowMarginorhighMarginare out of range.
GenerateSineWave(Dac63004, SlewRate)
Generates a sine wave with the specified parameters.
public static void GenerateSineWave(this Dac63004 dac, SlewRate slewRate)
Parameters
dacDac63004The Dac63004 instance.
slewRateSlewRateThe slew rate configuration for X function register.
Remarks
More information about the function generator can be found in the datasheet section "7.4.5.2.1 Triangular Waveform Generation".
GenerateTriangularWave(Dac63004, SlewRate, CodeStep, int, int)
Generates a triangular wave with the specified parameters.
public static void GenerateTriangularWave(this Dac63004 dac, SlewRate slewRate, CodeStep stepSize, int lowMargin, int highMargin)
Parameters
dacDac63004The Dac63004 instance.
slewRateSlewRateThe slew rate configuration for X function register.
stepSizeCodeStepThe step size configuration from X function register.
lowMarginintThe low margin of the wave. Value for DAC. From 0 to 4096.
highMarginintThe high margin of the wave.Value for DAC. From 0 to 4096.
Remarks
More information about the function generator can be found in the datasheet section "7.4.5.2.1 Triangular Waveform Generation".
Exceptions
- ArgumentOutOfRangeException
Thrown when
lowMarginorhighMarginare out of range.