The Arduino code application shown below, is a digital BFO oscillator for the tri-band radio software. I have tested the software and found that either my home made digital frequency counter ( made for my OND in electrical engineering ), or the digital vfo, is off frequency. The reading from my counter is around 50Hz low. However, the Arduino has added to it a fault test message using the Arduino ide monitor routine. When using the ide monitor, the message shown on the monitor relates to the setting of the BFO in accordance to the pin selection on pins 4 to 6.
Uno data pin 4 = usb
Uno data pin 5 = lsb
Uno data pin 6 = cw
To select the carrier mode, tie down to GND the required pin, or connect to the tri-band ssb / cw led connection to the twi interface chip. Should only CW and USB be required, then leave the LSB line un-connected, as to use the Arduino DDS BFO, to select say USB, then the Tri-band digital VFO software will pull to GND on the appropriate LED pin to switch on the LED, and in addition will also activate the USB on the DDS BFO, while the CW pin remains high. To select CW, then the LED pin for CW on the LED indicator board will go to GND, and the USB pin then high, which will then cause the DDS BFO software to switch from USB to CW. As the LSB pin is not connected or tied high, the LSB pin will not go GND and then LSB will not be selected. The DDS BFO software acts on the select line for CW or USB or LSB transitioning from high to low, only the required carrier BFO mode of CW or LSB or USB being selected individually, one at a time tied low to activate, not two or three together. When not used, the selection is put logic high. The Arduino code uses the "pull-up" resistor command, which means that a rotary switch or individual switches can be used to tie low to select the BFO carrier mode pin.
The connections for the DDS AD9850 on the data pins are, D0 and D1 are connected to +5V, while pins D3 to D6 are tied to GND. The remaining DDS connections are shown below.
DDS W_CLK = Uno data Pin 9 - connect to AD9850 word load clock pin (CLK)
DDS FQ_UD = Uno data Pin 10 - connect to AD9850 freq update pin (FQ_UD)
DDS DATA = Uno data Pin 11 - connect to AD9850 serial data load pin (AD9850 D7 = DATA)
DDS RESET = Uno data Pin 12 - connect to AD9850 reset line
It is perhaps useful to say that the BFO Arduino code shown below can also be used for a shortwave receiver, thus the Arduino application in this case is not limited to just ham radio, but available as well to shortwave listeners. One more note for a manual operation, when the either lsb, usb or cw is selected, the bfo is latched into that bfo carrier frequency, that is to say that pins 4 to 6 can be tied low for selection or momentary held low with a push to make switch for selection. Once another application choice is made requiring a change in the bfo signal frequency, then at this point the Arduino code will re-program the digital oscillator onto a new frequency that is programmed into the Arduino code.
The digital oscillator in previous code applications has been programmed and re-programmed in a code loop. I have found from fellow friends that this caused a sinx/x response from the digital oscillator output. By latching the digital oscillator programming, the oscillator is programmed once only per needs, in doing so avoiding the sinx/x signal output from the digital oscillator. This latching principle is now in use with the updated tri-band vfo software, the digital oscillator only updated once the dial knob is moved, avoiding the sinx/x output from the tri-band vfo oscillator when the dial knob is not moved. Hopefully in both cases, the true signal output purity from a digital oscillator would be realised as the RF professional engineers predict.
The tri-band vfo software when ssb is selected, the local oscillator of the tri-band software is used as a local oscillator for both transmit and receive mode, for a 9MHz I.F. the local oscillator for the 40m band is around 2MHz. However for cw receive use, the local oscillator vfo is used as the same for ssb, however for cw transmit mode, the local oscillator vfo is then used as the transmit oscillator. That is to say, the cw transmit vfo is changed in frequency to the dial frequency on the 40m band in the lower band software, and then keyed as a full break-in application between the 9MHz I.F. as a 2MHz local oscillator for 40m band in the receive cycle, and directly out onto the 40m band on transmit cycle in this example. All of the tri-band vfo software applications posted in the "radio ham tech blog", function in the same manner.
The 9MHz I.F. is used as a transmit modulator and receiver demodulator for ssb mode, but only required as a receive I.F. stage demodulator for cw mode. I would suggest a 9MHz crystal is used as the CW I.F. filter, using several in a chain would give the CW narrow filter slope, while the CW and SSB LED on the tri-band vfo software TWI radio panel interface would switch between the CW and SSB crystal filters.
Download the bfo code from my google drive, the code is in a text format and should open up in notepad. Cut and paste from notepad into the Arduino ide.
https://docs.google.com/document/d/1GnW372d605wLlM2yhu465t9R8qROLyKzMFHR9LYB5mY/edit?usp=sharing