The above file in post #61, has floats for the CTCSS tone table and uses 26118 bytes or 85% of program storage space, 1072 bytes or 52% for variables.
The one below uses less as the CTCSS tone table is int, with the frequencies multiplies by 10 to include a decimal point, then converted to float and divided by 10 to restore the DP when used.
This saves a few bytes. Now 26046 bytes or 84% of program storage space, 990 bytes or 48% for variables.
Actually 4 less than displayed as the "OLED" was removed from the version name to make the display better.
No doubt even more memory could be saved with better optimizations.
For the Sept 11 2022 Ham Fest, I hope to have a few kits available for the basic VFO. There will be plenty of the bare boards for those who want source their own parts.
Here is the instructions, so far.
Reading the start of this thread, Note of caution using the Nano onboard 5 Volt regulator.
In my solar controllers designs that I have made in the past, I have used the Nano onboard 5 Volt regulator and found issues with both the quality of some Nanos that are clones and not originals (Most on Ebay's are clones).
The voltage drop across the regulator as you know is the source of the heat so if feeding the board with 12 Volts the voltage drop of 7 Volts times the current draw generates considerable heat, thus if drawing say 300 mA the device is dissipating 2.1 Watts that has no real heat sink, the Nano gets quite hot, especially if the heat is not taken away. As a design practice I have limited the running of external devices that draw small amounts of currents, if requiring more that 100 mA in total I have used external regulators of either switch mode or series type.
Here is another 2M version. This has the libs removed now. See next post.
EDIT: 20230306 code now is the one to use. The previous one had an error creep in (I could not find what it was) but this works. Some changes from the broken 20200906 version...
For one thing, this works!
The SubTone (CTCSS) table is now defined as "int" with the frequ entered as freqx10 to allow a decimal point. The SubTone routine converts back to float and divides by 10. It could be done other ways but this works.
Also, converting the table to int makes more room so there are now 72 channels.
I've found errors keep coming up now if the libs are included in the file folder.
You will need to have installed the si5351, the Adafruit_SSD1306 and Adafruit_GFX libs beforehand. Here they are zipped.
I'm working on another software mod that was inspired by the IC22S version that has adjustable CTCSS tones.
Here is a version on progress that has 40 channels and the CTCSS tones are adjustable as are the channel frequencies. So far, the simplex/duplex is still fixed and there is no test to limit out of band when the duplex offset is applied. Also, it would be nice to store the frequencies for later use. I'll need help with that as I have never used that option.
This code uses A3 to select the mode. >200 = set frequ. >400 = set CTCSS. Something else can be added at >550.
Please feel free to have a play.
For some ADC resistors..
Pull down = 10K
buttons with resistors switched to +5V..
22K reads about 320.
10K reads about 512.
6K8 reads about 609.
Both 22K and 10K together = close to 6K6, so that will give you 4 states with 2 buttons, including 0V.
EDIT: Updated code at 17:25 20230315 and some resistors?
I've tried to make the code for this FM828 almost the same as that for the IC22S, except the synth/PLL driving part.
Also, more comments are in the code to help debugging it.
When there are more fixes, I'll update both.