Author Topic: What do i need for this DAC ?  (Read 2441 times)

0 Members and 1 Guest are viewing this topic.

Offline Jan AudioTopic starter

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: nl
What do i need for this DAC ?
« on: October 31, 2018, 04:28:12 pm »
Hi, i have this DAC for I2S : WM8521
The MCU i use is :  PIC32MX170F256B
I thought i generate some MCC,
thing is MCC dont has I2S codes,
anybody know what to do ?

Now i read the manual :
The audio interface supports I2S, Right Justified and DSP digital
audio formats.

What is the difference ?, google dont know.

Dont i need more external components for this DAC ?, can i hook it direct to the MCU nothing more needed ?

Ofcourse i also need some capacitors,
this DAC is SOIC package, if i buy a 100n SOIC, does it fit the pins ?, maybe i can solder it on the smd-converter then, close to the DAC.

I saw this PIC32MX170F256B has special audio codec I2S, so i got this one.
Maybe a SPI DAC is better or simpler ?, what is the big difference ?, exept that MCC dont has I2S code,
then i could buy any PIC32, all has SPI on board.

This DAC is also not being made no more, newer smaller DACs are there now,
you think this SOIC DAC is different with less quality then the newer ones ?, is is it only smaller package.

thanks in advance
 

Offline alex89

  • Contributor
  • Posts: 30
  • Country: it
Re: What do i need for this DAC ?
« Reply #1 on: October 31, 2018, 05:03:27 pm »
Did you read the DAC datasheet ?
 

Offline Jan AudioTopic starter

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: nl
Re: What do i need for this DAC ?
« Reply #2 on: October 31, 2018, 05:11:55 pm »
Yes, did i miss something ?
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15360
  • Country: fr
Re: What do i need for this DAC ?
« Reply #3 on: October 31, 2018, 05:32:35 pm »
Well, they suggest a typical application schematic, so you'll see there which components you need around this DAC. Mostly a few passive components.
As for more recent DACs of this kind, you may take a look at Cirrus Logic, for instance this line: https://www.cirrus.com/products/cs4334-35-38-39/

Regarding using I2S DACs with a PIC32, you could start here: http://ww1.microchip.com/downloads/en/AppNotes/01422A.pdf


 

Online Buriedcode

  • Super Contributor
  • ***
  • Posts: 1685
  • Country: gb
