digital vfo code for 160m, 80m, 40m band

/* 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

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/136VkvaC364cUqJEl7CKXJVmTs8u6sXbs6Uri7LhN2OM/edit?usp=sharing