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.

TLV320ADC5120: TLV320ADC5120

Part Number: TLV320ADC5120

Tool/software:


Hello,dear expert:
Our microphone project, one transmition and one receiver. The transmition use 5120, 5120 I2S output to telink. The receiver is telink UAC output.
Now we encounter problem.It's when input small signal such 5mvrms, THD+N is below 0.2%.But we see frequency spectrum on ap, the interference
is big,as following picture.According to 5120 datasheet, enable dre will help optimize this problem, write 0x25 data to 0x3c register,write 0x81 data to 0x6d register.
The actual test result is that when input small signal such 500uvrms,the gain is no change.The attachment is 5120 init code.Please help to check and help
resolve the problem.Thank you!

void TLV320ADC_Init(void)
{
    //w 9c 00 00 # Goto Page 0
    //w 9c 02 81 # Wake-up device by I2C write into P0_R2 using internal AREG
    //w 9c 6B 05 # Linear Phase Filter with 2 channel summer mode (DSP_CFG0)
    //w 9c 07 30 # TDM Mode with 32 Bits/Channel
    //w 9c 73 c0 # Enable Ch.1 - Ch.2 
    //w 9c 74 c0 # Enable Ch.1 - Ch.2 ASI Output channels
    //w 9c 75 e0 # Power up ADC
    u8 r_data;
    u8 wack;
	
    TLV320ADC_i2c_init();
    
    wack = TLV320ADC_IIC_WriteReg(0x00,0x00);
    if(wack == 0)  
        my_dump_str_data(1,"============set page0 fail", 0, 0);
    if(wack == 1)
        my_dump_str_data(1,"============set page0 succ", 0, 0);
    
    TLV320ADC_IIC_WriteReg(0x02,0x81); // Wake-up device   
    TLV320ADC_IIC_WriteReg(0x6b,0x01); //  

	
    //ADC_IIC_WriteReg(0x07,0x30); // TDM Mode with 32 Bits/Channel
    //TLV320ADC_IIC_WriteReg(0x07,0x40); // IIS Mode with 16 Bits/Channel
    TLV320ADC_IIC_WriteReg(0x07,0x60); // IIS Mode with 24 Bits/Channel
    TLV320ADC_IIC_WriteReg(0x13,0x01); // MCLK = 12.288 MHz, slave mode, auto clock configuration is enabled, automatic mode pll, fs is 48KHz
    TLV320ADC_IIC_WriteReg(0x14,0x44); // BCLK = 3.072 MHz , 48KHz
    // channel 1 config
    //TLV320ADC_IIC_WriteReg(0x3c,0x24); // Analog single-ended input, AC-coupled input  10-k   input impedance
   //TLV320ADC_IIC_WriteReg(0x3c,0x04);   // Analog differential input  10-k   input impedance, analog differential input, dre/agc/drc disabled

    // DRE or AGC or DRC enabled based on the configuration of bit 3 in register 108(P0_R108)
   TLV320ADC_IIC_WriteReg(0x3c,0x25); // Analog single-ended input, AC-coupled input  10-k   input impedance
   TLV320ADC_IIC_WriteReg(0x6d,0x81); // Input signal level threshold is -60 db, Maximum gain is 4 db

 
     // TLV320ADC_IIC_WriteReg(0x3d,(0<<1));// Channel gain is set to 0 dB
    //TLV320ADC_IIC_WriteReg(0x3d,(12<<1));// Channel gain is set to 6 dB
    //TLV320ADC_IIC_WriteReg(0x3d,(6<<1));// Channel gain is set to 3 dB
    TLV320ADC_IIC_WriteReg(0x3d,(0<<1));// Channel gain is set to 0 dB
    
  
    TLV320ADC_IIC_WriteReg(0x3e,0xc9); // Digital volume control is set to 0 dB
    //TLV320ADC_IIC_WriteReg(0x3e,205);   // Digital volume control is set to 2 dB
    //TLV320ADC_IIC_WriteReg(0x3e,0xff);   // Digital volume control is set to 27 dB
    //TLV320ADC_IIC_WriteReg(0x3f,0x80); // Gain calibration is set to 0 dB
    //TLV320ADC_IIC_WriteReg(0x40,0x00); // No phase calibration
            
    TLV320ADC_IIC_WriteReg(0x73,0x80); // Enable Ch.1 
    TLV320ADC_IIC_WriteReg(0x74,0x80); // Channel 1 output slot is enabled
    TLV320ADC_IIC_WriteReg(0x75,0xe0); // Power up ADC, PLL, MICBIAS	
}





  • Please look this problem,thank you!

  • shall respond shortly

  • As a first suggestion I would suggest to test performance of the ADC with a signal of the desired frequency ana amplitude with a signal generator.

    Please Do not use the Transmitter and Mic received signal to evaluate the ADC.

  • At the front end of tx,1KHz sine wave is inputted from ap.RX outpout signal to ap.By means of this way to evaluate the ADC.All microphone projects are evaluated by means of this way.

  • Please look my reply.Than you so much!

  • OK. Please send me the schematic so that I may co-relate with your code

  • Hello,the attachment is the schematic.Please help check!Thank you so much!

  • Please look my reply.Than you so much!

  • I dont see an AC coupling capacitor in the schematic. The I2C settings indicate AC coupled mode is used. Can you please also send me the complete mic circuit feeding the ADC?

  • 1、MICP_IN, MICN_IN  connected to TLV320ADC5120 PIN1&2&3&4(Pin1 &3 connected together. pin2&pin4 connected together. )

    2、another question: i want to use channel summing ,means: pin1 &pin3 connected together. pin2&pin4 connected together。i see your application note support this , but i don't find any register that related to this. please help ,thanks.

  • for testing ,i use auido precision unbalanced ouput connected to  m+,m-  pads(the left side of the picture,you may can't see the name clearly). and  audio precision usb audio input.

  • can you please let me know which application note you refer to for channel summing ?

  • Hello, about   channel summing, this is described at 5120 datasheet.Please look!

  • Hello,this is the related document.Please help look.Thank you!

  • void TLV320ADC_Init(void)
    {
        //w 9c 00 00 # Goto Page 0
        //w 9c 02 81 # Wake-up device by I2C write into P0_R2 using internal AREG
        //w 9c 6B 05 # Linear Phase Filter with 2 channel summer mode (DSP_CFG0)
        //w 9c 07 30 # TDM Mode with 32 Bits/Channel
        //w 9c 73 c0 # Enable Ch.1 - Ch.2 
        //w 9c 74 c0 # Enable Ch.1 - Ch.2 ASI Output channels
        //w 9c 75 e0 # Power up ADC
        u8 r_data;
        u8 wack;
    	
    	TLV320ADC_i2c_init();
        
        wack = TLV320ADC_IIC_WriteReg(0x00,0x00);
        if(wack == 0)  
            my_dump_str_data(1,"============set page0 fail", 0, 0);
        if(wack == 1)
            my_dump_str_data(1,"============set page0 succ", 0, 0);
        // 要注意ARGE_SELEC的1.8V是内部产生提供还是外部提供,外部提供的时候AVDD是3.3V
        TLV320ADC_IIC_WriteReg(0x02,0x81); // Wake-up device   
        TLV320ADC_IIC_WriteReg(0x6b,0x01); //  
    
    #if 0	
    	r_data = TLV320ADC_IIC_ReadReg(0x02);
    	my_dump_str_data(1,"r_data", &r_data, 1);
    #endif
    	
        //ADC_IIC_WriteReg(0x07,0x30); // TDM Mode with 32 Bits/Channel
        //TLV320ADC_IIC_WriteReg(0x07,0x40); // IIS Mode with 16 Bits/Channel
        TLV320ADC_IIC_WriteReg(0x07,0x60); // IIS Mode with 24 Bits/Channel
        TLV320ADC_IIC_WriteReg(0x13,0x01); // MCLK = 12.288 MHz, slave mode, auto clock configuration is enabled, automatic mode pll, fs is 48KHz
        TLV320ADC_IIC_WriteReg(0x14,0x44); // BCLK = 3.072 MHz , 48KHz
        // channel 1 config
    
    
    
       // TLV320ADC_IIC_WriteReg(0x3c,0x24); // Analog single-ended input, AC-coupled input  10-k   input impedance
      //  TLV320ADC_IIC_WriteReg(0x3c,0x04);   // Analog differential input  10-k   input impedance, analog differential input, dre/agc/drc disabled
    
    #if 0
        // disable
         TLV320ADC_IIC_WriteReg(0x3c,0x20); // Analog single-ended input, AC-coupled input  2.5-k   input impedance
    #else
        // enable dre, 2.5K input impedance Analog single-ended input
    	// DRE or AGC or DRC enabled based on the configuration of bit 3 in register 108(P0_R108)
    	//TLV320ADC_IIC_WriteReg(0x3c,0x21);
    	//TLV320ADC_IIC_WriteReg(0x6d,0x81); // Input signal level threshold is -60 db, Maximum gain is 4 db
    
        TLV320ADC_IIC_WriteReg(0x3c,0x21);
        TLV320ADC_IIC_WriteReg(0x6d,0x21); // Input signal level threshold is -24 db, Maximum gain is 4 db
    
    #endif
    
        TLV320ADC_IIC_WriteReg(0x6b,0x04); // Channel summation mode for higher SNR
    
    	#if 0
        if(tx_gain_vol == 1)
            TLV320ADC_IIC_WriteReg(0x3d,(24<<1));// Channel gain is set to 12 dB
        else if(tx_gain_vol == 2)
            TLV320ADC_IIC_WriteReg(0x3d,(36<<1));// Channel gain is set to 18 dB
        else
            TLV320ADC_IIC_WriteReg(0x3d,(48<<1));// Channel gain is set to 24 dB
        #elif 1
        if(tx_gain_vol == 1)
            TLV320ADC_IIC_WriteReg(0x3d,(18<<1));// Channel gain is set to 9 dB
        else if(tx_gain_vol == 2)
           // TLV320ADC_IIC_WriteReg(0x3d,(0<<1));// Channel gain is set to 0 dB
        	TLV320ADC_IIC_WriteReg(0x3d,(12<<1));// Channel gain is set to 6 dB
        	//TLV320ADC_IIC_WriteReg(0x3d,(20<<1));
        else
            TLV320ADC_IIC_WriteReg(0x3d,(54<<1));// Channel gain is set to 27 dB
        #else
        if(tx_gain_vol == 1)
            ADC_IIC_WriteReg(0x3d,(0<<1));// Channel gain is set to 0 dB
        else if(tx_gain_vol == 2)
            ADC_IIC_WriteReg(0x3d,(46<<1));// Channel gain is set to 23 dB
        else
            ADC_IIC_WriteReg(0x3d,(46<<1));// Channel gain is set to 23 dB
        #endif
        TLV320ADC_IIC_WriteReg(0x3e,0xc9); // Digital volume control is set to 0 dB
        //TLV320ADC_IIC_WriteReg(0x3e,205);   // Digital volume control is set to 2 dB
        //TLV320ADC_IIC_WriteReg(0x3e,0xff);   // Digital volume control is set to 27 dB
        //TLV320ADC_IIC_WriteReg(0x3f,0x80); // Gain calibration is set to 0 dB
        //TLV320ADC_IIC_WriteReg(0x40,0x00); // No phase calibration
                
        TLV320ADC_IIC_WriteReg(0x73,0x80); // Enable Ch.1 
        TLV320ADC_IIC_WriteReg(0x74,0x80); // Channel 1 output slot is enabled
        TLV320ADC_IIC_WriteReg(0x75,0xe0); // Power up ADC, PLL, MICBIAS
    }

    Hello,the attachment is adc5120 init code.

    when close channel summing, we don't write data to register 0x6b, the snr is 77db.

    when open channel summing, we  write data 0x04 to register 0x6b, the snr is 78db.

    But according to datasheet, when open channel summing, the snr should be promoted by 3db,not only 1db.

    Please help look.Thank you!

  • Please help look.Thank you!

  • Please disconnect R11 and R12 . Apply signal to one input of the ADC and evaluate performance of ADC with large and small signals applied to it. Please do not enable channel summation.

    Please let me know your results

  • void TLV320ADC_Init(void)
    {
        //w 9c 00 00 # Goto Page 0
        //w 9c 02 81 # Wake-up device by I2C write into P0_R2 using internal AREG
        //w 9c 6B 05 # Linear Phase Filter with 2 channel summer mode (DSP_CFG0)
        //w 9c 07 30 # TDM Mode with 32 Bits/Channel
        //w 9c 73 c0 # Enable Ch.1 - Ch.2 
        //w 9c 74 c0 # Enable Ch.1 - Ch.2 ASI Output channels
        //w 9c 75 e0 # Power up ADC
        u8 r_data;
        u8 wack;
    	
        TLV320ADC_i2c_init();
        
        wack = TLV320ADC_IIC_WriteReg(0x00,0x00);
        if(wack == 0)  
            my_dump_str_data(1,"============set page0 fail", 0, 0);
        if(wack == 1)
            my_dump_str_data(1,"============set page0 succ", 0, 0);
        // 要注意ARGE_SELEC的1.8V是内部产生提供还是外部提供,外部提供的时候AVDD是3.3V
        TLV320ADC_IIC_WriteReg(0x02,0x81); // Wake-up device   
        TLV320ADC_IIC_WriteReg(0x6b,0x01); //  
    
    
        TLV320ADC_IIC_WriteReg(0x07,0x60); // IIS Mode with 24 Bits/Channel
        TLV320ADC_IIC_WriteReg(0x13,0x01); // MCLK = 12.288 MHz, slave mode, auto clock configuration is enabled, automatic mode pll, fs is 48KHz
        TLV320ADC_IIC_WriteReg(0x14,0x44); // BCLK = 3.072 MHz , 48KHz
    
    
        #if 0// channel 1 config
        TLV320ADC_IIC_WriteReg(0x6d,0x21); // Input signal level threshold is -24 db, Maximum gain is 4 db
        TLV320ADC_IIC_WriteReg(0x3c,0x21);
        TLV320ADC_IIC_WriteReg(0x3d,(20<<1));// Channel gain is set to 10 dB
        TLV320ADC_IIC_WriteReg(0x3e,241); // Digital volume control is set to 20 dB
        TLV320ADC_IIC_WriteReg(0x73,0x80); // Enable Ch.1 
        TLV320ADC_IIC_WriteReg(0x74,0x80); // Channel 1 output slot is enabled
        #else // channel 2 config
     
        TLV320ADC_IIC_WriteReg(0x6d,0x21); // Input signal level threshold is -24 db, Maximum gain is 4 db
        TLV320ADC_IIC_WriteReg(0x2b,0x00);
        TLV320ADC_IIC_WriteReg(0x22,0x00);
        TLV320ADC_IIC_WriteReg(0x41,0x21);
        TLV320ADC_IIC_WriteReg(0x42,(44<<1));// Channel gain is set to 22 dB
        TLV320ADC_IIC_WriteReg(0x43,0xc9); // Digital volume control is set to 0 dB
        TLV320ADC_IIC_WriteReg(0x73,0x40); // Enable Ch.2
        TLV320ADC_IIC_WriteReg(0x74,0x40); // Channel 2 output slot is enabled
        #endif
    
    	
        TLV320ADC_IIC_WriteReg(0x75,0xe0); // Power up ADC, PLL, MICBIAS
    }

    Hello,

    void TLV320ADC_Init(void)
    {
        //w 9c 00 00 # Goto Page 0
        //w 9c 02 81 # Wake-up device by I2C write into P0_R2 using internal AREG
        //w 9c 6B 05 # Linear Phase Filter with 2 channel summer mode (DSP_CFG0)
        //w 9c 07 30 # TDM Mode with 32 Bits/Channel
        //w 9c 73 c0 # Enable Ch.1 - Ch.2 
        //w 9c 74 c0 # Enable Ch.1 - Ch.2 ASI Output channels
        //w 9c 75 e0 # Power up ADC
        u8 r_data;
        u8 wack;
    	
        TLV320ADC_i2c_init();
        
        wack = TLV320ADC_IIC_WriteReg(0x00,0x00);
        if(wack == 0)  
            my_dump_str_data(1,"============set page0 fail", 0, 0);
        if(wack == 1)
            my_dump_str_data(1,"============set page0 succ", 0, 0);
        // 要注意ARGE_SELEC的1.8V是内部产生提供还是外部提供,外部提供的时候AVDD是3.3V
        TLV320ADC_IIC_WriteReg(0x02,0x81); // Wake-up device   
        TLV320ADC_IIC_WriteReg(0x6b,0x01); //  
    
    
        TLV320ADC_IIC_WriteReg(0x07,0x60); // IIS Mode with 24 Bits/Channel
        TLV320ADC_IIC_WriteReg(0x13,0x01); // MCLK = 12.288 MHz, slave mode, auto clock configuration is enabled, automatic mode pll, fs is 48KHz
        TLV320ADC_IIC_WriteReg(0x14,0x44); // BCLK = 3.072 MHz , 48KHz
    
    
        #if 0// channel 1 config
        TLV320ADC_IIC_WriteReg(0x6d,0x21); // Input signal level threshold is -24 db, Maximum gain is 4 db
        TLV320ADC_IIC_WriteReg(0x3c,0x21);
        TLV320ADC_IIC_WriteReg(0x3d,(20<<1));// Channel gain is set to 10 dB
        TLV320ADC_IIC_WriteReg(0x3e,241); // Digital volume control is set to 20 dB
        TLV320ADC_IIC_WriteReg(0x73,0x80); // Enable Ch.1 
        TLV320ADC_IIC_WriteReg(0x74,0x80); // Channel 1 output slot is enabled
        #else // channel 2 config
     
        TLV320ADC_IIC_WriteReg(0x6d,0x21); // Input signal level threshold is -24 db, Maximum gain is 4 db
        TLV320ADC_IIC_WriteReg(0x2b,0x00);
        TLV320ADC_IIC_WriteReg(0x22,0x00);
        TLV320ADC_IIC_WriteReg(0x41,0x21);
        TLV320ADC_IIC_WriteReg(0x42,(44<<1));// Channel gain is set to 22 dB
        TLV320ADC_IIC_WriteReg(0x43,0xc9); // Digital volume control is set to 0 dB
        TLV320ADC_IIC_WriteReg(0x73,0x40); // Enable Ch.2
        TLV320ADC_IIC_WriteReg(0x74,0x40); // Channel 2 output slot is enabled
        #endif
    
    	
        TLV320ADC_IIC_WriteReg(0x75,0xe0); // Power up ADC, PLL, MICBIAS
    }

     

    Hello,I want to user channel 2 as  analog input,but it seems that it has not work. please see the config files. and help check what the problem is .

    the background is i want to use channel summing to improve snr. but the result is not as expected. then i check the channel 1 and 2 seperately. the channel 1 works as expected. but the channel 2 doesn't work. SOS,thanks.

  • 1.Normally we do not suggest to directly connect the inputs of the  individial channels. I would suggest to connect the input signals to the 2 channels with seperate coupling capacitors. There are internal feedback loops that may get disturbed if we join inputs together.

    2. Check if Channel 1 and Channel 2 are individually giving a digital output. 

    I note that your code either enables channel 1 or channel 2 .Please combine to make both work  at the same time.

    Additionally run command 

       0x0B 0x00  This puts channel 1 data on left output slot0

       0x0C 0x01  This puts channel 2 data on left output slot 1 .

    3. After both channels run individually, try the summation command

      

  • thanks. 

    I check the datasheet. in fact , after power on, TLV320ADC5120 0x0B is 0x00 and 0x0C is 0x01 initially . I don't change the register value.

    strange thing is when I only enable channel 2 , there is no data(seems doesn't work at all, even don't get any noise). but when I only enable channel 1, the data is as expected. 

    thus i think may the reason cause  the summation value 6dB below.

    so, please help check ,if i what to only enable channel2. the schematic or the code may get something wrong?

    thanks again.   

  • As I mention before Please do not connect the input pins of the 2 channels together. Connect signal with individual coupling capacitors to the the channel2  IN2P pin. Connect IN2M with capacitor to ground

    Please then check with an oscilloscope if the signal is actually present at the pin.

    In software enable only channel2 

    Following this you can try with 0X0C at  0x00