Re: What do i need for this DAC ?
« Reply #4 on: October 31, 2018, 07:35:23 pm »
Setting up the SPI module for I2S on the PIC32 (or PIC24) is pretty straight forward, with only a handful of config registers.  Master is much easier than slave for timing reasons.  It also has a "clock reference module" for generating a wide range of clocks for I2S (so you dont' have to use specific crystal frequencies for standard sampling rates, like 12.288MHz for 48ksps, you can use 16MHz).

As for DAC's, some of the older ones are just as good as modern ones - at least in terms of "audio quality" and even if the DAC you have doesn't satisfy you, you can just use that to get the system working, then upgrade to a newer one because almost all DACs support I2S, and only require a few caps.  The IC package has little to do with it except for the practical problems of populating the PCB.

It sounds like you're not even sure about how to use the PIC32 and DAC given you are asking how to hook it all up. How many projects have you done on the PIC32?
 

Offline Jan AudioTopic starter

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: nl
Re: What do i need for this DAC ?
« Reply #5 on: November 01, 2018, 01:44:37 pm »
Thanks Burried.
This is my first project for PIC32.
I made 3 synths with DSPIC internal DAC, i,m new to PIC32, i,m starting to like it ( less power consumption ).

I still have this problem : how to disable cashing and wait states ?
Cant find much in the manual, if i search for "cach" it find nothing about it.
I did find one wait state : BMXblabla, sets RAM waitstate from 1 to 0 cycles.
 

Offline Jan AudioTopic starter

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: nl
Re: What do i need for this DAC ?
« Reply #6 on: November 01, 2018, 01:52:53 pm »
Well, they suggest a typical application schematic, so you'll see there which components you need around this DAC. Mostly a few passive components.
As for more recent DACs of this kind, you may take a look at Cirrus Logic, for instance this line: https://www.cirrus.com/products/cs4334-35-38-39/

Thanks SiliconWizard, a few passives sound good.
I was afraid i needed more things for the PLL.

This DAC is indeed Cirrus logic, Wolfson.
Next time i also take a look at Texas instruments.

That DAC you recommend is a 1 bit, not multibit.
« Last Edit: November 01, 2018, 01:55:08 pm by Jan Audio »
 

Offline Jan AudioTopic starter

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: nl
Re: What do i need for this DAC ?
« Reply #7 on: November 01, 2018, 02:01:27 pm »
I dont know what mode to go for.
I2S or DSP mode, what is better ?
 

Online Buriedcode

  • Super Contributor
  • ***
  • Posts: 1685
  • Country: gb
Re: What do i need for this DAC ?
« Reply #8 on: November 01, 2018, 02:36:38 pm »
...That DAC you recommend is a 1 bit, not multibit.

It is a sigma delta DAC, like almost all modern Audio DAC's.  These are, at least in basic terms 1-bit DAC's but with interpolation and oversampling making them 16-24-bit.  This relaxes the constraints on the output filter, meaning you only really need a simple RC filter ( = less components).  The DAC he linked will do just fine!

I was afraid i needed more things for the PLL.

What PLL?  The only PLL required for this would be the clock reference module in the PIC32 to generate the required master clock and LRCLK for the correct sample rate.  The DAC itself has no PLL, and you do not need an external one.

Thanks Burried.
This is my first project for PIC32.
I made 3 synths with DSPIC internal DAC, i,m new to PIC32, i,m starting to like it ( less power consumption ).

A synth is quite a big project, so I guess you're mostly there then.


I dont know what mode to go for.
I2S or DSP mode, what is better ?

I2S would be more  "compatable" with different devices as it is a more widely used standard.  The PIC32 SPI module also supports this mode well.  DSP mode I *think* is used when there are more than 2 channels, and it can be used with plain SPI but the timing has to be precise for the sample rate.  In terms of "sound quality" no difference.  Both send the same data to the DAC.  long story short - stick with I2S just because its easier to implement with a PIC32.
 

Offline Jan AudioTopic starter

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: nl
Re: What do i need for this DAC ?
« Reply #9 on: November 01, 2018, 02:53:08 pm »
Thanks, i will stick with the I2S.
Later on i will try the texas instruments with 8 outputs, and it only cost 1 SPI module in DSP mode for all 8 outputs ?, very nice.

I am going to generate some SPI code in MCC now, hope i get the correct interrupt for audio.
« Last Edit: November 01, 2018, 02:55:47 pm by Jan Audio »
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15360
  • Country: fr
Re: What do i need for this DAC ?
« Reply #10 on: November 01, 2018, 04:56:24 pm »
This DAC is indeed Cirrus logic, Wolfson.

Wolfson was acquired by Cirrus a few years ago, but recent CS DACs are not Wolfson products. Not sure they even share any silicon IP.
Recent CS audio DACs are cheap and pretty decent.

Next time i also take a look at Texas instruments.

If you're looking for higher-end audio DACs from TI, I would recommend the PCM1794 which is excellent. A whole different ballpark. It's not as straightforward to integrate though - it has current outputs and will need a proper output stage to get the most out of them. You'll get the same with most high-end DACs.

That DAC you recommend is a 1 bit, not multibit.

Not sure what you're on about here. The WM8521 and CS433x DACs are both sigma-delta DACs with voltage outputs. The internal details of the respective sigma-delta modulators are not disclosed anyway and the rest is just marketing. The CS43xx have better THD figure and only slightly lower SNR - overall, I think they perform better, that's all that really matters IMO. You can find even better performing DACs from Cirrus - for instance the CS434x series, and even the CS43198 - I just gave an example of what was close enough to the obsolete WM8521.
 

Offline Jan AudioTopic starter

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: nl
Re: What do i need for this DAC ?
« Reply #11 on: November 01, 2018, 05:23:34 pm »
I readed all these manuals and they say multibit is less noisey, but you are right its about the specs.
Hoping i have some sound tomorrow, MCC dont generates interrupt for me, dont know what to do.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15360
  • Country: fr
Re: What do i need for this DAC ?
« Reply #12 on: November 01, 2018, 05:49:41 pm »
I readed all these manuals and they say multibit is less noisey (...)

OK. There's much debate about this. Multi-bit (or segmented) sigma-delta modulators are hard to design right. A simple sigma-delta modulator running at a high enough frequency will be much simpler to design and much easier to get right.

Again, for the kind of performance you were targetting, I would stick to the simple sigma-deltas. If you're willing to use simple-to-integrate, voltage-output DACs, it won't matter.

I would only begin to bother if aiming at SNRs > 100 dB and THD+N < -100 dB, really. In which case, the output stage must be designed carefully as I said above.

 

Offline diyaudio

  • Frequent Contributor
  • **
  • !
  • Posts: 683
  • Country: za
Re: What do i need for this DAC ?
« Reply #13 on: November 01, 2018, 06:26:33 pm »
Hi, i have this DAC for I2S : WM8521
The MCU i use is :  PIC32MX170F256B
I thought i generate some MCC,
thing is MCC dont has I2S codes,
anybody know what to do ?

Now i read the manual :
The audio interface supports I2S, Right Justified and DSP digital
audio formats.

What is the difference ?, google dont know.

Dont i need more external components for this DAC ?, can i hook it direct to the MCU nothing more needed ?

Ofcourse i also need some capacitors,
this DAC is SOIC package, if i buy a 100n SOIC, does it fit the pins ?, maybe i can solder it on the smd-converter then, close to the DAC.

I saw this PIC32MX170F256B has special audio codec I2S, so i got this one.
Maybe a SPI DAC is better or simpler ?, what is the big difference ?, exept that MCC dont has I2S code,
then i could buy any PIC32, all has SPI on board.

This DAC is also not being made no more, newer smaller DACs are there now,
you think this SOIC DAC is different with less quality then the newer ones ?, is is it only smaller package.

thanks in advance

You need to make sure the PIC supplies all the necessary clocks required. BCLK (Bit clock input) , LRCLK (Sample rate clock input) and MCLK  (Master clock input)

Operation using master clocks of 256fs, 384fs, 512fs or 768fs is provided, selection between clock
rates being automatically controlled. Sample rates (fs) from 8kHz to 192kHz are allowed provided the
appropriate system clock is input
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf