Over the last couple of days, I have made a bunch of enhancements to this project:
- Added a three pin header to the front of the box (right over top of the PWM banana plug output) so that you can plug a servo directly into the function generator for testing.
- Added a Square (Slow) digital mode to complement the Square (Fast) mode. The slow mode uses the same digital output that the fast one does, but is 1/256 the frequency. (The high speed square starts at 10MHz and goes down to 39.062kHz; the slow square starts at 39.062kHz and goes down to 152Hz). These two modes are meant for very high accuracy square waveforms.
- Renamed the DDS Square wave to "Square (Analog)" to differentiate it from the other two digital square outputs.
- Add protection diodes to prevent issues from plugging in the power supply backwards
- Fix some UI bugs (incrementing speed when holding buttons, garbage chars on the LCD, etc)
- Shaved a few CPU cycles off of TIMER1_OVF ISR by using GPIOR2 instead of push / pop for saving SREG
- Implemented TIMER1_COMPA in assembly so that we don't need to do the standard push register preamble (play safe, kids!)