Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

AD9850 Generate Random Fixed Frequencies Controlled By MEGA328P-AU

Status
Not open for further replies.

Tigera

Newbie
Joined
Dec 8, 2014
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,325
Hey

I've made a circuit with AD9850 Controlled by ATMega328P-AU with serial interface.

Here is the Schematic Link.

[Moderator action: Link to external file server removed]


I've Tested Prog with AD9850 Module (HC-SR08_Module) and code is working.

Circuit use a 3.7v Single Cell Li-Po Battery and MT3608 to Boost 3.7v to 5v.

The Reference Oscillator for ad9850 is 2 MHz .

I've Reduce the code to just set the frequency of ad9850 But it generates few fixed random frequencies .

for instance:

Desire Freq ----> Output Freq

1 KHz ----> 900 KHz
2 KHz ----> 3.9 KHz

3 KHz ----> 15Hz

4 KHz ----> below 2Hz

5 KHz ----> 899 KHz



and so on.....



every time i change frequency , the output frequency is a random value between above.

I would appreciate any help.
 
Last edited by a moderator:

hello,

**broken link removed** with an Oscillator Quartz 125MHz !

Hardware_links_18F26K22_AD9850.jpg
light version to test AD9850 wich gives :
Init à 1Hz
Init à 1000Hz
Init à 5000Hz
Init à 20KHz
Init à 200KHz
Init à 1 MHz

with
float AD9850_FREQUENCY_FACTOR = 34.35973837; // 2^31 divided by 125MHz
4 294 967 296‬/125 000 000

main fonction to drive AD9850 (32 bits register to define frequency output)
Code:
void AD9850_Charge_Freq(float Freq)
{
AD9850_Serial_Data.TuningWord = (long) (Freq * AD9850_FREQUENCY_FACTOR);
SendSerialDataByteToAD9850(AD9850_Serial_Data.DDS. pv0);
SendSerialDataByteToAD9850(AD9850_Serial_Data.DDS. pv1);
SendSerialDataByteToAD9850(AD9850_Serial_Data.DDS. pv2);
SendSerialDataByteToAD9850(AD9850_Serial_Data.DDS. pv3);
SendSerialDataByteToAD9850(AD9850_CONTROL_WORD);
Delay_us(100);
FQ_UD = 1;
Delay_us(200);
FQ_UD = 0;
Delay_us(200);
}


with 2MHz you will get .
4 294 967 296‬/2 000 000 = 2147
means High resolution for low frequency , but short range in frequency

post your code ... to check the step value in frequency corresponding to the 32bits AD9850 register..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top