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.

I2C driver for TLV320AIC32 ?

Other Parts Discussed in Thread: TLV320AIC32

Is there any code available for an I2C driver to configure the TLV320AIC32 ?  I am using a Microchip dsPIC33EP512MU810 but I2C is new to me so I am finding it difficult..  

I have a WT32i bluetooth development board (part no. DKWT32i) which has the TLV320AIC32 on it.  

For the development board, a terminal program can be used which sends commands via a USB-RS232 interface to the WT32i module.  The WT32i module then sends I2C data to the TLV320AIC32.

Now I am trying to configure the TLV320AIC32 using I2C directly from the dsPIC for a standalone solution.

  • Hello, John,

    Welcome to E2E and thank you for your interest in our products!

    Please take a look at the following scripts. They are in the hex format w xx yy zz (w - write, xx - I2C address, yy - register address, zz - register data).

    Playback Mode.txt
    Playback mode (line out)
    MCLK = 11.2896MHz; WCLK = 44.1KHz; BCLK = 2.8224 MHz
    
    w 30 07 80
    w 30 07 8A
    w 30 25 C0
    w 30 29 02
    w 30 2B 00
    w 30 52 80
    w 30 5C 80
    w 30 4B 80
    w 30 4E 80
    w 30 56 09
    w 30 5D 09
    w 30 4F 09

    Recording Mode.txt
    Recording mode (Differential input to digital output)
    MCLK = 11.2896MHz; WCLK = 44.1KHz; BCLK = 2.8224MHz
    
    w 30 1F F8
    w 30 15 F8
    w 30 16 84
    w 30 13 84
    w 30 0F 00
    w 30 10 00

    Best regards,
    Luis Fernando Rodríguez S.

  • Thanks for your reply Luis.

    I know the data I need to send via I2C (see table below). What I am looking for is an I2C driver (preferably for the Microchip PIC) that will send this data using the I2C module.

    I have tried to write my own I2C driver (using the I2C module in the dsPIC33EP512MU810) but I can't get it to work, the DAC does not pull down the ACK bit when I send the very first byte, this being the I2C address of 0x30 (or 0x18 when shifted right one bit).

    One thing I am unsure about is the RESET pin on the DAC, at the moment this is just floating. Could this be the reason why the DAC does not respond to my I2C message and the reason it doesnt pull down the ACK bit in the I2C message ?

    I2C | Byte 1 | Byte 2 | Byte 3+
    Address | Data Length | Register |
    30 | 18 | 02 | 00918000008A1037000100008000000FF07C7C787C7C78
    30 | 04 | 25 | C01400
    30 | 0A | 28 | C00000000000008000
    30 | 03 | 33 | 0F00
    30 | 05 | 3F | 00800F00
    30 | 04 | 65 | 00A200
  • Hi, John,

    Unfortunately, we don't have an I2C driver for our codec devices. However, I would recommend to pull-up the RESET pin. This will ensure that the device reset will not be applied during the I2C message.

    Please let me know if you have more questions or comments.

    Best regards,
    Luis Fernando Rodríguez S.