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.

TLV320AIC23 with microphone input

Hello

       I want to use TLV320AIC23 with microphone. I wanted to know that What TLV320AIC23 sends over I2S interface in microphone settings. Is ıt use both right and left channel to send microphone data on I2S or it just sends at just one of the channels (left/rigth). Because microphone is natively a mono device, I want to get microphone data at one of the channels.(left or right). Is there a configuration for that.

     In addition can you suggest a technical document which explains the initial register settings of TLV320AIC23. a sample code would be a good start up.

Regards.

  • Hello Engin,

    According to the block diagram of page 1-3, the mic input is muxed into both Left and right channels when Microphone is configured as the DAC input in INSEL  bit (D2) of Analog audio path control register. So the mic input will be streaming in both channels. 

    Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Hello Diego

    OK. I see that I need to filter one of the channels.

    In additon, On page 20, Section 3.1.2, there is a sentence as follow; The TLV320AIC23B is a write only device and responds only if R/W is 0.

    Is that mean that I can not read any of the internal registers of the TLV320AIC23B ? Am I right ?

    Do I need to arrage a 9bit I2C communication ? the registers of the TLV320AIC23B has 9bits. But the register addresses has 7bits. I'm a little bit confused. Can you clearify the I2C communication?

    Also, I'm feeding 12.5MHz from my MCU instead of 12.288MHz. Is it a problem for the TLV320AIC23B ?

    Is there also a initialization code for this particular IC.


    Regards

  • Hello Engin,

    Yes, as datasheet says this is a write-only device. About I2C communication:

    General I 2C Operation

    The I 2C bus employs two signals; SDA (data) and SCL (clock), to communicate between integrated circuits in a system. Data is transferred on the bus serially one bit at a time. The address and data can be transferred in byte (8-bit) format, with the most significant bit (MSB) transferred first. In addition, each byte transferred on the bus is acknowledged by the receiving device with an acknowledge bit. Each transfer operation begins with the master device driving a start condition on the bus and ends with the master device driving a stop condition on the bus. The bus uses transitions on the data pin (SDA) while the clock is high to indicate a start and stop conditions. A high-to-low transition on SDA indicates a start and a low-to-high transition indicates a stop. Normal data bit transitions must occur within the low time of the clock period. The master generates the 7-bit slave address and the read/write (R/W) bit to open communication with another device and then waits for an acknowledge condition. The slave device holds SDA low during the acknowledge clock period to indicate an acknowledgment. When this occurs, the master transmits the next byte of the sequence. Each device is addressed by a unique 7-bit slave address plus R/W’ bit (1 byte). All compatible devices share the same signals via a bidirectional bus using a wired-AND connection. An external pullup resistor must be used for the SDA and SCL signals to set the high level for the bus.

    So the address of the device can be 0x24 or 0x36 (7bit address + R/W' [0]).

    Regarding the register write, the 16 bit word is composed by the seven bits of the register address and the 9 bits of data as indicated in D/S:

     Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer

  • Hello Diego

          My settings is as follows;

    TLV320AIC23B_Write(TLV320AIC23B_Reset, 0x00); 
    TLV320AIC23B_Write(TLV320AIC23B_PowerDownControl, 0x09); 
    TLV320AIC23B_Write(TLV320AIC23B_AnalogAudioPath, 0x05);
    TLV320AIC23B_Write(TLV320AIC23B_DigitalAudioInterface, 0x0E); 
    TLV320AIC23B_Write(TLV320AIC23B_LeftLineVolume, 0x19); 
    TLV320AIC23B_Write(TLV320AIC23B_RightLineVolume, 0x19);
    TLV320AIC23B_Write(TLV320AIC23B_SampleRateControl, 0x0C); 
    TLV320AIC23B_Write(TLV320AIC23B_DigitalInterfaceAct, 0x01);

    There is a problem with microphone input. When I modify the Analog Audio Path Register (0x04) for microphone input, I get 0x0CB10CB1 form I2S data line. It is a fixed data, never changes. When I modify the Analog Audio Path Register (0x04) for line input, I get data changing around zero, because I did not give any input from line input. 

    What could be the problem with the registers for microphone input selection. Is there a problem with my register selections ?

    I'm using 8KHz sampling.

    Regards

  • Hello Engin, 

    Have you tried powering down he line input and setting the gain to 0dB (Left/Right Volume, 0x97)? Perhaps the problem is related to the Mic Gain and/or schematic design. We strongly suggest to follow our Evaluation Modules layout for new designs, you can find the complete schematic and layout in the AIC23BEVM User's Guide. I would suggest you to take a look to this post, it explains the characteristics of the Microphone input of the TLV320AIC23 codec.

    Best Regards,

      -Diego Meléndez López
       Audio Applications Engineer