MQS on T4.0 doesn't seem to work at 24MHz clock.

MarkT

Well-known member
Seems OK at the other speeds. I assume same for T4.1 but don't have one to test with. My test code is:
Code:
#include <Audio.h>

AudioSynthWaveformSine  sineL ;
AudioSynthWaveformSine  sineR ;
AudioOutputMQS          mqs ;
AudioConnection  c1 (sineL, 0, mqs, 0);
AudioConnection  c2 (sineR, 0, mqs, 1);

void setup()
{
  AudioMemory (10) ;
  AudioNoInterrupts () ;
  sineL.amplitude (0.75) ;
  sineL.frequency (1.0) ;
  sineL.phase (0) ;
  sineR.amplitude (0.75) ;
  sineR.frequency (1.0) ;
  sineR.phase (90) ;
  AudioInterrupts () ;
}

void loop() 
{

}

[ Diagnosed using a 'scope to check on pins 10 and 12. ] The 352.8kHz PWM is present at 24MHz, but is ot modulated at all, stays at 50% mark/space ratio.
 
Back
Top