|
1 | 1 | /** |
2 | | - Raduino_v1.27.2 for BITX40 - Allard Munters PE1NWL (pe1nwl@gooddx.net) |
| 2 | + Raduino_v1.27.3 for BITX40 - Allard Munters PE1NWL (pe1nwl@gooddx.net) |
3 | 3 |
|
4 | 4 | This source file is under General Public License version 3. |
5 | 5 |
|
|
38 | 38 | // recommended pot span when radio is used mainly for CW: 10 to 25 kHz |
39 | 39 |
|
40 | 40 | // USB/LSB parameters |
41 | | -#define CAL_VALUE 0 // VFO calibration value |
| 41 | +#define CAL_VALUE 1575 // Initial VFO calibration value: 180 ppm |
42 | 42 | #define OFFSET_USB 1500 // USB offset in Hz [accepted range -10000Hz to 10000Hz] |
43 | 43 | #define VFO_DRIVE_LSB 4 // VFO drive level in LSB mode in mA [accepted values 2,4,6,8 mA] |
44 | 44 | #define VFO_DRIVE_USB 8 // VFO drive level in USB mode in mA [accepted values 2,4,6,8 mA] |
@@ -334,6 +334,7 @@ byte *paddleDAH = &_dah; // Paddle DAH bind to DAH |
334 | 334 | */ |
335 | 335 |
|
336 | 336 | #define bfo_freq (11998000UL) |
| 337 | + |
337 | 338 | unsigned long baseTune = 7100000UL; // frequency (Hz) when tuning pot is at minimum position |
338 | 339 | int old_knob = 0; |
339 | 340 | int RXshift = 0; // the actual frequency shift that is applied during RX depending on the operation mode |
@@ -389,7 +390,7 @@ void si5351bx_init() { // Call once at power-up, start PLLA |
389 | 390 | Wire.begin(); |
390 | 391 | i2cWrite(149, 0); // SpreadSpectrum off |
391 | 392 | i2cWrite(3, si5351bx_clken); // Disable all CLK output drivers |
392 | | - i2cWrite(183, SI5351BX_XTALPF << 6); // Set 25mhz crystal load capacitance |
| 393 | + i2cWrite(183, ((SI5351BX_XTALPF << 6) | 0x12)); // Set 25mhz crystal load capacitance (tks Daniel KB3MUN) |
393 | 394 | msxp1 = 128 * SI5351BX_MSA - 512; // and msxp2=0, msxp3=1, not fractional |
394 | 395 | uint8_t vals[8] = {0, 1, BB2(msxp1), BB1(msxp1), BB0(msxp1), 0, 0, 0}; |
395 | 396 | i2cWriten(26, vals, 8); // Write to 8 PLLA msynth regs |
@@ -2278,7 +2279,7 @@ void calibrate_touch_pads() { |
2278 | 2279 |
|
2279 | 2280 | void setup() { |
2280 | 2281 | u.raduino_version = 27; |
2281 | | - strcpy (c, "Raduino v1.27.2"); |
| 2282 | + strcpy (c, "Raduino v1.27.3"); |
2282 | 2283 |
|
2283 | 2284 | lcd.begin(16, 2); |
2284 | 2285 |
|
@@ -2366,7 +2367,7 @@ void setup() { |
2366 | 2367 | shiftBase(); //align the current knob position with the current frequency |
2367 | 2368 |
|
2368 | 2369 | //display warning message when VFO calibration data was erased |
2369 | | - if ((u.cal == 0) && (u.USB_OFFSET == 1500)) { |
| 2370 | + if ((u.cal == CAL_VALUE) && (u.USB_OFFSET == OFFSET_USB)) { |
2370 | 2371 | printLine(1, (char *)"VFO uncalibrated"); |
2371 | 2372 | delay(1000); |
2372 | 2373 | } |
|
0 commit comments