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.

DAC101S101: How to play a 16 bit Audio File Wave file with this DAC

Part Number: DAC101S101
Other Parts Discussed in Thread: PCM1780, , PCM5100A, DAC121S101, PCM1753

Hi,

I am using DAC 101S101 device interfaced with TPA3110 to play the Audio.

My doubt is DAC 101S101 Accepts 10bits of Digital Data only. But in my case I have .wav (Audio) files converted to 16 Bits sample data format.

So how i can able to send the 16 bit data to 10bit DAC? Is there any conversion i need to do before send the data to DAC?

Thanks in Advance for your Support

  • Hi Sakthi,

    I think this question really relies more on what you are using to generate the digital signals for the DAC.  The DAC accepts a formatted SPI frame, as shown in figure 36 of the DAC101S101.

    The first 4 bits should be 'b0000 to ensure the device in normal operation.  As this is a 10 bit DAC, only you will need to shift and mask the 16bit sample frame to 10 bits.  You should send the 10 most-significant bits to the DAC. For example, if the sample data is 0xFF54 you will shift the DAC four bits to the right, and send 0x0FF5 to the DAC.  The last two bits are ignored by the DAC, so you do not need to mask them if you do not want to .  The 10-bit data latched into the DAC would be 0x3FD.

    Thanks!

    Paul

  • Hello Paul,

    Thanks for your replay. And also i required one more suggestion from you.

    If we do the right shift by 4bits surely we will loose the audio data of 4 bits? This will disturb the Audio Signal?

    Audio will be played properly?

  • Hi Sakthi,

    By shifting the data you do loose some of the audio fidelity (or resolution) as you are now only representing the data with 10 bits. Most audio DACs have resolution beyond 16 bits.

    Thanks!
    Paul
  • Hi Paul,

    Thanks for your suggestion.

    So the understanding is i will not loose full Audio signal but i will loose some quality of the sound. Is it correct?

    And also any other different solution is available for my Application?

    If you have any sample Audio file for testing please share with me.

  • Hi Sakthi,

    I believe you main difficulty will be generated the digital audio signal. TI has many audio DACs (design specifically for audio) that take I2S format. There are some micro controllers and processors that support his format natively that you can investigate if you would like. I do not think the DAC101S101 has been tested for audio applications, so you may want to look into other parts, such as the PCM1780.

    Thanks!
    Paul
  • Hi Paul,

    Thanks for your valuable suggestions.

    And i like to understand  DAC101S101Q is qualified for any specific Application?

    I can able to use DAC101S101Q for Audio Applications?

  • The DAC101S101-Q1 is specifically qualified for automotive applications (-Q1).  Otherwise, it is considered a precision DAC, and is used in application where precise DC performance is required.  Audio is generally not a precision DC application but a AC application, where AC performance is more important.  You will find that audio DACs are specified with parametrics like Signal-to-Noise Ratio (SNR), Total Harmonic Distortion and Noise (THD+N), and Dynamic Range.  Precision DACs have parametrics like INL, DNL, Offset Error, Gain Error, and thermal drift.  

    It is possible to use a precision DAC for audio applications, but care must be taken to ensure that the application has the AC capabilities that are desired.  For example, when precision DAC is updated there is a glitch. The glitch is specified in the datasheet and can vary code to code.  If you are trying to create a high frequency signal (like audio), you may find that the glitch contributes too much distortion to the signal. I have never used the DAC121S101 for an audio application, but I would assume it can produce simple tones or low-fidelity audio that might be adequate for some applications.  If you are expecting high fidelity performance, then I suggest you use an audio DAC.  Consider the PCM1753 or PCM5100A.

    Thanks!

    Paul

  • Hello Paul,

    Thank you very much for your suggestions.