Support Path: /Product/Development and troubleshooting/
Hi everyone,
I'm trying to manage to play audio to a 8 ohm speaker using TLV320DAC3100 TI DAC+amplifier.
I am driving TLV320DAC3100 through I2C using a arduino 3V3 logic board.
Device init is done as below
digitalWrite(A0, LOW); //Do a hardware reset delay(10); digitalWrite(A0, HIGH); delay(10); Serial.begin(9600); write_reg(TLV320DAC, 0x00, 0x00); //Set page 0 write_reg(TLV320DAC, 0x01, 0x01); // Do a software reset delay(10); write_reg(TLV320DAC, 0x04, 0x07); // PLL_CLKIN = BCLK CODEC_CLKIN = PLL_CLK write_reg(TLV320DAC, 0x06, 0x07); // J = 7 Wire.beginTransmission(TLV320DAC); // D(msb) = 0 Wire.write(0x07); // D(lsb) = 0 Wire.write(0x00); Wire.write(0x00); Wire.endTransmission(); write_reg(TLV320DAC, 0x05, 0x94); // P = 1, R = 4 PLL is powered up write_reg(TLV320DAC, 0x0B, 0x82); // NDAC = 2 write_reg(TLV320DAC, 0x0C, 0x87); // MDAC = 7 write_reg(TLV320DAC, 0x0D, 0x00); // OSR MSB = 0 write_reg(TLV320DAC, 0x0E, 0x80); // OSR LSB = 128 write_reg(TLV320DAC, 0x1B, 0x00); // Codec interface I2S and word Length 16bit write_reg(TLV320DAC, 0x00, 0x00); // Go to page 0 write_reg(TLV320DAC, 0x3C, 0x04); // Processing block 4 write_reg(TLV320DAC, 0x00, 0x08); // Go to page 8 write_reg(TLV320DAC, 0x01, 0x04); // Adaptive filtering enabled write_reg(TLV320DAC, 0x00, 0x01); // Go to page 1 write_reg(TLV320DAC, 0x20, 0x86); // Power up Class D output driver write_reg(TLV320DAC, 0x21, 0x44); // Power on time 610ms & ramp up step time = 1,95ms write_reg(TLV320DAC, 0x23, 0x44); // DAC_L to Left channel mixer amplifier & DAC_R to Right channelmixer amplifier write_reg(TLV320DAC, 0x26, 0x90); // Left analog volume routed to class D output driver with gain = -8dB write_reg(TLV320DAC, 0x2A, 0x04); // Class D output stage gain =6dB & class D driver not muted delay(100); write_reg(TLV320DAC, 0x00, 0x00); // Go to page 0 write_reg(TLV320DAC, 0x3F, 0xFC); //Left & Right channels powered up & left and right data path = (L+R)/2 write_reg(TLV320DAC, 0x41, 0x00); //Gain DAC Left = 0dB write_reg(TLV320DAC, 0x42, 0x00); //Gain DAC Right = 0dB write_reg(TLV320DAC, 0x40, 0x02); //Unmute DAC channels
My problem is that even if I do not play any sound, I still have a noise I can't rid of. (See wav file attached)
Does anyone have an idea about what it could be ?
Thanks for your help, and have a good day !