brycecherry75 / MAX2870

Arduino support for the MAX2870 Wideband Frequency Synthesizer chip from Maxim
9 stars 8 forks source link

COMMAND SET #5

Open dlramfan opened 1 year ago

dlramfan commented 1 year ago

Thank you for your work with the MAX2870. I am working with your example2870. I believe that I have good communication between the UNO and MAX2870 (see MAX2870 Read STATUS.jpg) MAX2870 Read STATUS I have adjusted the REF successfully. I cannot seem to set output frequency successfully. Is there a document that describes exactly how to format the "setf" command? Here is an example of what I've attempted: setf 0x3000000000, 4, 4, UNDIVIDED, false, 0x000003E8, 0x00007530 Frequency is a character string ,Power Level 4, Aux Power Level 4, fundamental (UNDIVIDED), Precision Frequency is false, Frequency Tolerance is 1000Hz expressed as uint32_t, calculation timeout is 30000 expressed as uint32_t I get an ERROR code. I've tried this command every way I can think of. Additionally, is there a command that would allow setting frequency only and power level only? I tried using the link on your GitHub MAX2870 main page where it says: "The library is documented in the [docs directory] (https://github.com/brycecherry75/MAX2870/blob/main/doc/html), and was created using Doxygen." The hyperlink is not working. I thought there might be some examples of each command (really useful for me since I'm still learning). Thanks so very very much for any assistance you can offer. dlramfan

dlramfan commented 1 year ago

I have resolved the communication issues. I can enable the chip: CE ON I am able to set the reference REF 100000000 1 UNDIVIDED I am able to set a frequency but the chip does not lock (LD never transitions) FREQ 1000000000 4 4 FUNDAMENTAL 0 0 When set to 1GHz as shown, the output goes to 1.623GHz as measured on my Advantest Spectrum Analyzer I have tried many combinations of REF division. I have also tried many RF Frequencies from 100MHz - 6GHz (all should have been INT mode). At times the chip shuts down. I am using a breakout board for the MAX2870 supplied by an unknown vendor, however I've traced the circuit and agree with the part selection although I would bypass much closer to the chip. Could you offer any insights? Do you have any experience similar to mine? By the way, I am an RF/Microwave engineer (UMC/RFMD/Triquint/Qorvo). I am not an expert code writer. I dabble. :)

dlramfan commented 1 year ago

Another note, I have tried to use many combinations of FREQ_DIRECT such as the following (from power up): CE ON REF 1000000 1 UNDIVIDED (100MHz) STEP 10000000 (10MHz) FREQ_DIRECT 1 32 2 0 16 0 false (200.0MHz) ALL FREQ_DIRECT combinations produce an ERROR. So sorry to be a pest. I'm just wondering how successful others have been with your example code. Thank you in advance for all of your hard work and support. Once I have this working I'll be implementing multi-stage output filtering, level control, etc... Once complete and I publish my findings, I'll be sure to acknowledge your contribution. Thank you so much! Best Regards, David

dlramfan commented 1 year ago

As an update, I have examined the code just a bit. In the header the command is described as: FREQ_DIRECT R_divider INT_value MOD_value FRAC_value RF_DIVIDER_value PRESCALER_value FRACTIONAL_MODE(true/false) However, upon examining the code it seems that the PRESCALER_value is not required and this command should read: FREQ_DIRECT R_divider, INT_value, MOD_value, FRAC_value, RF_DIVIDER_value, FRACTIONAL_MODE(TRUE/FALSE) This entry method seems to be well accepted by the software, but I have yet to successfully get the Arduino UNO R3 to pass the SPI data accurately. Getting random results. I've ordered an Arduino DUE to try instead. I will share the results. Thanks so much for your hard work. Cheers, David

brycecherry75 commented 1 year ago

I had no issues with my board using these settings and with the HMC830 and ADF4355 VCO libraries I wrote, I had issues due to improper charge pump current (and for the ADF4355, bleed current) settings during development; functions to set charge pump current and phase detector polarity are now included in the library and demo sketch (CP_CURRENT and PD_POLARITY commands) - changing these settings with these commands will hopefully deal with your problem.

If you continue to experience problems, what are the VFO parameters displayed after a successful FREQ command?

dlramfan commented 1 year ago

Good afternoon. Thanks so much for the input. Once I updated example2870 I set CP_CURRENT, I left PD_POLARITY as is (default polarity is correct in my case). This adjustment sent me down the path of the loop filter construction on the breakout board. Based on 10MHz fPFD, 100MHz/V Kvco, and 2.56mA CP current, and 12kHz LBW, the passive loop filter used in the breakout board was problematic. I've since modified the loop filter. Now I have good control of frequency and power. Now on to the next system block. Thanks so much for your kind support! Cheers, David

thegreatleade commented 6 months ago

What will be the sweep command if I want to sweep from 433 MHz to 440 MHz? The MAX2870 generates the sweep.