Close

The intersection of Face and Palm

A project log for Funktion Generator

An AVR DDS function generator.

tim-savageTim Savage 02/26/2017 at 13:450 Comments

After spending several days trying to work out why my output wave looked so awful and was not at the correct frequency I extracted the code that actually generates the DDS output for closer inspection. Before it clicked the default frequency constant was not only backwards but I was writing it into the wrong registers! The DDS generation uses a 24bit step value and I was not only writing the constant into the upper two bytes I had even flipped the byte order. With the values in the correct registers I have a decent output.

The constants are calculated with a tool written in Python (included in the git repository).

Time to start working on hardware and getting off the development board!

Discussions