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.

TLV320AIC12K D/A PGA Gain register issue

Other Parts Discussed in Thread: TLV320AIC12K

Hi,

I'm using teh TLV320AIC12K Mono chip. I got it working where I been able to record voice from a microphone.  Now on the playback side; as I am playing back the recorded sound file, I want to able to control the volume in real time. So I have a touchscreen where I have a slider type module where I am sliding the slider module from 0% to 100% and each slide ponit, I have a function that writes to regiter 5B, the DA gain register.  But the problem is as I am updating my volume module, I hear the volume level the same, and not increasing or decreasing.  So is Regieter 5B meant to be used this way? Or am I missing something.

Thanks,

..

  • S Embedded,

     In this device by default most of the blocks are powered up. Register 5B should control the DAC volume. Can you confirm your communication is working. Try writing a register (2) and read back the same. Read back on register 5 will cycle through 5A, 5B, 5C and 5D. 

  • Hi Vins,

    Thanks for the replay.  So I did try this.  I have always set register 5C's Input Buffer Gain to be at 24dB, the max, b/c I don't know why, but b/c of the types of mic I had, or the lenght of the trace between the chip and the mic due to loss, etc. It felt like setting the ADC input buffer gain to 24dB gave me the adequate volume I needed during playback.  So I tried this; having ADC input buffer gain still set at the max 24dB, I also set the PGA gain to its max.  Then I recorded and during playback, I hear nothing but kind of just white noise as if the gain I had set was too much and somethign overflew.  SO I am wondering if the gain stages, Input Buffer gain, or the PGA gain, has anythign to do with anything.....

    Thanks.

  • S Embedded,

        If you are using a microphone, depending on the sensitivity and sound pressure level, you will need set the PGA. We have seen that could be anywhere between 20-35dB gain. Choose the gain that works for you the best, combination of ADC PGA and input buffer

    When you max out both gains, probably it is saturated and all you hear is noise.

  • Hi Vins,

    I figured it out.  It's my own mistake.  I mean to do the following to adjust my data so it basically does a sanity check in which it cleans out bit 7, 6 to zero and then makes those two bits into 0x01XX_XXXX:

      Vol = (Vol & 0x3F) | (0x40);

    but instead i did

       Vol = (Vol & 0x3F) || (0x40);

    So the II made it into a boolean compoarison rather thatn the intended I.

     

    Thanks much.