I'm using the teensy 3.6 board with the audio adapter and the teensy audio library. Here's the code to generate a sine wave:
AudioMemory(10);
sgtl5000_1.enable();
sgtl5000_1.volume(0.9);
sgtl5000_1.unmuteLineout();
sgtl5000_1.lineOutLevel(13);
waveform1.begin(WAVEFORM_SINE);
waveform1.frequency(100);
waveform1.amplitude(1);
I have a scope on the line out. See picture. The scope is showing the amplitude go negative. Why is that?
Also, I fed the output into a stm32-nucleo board (with arduino framework). printed out the analogRead values, and plot looks like this
Which if the signal went negative, may correlate to the truncated floor values of 0. What am I doing wrong?
AudioMemory(10);
sgtl5000_1.enable();
sgtl5000_1.volume(0.9);
sgtl5000_1.unmuteLineout();
sgtl5000_1.lineOutLevel(13);
waveform1.begin(WAVEFORM_SINE);
waveform1.frequency(100);
waveform1.amplitude(1);
I have a scope on the line out. See picture. The scope is showing the amplitude go negative. Why is that?
Also, I fed the output into a stm32-nucleo board (with arduino framework). printed out the analogRead values, and plot looks like this
Which if the signal went negative, may correlate to the truncated floor values of 0. What am I doing wrong?