Table of Contents

Class FunctionGeneratorExtensions

Namespace
Iot.Device.Dac63004
Assembly
Iot.Device.Dac63004.dll

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

dac Dac63004

The Dac63004 instance.

slewRate SlewRate

The slew rate configuration for X function register.

stepSize CodeStep

The step size configuration from X function register.

lowMargin int

The low margin of the wave. Value for DAC. From 0 to 4096.

highMargin int

The high margin of the wave. Value for DAC. From 0 to 4096.

Exceptions

ArgumentOutOfRangeException

Thrown when lowMargin or highMargin are out of range.

GenerateSineWave(Dac63004, SlewRate)

Generates a sine wave with the specified parameters.

public static void GenerateSineWave(this Dac63004 dac, SlewRate slewRate)

Parameters

dac Dac63004

The Dac63004 instance.

slewRate SlewRate

The 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

dac Dac63004

The Dac63004 instance.

slewRate SlewRate

The slew rate configuration for X function register.

stepSize CodeStep

The step size configuration from X function register.

lowMargin int

The low margin of the wave. Value for DAC. From 0 to 4096.

highMargin int

The 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 lowMargin or highMargin are out of range.