|
Reply
First of all, look at the interface description of the programming manual accompanying the CD-ROM software, and the program example can refer to the VC secondary development program example.
Set waveform frequency (for example, 5000Hz) and output process is as follows:
0. Call DDSSearch to find the device and return the device index.
For example, int m_nDevice = DDSSearch();
1. Call DDSSetFrequency function to obtain the length of data points and the number of cycles of the frequency to be set
For example: DDSSetFrequency (m_nDevice /* Device index */, 5000/* Specifies the frequency value to be set,the unit is Hz*/,, &dataLen/* Specifies the data length required to return the current set frequency value. &dataPeriodNum/* The number of cycles it takes to return the frequency value set at the moment */);
2. Calculate data based on the value of dataLen and dataPeriodNum. For example, the calculation method of sine wave data in the VC secondary development example, see the VC program Demo for details.
3. Call DDSDownload to download data to the device.
For example, DDSDownload(m_nDevice, dataBuffer, dataLen);
|
|