A project log for Alternate Firmware for FG-100 DDS Function Gen

Reverse engineer the FG-100 pinout and develop alternate firmware that improves some of the shortcomings of the default firmware.

Tim SavageTim Savage 10/25/2015 at 15:453 Comments

UI to select wave form and set frequency working (and the first of the improvements, cursor will remain at last location).

Next steps are to modify the DDS loop to be able to break out and implementation of the run/stop button via an interrupt.

With that the initial goal of an equivalent firmware with some of the UI quirks fixed is reached. Following from that the next steps are:

There are certain hardware limitations (eg buttons require row scanning) that does make certain things difficult while trying to run a tight loop required to do DDS. The next project will likely utilise 2 micros, one running DDS that is slaved to a master for implementing UI.


Jarret Chessell wrote 10/27/2015 at 02:52 point

I was fairly certain the run/stop was an interrupt for that reason. Are you creating a UI to mimic the existing one, or have you thought up a different way?
I'll have to try your software off of gethub soon!

  Are you sure? yes | no

Tim Savage wrote 10/27/2015 at 03:25 point

Yes the Run/Stop button is on an interrupt so the DDS loop can run at full steam. I'm taking advantage of GPIOR0 (can be checked in a single ASM instruction) to set a break bit. If the bit is cleared the DDS loop exits. 
Initially I'm replicating the existing functionality with a few tweaks. I'm pretty close to this stage, will announce a beta release when I have it roughly working.
Post that initial release I'm going to start on improvements, something along the lines of using mode to select entry the field and the cursor keys to increment (including the waveform) that will allow for additional entry fields, like configuring a frequency sweep (eg configuring start/stop/step size/timeframe). The ability to load/save frequencies/sweeps to EEPROM etc.
From there I'll look at hardware hacks eg add a rotary encoder, this would make setup even easier as well as free up the cursor buttons for alternate functionality.

The only downside as I mentioned in the post is some of the hardware limitations that make certain things difficult, adjusting frequencies on the fly is in that category, might be doable with a rotary encoder using interrupts.

  Are you sure? yes | no

Tim Savage wrote 10/25/2015 at 15:45 point

As usual, code uploaded to GitHub

  Are you sure? yes | no