Hi,
I'm trying to use the Teensy Audio library to output audio to a PCM5102 I2S DAC, but I fail to get any audio out of it.
My connections are as follows:
| **PCM5102 ** | Teensy 3.2 |
|---|---|
|
--- |
--- |
| VIN | 3.3V |
| GND | GND |
| LRCK | 23 |
| DIN | 22 |
| BCK | 9 |
| SCK | 11 |
| FLT | GND (normal latency) |
| DEMP | GND (de-emphasis off) |
| XSMT | 3.3V (soft un-mute) |
| FMT | GND (I²S format) |
This is the code I've tried. I have no idea if it is even remotely correct, since I only found examples with the SGTL5000 DAC, but not for a generic I2S DAC.
#include <Audio.h>
AudioSynthWaveformSine sine1;
AudioOutputI2S i2s1;
AudioConnection patchCord1(sine1, 0, i2s1, 0);
AudioConnection patchCord2(sine1, 0, i2s1, 1);
void setup() {
// AudioMemory(12);
// i2s1.begin();
AudioNoInterrupts();
sine1.frequency(440);
sine1.amplitude(0.5);
AudioInterrupts();
}
void loop() {}
I would be very grateful if someone could point me in the right direction.
Pieter