You could use a 50mhz reference, but you would have to hack the Raduino code a bit.
toggle quoted message
Show quoted text
Something like this should work, as per post? ??/g/BITX20/message/35235 In my own Raduino code, I adjust si5351bx_vcoa directly, and save it to EEPROM when done. But am following the convention set by the uBitx stock code with a call to si5351_setcalibration() The functions enc_read() and btnDown() are also from the stock uBitx code.? If the calibration found in EEPROM at power up is beyond perhaps +/- 1000 ppm? at 875mhz (so a number bigger than 875000 or less than -875000), it should be ignored and a calibration value of 0 assumed. With the code as presented, we are adjusting the 25mhz reference oscillator to the si5351 by a factor of 10 Hertz out of? 875mhz with each encoder tick, a factor of 11.4 ppb. That will be slow going. Increasing that to 100 Hz might be more practical. It's possible that no tone will be heard at the start, but moving the encoder one way or the other should eventually find it. This line of code: ? ? unsigned long clk1 = clk0 + 44995000;? ? ? //? clk0 + the center of the 45mhz crystal filter could be changed to? ? ? unsigned long clk1 = clk0 + 44995000 + beatnote;?? where beatnote is an audio tone of perhaps 500? in Hz. Then use a frequency counter on the speaker leads to measure the resultant audio tone, twiddle the encoder till the frequency counter reads exactly that 500 hz. With this change, you no longer need to find true zero beat, as zero Hz may be hard to find given the capacitive coupling through the audio amp. // Takes one arg, the frequency standard in Hz that we have available // Could be a station off the air, could be a fancy rubidium standard // If that frequency is over 30mhz (and less than 64mhz),?? // then should be injected into T2 pin 1 directly, bypassing the 30mhz LPF at L1,2,3,4 // Use the encoder to adjust the VFO until zero beat is heard // We place the BFO in the center of the 12mhz filter passband so zero beat is easily heard. // Save the value of "calibration" that has been found to eeprom. // This calibrates all three oscillators from the si5351 in one go, and does so with great accuracy. // The LCD display shows the assumed frequency of vcoa, nominally 875mhz. // Untested and may be a bug or two (though I use something similar on my raduino). void calibrateExample(unsigned long freqref) { ? ? short calibration = 0; ? ? unsigned long clk0 = 11998000;? ? ? ? ? ? ? ? ?//? BFO at center of 12mhz crystal filter in hz ? ? unsigned long clk1 = clk0 + 44995000;? ? ? //? clk0 + the center of the 45mhz crystal filter ? ? unsigned long clk2 = freqref + 44995000;? //? A high side VFO ? ? while (! btnDown() )? ?{? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? // Press the button when zero beat is acheived ? ? ? ? calibration = calibrtion + 10*enc_read();? ? ? // Rotate encoder for zero beat ? ? ? ? lcd.setCursor(0,0);? ? lcd.print(875000000 + calibration); lcd.print("? "); ? ? ? ? si5351_setcalibration(calibration); ? ? ? ? si5351bx_setfreq(0, clk0); ? ? ? ? si5351bx_setfreq(1, clk1); ? ? ? ? si5351bx_setfreq(2, clk2);? ? ? } } On Thu, Jul 19, 2018 at 02:32 PM, John Malone wrote: I have a 50mh signal source, can I use it to calibrate the v4 ubitx board? |