Fast MCUs with 3+ DACs - Page 1
Forum section: electronics / general

author: ajb
author_rank: Super Contributor
timestamp: February 22, 2019, 02:24:34 pm
content: I have a prototype built with an STM32F334, which is a 72MHz Cortex M4 that does some very basic real-time signal processing with as little latency as possible (~120kHz sample rate), and outputs the result via the DACs. It works okay, but it's fairly tight on timing, and doesn't leave a lot of time for it to perform other house-keeping tasks. I see there are some PIC32MK parts with three DACs that run at 120MHz, but I'm not familiar with the platform at all so I'm not sure how they compare in terms of real-world performance of the 72MHz M4. Also they don't appear to have I2C, which is weird and annoying.I'll have to think about whether the lack of I2C is a dealbreaker on the PIC32MK, but I would be curious if anyone has real-world experience with the two platforms and can comment on their relative performance in realistic scenarios. In particular I'm concerned with ISR entry/exit overhead, since from what I've read MIPS doesn't incorporate hardware support for context changes like the CM4 does.From what I've seen these seem to be the only options in this performance class, at least among vendors accessible in low quantities. Are there any parts I've missed?

author: ogden
author_rank: Super Contributor
timestamp: February 22, 2019, 03:10:38 pm
content: Quote from: ajb on February 22, 2019, 02:24:34 pmMove to completely another MCU architecture shall be last option in the list. You can do 120Ksps using audio DAC/ADC, using 168MHz STM32F405. It has 2*I2S (bidirectional) meaning that with 2x DAC like PCM1789 you will have 4 DAC channels, up-to 24bit@192Ksps. If you need inputs as well, then you pick codec which combines both - ADC and DAC.

author: ajb
author_rank: Super Contributor
timestamp: February 22, 2019, 03:34:17 pm
content: An external DAC is also an option I'm considering, but space and cost is a concern. A 64-100 pin MCU with 3 DACs gives me basically a one-chip solution, so I just want to make sure I'm not missing any worthwhile options.

author: JPortici
author_rank: Super Contributor
timestamp: February 22, 2019, 05:42:09 pm
content: Quote from: ajb on February 22, 2019, 02:24:34 pmunless you need floating point or usb, avoid the PIC32MK. There are a lot of gotchas.a dsPIC33EP(GS)/CH/CK will outperform it in every aspect.

author: Kleinstein
author_rank: Super Contributor
timestamp: February 22, 2019, 05:44:13 pm
content: Audio DACs and ADCs may add some latency. So one may have to be careful with external DACs. Also the analog part of a DAC might add some delay.

author: NorthGuy
author_rank: Super Contributor
timestamp: February 22, 2019, 06:18:13 pm
content: When 72 MHz CPU does things at 120 kHz, it is 600 instructions per point. Looks like a lot for "very basic real-time processing". Perhaps improving the algorithms would help?

author: PCB.Wiz
author_rank: Super Contributor
timestamp: February 22, 2019, 06:58:35 pm
content: Quote from: ajb on February 22, 2019, 03:34:17 pmA small part like EFM8BB3/EFM8LB1 makes a very good external DAC. Cheaper than the equivalent DAC alone, and you can make it smarter where it needs to be.Offers 2 or 4 channels of 12b DAC, fast and good drive, and has SPI link possible.External DACs are also likely to have better noise performances as they do not share the digital activity of a 'all-in-one' big die part.

author: ajb
author_rank: Super Contributor
timestamp: February 22, 2019, 07:02:19 pm
content: Quote from: NorthGuy on February 22, 2019, 06:18:13 pm120kHz x 3 channels, so really 200 instructions per point. The prototype was also only running at 64MHz, which is the max you can get from the 8MHz HSI on that MCU. I'll definitely add an external clock if I stick with this family. There's definitely room to improve the efficiency of the computations and interrupt handling, but having additional headroom would still be helpful to relieve pressure on some of the other tasks the system needs to do.Quote from: JPortici on February 22, 2019, 05:42:09 pmThe dsPIC range doesn't seem appealing here--nothing with >2 DACs, and if I'm going the external DAC route I may as well go with a gruntier 32-bit ARM.AD looks like they may have some interesting parts, but their parametric search is awful, and the couple candidates I've found have been quite spendy.

author: Boscoe
author_rank: Frequent Contributor
timestamp: March 02, 2019, 08:07:42 pm
content: Using STMCube's search feature, it looks like you only have the F3 line as an option maxed out at 72MHz. I guess either an external DAC or jumping ship are your only options. Perhaps FPGA? Lattice offer some pretty small packages, as does Intel now.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: March 02, 2019, 10:39:14 pm
content: Quote from: ajb on February 22, 2019, 07:02:19 pmThat could make more sense.What performance DAC do you need and how many channels ?

