![SpinCore Technologies PulseBlaster DDS-III Скачать руководство пользователя страница 15](http://html.mh-extra.com/html/spincore-technologies/pulseblaster-dds-iii/pulseblaster-dds-iii_owners-manual_1347664015.webp)
PulseBlasterDDS
int status_readback();
Reads the status of the board and returns an integer whose bit representation corresponds to the
status signals described in section IV. Bit zero is stopped; bit one is reset; bit two is running; bit
three is waiting.
Example Use of C Functions
// Example1.cpp
//
// SpinCore Technologies, Inc.
// May 2004
// http://www.spincore.com
//
// The following program code uses C Functions from 'pbdfuncs' to
// generate and execute a pulse sequence on the PulseBlasterDDS board.
// Be sure to include the DLL (pbd03pc.dll), the library file
// (pbd03pc.lib), the header files (pbd03pc.h and pbdfuncs.h), and source
// file (pbdfuncs.cpp) in the working directory of your C compiler .
#include "pbdfuncs.h"
#include "pbdfuncs.cpp"
#include "PBD03PC.h"
#include <stdio.h>
void main(void)
{
int start;
// Locates & Initializes the PulseBlasterDDS Board
pb_init();
// Set Because the Board Operates at 100MHz
set_clock(100);
// Prepare the Board to Receive Freqeuncy Values
start_programming(FREQ_REGS);
// Load Frequency Register 0
set_freq(1.054);
// Load Frequency Register 1
set_freq(2);
// Prepare the Board to Receive TX Phase Values
start_programming(PHASE_REGS_1);
// Load Phase Register 0
set_phase(0);
// Load Phase Register 1
set_phase(90);
// Prepare the Board to Receive RX Phase Values
start_programming(PHASE_REGS_0);
// Load Phase Register 0
set_phase(0);
// Load Phase Register 1
set_phase(180);
// Prepare the Board to Receive pulse program instructions
start_programming(PULSE_PROGRAM);
//Instruction 0 - Continue to instruction 1 in 2us
//Freq Reg 0, Phase Reg 1 for DAC_OUT_1, DDS TX Output ON, Phase Reg 0 for
//DAC_OUT_0 and DAC_OUT_2, DDS RX Output ON, Flags = 0x3FF, OPCODE = CONTINUE
start = pb_inst(0, 1, TX_ANALOG_ON, 0, RX_ANALOG_ON, 0x3FF, CONTINUE, 0, 2*us);
// Instruction 1 - Continue to instruction 2 in 4us
//Freq Reg 0, Phase Reg 1 for DAC_OUT_1, DDS TX Output OFF, Phase Reg 0 for
//DAC_OUT_0 and DAC_OUT_2, DDS RX Output ON, Flags = 0x000, OPCODE = CONTINUE
9/20/200515
www.spincore.com