Teensy 4 with TWO pcm5102 DAC ?

Status
Not open for further replies.

emmanuel63

Well-known member
Hello,

I have been using the PCM5102 for various projects. These DACs are cheap and deliver high quality audio.
I am wondering if it is possible to use 2 of them to get 4 audio channel outputs ?

Thank you
Emmanuel
 
Hi Emmanuel,

I guess it's possible, see the example at File > Examples > Audio > HardwareTesting > PassThroughQuad.
Connect one PCM5102 board to pins 7, 20, 21 and the other board to pins 32, 20, 21.
Code [not tested by me]:
Code:
#include <Audio.h>

AudioSynthWaveformSine   sine1;
AudioOutputI2SQuad       i2s_quad2;  
AudioConnection          patchCord1(sine1, 0, i2s_quad2, 2);
AudioConnection          patchCord2(sine1, 0, i2s_quad2, 3);
AudioConnection          patchCord3(sine1, 0, i2s_quad2, 0);
AudioConnection          patchCord4(sine1, 0, i2s_quad2, 1);

void setup() {
  AudioMemory(12);
  sine1.frequency(1000);
  sine1.amplitude(0.5); // -6dB
}

void loop() {
}

Paul
 
Yes, either AudioOutputI2SQuad or AudioOutputI2S & AudioOutputI2S2 should work fine.

You could connect up to 5 of those PCM5102 boards if you use AudioOutputI2SOct and AudioOutputI2S2. But one of the required pins is on the bottom side of Teensy 4.0, so the wiring is easier if using Teensy 4.1.
 
Status
Not open for further replies.
Back
Top