F5OEO / rpiadf4351

Control ADF4351 with Raspberry SPI
GNU General Public License v3.0
4 stars 2 forks source link

PLL output signal with an offset #1

Open sushie96 opened 6 years ago

sushie96 commented 6 years ago

I have used your program in raspberry pi3 for controlling the adf4351 evaluation module, I have connected the rf_out+ with my spectrum analyzer, but I am receiving the output with an offset. When writing 437MHz it is outputting signal at around 390MHz. I haven't modified the code and ran the default code after compiling. Please help me with this. Thanks

sushie96 commented 6 years ago

Also the compilation of the library gave these warnings

In file included from adf4351.c:75:0: adf4351.c: In function ‘adf4350_set_freq’: adf4351.h:88:44: warning: result of ‘9 << 29’ requires 34 bits to represent, but ‘int’ only has 32 bits [-Wshift-overflow=]

define ADF4350_REG2_NOISE_MODE(x) ((x) << 29)

                                        ^

adf4351.c:367:30: note: in expansion of macro ‘ADF4350_REG2_NOISE_MODE’ ADF4350_REG2_MUXOUT(0x7) | ADF4350_REG2_NOISE_MODE(0x9))); ^~~~~~~

F5OEO commented 6 years ago

No problem with warning, however, it assume that RefClock if 10Mhz which could be maybe an other value on your board. You can change it here according to your value : https://github.com/F5OEO/rpiadf4351/blob/a2c5de3eaa08bac6fd5af4ac88f58b6c1dbb7913/ctladf4351.c#L15

And recompile (make)

sushie96 commented 6 years ago

Sir, I am not using any ref in, i want to use the 25Mhz internal vco

F5OEO commented 6 years ago

Replace 10000000 by 25000000

sushie96 commented 6 years ago

Thanks Sir, Now the offset is gone I tested with 437MHz and 2GHz signal. but now when I am writing 2.1GHz and even for 1.95GHz frequency, it is not showing any output at that frequency is it something to do with channel spacing value?

sushie96 commented 6 years ago

I also tried sweeping from 1000 MHz to 1100MHz with a sweep step of 10MHz, with a delay of 2seconds. I didnt work as properly and after 1050 MHz the frequency output was at random frequencies.