VFO Design with Adaptive Step Rate and Vernier Display

VK3ZYZ

Moderator
Staff member
There has been an odd problem with the code. When trying to run the 4 spare port pins as band select outputs, they do not work.
I'd added a clack through the ports on startup and that was ok, but as soon as the main code was initialized, the port pins went away. This has been bugging me for some days now, so I have been chipping at the code and this finally works.

It is a rehash of some earlier code set up for the Codan 8727 radio.
It has an IF of 1.650Mhz, with the BFO at 1.650Mhz for USB and 1.647Mhx for LSB.

The band switching now works, as for some reason, I had to re-do the pin modes of the ports at the end of setup(). Something else is screwing with those but I cannot find what it is. Anyway, this has been working on my Version 1 board.

Of course, you will need to adjust the frequencies for your set. As the Codan cannot go higher, I have limited the max band to the 14Mhz one, but that can be changed in the software. There is some stuff there to run a small OLED display as a meter too. Just a demo is included and it will work if a suitable display is connected to the I2C lines.

The four band switching lines could run to en external decoder for more individual bands. Maybe a 74138 for 8 out? Similar chips can be found for 10 or even 16 outputs.


Why the pin modes on these 4 pins went away while the other pins did not, I cannot work out. Maybe someone else can spot a silly mistake I've made but just cannot see it.
EDIT 20221216: The freq did not update on band switching until the dial was moved.
This is fixed now. I hope.
 
Last edited:
Top