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:
- Improved input context, allow the mode button to select the input context, initially frequency and function but that then provides for the ability to configure a sweep.
- Support for sweeping frequencies, likely implemented with a timer interrupt to adjust frequency.
- Adding support for interaction via a rotary encoder,, to use some of the free pins, if implemented with interrupts this could allow for configuration of the frequency while it's running.
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.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
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
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
As usual, code uploaded to GitHub
Are you sure? yes | no