0

I have a PCM1804 -- and I want to use it convert the stereo audio signal from RCA/SCART to a TosLink Optical output - outputting a PCM signal.

I have been using its datasheet found here : PCM1804 datasheet

This is the proposed circuit as my starting point. I know there will be mistakes, and missing components in here - this is exactly what I hope to identify and understand. Any advice would be very much appreciated:

schematic

simulate this circuit – Schematic created using CircuitLab

I have never used a chip like the PCM1804 - so am fully aware I have got this wrong, and this is really where I am looking for some guidance.

Please offer constructive support in building the approproiate circuit around the PCM1804. Explaining why each mistake, or missing component is necessary will really help me to understand what is going on! Thank you!

Transistor
  • 168,990
  • 12
  • 186
  • 385
RenegadeAndy
  • 444
  • 6
  • 14
  • 1
    I don't know anything about the PCM1804 but I imagine that the RCA input "negatives" should be connected to circuit GND. – Transistor Oct 05 '16 at 17:43
  • The data sheet on page 4 state that pin 24 should be R-Channel analog input negative pin, and pin 5 should be L-Channel analog input negative pin....hence my decision? I also know nothing about the PCM1804 - but just going from what I see on the datasheet. – RenegadeAndy Oct 05 '16 at 17:45
  • 1
    See Figure 44 for use with a non-differential signal. – Transistor Oct 05 '16 at 17:51
  • Transistor - thank you but that circuit doesn't really make sense to me - I don't really understand it and where the PCM1804 fits into it – RenegadeAndy Oct 05 '16 at 17:54
  • 1
    In Fig. 44, the PCM1804 is the box at the right of the drawing. The three op-amps create the differential input signals for the PCM1804 from the single-ended analog input you will get from the RCA connectors. You don't show any power supply bypass capacitors in your drawing, and the recommended operating voltage for the PCM1804 is 5 volts, not 6.3. – Peter Bennett Oct 05 '16 at 18:15
  • Hey peter. Do you mean the two op amps? I am not sure why they are needed? Additionally, what are power supply bypass capacitors - and why are they required here? What kind would you suggest. – RenegadeAndy Oct 05 '16 at 18:19
  • See datasheet Fig 42 and 43 for recommended bypass capacitors - they ARE required. The footnotes to those figures give the recommended types and values for the capacitors. Fig 44 shows three op-amps in the single-eneded to differential converter circuit. You'll need two of these circuits, one each for Left and Right channels. – Peter Bennett Oct 05 '16 at 18:29
  • Aha sorry Peter I was looking at Figure 45 when I was confused. Right, so can you explain what the op amps actually do to the signal, I am really struggling to understand circuit Figure 44. For bypass capacitors, it looks like a 0.1uF ceramic and 10-uF tantalum, so is that both in series for Vcc? – RenegadeAndy Oct 05 '16 at 18:34
  • In figure 44, the left-hand op amp is a simple inverter. The other two are simply good buffers to make sure the two inputs are driven cleanly. Since the particular application that this was designed for had an 8 volt input (read the text) the buffers are designed with a gain of 1/3. The PCM1804 needs differential inputs - that is, the two inputs are opposite each other, and their sum is zero. This is why each buffer has a 10 uF cap as part of its input - to AC couple the inputs. – WhatRoughBeast Oct 05 '16 at 22:30

2 Answers2

3

The outputs of the PCM1804 are a good first step. However, you should also look up the TOSLINK and (S/PDIF)/(AES53) interface specs, such as here and here and you'll see that the raw data is not enough. TOSLINK uses 32-bit packets, and only is guaranteed to support 20-bit data fields. Furthermore, audio fields are preceded by sync words, as specified in the AES link.

So, what you need to do is use the PCM1804 to digitize at a constant sample rate, and then use a microcontroller to buffer the data, assemble data packets, and then produce the bit stream which is sent to the transmitter.

WhatRoughBeast
  • 59,978
  • 2
  • 37
  • 97
  • Aha - so yes I need to feed the output of the PCM1804 into a microcontroller. But which one?! Is there something which will do this for me? It sounds like this should be a fairly standard process? – RenegadeAndy Oct 05 '16 at 18:20
  • 1
    Actually, it's so standard a process that it's usually found in dedicated ICs used for CD players and such. You'll need a reasonable speed (a good deal faster than whatever bit rate you pick). A standard (logic-level) UART output would work if you can get one with better than 3 Mbaud, and if you can set it for no start and no stop bits. You'd decompose your 32-bit packets into 4, 8-bit words and transmit them end-to-end, and do the same for sync words. I cannot recommend a specific chip. – WhatRoughBeast Oct 05 '16 at 18:56
  • Got a name for the kind of thing I am looking for WhatRoughBeast? Your expertise is highly valued! What is the name for such an integrated circuit? – RenegadeAndy Oct 05 '16 at 19:51
  • I doubt that there is a chip which does exactly what you want. I only meant that the function (A/D to TOSLINK) is common, and is builtin to lots of chips which do TOSLINK. It's what is called IP, Intellectual property, and a commercial user probably pays some company for a working logic package which they then insert into an IC design. You will have to do it the hard way. – WhatRoughBeast Oct 05 '16 at 22:34
1

I don't see anything in the data sheet that suggests that it outputs the proper data format for S/PDIF (or TOSLINK). You likely need to use a microcontroller to create the S/PDIF bitstream. Here is a possible starting place...

Ref: https://forum.pjrc.com/threads/28639-S-pdif

Richard Crowley
  • 14,382
  • 2
  • 20
  • 37