Skip to content

Commit 09c1725

Browse files
committed
Regression: we have back the concept of an XFO just for the calculations...
1 parent 82bc709 commit 09c1725

File tree

2 files changed

+38
-7
lines changed

2 files changed

+38
-7
lines changed

arduino-arcs.ino

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* * CLK0 use PLLA & CLK1 use PLLB
4040
* * CLK0 is employed as VFO (to mix with the RF from/to the antenna)
4141
* * CLK1 is employed as BFO (to mix with the IF to mod/demodulate the audio)
42-
* * We use the full power in all outputs (8mA ~0dB)
42+
* * We use the full power in all outputs (8mA ~0dB?)
4343
*
4444
* * Please have in mind that this IC has a SQUARE wave output and you need to
4545
* apply some kind of low-pass/band-pass filtering to smooth it and get rid
@@ -303,17 +303,41 @@ struct mConf conf;
303303
// var is word so max is 65535 in 1/4 secs is ~ 16383 sec ~ 273 min ~ 4h 33 min
304304
#define SAVE_INTERVAL 2400 // 10 minutes = 60 sec * 4 ticks/sec * 10 min
305305

306-
// hardware pre configured values
306+
// This value is not the real PPM value is just the freq correction for your
307+
// particular xtal from the 27.00000 Mhz one, if you can measure it put it here
308+
long si5351_ppm = 2256; // in Hz, mine is 2.256 Khz up
309+
310+
/******************************************************************************
311+
* The use of an XFO... some users are requesting the use of an XFO in the
312+
* calculations.
313+
*
314+
* Some users with double conversion radios has 1st & 2nd IF, so this radios
315+
* usually has a XTAL oscillator to mix 1st & 2nd IF back and forward, this is
316+
* called an XFO.
317+
*
318+
* WARNING!: we are not generating that XFO frequency, just taking it into
319+
* account in the calculations; so, put your soldering iron down and keep the
320+
* XTAL oscillator running please.
321+
*
322+
* If you have this scenario just uncomment the below line and put in there
323+
* your XFO frequency in Hz (9.6MHz = 9 600 000, spaces are added now to clarify)
324+
*
325+
* This will trigger a few macros ahead and will calculate the correct VFO
326+
* frequencies for you in normal and SETUP mode.
327+
*
328+
* Now, be aware that if you triggers this from now own any reference to "IF"
329+
* will be about the *second* IF (the lower one, the one that get's modulated
330+
* and demodulated)
331+
*****************************************************************************/
332+
//#define XFO 5300000 // 5.3 Mhz as an example
333+
334+
// hardware pre-configured values
307335
// pre-configured values for a single conversion radio using the FT-747GX filter
308336
long lsb = -1600;
309337
long usb = 1600;
310338
long cw = 0;
311339
long ifreq = 8213950;
312340

313-
// This value is not the real PPM value is just the freq correction for your
314-
// particular xtal from the 27.00000 Mhz one, if you can measure it put it here
315-
long si5351_ppm = 2256; // in Hz, mine is 2.256 Khz up
316-
317341
// Si5351a Xtal
318342
long XTAL = 27000000; // default FREQ of the XTAL for the Si5351a
319343

fd-si5351.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,14 @@ void si5351ai2cWrite(byte regist, byte value){
124124
// set the calculated freq to the VFO
125125
void setFreqVFO() {
126126
// temp var to hold the calculated value
127-
long freq = *ptrVFO + ifreq;
127+
long freq = *ptrVFO;
128+
129+
// macro about XFO
130+
#ifdef XFO
131+
freq += XFO;
132+
#else
133+
freq += ifreq;
134+
#endif
128135

129136
// apply the ssb factor
130137
if (*ptrMode == MODE_USB) freq += usb;

0 commit comments

Comments
 (0)