EDIT:
Working version: https://github.com/FrankBoesing/Teensy3-SPDIF
Only PIN22 is needed.
Today I read me a bit in S / PDIF.
I think we could make it happen on a Teensy using SPI.
The protocol is not too complicated, actually we could even use the 2 SPI device of T3.1, because there is no need for SCK.
Unfortunately there is a problem: The baud rate.
We need exactly 64 * 44100 Hz (= 2.8224 MHz)
I do not believe that the SPI device this baud rate can generate, but maybe there is a trick?
What comes to mind:
- An external clock with the SPI device in slave mode (perhaps with a tiny avr which generates the clk?)
- Somehow use the built-in timer to generate (2x ?) 2.8224 MHz
Unfortunately, we can then no longer use SPI for other things, such as rading from SD.
Another idea: a Teensy LC as a "slave" for the T3.1. The LC would do S / PDIF output (again we have to think about the clock), the T3.1 provide the audio data to the LC.
What do you think?
Do you have any other ideas?
Last edited: