Hello! I am using an ATtiny416, and have imported this project: https://github.com/MicrochipTech/TB3210_Getting_Started_with_DAC/blob/master/Generating_Sine_Wave_Signal/main.c
It uses the on board DAC to generate an audio tone. My end goal is to do just that - make a couple of audible beeps between 500Hz-2000Hz. I have the code running great, at a 3.33MHz system clock as shown in the project.
The issue is, I want to run the system clock at a very low 8KHz. When I change to this, I get no sound. Presumably this is something to do with it using the _delay_us() function and the smallest delay you can achieve with certain clock speeds. Can someone verify this?
Or does anyone know of a better way to generate these audio tones at such a low clock speed?