Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Re: LOOKING FOR HELP ADDING USB TO EXISTING BITX40 ARDUINO SKETCH
I made 2 functions and call them from the the usb / lsb case button (in bold) It compiles and i can tune lsb but usb does not seem to work. However, if i change th - to a plus in the if_offset - Usb seems to be there. I #ifdef IF_Offset ?uint32_t vco = bfo - (vfo * SI5351_FREQ_MULT); ?si5351.set_freq(vco, SI5351_CLK0); // WAS 0 ?tbfo = "LSB"; ?si5351.drive_strength(SI5351_CLK0,SI5351_DRIVE_8MA);? #endif I tried the other frequencies but they thru of the cal. Joe ve1bwv buttonState3 = digitalRead(buttonPin3); ? if (buttonState3 != lastButtonState3) { ? ? if (buttonState3 == HIGH) { ? ? ? buttonPushCounter3++; ? ? ? switch (buttonPushCounter3) { ? ? ? ? case 1: ? ? ? ? ? Serial.println("USB"); ? ? ? ? ? tft.setFont(); ? ? ? ? ? tft.setTextSize(1); ? ? ? ? ? tft.fillRect(130, 225, 60, 15, GREY); ? ? ? ? ? tft.drawRect(130, 225, 60, 15, GREY); ? ? ? ? ? tft.setCursor(142, 229); ? ? ? ? ? tft.setTextColor(DARKGREY, GREY); ? ? ? ? ? tft.print("SSB/CW"); ? ? ? ? ? delay(100); ? ? ? ? ? tft.fillRect(130, 225, 60, 15, DARKGREY); ? ? ? ? ? tft.drawRect(130, 225, 60, 15, GREY); ? ? ? ? ? tft.setCursor(142, 229); ? ? ? ? ? tft.setTextColor(WHITE, DARKGREY); ? ? ? ? ? tft.print("SSB/CW"); ? ? ? ? ? delay(100); ? ? ? ? ? tft.fillRect(269, 130, 44, 18, BLACK); ? ? ? ? ? tft.setFont(&FreeSans9pt7b); ? ? ? ? ? tft.setTextSize(1); ? ? ? ? ? tft.setCursor(270, 145); ? ? ? ? ? tft.setTextColor(WHITE, BLACK); ? ? ? ? ? tft.println("USB"); ? ? ? ? ? void usbjoe(); ? ? ? ? ?? ? ? ? ? ? break; ? ? ? ? case 2: ? ? ? ? ? Serial.println("CW"); ? ? ? ? ? tft.setFont(); ? ? ? ? ? tft.setTextSize(1); ? ? ? ? ? tft.fillRect(130, 225, 60, 15, GREY); ? ? ? ? ? tft.drawRect(130, 225, 60, 15, GREY); ? ? ? ? ? tft.setCursor(142, 229); ? ? ? ? ? tft.setTextColor(DARKGREY, GREY); ? ? ? ? ? tft.print("SSB/CW"); ? ? ? ? ? delay(100); ? ? ? ? ? tft.fillRect(130, 225, 60, 15, DARKGREY); ? ? ? ? ? tft.drawRect(130, 225, 60, 15, GREY); ? ? ? ? ? tft.setCursor(142, 229); ? ? ? ? ? tft.setTextColor(WHITE, DARKGREY); ? ? ? ? ? tft.print("SSB/CW"); ? ? ? ? ? tft.fillRect(269, 130, 44, 18, BLACK); ? ? ? ? ? tft.setFont(&FreeSans9pt7b); ? ? ? ? ? tft.setTextSize(1); ? ? ? ? ? tft.setCursor(270, 145); ? ? ? ? ? tft.setTextColor(WHITE, BLACK); ? ? ? ? ? tft.println("CW"); ? ? ? ? ? break; ? ? ? ? case 3: ? ? ? ? ? Serial.println("LSB"); ? ? ? ? ? tft.setFont(); ? ? ? ? ? tft.setTextSize(1); ? ? ? ? ? tft.fillRect(130, 225, 60, 15, GREY); ? ? ? ? ? tft.drawRect(130, 225, 60, 15, GREY); ? ? ? ? ? tft.setCursor(142, 229); ? ? ? ? ? tft.setTextColor(DARKGREY, GREY); ? ? ? ? ? tft.print("SSB/CW"); ? ? ? ? ? delay(100); ? ? ? ? ? tft.fillRect(130, 225, 60, 15, DARKGREY); ? ? ? ? ? tft.drawRect(130, 225, 60, 15, GREY); ? ? ? ? ? tft.setCursor(142, 229); ? ? ? ? ? tft.setTextColor(WHITE, DARKGREY); ? ? ? ? ? tft.print("SSB/CW"); ? ? ? ? ? tft.fillRect(269, 130, 44, 18, BLACK); ? ? ? ? ? tft.setFont(&FreeSans9pt7b); ? ? ? ? ? tft.setTextSize(1); ? ? ? ? ? tft.setCursor(270, 145); ? ? ? ? ? tft.setTextColor(WHITE, BLACK); ? ? ? ? ? tft.println("LSB"); ? ? ? ? ? ?void lsbjoe(); ? ? ? ? ? buttonPushCounter3 = 0; ? ? ? ? ? // void lsbjoe(); ? ? ? ? ? break; ? ? ? ? ?? ? ? ? ? default: ? ? ? ? ? // if nothing else matches, do the default ? ? ? ? ? // default is optional ? ? ? ? ? break; void lsbjoe(){ uint32_t vco = bfo - (vfo * SI5351_FREQ_MULT); si5351.set_freq(vco, SI5351_CLK0);? ? tbfo = "LSB"; ? volatile uint32_t LSB = 1199850000ULL; ? bfo = LSB; ? si5351.drive_strength(SI5351_CLK0,SI5351_DRIVE_8MA); //you can set this to 2MA, 4MA, 6MA or 8MA WAS CLK0 ? return; } void usbjoe(){ uint32_t vco = bfo + (vfo * SI5351_FREQ_MULT); si5351.set_freq(vco, SI5351_CLK0); // WAS 0 ? ? tbfo = "USB"; ? bfo = USB; ? volatile uint32_t USB = 1200150000ULL; ? si5351.drive_strength(SI5351_CLK0,SI5351_DRIVE_8MA); //you can set this to 2MA, 4MA, 6MA or 8MA? ? return; } On Fri, Jul 28, 2017 at 12:45 AM, Jerry Gaffke via Groups.Io <jgaffke@...> wrote: Looks like PD8W was written to drive the BFO with CLK0 from the Si5351 instead of using the Bitx40 analog BFO. |
to navigate to use esc to dismiss