Summary

Transmit 16 bit stereo audio as Digital S/PDIF.

Audio Connections

PortPurpose
In 0Left Channel
In 1Right Channel

Functions

This object has no functions to call from the Arduino sketch. It simply streams data from its 2 input ports S/PDIF encoded digital audio on pin 22.

Hardware

The S/PDIF output signal can be used to drive an optical TOSLINK cable, or a standard (usually orange) RCA jack.

PinSignalDirection
22S/PDIFOutput

For optical TOSLINK output, this OSH Park board can be used with the inexpensive Everlight PLT133/T6A connector, available at Digikey, 1080-1434-ND.

Examples

The AudioOutputSPDIF object can be used in place of the AudioOutputI2S object,

used in nearly all the examples. The WavFilePlayer shows how to substitute output objects for different hardware types.

File > Examples > Audio > WavFilePlayer

Credits

Frank Boesing developed the AudioOutputSPDIF code. The original forum disussion included valuable input and code from "kpc".

Notes

S/PDIF output uses the I2S hardware. This object can not be used together with any of the I2S objects, because it requires the I2S hardware with different internal settings.