S/PDIF Input to Teensy

Status
Not open for further replies.
I'm trying to take a receiver's coaxial output (S/PDIF), convert it to I2S via a WM8804 (http://store.sure-electronics.com/product/AA-AB41133), input it to a Teensy 3.2, perform an FFT on it, and display it with LEDs. Here's my current code: https://github.com/moomerator/Audio-Visualizer/blob/master/6_Full_Audio_Analyzer_FromSpeaker.ino and circuit: https://github.com/moomerator/Audio-Visualizer/blob/master/v6 wiring.jpg

I'm sure that the issue is getting the Teensy to read the data. I believe it will need to be in I2S slave mode but it looks like it doesn't read in an MCLK and I'm not well versed enough with this stuff to fully understand why. My hope was that I could just plug the I2S clocks outputting from the WM8804 into the applicable Teensy pins and it would read them in but that didn't seem to work. Not sure if I could use the audio shield here to simplify things (I've thought about just connecting wires on the receiver that are typically for a speaker to the inputs on the shield but I'm thinking that would probably just let the magic smoke out of my Teensy).

I have working codes for the same project using USB input with:
- no audio output using no audio shield: https://github.com/moomerator/Audio-Visualizer/blob/master/4_Full_Audio_Analyzer_HSVGradient.ino
- audio output via the audio shield: https://github.com/moomerator/Audio-Visualizer/blob/master/5_Full_Audio_Analyzer_wSound.ino
but this project seems to be in a whole different league..

Frankly I think I may be over my head and wanted to get some advice because I'm not sure if I'm really close or completely off so even if the advice is "you're way off, just cut your losses and do something easier" that's fine but I don't want to quit if it's just a could lines of code.
 
You aren't programming the WM8804's registers, so I presume its in hardware mode? What switch settings do you have on the WM8804 board?
The WM8804 datasheet describes hardware mode and the fact it latches some of the control bits from certain pins at reset time. How this relates
to slave/master mode will take some figuring out I think.
 
Somebody has to be I2S master. Timing is set by the S/PDIF source, so WM8804 must be in Master mode. Set up Teensy for I2S slave.
 
Somebody has to be I2S master. Timing is set by the S/PDIF source, so WM8804 must be in Master mode. Set up Teensy for I2S slave.

Thanks for this, I decided to add a few lines for patching the I2Sslave connection to an i2S output so that I could listen through the sound shield.. it's definitely pulling info from the WM8804 now (all noise stops when power to the WM8804 is cut) but it's just white noise. Looking back at the circuit you used back in https://forum.pjrc.com/threads/45394-SPDIF-Input-and-Output?highlight=toslink mine looks a bit different. I realize you were doing quad so it's bound to be a bit different but I'm currently tying DOUT to the RX pins (13) and I have no DIN (here's an outline of where my circuit is currently compared to what you posted in the referenced thread: https://github.com/moomerator/Audio-Visualizer/blob/master/v6.1 wiring.PNG. Does this seem right?
 
It looks like your setup has both the WM8804 and the Audio Shield driving the I2S0_RSD0 input on the T3.2. You shouldn't connect two outputs to the same input.
 
Status
Not open for further replies.
Back
Top