0

Since the original analog audio in my device (MiSTerfpga) is bad, I'm using an external TOSLINK-to-RCA-stereo DAC. Now I'd like to merge this setup into the device. I'd like to know if wiring the S/PDIF line from GPIO1/pin9 to the coax-input of the DAC PCB is the best practise, or if I'm missing something.

This is the schematic of my device on GitHub (LED4 is for digital audio transmission).

My DAC is a KabelDirekt and it has a CS8416 and a CS4344.

My idea was to desolder all the sockets from the DAC PCB and make direct connections to +5 V, GND, and S/PDIF to DC-in and coax-in.

ocrdu
  • 8,705
  • 21
  • 30
  • 42
Alex
  • 1
  • 1
  • The coax input is 75 ohm input so likely too high load. If you anyway are going to remove the Toslink receiver which has a digital logic level output, replace the Toslink output with FPGA output. – Justme Nov 24 '22 at 12:38
  • Thanks, I wouldn't have known, so this is highly appreciated. – Alex Nov 24 '22 at 16:30

1 Answers1

0

Since the length of cable will be very short, it is not necessary to respect the usual SPDIF coax 75R impedance. You can still add a source termination resistor for signal integrity if it is not already present on the main board, 30-50 ohms for example.

From its maximum ratings, CS8416 won't have any problems with 3V3 logic level SPDIF input signals. Here is its input structure from the datasheet:

enter image description here

Since the DAC doesn't have a differential AES input, RXN pin should be unused. So if your LVCMOS 3V3 signal arrives on a RXP pin, the input comparator will use VCC/2 as a threshold, which is ideal. It is quite common to use these SPDIF chips with 3V3 input signal levels, for example if the SPDIF output comes from a TOSLINK receiver.

If the DAC has a termination resistor to ground, you can remove it to avoid drawing unnecessary current from the FPGA output. Likewise if the input is coupled through a capacitor, you can replace it by a short (or whatever low value resistor fits on the cap footprint) it but it should not be necessary.

bobflux
  • 70,433
  • 3
  • 83
  • 203
  • That helped a lot, thanks for taking the time! I'll try it out and report back if it worked. – Alex Nov 24 '22 at 16:28
  • 1
    This is wrong. The datasheet especially says the inputs, even those from TTL/CMOS outputs, must be AC coupled. – Justme Nov 24 '22 at 16:35
  • @Justme Yeah, they say you're supposed to AC couple it, and I've never seen a TOSLINK input with a coupling cap in the signal line. There's no issue in leaving the cap though. – bobflux Nov 24 '22 at 16:41
  • @bobflux That would depend on the SPDIF receiver input stage, not the TOSLINK module output stage. The CS8416 datasheet mandates a cap. Many other SPDIF receivers don't. – Justme Nov 24 '22 at 16:44
  • Yeah I know. Still plenty of cs84xx with DC coupled toslink receivers running around... seems to work just fine – bobflux Nov 24 '22 at 18:43
  • I took apart the DAC pcb and scanned it for being able to do some better tracing. What I realize is that TOSLINK input goes to RXP0-3 while COAX goes to RXN. When I take the spdif from my device that went through the LED, can I really connect it to the COAX input on the DAC and expect it to work? – Alex Nov 24 '22 at 21:59
  • That's pretty creative, SPDIF signal has no polarity so it shouldn't mind being input on the negative input pin, it should "autoselect" the input port with signal, and it should fail completely if both coax and toslink are connected at the same time... but for the price, who cares – bobflux Nov 24 '22 at 22:36
  • In this case I guess there must be AC coupling capacitors on both inputs, because the toslink receiver will output 0V when it's not receiving, so the comparator wouldn't work. With AC coupling between the toslink receiver and the chip it will receive VCC/2 when there's no toslink signal, which makes a good threshold for the comparator to read signal on the other input. So I guess you can connect the FPGA output to the coax input, it should work. – bobflux Nov 24 '22 at 22:39
  • Thank you very much for your help! I'm drawing some schematics while I have the ports off the pcb, so I will test it on the real thing as soon as I receive the second DAC I just ordered. When it works I'll be able to cut down the size of the DAC to a minimum which is a great addition to the folks who own a MiSTerfpga and want to mod theirs too. [Here're my scans](https://www.dropbox.com/scl/fo/4myo1c3tk06i6u13dm5p3/h?dl=0&rlkey=h2cjf12vrrlcghgtq57sm88s8) – Alex Nov 24 '22 at 23:11
  • I see termination resistors to ground on the board so if you don't want to load the output of the FPGA you could remove them, or use the toslink input (with the receiver removed). – bobflux Nov 25 '22 at 07:02
  • I decided to strip the pcb and finished drawing the schematic in case anybody is interested, [Here's](https://www.dropbox.com/scl/fo/4myo1c3tk06i6u13dm5p3/h?dl=0&rlkey=h2cjf12vrrlcghgtq57sm88s8) my folder. New DAC is scheduled to arrive soon, so I'll test it with the discussed connection and will report back. Thanks again! – Alex Nov 26 '22 at 17:29