Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

LabVIEW Simulation of Direct Digital Synthesis ( DDS ) Mode

2 ratings | 5.00 out of 5
Print

Downloads

Filename: dds_32_14_bit_ex.vi
Requirements: View

This LabVIEW example demonstrates how Direct Digital Synthesis generates waveforms.

A DDS system is basically made up of a Lookup Memory, an accumulator (counter), and a Digital to Analog Converter.

The Lookup Memory (LM) contains one cycle of the waveform to be generated. In this example, the LM is 14-bits, 16,384 samples (2^14) containing one cycle of a sine wave. Each sample is a 16 bit signed integer value. An array containing the samples of the sine wave simulates the lookup memory.

The Accumulator is similar to a counter, but it has more features. The most important feature is the ability to count by almost any number as well as one. In this example, the Accumulator is simulated by a while loop and a shift register to count by the Frequency Control Word. The count is done with U32 representation and therefore, simulates a 32 bit counter. When it reaches its highest values, the "counter" rolls over as an Accumulator does.

The Accumulator value is converted to an array of Booleans so that it can easily take the top 14 bits, and then convert this array to an integer value. The high 14-bits of the "Accumulator" are sent to the LM and index the array. The indexed value of the Lookup Memory is a 16 bit signed integer sample of the sine wave, and this value is sent to the DAC.

Requirements


Filename: dds_32_14_bit_ex.vi

Software Requirements


Application Software: LabVIEW Full Development System 7.1
Language(s): LabVIEW

 
2 ratings | 5.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).