PolySynth comes to life! We can finally generate simple sinusoidal waveforms out of the DAC at arbitrary frequency!
Channel 0 above pulses once per period, so the frequency of that pulse indicates the sine waves' frequency. The above example shows a ~1 kHz sine wave output. The lines DIN, CLK, and CS are the serial interface from the MCU to the DAC. They are toggling much faster than 1kHz (approximately 1 MHz).
To do this, we store sine wave samples in a lookup table and simply iterate through them, streaming them out over SPI at a set frequency.
Now that the hardware drivers are in place, all that is left is to build a firmware stack on top of this to generate multiple frequencies via Additive Sinusoidal Synthesis.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.