• AVR Freaks

Audio DAC noise (dsPIC33FJ64GP802)

Author
woostern
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2010/02/17 14:11:26
  • Location: 0
  • Status: offline
2010/02/17 14:26:58 (permalink)
0

Audio DAC noise (dsPIC33FJ64GP802)

I'm using the internal 16-bit audio DAC on the 28-pin PDIP version of the dsPIC33FJ64GP802, and I'm hearing quite a bit of audio-range white noise.  It is not loud, but it is not within the 62 db SNR spec.

I am using the right channel only, and have it connected up to a differential amplifier, exactly as in section 33.8 of the dsPIC reference manual.  To narrow down the problem, I have disabled as many peripherals as I can, and am driving 0's onto the DAC output.  I have the DAC default value set to 0 also. 

I don't think it is problem with the analog power supply or other parts of the board, because when I disable the (internal) DAC output amplifier the noise goes away.  I've tried disabling the PLL, using external resonators, and tried a few different sample rates, without effect.

Otherwise the DAC is working okay.

Does anybody have experience with this DAC?  Are there any settings that can improve performance, peripherals I should disable?

thanks,
Nathan
#1

8 Replies Related Threads

    woostern
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2010/02/17 14:11:26
    • Location: 0
    • Status: offline
    RE: Audio DAC noise (dsPIC33FJ64GP802) 2010/02/17 16:11:12 (permalink)
    0
    I guess other people are having the same problem (although nobody has a solution):

    http://www.microchip.com/forums/tm.aspx?m=413943
    http://www.microchip.com/forums/tm.aspx?m=443008
    http://www.microchip.com/forums/tm.aspx?m=465687
    http://www.microchip.com/forums/tm.aspx?m=451198

    I'll keep my post up to continue the saga, and see if anybody has anything fresh to say.
    post edited by woostern - 2010/02/17 20:45:53
    #2
    saipan59
    Super Member
    • Total Posts : 191
    • Reward points : 0
    • Joined: 2006/06/19 11:27:36
    • Location: 0
    • Status: offline
    RE: Audio DAC noise (dsPIC33FJ64GP802) 2010/02/18 07:47:43 (permalink)
    0
    Perhaps it would be useful to instrument the noise with a spectrum analyzer - maybe it would correllate with something?
    I would volunteer, except I don't have an analyzer...
     
    And/or: Is the noise something that can be easily filtered out?
     
    Pete
     
    #3
    woostern
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2010/02/17 14:11:26
    • Location: 0
    • Status: offline
    RE: Audio DAC noise (dsPIC33FJ64GP802) 2010/02/18 07:59:52 (permalink)
    0
    ORIGINAL: saipan59
    Perhaps it would be useful to instrument the noise with a spectrum analyzer - maybe it would correllate with something?


    I'll try to take some measurements later today.

    ORIGINAL: saipan59
    And/or: Is the noise something that can be easily filtered out?


    For my current application, which is somewhat lo-fi, I can roll off most of the noise with a simple filter.  However I would not use this part again unless this problem can be solved.
    #4
    modcan
    Super Member
    • Total Posts : 203
    • Reward points : 0
    • Joined: 2006/02/11 20:32:00
    • Location: 0
    • Status: offline
    RE: Audio DAC noise (dsPIC33FJ64GP802) 2010/02/28 16:51:00 (permalink)
    5 (1)
    Check to make sure you have the most recent DAC data sheet. Only till very recently the DAC differential output schemo in the
    MCHP data sheet was backwards. The feedback resistor was in the non-inverting loop.
    I use the 802 DACs all the time for audio work and they are not noisy at gains of 2 or 3x. I am not doing
    anything fancy with setup either. Just running them as per data sheet suggested setup.
    Setting the sample rate can be a bit confusing as the data sheets are a little obtuse ( I found anyway)
    I have used probably 100 of the 802 devices and never found one to be noisier than others so they are consistent.
    My principle application is for audio oscillators using lookup tables to generate waveforms for music synthesis.

    Here are the DAC settings I use.



        /* Initiate DAC Clock */
        ACLKCONbits.SELACLK = 0;        // FRC w/ Pll as Clock Source
        ACLKCONbits.AOSCMD = 0;            // Auxiliary Oscillator Disabled
        ACLKCONbits.ASRCSEL = 0;        // Auxiliary Oscillator is the Clock Source
        ACLKCONbits.APSTSCLR = 6;       

        DAC1STATbits.ROEN = 1;            // Right Channel DAC Output Enabled 
        DAC1STATbits.LOEN = 1;            // Left Channel DAC Output Enabled 
        DAC1STATbits.RITYPE = 0;            // Interrupt if not full

        DAC1DFLT = 0x0000;                // DAC Default value is the midpoint
        DAC1CONbits.DACFDIV = 1;         
       
        DAC1CONbits.FORM = 0;            // Data Format is unsigned integer
        DAC1CONbits.AMPON = 0;            // Analog Output Amplifier is enabled during Sleep Mode/Stop-in Idle mode

        DAC1CONbits.DACEN = 1;            // DAC1 Module Enabled
        IEC4bits.DAC1RIE=1;                //Enable DAC Right Interrupt
        IEC4bits.DAC1LIE=0;                //Diable DAC Left Interrupt

        IFS4bits.DAC1RIF=0;                //Clear interrupt flag
      


    #5
    woostern
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2010/02/17 14:11:26
    • Location: 0
    • Status: offline
    RE: Audio DAC noise (dsPIC33FJ64GP802) 2010/03/02 21:29:15 (permalink)
    0
    Thanks for the tips!  I am using the updated datasheet, with feedback going to the inverting input.  Is it possible you haven't noticed the noise because you are generating full scale waveforms and then externally attenuating them (and the noise) before listening/measuring?

    My settings are a little different, but I don't know how that could go wrong:

        ACLKCONbits.SELACLK = 0;       
        ACLKCONbits.AOSCMD = 0;       
        ACLKCONbits.ASRCSEL = 0;       
        ACLKCONbits.APSTSCLR = 7;     

        DAC1STATbits.LOEN = 0;            // Disable left output
        DAC1STATbits.ROEN = 1;            // Enable right output

        DAC1DFLT = 0x0000;               
                                         
        DAC1CONbits.DACFDIV = 38;       
        DAC1CONbits.FORM  = 1;
        DAC1CONbits.AMPON = 0;
        DAC1CONbits.DACEN = 1;

    I still need to measure the noise quantitatively.     
    #6
    modcan
    Super Member
    • Total Posts : 203
    • Reward points : 0
    • Joined: 2006/02/11 20:32:00
    • Location: 0
    • Status: offline
    RE: Audio DAC noise (dsPIC33FJ64GP802) 2010/03/06 04:17:32 (permalink)
    0
    I would try to scope the DAC outs to see what your actual sample rate is or toggle a bit in the DAC interrupt to make it easier to see.
    I found the recommended settings didn't add up to the sample rate they should have. Your value of 38 for DACFDIV seems kind of high
    although I know there are a lot of ways to arrive at the same value with divider values etc. Your sample rate maybe a bit low.
    For decent audio you should be shooting for 44k or better.
    I am outputting full scale waves as you mention but on a sine wave they are nice and clean sounding to my ears at least and I am listening to them at fairly high volume.
    On my picoscope the noise riding on the output doesn't look unreasonable. I have other designs using CS4270 Codec which costs as much as an 804
    and the noise level is not much better.




    #7
    Tez
    Super Member
    • Total Posts : 480
    • Reward points : 0
    • Joined: 2006/10/04 11:09:05
    • Location: 0
    • Status: offline
    RE: Audio DAC noise (dsPIC33FJ64GP802) 2010/03/14 20:52:19 (permalink)
    0
    Check the latest device data sheet. The ENOB on this DAC is around 9 bits and SNR is around 60dB. So the noise may not be un-common. Also for the differential amp circuit for the output...be sure you are referring to the latest documentation. There was an error in this circuit in the older documenation rev. I check DS70112B and this has the correct circuit.
    #8
    ke5vic
    Starting Member
    • Total Posts : 31
    • Reward points : 0
    • Joined: 2010/03/01 06:00:51
    • Location: 0
    • Status: offline
    Re: RE: Audio DAC noise (dsPIC33FJ64GP802) 2011/11/06 14:01:10 (permalink)
    0
    I've have the noise too. Thought it was my layout etc. Nine bits not enough. 
    Has anyone found any fix for this?

    Dithering, AGC, ????
    #9
    Jump to:
    © 2020 APG vNext Commercial Version 4.5