The radio vfo code shown below is for a ham radio set covering the 40m, 20m and 15m bands. As only 40m is lower sideband and both 20m and 15m are upper sideband for single sideband operation, the Arduino code will detect if lower or upper sideand is needed when the cw/ssb switch is used. For this reason, the connection of the triband bfo Arduino Uno board is connected at an additional point. Table below shows the radio panel connections:
All of the PCF8574 pin connections are set within the vfo code as active low Output pins P0, P1 and P2 logic switch each of the ham band boards, or to switch the different antenna filtering arrangements, while pins P3, P4 and P7 are direct connections to the tri-band bfo Arduino Uno code. The tri-band bfo url is listed below:
https://sites.google.com/site/radiohamtechnology/digital-bfo-for-tri-band-radio-software
Below is the 40m, 20m and 15m digital vfo code. Do remember while operating CW, the vfo is placed on the output dial frequency and used as the keyed vfo output into the transmitter circuit, but on receive mode the 9MHz I.F. is used. For SSB operation, the 9MHz I.F. is used to generate and resolve the SSB signal. In each case, the tri-band BFO is used to source the 9MHz I.F. stage signal source at the 9MHz +/- 1.5KHz for upper or lower ssb. For CW operation, the BFO is 600Hz higher than the centred CW signal within the 9MHz I.F. stage. The digital vfo for the radio will show a direct carrier reading for CW on the dial display, but for ssb operation, the dial display relates to the centre of the ssb transmission, in otherwords the dial display does not show the carrier frequency, but rather the centre of the transmission signal. This means that to stay within the band edges, while operating ssb, the display needs to show the transmission to be within +1500Hz from the bottom of the band, and -1500Hz from the top of the band. To add to the Arduino code application use, the Arduino code as with the four other tri-band code applications, has a last use recall auto memory, that is as you switch between each of the bands, the last frequency setting on the band that was used before changing is remembered and auto recalled back for use when changing back onto the band. The cw/ssb switch for ssb use is auto selected between lsb and usb depending on the band allocation use.
Below is the Digital VFO Arduino code of an Arduino Uno application.
/* This program written by Alastair GW0AJU.
The code presented here for an all HF tri-band digital vfo.
The program code is set in this listing as the lower ham band 160m, 80m, and the 40m band,
with either CW or LSB.
The program code to be easily adjusted for the mid-bands of 30m, 20, and 17m, adjusting the
"void setup()" code accordingly. The "void carrier_mode()" and "void tx_rx()" would need altered
to represent the new hamd band requirements. Subsequently for the higher ham bands of 15m, 12m, and 10m
bands, the same alterations would be required. An extended band radio of LF, MF and 60m could also be
constructed by adjusting the same code routines.
In all cases, the code uses a 9MHz intermediate frequency for reception, and also for SSB exciter. However
for CW transmissions, the digital VFO is placed directly onto the dial frequency as the digital vfo is used as
the carrier oscillator for TX mode, thus CW keying the digital vfo for CW tx onto the output dial frequency setting,
then the digital vfo adjusted for reception onto a 9MHz intermediate frequency setting.
An i/o bus expander of the pcf8754 type is used to access to an output LED panel indicator, while also giving
a logic output for ham band antenna switching on three of the i/o bus pins, P0, P1 and P2. The carrier mode
switching is also present on the i/o bus, on pins P3 for CW and P4 for SSB, used also for switching between
CW and SSB Tx/Rx circuits such as the BFO frequency selection for CW and SSB and band pass filtering. The morse
key and PTT line is also imaged on i/o pin P5.
It is suggested that in order to accurately use the twi display and i/o bus expander, use a twi searching program
to find the network address of each unit.
Ardunio board used = Ardiuno Uno
original date 8th Feb 2016
https://docs.google.com/document/d/1cjHlUYgvcDKJ4s7q5FdvRJcKgZBk0I7dyTvN7pR_qz8/edit?usp=sharing