author: ajb
author_rank: Super Contributor
timestamp: March 05, 2019, 03:53:52 pm
content: Quote from: PCB.Wiz on March 02, 2019, 10:39:14 pmAt least 3 channels, nominally 12 bits and I'd probably go for ~250ksps in an external DAC. But realistically I'll probably stick with the existing MCU since there don't seem to be any other good options with three internal DACs, and I don't think I can justify the cost and size increase that an external DAC involves on the initial iteration. Adding an FPGA to do the real-time computation would be neat and fun to do, but even less justifiable unfortunately (and I'd still want an MCU to do MCU-ish things).

author: aldi
author_rank: Contributor
timestamp: March 06, 2019, 06:38:52 pm
content: Maybe the Delfino series from TI. This is the cheapest with 3 DACS :http://www.ti.com/product/TMS320F28374S,it costs about €15 (https://octopart.com/search?q=%20TMS320F28374S).Or the ADUCM32x series, not much faster (80MHz Cortex-M3), but it has eight DACs, seehttps://www.analog.com/en/products/aducm320.html.

author: ajb
author_rank: Super Contributor
timestamp: March 06, 2019, 07:40:08 pm
content: Quote from: aldi on March 06, 2019, 06:38:52 pmOoh, that TI part looks interesting, thanks! Might just go ahead and throw the Launchpad for it into my Mouser cart. I did look at some of the ADUCM parts, I like that they're ARMs, but yeah, not much of a core performance bump for about twice the price of the STM32F3 series.

author: oPossum
author_rank: Super Contributor
timestamp: March 07, 2019, 01:44:02 pm
content: The Launchpad for that part only has 2 DAC outputs available. I discovered that the hard way.

author: Mattjd
author_rank: Regular Contributor
timestamp: March 11, 2019, 02:06:44 pm
content: Quote from: ajb on February 22, 2019, 02:24:34 pmhttps://www.digikey.com/product-detail/en/texas-instruments/LAUNCHXL-F28379D/296-46713-ND/7219341&?gclid=CjwKCAiA45njBRBwEiwASnZT5x6Gt9BzjoFPP_uEvVcABP6KJm7G4OXZxe9Dw-BrjMSACmGk6M81-BoC_KsQAvD_BwE

author: Mattjd
author_rank: Regular Contributor
timestamp: March 11, 2019, 02:07:45 pm
content: Quote from: aldi on March 06, 2019, 06:38:52 pmI see someone beat me to it

author: Mattjd
author_rank: Regular Contributor
timestamp: March 11, 2019, 02:09:56 pm
content: Quote from: oPossum on March 07, 2019, 01:44:02 pmThat's very important thing to remember.Yes, when dealing with TI there are three datasheets you want to focus on. Development Board datasheet, processor specific datasheet, processor family datasheet.For example it appears the C2000 has 4 DAC available on launch padhttp://www.ti.com/lit/ml/sprui73a/sprui73a.pdf

author: oPossum
author_rank: Super Contributor
timestamp: March 11, 2019, 02:26:15 pm
content: It has 2 analog outputs for DACA and DACB.There is no practical way to get to DAC3.

author: Mattjd
author_rank: Regular Contributor
timestamp: March 11, 2019, 02:39:45 pm
content: Quote from: oPossum on March 11, 2019, 02:26:15 pmYours appears to be an older version with less headers than the one I linked to on Digi-key

author: oPossum
author_rank: Super Contributor
timestamp: March 11, 2019, 02:42:46 pm
content: No, same Launchpad.The MCU only has 3 DACs.Please RTFM.

author: Mattjd
author_rank: Regular Contributor
timestamp: March 11, 2019, 02:46:11 pm
content: Quote from: oPossum on March 11, 2019, 02:42:46 pmhttps://imgur.com/a/D7gm2Q8http://www.ti.com/lit/ug/sprui77b/sprui77b.pdfwhat datasheet are you pulling from?they're part of CMPSS

author: oPossum
author_rank: Super Contributor
timestamp: March 11, 2019, 02:58:53 pm
content: The schematic excerpt I posted is from that exact document.Look at the schematic. Look at the MCU datasheet.It should be obvious why there are 4 pins label Analog Out.It is not because there are 4 DACs! There are only 3, and only 2 available.

author: ajb
author_rank: Super Contributor
timestamp: March 14, 2019, 01:27:09 am
content: Quote from: oPossum on March 07, 2019, 01:44:02 pmUgh, that's frustrating. Thanks for pointing it out. Not bringing out every IO pin is possibly the worst thing you can do on a dev board, especially on a BGA. The second worst thing is putting a zero ohm jumper between two GPIOs connected to different header pins and not clearly indicating this on the PCB (which as a matter of fact wasalsoon a TI dev board...)After taking another look at pricing, and the Delfino parts may not actually make sense on the initial variant of this project, but they still look interesting to play with, and a later iteration of this project may be able to take better advantage of their theoretical performance.

author: OwO
author_rank: Super Contributor
timestamp: March 15, 2019, 04:11:36 am
content: This seems like the kind of thing that would be better suited to an FPGA. You haven't specified DAC precision or noise floor needed, but if it's just audio-level stuff (or <100kHz) then delta-sigma modulation on a digital pin might be sufficient. I've used this trick to do audio output on an FPGA before (without a DAC) and the output was very clean, I would say comparable to at least a 14 bit DAC.