#define FRQ_TEST 0x00
/Frequency test state
#define COUNTER 0x80
//Counter state
#define COUT_LATCH 0x00 // F
#define COUT_NOT LATCH 0x40
//Output latch
__declspec(dllimport) BOOL WINAPI SetCON(unsigned
char d,int index);
Parameters introduction:d unsigned 8 bits integer.
Index device number to operate
Return value:If return true, it express successful setup, else
express failing setup.
Example:BOOL Flag;
Flag=SetCON(CONSTANT_WAVE|
EXT_FALLING_TRIG|
INT_TRIG_EN|
FRQ_TEST|
COUT_NOT LATCH,0);
Note:The hardware of signal controls the state of signal set by 8
bits control memory(Bit7 to Bit0).
Bit0:
2
DDS-3005 USB SDK manual
If return 1, it express output waveform is single
waveform,The trigger touch off one single waveform
every time。If isn’t single, the voltage will hold the state of
last sample.
If return 0, it express output continuous. If be touched off
(From inside or exterior), it will output periodic waveform
hour after hour.
Bit1:
If return 1, it express to appear raising trigger.
If return 0, it express to appear falling trigger.
Bit2:
If return 1, it express to external trigger work.
If return 0, it express to intramural trigger work.
Bit3:hold
Bit4:
If return 0, it express to start wave output.
If return 1, it express to stop waveform output and wait for
trigger.
Bit5:hold
Bit6:
If return 0, it express to frequency counter’s output latch
then counter signal.
If return 0, it express to connect directly. If the counter
works, it should first be latch then read, last latch.
Bit7:
If return 0, it express state that the frequency test, reset
frequency counter.
If return 1, it express the counter works , being not effected
__declspec(dllimport) BOOL WINAPI SetAD9850(unsigned long d,int
index);
Parameters:d unsigned long integer.
Index device number to operate
Return value:If return true ,it express successful operation,else
express failing operation.
Example:BOOL Flag;
Unsigned Long FrqVal=10000;
4
DDS-3005 USB SDK manual
Flag= SetAD9850 (FrqVal ,0);
Note: Set out frequency of sample point is F, d is 32 bits
parameter, then:
F=100 * d / 4294967296 (MHz)
4 Set relay state
//optional parameters
#define MASK_FIR_NOT_5M 0x01 //Filter cut-off
frequency less than 5M
#define MASK_FIR_PAS_5M 0x02 //Filter
cut-off frequency is 5M
#define MASK_AMP_D15FU 0x10 //Waveform
normal scope
#define MASK_AMP_N10DB 0x20 //Waveform
output attenuate 20dB
#define MASK_OUT_HZ 0x04 //Output
closed
#define MASK_OUT_EN 0x08 //Output
opened
#define MASK_COP_AC 0x40 /Input
frequency AC coupling
#define MASK_COP_DC 0x80 //Input
frequency DC coupling
__declspec(dllimport) BOOL WINAPI SetRelay(unsigned
char d,int index);
Note: There are four Relays in the signal fountain, control them
by value in optional parameters. This operation will cost
100ms, that is the filter execute time.
5 Select frequency counter input
//optional parameters
#define FRQ_DC_20M 0x01 /Select low
frequency input
#define FRQ_10M_2700M 0x00 //Select high
frequency input
__declspec(dllimport) BOOL WINAPI
SetFinSource(unsigned char d,int index );
Parameters: d 8 bits unsigned integer
Index device number to operate.
Return value:If return true ,it express successful operation,else
express failing operation.
Example:BOOL Flag;
Flag= SetFinSource (FRQ_10M_2400M ,0);
Note: There are two interface of signal input, one is high
frequency input (10 to 2.7GHz), another is low frequency
input(DC to 20M).
6
DDS-3005 USB SDK manual
6 Reset counter and startup frequency one time
test
__declspec(dllimport) BOOL WINAPI StartFrqMeasure(int
index );
Parameters: Index device number to operate
Return value:If return true ,it express successful operation,else
express failing operation.
Example:BOOL Flag;
Flag= StartFrqMeasure(0);
Note: When it works in the frequency test state, it reset
counter and bring one time intramural gating signal. The
signal persists 1000ms, and carry through frequency
counter. When it is the counter state, the function only
reset the counter.
7 Set address counter’s last address
__declspec(dllimport) BOOL WINAPI SetEndAddr(unsigned
long d,int index);
Parameters: d unsigned long integer.
Index device number to operate
Return value:If return true ,it express successful operation,else
express failing operation.
Example:BOOL Flag;
Unsigned Long AddrVal=10000;
Flag= SetEndAddr (AddrVal,0 );
7
DDS-3005 USB SDK manual
Note: There is a 256K unit of 16 bit width in the signal fountain.
So the address of end area is from 0000H to 3FFFF.This
function should execute before send the waveform data
to signal set. After that, reset address counter and stop it.
Wait for the user sending over the data.
Note:The function should be use after transfer Wave form data
to inside of the signal fountain. After the function that set
address counter’s last address is used, the address counter has
stopped and waited for program carry data of waveform to
signal RAM. When transfer stop, function is used and start
address counter again and send the signal fountain output
waveform.
10 Read the value of the counter.
__declspec(dllimport) unsigned long WINAPI
GetFrqMeasureResult(int index);
Parameter: Index device number to operate
result:The value of the counter.
example:Long CounterVal;
CounterVal= GetFrqMeasureResult (0);
Note:When you are testing frequency ,the function should be
use after starting one time frequency test for
1000ms,When the counter is working, the function should
9
DDS-3005 USB SDK manual
be use after enable the flip-latch of the counter. Then
Unable the flip-latch of the counter.
11 Transfers Wave form data to the signal fountain
__declspec(dllimport) BOOL WINAPI
SendDataPackage64(unsigned char *d,unsigned int n,int
index );
Parameter:d waveform buffer the first pointer.
n the number of bits in the waveform buffer.
Index device number to operate
Result : If return true ,it express successful operation,else
express failing operation.
Example :
Unsigned char Buf[200];
FlagSetAD9850 (1000000); //Set the rate of
renovation
for(int i=0;i<100;i++) //Compute one cycle sine wave
form
{
unsigned int Temp = (unsigned int)(8192 + 8000 *
sin(i * 3.14159265 * 2 / 100));
Buf[2 * i] = Temp % 256;
Buf[2 * i + 1] = Temp / 256;
}
SetEndAddr (99); //Setting the last address of
Note:One sample point has two bytes,but the efficiency
width are 14 bits. The value is relation of linearity with
the output voltage. 0000H is correspond with -10V,
3FFFH is correspond with +10V.The low 8 bits of every
sample point are save at low address of the buffer. The
high 8 bits of every sample point are save at high
address of the buffer. The samples give us a program
that transfers 100 points to the signal fountain.
If the return of the interface function is False, it express the
communication with USB interface is failed. User can use the
interface functions reference the samples of many languages.
12 Read Address
__declspec(dllimport) BOOL WINAPI Read24C01(unsigned
char Addr,unsigned int *Dat,int index);
Parameters:
addr:the pipe number to operator
Dat the buffer for receive data.
Index device number to operate
Result : If return true ,it express successful operation,else
express failing operation.
Example :unsigned int temp;
11
DDS-3005 USB SDK manual
If(!Read24C01(0,&temp,0)
MessageBox(¡°Read Error!¡±);
Else
MessageBox(¡°Read OK!¡±);;
Note:
Read Address.
13 Write Address
__declspec(dllimport) BOOL WINAPI Write24C01(unsigned char
Addr,unsigned int Dat,int index)
Parameters: addr:the pipe number to operate
Dat the buffer for sending out data.
Index Device number to operate
Result : If return true ,it express successful operation,else
express failing operation.
Example :
Unsigned int buf;
If(Read24C01(0,buf,0))
MessageBox(¡°Write OK¡±);
Else
MessageBox(¡°Write Error!¡±)
Note:
Write Address.
14 Initialize USB Device
__declspec(dllimport) int WINAPI GetItemNum(int *addr,int
12
DDS-3005 USB SDK manual
&len);
Parameters:addr array for device index
Len the length of add
Result : If return 0, it express successful operation.
If return 1, express failing operation.
Example :Int addr[127],len;
Int res=GetItemNum(addr,len);
If(res==0)
{
Return OK;
}
Else
{
Return ERROR;
}
Note: initialize all devices, and get the number of devices.
You must call this function before operation.
13
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.