AD9850 Module No output signal

Hello,

I'm trying to get the AD9850 module to work using an Arduino UNO R3. After uploading the code, I get no signal.

I looked at the outputs with a multimeter: the second sinusoidal output saturates at 1.7V and the first square output saturates at the supply voltage (3.3V or 5V).

Here's the code I used. Can you explain what could happen? Could it be the AD9850 module, the arduino or the code?

// Pin definitions
#define W_CLK 7
#define FQ_UD 8
#define DATA 9
#define RESET 10

// Macro to generate a high pulse on a pin
#define pulseHigh(pin) {digitalWrite(pin, HIGH); delay(1) ; digitalWrite(pin, LOW); delay(1);} 

// Function to transfer a byte to the AD9850

void tfr_byte(byte data) 
{
  for(int i = 0; i < 8; i++, data >>= 1) {
    // Send the least significant bit of data to the DATA pin
    digitalWrite(DATA, data & 0x01);
    delay(1);
    // Generate a pulse on the W_CLK pin
    pulseHigh(W_CLK); 
  }
}

// Function to send the desired frequency to the AD9850
void sendFrequency(double frequency) {
  // Calculate the frequency word
  int32_t freq = frequency*4294967295/125000000; 
  
  // Send the frequency word, one byte at a time
  
  for(int b=0; b<4; b++, freq>>= 8) 
  {
    tfr_byte(freq & 0xFF);
  } 
  // Send control byte (0x000)
  tfr_byte(0x000);
  // Generate a pulse on the FQ_UD pin to update the frequency
  pulseHigh(FQ_UD); 
}

void setup() {
  // Set the pin modes to OUTPUT
  pinMode(FQ_UD, OUTPUT);
  pinMode(W_CLK, OUTPUT);
  pinMode(DATA, OUTPUT);
  pinMode(RESET, OUTPUT);

  // Initialize the AD9850 with pulses on RESET, W_CLK, and FQ_UD pins
  pulseHigh(RESET);
  pulseHigh(W_CLK);
  pulseHigh(FQ_UD);
}

void loop() {
  // Set the frequency
  sendFrequency(100); 
  // Infinite loop to stop further execution
  while(1);
}

Thanks for any help.

All the best,
Timothée.

Have a look at - GitHub - RobTillaart/AD985X: Arduino library for AD9850 and AD9851 function generators.

If the examples of the library work you know that your device is good and correctly connected.

Hello,

Thanks for your message. I download your librairies and try the example demo for the AD9850 (1 device). But it is not working that much.

When I upload your demo program in my arduino board, open my monitor and see weird character. When I try to communictae with it with the serial monitor, I have any answer.

I think the path of the files is not good due to my user folder (non Ascii character). Do you think is a possibility ? Should I put my code in another folder ?

For more information about the hardware I did :

                  +-----------+
                  |   X-TAL   |
                  |         L |
   3.3V --->  VCC | o       o | VCC
  PIN  9 ---> CLK | o       o | D0
 PIN  8 ---> PUFD | o       o | D1
 PIN 7  ---> DATA | o       o | D2
 PIN 6 -->  RESET | o       o | D3
    GND --->  GND | o CCC   o | D4
            QOUT1 | o CCC   o | D5
            QOUT2 | o       o | D6
            ZOUT1 | o       o | D7 
            ZOUT2 | o  PP   o | GND
                  |    PP     |
                  +-----------+

New detail : sometime by just power up the device, I have a signal from the module. But when I reset the arduino board, It is not working again.

Thanks for your help.
Timothée

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.