Component: DDS DAC (AD9834/AD9833) (AD9834/AD9833) (Analog Output)

From Flowcode Help
Jump to navigationJump to search
Author Matrix TSL
Version 1.0
Category Analog Output


DDS DAC (AD9834/AD9833) component

Component to drive AD9834 and AD9833 Direct Digital Synthesis (DDS) waveform generator ICs via SPI interface. These devices can generate sine, triangle, and square wave outputs with programmable frequency and phase. Compatible with AD9833 and AD9834 devices.

Detailed description

No detailed description exists yet for this component

Examples

Auto Detect Port Number

This example auto detects and opens a COM Port based on preassigned USB Identifiers VID/PID.

For a known device the VID and PID can be found via Windows device manager.

FC6 Icon.png Auto Detect Example







Macro reference

DisableOutput

Fc9-comp-macro.png DisableOutput
Disables the DDS output (puts device in sleep mode). 
Fc9-void-icon.png - VOID Return


EnableOutput

Fc9-comp-macro.png EnableOutput
Enables the DDS output. 
Fc9-void-icon.png - VOID Return


Initialise

Fc9-comp-macro.png Initialise
Initializes the SPI bus and resets the DDS device. Call this once at startup. 
Fc9-void-icon.png - VOID Return


Reset

Fc9-comp-macro.png Reset
Resets the DDS device. This clears all registers and stops output. 
Fc9-void-icon.png - VOID Return


SetFrequency

Fc9-comp-macro.png SetFrequency
Sets the output frequency in Hz. Frequency range depends on clock frequency (typically 0 Hz to ClockFreq/2). 
Fc9-u32-icon.png - ULONG Frequency
Frequency in Hz 
Fc9-u8-icon.png - BYTE Register
Frequency register to use: 0 or 1 
Fc9-void-icon.png - VOID Return


SetPhase

Fc9-comp-macro.png SetPhase
Sets the phase offset. Phase value range: 0-4095 (0 to 360 degrees). 
Fc9-u16-icon.png - UINT Phase
Phase value: 0-4095 (0 to 360 degrees) 
Fc9-u8-icon.png - BYTE Register
Phase register to use: 0 or 1 
Fc9-void-icon.png - VOID Return


SetWaveform

Fc9-comp-macro.png SetWaveform
Sets the output waveform type: 0=Sine, 1=Triangle, 2=Square 
Fc9-u8-icon.png - BYTE WaveformType
Waveform type: 0=Sine, 1=Triangle, 2=Square 
Fc9-void-icon.png - VOID Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Device Type
Selects which DDS device is connected. 
Fc9-type-21-icon.png Clock Frequency
External clock frequency in Hz. Typical values: 25000000 (25 MHz) for AD9833, 75000000 (75 MHz) for AD9834. 
Fc9-conn-icon.png SPI Connections
Fc9-type-16-icon.png Channel
SPI Channel selector 
Fc9-type-16-icon.png Prescale
Prescale option selector 
Fc9-type-5-icon.png MOSI
SPI Data Out Pin SDO - Also Known as Master Out Slave In (MOSI) when used in Master mode. 
Fc9-type-16-icon.png MOSI Remap Pin
Select which the target pin to assign the MOSI hardware pin functionality. 
Fc9-type-5-icon.png MISO
SPI Data In Pin SDI - Also Known as Master In Slave Out (MISO) when used in Master mode. 
Fc9-type-16-icon.png MISO Remap Pin
Select which the target pin to assign the MISO hardware pin functionality. 
Fc9-type-5-icon.png CLK
SPI Clock Pin CLK - The Clock signal is driven by the SPI master. 
Fc9-type-16-icon.png CLK Remap Pin
Select which the target pin to assign the CLK hardware pin functionality. 
Fc9-type-5-icon.png CS / SS
Chip Select / Slave Select Pin Master Mode: General purpose output pin used to select the remote SPI device. Slave Mode: Hardware chip select pin input used to select the SPI device.  
Fc9-conn-icon.png Simulation
Fc9-type-7-icon.png Simulate Comms
 

Component Source Code

Please click here to download the component source project: FC_Comp_Source_DAC_AD9834_AD9833.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_DAC_AD9834_AD9833.fcfx