2020-04-25 04:39 AM
Hi =)
I'm very new in the STM32 world - decided to upgrade from AVR to 32bit and I like the STM32 product series, documentation and community so here I am =)
I would like to interface an 8 channel DAC with an STM32, for example a TI PCM1690.
My questions are:
* Which STM32 would you recommend for this? I was thinking the F4 series
* An 8-channel DAC will need 4 I2S Data lines - does that mean I need an MCU with 4 I2S?
Thank you!
Simon
2020-04-25 05:14 AM
> need 4 I2S Data lines - does that mean I need an MCU with 4 I2S?
You need 4 I2S data outputs, sharing a common set of clocks (possibly by tying respective pins together). As ST likes to make things less clear, they stick to "duplex I2S" which in fact are 2 separate I2S modules with clocks internally tied together (one of them being the full-fledged SPI/I2S module, the other a stripped-down slave-only I2Sext module) and if you'd use the clicky (CubeMX) it probably wouldn't allow you to set both as Tx, but in fact they can be set so, so one "fullduplex I2S" in ST's parlance in fact means two I2S data outputs for you. Note, that you can also use the SAI modules where available, with two data outputs per module, and they can be internally synchronized i.e. share clocks without need to connect them through pins.
F4 may be a good choice, but it really depends on what else do you want to do - those data for DAC probably won't appear out of thin air, will they?
It may be a good idea to buy a Nucleo board with the given chosen mcu, wire up somehow the DAC (e.g. using some of those protoboards converting SMD footprints to DIL, keeping in mind the clocks' frequency) and prototype proof-of-concept software. Or, get some of the DISCO boards - maybe even the venerable 'F407 DISCO - and try a with the "normal" stereo DAC which is onboard; the other channels may then be just output to void.
JW
2020-04-25 07:10 AM
Thanks Jan that really helps a lot! :D
Just to be sure I understood correctly - you're saying that with an MCU with 2 duplex I2S I have enough to 4 i2s data output? So for example, on the STM32F411xC/xE chip it says <<SPI2 and SPI3 with muxed full-duplex I2S >> - that would be enough to run an 8-channel DAC?
> those data for DAC probably won't appear out of thin air, will they?
Indeed not :D
The whole project will need:
* 8-channel DAC
* a TFT LCD display - I was thinking using an Ilitek ILI9341 - uses one SPI on the STM32
* an Ethernet port - I was thinking of using a Wiznet w5500 - uses second SPI on the STM32
* (maybe) a WiFi module like ESP8266 - uses one UART on the STM32
* the audio will be read from an SD card and/or a USB stick
* a MIDI output - uses second UART on the STM32
* The project will not do any intense computation, just send information/data to other devices (which for now I am doing using an AVR - without the audio outs)
And thanks for the Disco boards that looks like a good idea to start =)
But in order to test the SMD packaged 8-channel DAC - which clearly I need to do/play with before I can build a prototype PCB, I like the idea of these "protoboards converting SMD footprints to DIL" - do you have examples please?
Thanks
2020-04-25 01:35 PM
Hi Simon,
> you're saying that with an MCU with 2 duplex I2S I have enough to 4 i2s data output?
> So for example, on the STM32F411xC/xE chip it says <<SPI2 and SPI3 with muxed full-duplex I2S >> - that would be enough to run an 8-channel DAC?
As I've said ST is innovative in its nomenclature, so I'm not quite sure what they meant by *muxed* fuldupplex I2S... but as the 'F4 line generally follows what has been set up by the venerable 'F407 which was the first in that line; it is most probably the case of what I've described above and then yes, that's enough for 4 stereo I2S channels.
> I like the idea of these "protoboards converting SMD footprints to DIL" - do you have examples please?
There are usually some at the outlets catering for "tinkerers" like Seeed and Adafruit. I don't quite follow these. And there may be also some at "serious" dealers like Farnell. I don't know where are you located, but maybe these will appeal to you:
http://www.proto-advantage.com/store/index.php?cPath=2200_2224&osCsid=pr8uqt5e41no3uaed7j5q4q5t2
I don't endorse them, just found on web some time ago and was impressed by the selection
JW
JW
2020-04-27 03:57 AM
Hi Jan
Thanks that is again really helpful! :D
I bought an F407 Disco where I will try the DAC out. Regarding the final chip, I think I'll go F446 or F411 since they have a high number of SPI's (as I understood using the I2S reduces the number of SPI available - I guess that is what they mean by "muxed").
Regarding the SMD to DIL converters - nice website but a bit pricey IMO (28 USD for having the whole thing soldered and sent to Denmark), I did not find any other which will also do the soldering. Because yes these boards can be bought everywhere - but getting them without the chip soldered is kind of pointless - the whole point (for me at least) is to avoid having to solder a small SMD package!
I realized I could just design the PCB myself and get it made and soldered by JLCPCB - problem is they do not have any PCM16x chip in stock.