This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PCM1865: TDM channel configuration

Part Number: PCM1865
Other Parts Discussed in Thread: PCM1807,

Hello,

I am trying to set-up my new design as it was configured on a earlier PCB version (with a different ADC), and I would like to know if I can select the order in the output TDM stream. I have a signal, from a PCM1807, as a digital input (I2S 24-bit) at the pin 21. I have seen the Page.0-Register.0x0C and none of them are my prefered option. I would love to have a 8ch-TDM stream being:

  •  CH1: ch1[L]
  •  CH2: ch1[R]
  •  CH3: ch2[L]
  •  CH4: ch2[R]
  •  CH5: Din[L]
  •  CH6: Din[R]
  •  CH7: empty
  •  CH8: empty

Hope anyone can help me here. Thanks in advance. BR,

Manuel

  • Also, I would love to know if it would be possible get the PCM1807 to work in I2S format if the clocks are 256 x fs (LRCLK=fs=48000Hz, BCLK=12.288MHz). I am quite sure it is not, so I will need to change my design. At the moment I can generate the 256 x fs clocks from the PCM1865 or my DSP core, but then for the PCM1807 I do not know if I can synchronize it with the PCM1865 and get its L and R audio channels. My DSP has only one TDM input and that is why I am setting up the communications this way.

  • Hi Manuel,

    Unfortunately the options listed in 0x0C are the only options available for this device. 

    The PCM1807 will accept a 256*fs SCLK but BCLK must be 64*fs = 3.072 MHz.

    Best regards,

    Jeff

  • Hi Jeff,

    Thanks for your answer. Now I have a problem with the configuration. I am using this audio ADC as a sensing ADC for audio purposes, but not for literal audio. I need to sense some resistors connected in the audio path so I measure the current flowing to the speakers and the applied voltage (2 speakers, so I use the 4 differential input pairs). I have checked with the oscilloscope that the signal is correctly arriving to the differential pins.

    Please, correct me if I am making anything wrong in the configuration, which is:

    • Set the device in master mode and configure clocks (they are fine)
    • Set the output in TDM (P0, R0x0B, bits 1-0 to 0b11)
    • Set TDM format to 4-ch (P0, R0x0C, bits 1-0 to 0b01)
    • Set TDM words of 32 bits (P0, R0x0b, bits 3-2 to 0b00)
    • Set ADC1_L to diff VIN1 (P0, R0x06, bits 5-0 to 0b010000)
    • Set ADC1_R to diff VIN2 (P0, R0x07, bits 5-0 to 0b010000)
    • Set ADC2_L to diff VIN4 (P0, R0x08, bits 5-0 to 0b100000)
    • Set ADC2_R to diff VIN3 (P0, R0x09, bits 5-0 to 0b100000)
    • Disable mic bias (P3, R0x15, bit 0 to 0)

    I do not know if I have to set anything else, regarding PGA, mixers or whatever, as I do not see it clear in the datasheet. Please help, as I do see an output frame that looks like TDM, but no matter what I am inputing I cannot see a change in the read values.

    Thanks in advance. BR,

    Manuel

  • Hi Manuel,

    There should be nothing to configure regarding PGA etc. Can you clarify that you see data on the DOUT pin, or are you referring to "read" as reading registers?

    Best regards,

    Jeff

  • Hi Jeff,

    I mean in the DOUT pin (pin 18). The waveform that I have is the following:

    • Here this is the waveform:
    • Here you can see the cursors showing that we are using 4 channels of the TDM stream (32 BCLKs per channel)
    • Here the cursors are showing the first channel, with the padding zeroes at the end of the word
    • Here the cursors are showing the 24 effective BCLKs per channel, as you can infere from the difference of timing
    • And here I have on the yellow and the purple probes the positive and negative input pins of VIN3 (pins 28 and 30), the white line is the substraction of both lines and the green line is the TDM stream, which here cannot be seen but it has no significant change

    I hope this can be useful to you. Also, as we've been discussing in this topic, I am concerned that this may be an old unit because there is a register configuration that hints it uses the Rev.C of the datasheet. I do not know if this can make that the registers should be configured differently.

    BR,

    Manuel

  • That slope on the DOUT line is very odd. I've attached a register dump/script for you to try.

    As far as the revision goes, it's highly unlikely that the part itself changed, just that the datasheet was revised to better reflect the part. 

    PCM1865_Master.cfg

    Best regards,

    Jeff

  • Hi Jeff,

    I solved my issue finally. The problem was the mode of the SPI protocol (I was reading on rising edges instead of falling edges), and that made the configurations to be strange. Also, in order to match my old design (as this is a redesign due a chip shortage on the other part) I had to delay the TDM channles by 128 BCLKs because the old part identified CH1-CH4 with the high part of LRCLK, instead of the low side that uses this chip.

    Anyway, many thanks for your time and help in order to get this problem fixed.

    Best regards,

    Manuel