Excuse my small Arduino knowledge. I was trying to fix these issues with no luck

first of all, this code would give me a max of about 46.6661MHz true output freq (measured by the O'scope) and 69.999.999Mhz indicated on the LCD but the AD9851 allow up to 70Mhz which I wantso long story short the LCD indicated frequency is not the same as the measured one

Prior work was computer software and data communications for 34 years. Then owner/President of an electronic assembly service for 20 years. Amateur radio since 1955, approximately. Live in Central Oregon desert.

Excuse my small Arduino knowledge. I was trying to fix these issues with no luck

first of all, this code would give me a max of about 46.6661MHz true output freq (measured by the O'scope) and 69.999.999Mhz indicated on the LCD but the AD9851 allow up to 70Mhz which I wantso long story short the LCD indicated frequency is not the same as the measured one

Try the attached library (in the ZIP file). It supports the AD9851 and also provides for calibrating the 30 mhz crystal to WWV or some other standard.

The oscilloscope is perfectly fine, to be honest I am so new to this kind of coding I started learning to code Arduino long time ago and all I have is very basic knowledge so your help is much much appreciated.

The oscilloscope is perfectly fine, to be honest I am so new to this kind of coding I started learning to code Arduino long time ago and all I have is very basic knowledge so your help is much much appreciated.

I was playing with the multiplyer number of 4294967296 and I started getting a closer numbers to the actual measured output frequency!

but is there a mathematical way to accurately set the frequency?which part of the code represents the LCD shown freq and which is the actual measured output freq

BTW I have a clone ELEGO UNO R3 if this makes a difference

Download the zip file I put up for you. Not only are those scaling factors explained, but the library also contains the ability to calibrate your crystal to an exact value.

Note that it's not a "dumbed down click to install" library. You need to make your own directory (or "folder" in Windoze) called "AD9851" then unzip the file into that directory to produce "AD9851.cpp" and "AD9851.h", then restart your IDE and you can #include the library into your sketch.

Also, the library returns a value to you which is the EXACT frequency that got set (along with any errors due to the integer value not lining up exactly). For example, you may do a "DDS.setFreq (1000000UL);" but it may return "1000001UL" if that's the closest it can get.