Other Parts Discussed in Thread: PCM1865
Hello,
I have a PCM1865 set up and working in 4ch TDM output mode with 4x differential audio inputs.
The issue im having is that no matter what combination of multiplexer settings i use, I can't get values from more than 3 channels at a time to show up as one of the channels is always reading near zero.
This is my setup code:
void ADC_init(void)
{
__PCM1865_setPage(0);
__PCM1865_setReg(0x00, 0xFE); // Reset all registers
__PCM1865_setReg(0x01, 0x20); // PGA CH1_L to 20dB
__PCM1865_setReg(0x02, 0x20); // PGA CH1_R to 20dB
__PCM1865_setReg(0x03, 0x20); // PGA CH2_L to 20dB
__PCM1865_setReg(0x04, 0x20); // PGA CH2_R to 20dB
__PCM1865_setReg(0x05, 0x86); // Enable SMOOTH PGA Change, Independent Link PGA
__PCM1865_setReg(0x06, 0x50); // Polarity: Normal, Channel: VIN1P, VIN1M (CH1)
__PCM1865_setReg(0x07, 0x50); // Polarity: Normal, Channel: VIN2P, VIN2M (CH2)
__PCM1865_setReg(0x08, 0x60); // Polarity: Normal, Channel: VIN4P, VIN4M (CH3)
__PCM1865_setReg(0x09, 0x60); // Polarity: Normal, Channel: VIN3P, VIN3M (CH4)
__PCM1865_setReg(0x0A, 0x00); // Secondary ADC Input: No Selection
__PCM1865_setReg(0x0B, 0x0F); // RX WLEN: 32 bit, TX WLEN: 16bit, FMT: TDM format
__PCM1865_setReg(0x0C, 0x01); // TDM_OSEL: 4ch TDM
__PCM1865_setReg(0x10, 0x31); // GPIO1_FUNC - SCK Out, GPIO0_FUNC - SPI MISO
__PCM1865_setReg(0x11, 0x30); // GPIO3_FUNC - SCK Out, GPIO2_FUNC - GPIO2
__PCM1865_setReg(0x1B, 0x01); // DIN_RESAMP: resample DIN with rising edge of BCK
__PCM1865_setReg(0x20, 0x01); // MST_MODE: Slave; CLKDET_EN: Enable
}
I have been able to get data incoming from all 4 of the inputs in some combination, but not at the same time.
Is there a clear configuration issue or is it more likely to be a silicon error?
Thanks for the help!
James