Not sure it will help, but here is a basic DDS testing 'sketch' running on a arduino board. It shows needing to send a 'reset' to the device before a desired frequency word.
//AD9850 DDS test
#define DDS_CLOCK 125000000
#define CLOCK 8 //pin connections for DDS
#define LOAD 9
#define DATA 10
#define RESET 11
#define probePin 12
#define ledPin 13
void setup()
{
pinMode (DATA, OUTPUT);
pinMode (CLOCK, OUTPUT);
pinMode (LOAD, OUTPUT);
pinMode (RESET, OUTPUT);
pinMode (probePin, INPUT);
pinMode (ledPin, OUTPUT);
AD9850_init();
AD9850_reset();
SetFrequency(28000000);
}
void SetFrequency(unsigned long frequency)
{
unsigned long tuning_word = (frequency * pow(2, 32)) / DDS_CLOCK;
digitalWrite (LOAD, LOW);
shiftOut(DATA, CLOCK, LSBFIRST, tuning_word);
shiftOut(DATA, CLOCK, LSBFIRST, tuning_word >> 8);
shiftOut(DATA, CLOCK, LSBFIRST, tuning_word >> 16);
shiftOut(DATA, CLOCK, LSBFIRST, tuning_word >> 24);
shiftOut(DATA, CLOCK, LSBFIRST, 0x0);
digitalWrite (LOAD, HIGH);
}
void AD9850_init()
{
digitalWrite(RESET, LOW);
digitalWrite(CLOCK, LOW);
digitalWrite(LOAD, LOW);
digitalWrite(DATA, LOW);
}
void AD9850_reset()
{
//reset sequence is:
// CLOCK & LOAD = LOW
// Pulse RESET high for a few uS (use 5 uS here)
// Pulse CLOCK high for a few uS (use 5 uS here)
// Set DATA to ZERO and pulse LOAD for a few uS (use 5 uS here)
// data sheet diagrams show only RESET and CLOCK being used to reset the device, but I see no output unless I also
// toggle the LOAD line here.
digitalWrite(CLOCK, LOW);
digitalWrite(LOAD, LOW);
digitalWrite(RESET, LOW);
delay(5);
digitalWrite(RESET, HIGH); //pulse RESET
delay(5);
digitalWrite(RESET, LOW);
delay(5);
digitalWrite(CLOCK, LOW);
delay(5);
digitalWrite(CLOCK, HIGH); //pulse CLOCK
delay(5);
digitalWrite(CLOCK, LOW);
delay(5);
digitalWrite(DATA, LOW); //make sure DATA pin is LOW
digitalWrite(LOAD, LOW);
delay(5);
digitalWrite(LOAD, HIGH); //pulse LOAD
delay(5);
digitalWrite(LOAD, LOW);
// Chip is RESET now
}
void loop()
{
// read the state of the pushbutton value:
int probeState = digitalRead(probePin);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (probeState == HIGH) {
// turn LED on:
SetFrequency(28001000);
digitalWrite(ledPin, HIGH);
}
else {
// turn LED off:
SetFrequency(28000000);
digitalWrite(ledPin, LOW);
}
}