Get data from card to SRAMs - Page 1
Forum section: electronics / general

author: Jan Audio
author_rank: Frequent Contributor
timestamp: November 05, 2020, 12:00:13 pm
content: Hi, i have a sd-card with a data-file.I have 3 DSPs with each a SRAM.How do i get the data from 1 card into 3 SRAMs ?Can u use 4066 gates or 4051 ?, does it work at SPI speed ?How is this done normally ?thanks

author: Yansi
author_rank: Super Contributor
timestamp: November 05, 2020, 12:12:19 pm
content: I find this quite an interesting question, from somebody who works with DSPs.Why can't there be a shared data bus for interchange in between the DSPs?Multiplexing the SDcard is probably the worst idea of them all.

author: Jan Audio
author_rank: Frequent Contributor
timestamp: November 05, 2020, 02:19:34 pm
content: Hi, thanks for the reply,please explain about the shared data-bus.I know i have the worsed idea that why i post.My plan was : have a microcontroller read the card, set multiplexers, and write to SDRAM 3 times, then the DSPs can read it.

author: Yansi
author_rank: Super Contributor
timestamp: November 05, 2020, 02:27:12 pm
content: Please describe your setup, as whole. Make a block diagram, what is what and what it is supposed to. Only then can we make sensible suggestions for solutions.The info you have given is a mess. First talking about SRAM, now SDRAM. So which one? What DSPs?What SD card files? What data size? What data bandwidth required?I hope you are pretty much aware, that sticking a 4066/4051 cmos snail-logic type of job within a likely 100 MHz SDRAM bus ain't gonna cut the mustard here.Why can't you interface all DSPs on a single common bus? (such as SPI) and make one of the DSPs work with the SD card directly, then share data through the SPI? (Or dedicate a separate MCU to do all the SDcard stuff).

author: Jan Audio
author_rank: Frequent Contributor
timestamp: November 05, 2020, 03:04:02 pm
content: Ok, i have 3 DSPIC33FJ128GP802, it has stereo DAC, so each DSPIC has 2 voices.The DSPIC reads data from the SRAM, wave audio files.All DSPICS should have the same data in the connected SRAM.The data in all 3 SRAM comes from 1 SD-card.Any better ideas to make a polyphonic sample-player in DIP format ?

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 05, 2020, 03:15:27 pm
content: Quote from: Jan Audio on November 05, 2020, 03:04:02 pmI take it each MCU (dsPIC MCUs are still MCUs IMO, only with some DSP capabilities, but I wouldn't call them DSPs per se. Just a thought, because in your initial post, it could be misleading) has its own, external SRAM chip?Since those MCUs are full-fledged MCUs, they embed all the functionalities and peripherals you'd ever need for this card reading task.I can't see why you'd bother multiplexing. Don't your 3 MCUs already communicate with one another in some way, if just to synchronize their playing?Then I'd just select one for SD Card access, and this "master" MCU would read the SD card, write to its own SRAM and then send content to the others through some bus, SPI for instance. Those MCUs have ample peripherals for that (several SPI, UART, parallel bus each).

author: Jan Audio
author_rank: Frequent Contributor
timestamp: November 05, 2020, 03:41:48 pm
content: Quote from: SiliconWizard on November 05, 2020, 03:15:27 pmYes.

author: Jan Audio
author_rank: Frequent Contributor
timestamp: November 05, 2020, 03:44:51 pm
content: Quote from: blueskull on November 05, 2020, 03:17:38 pmYes, cant get in hobbyist DIP format those good chips, i,m stuck with microchip slow MIPS, i just accept it.Anyways, i would like to have all 3 DSPICs the same software, else it gets to confusing.I also have a PIC16 as master controller, i can send it there over the SPI, better over UART because those chips have only 28pins, or 40 for the PIC16, i need more pins for sure, still not buying SMD things.

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 05, 2020, 04:03:40 pm
content: You can absolutely do what we suggested with a single firmware for all.The role of each MCU ("master/slave") can be determined at runtime in various ways. It could just be the state of an IO (as input). Or it could even auto-detect: the one detecting it's connected to an SD card would automatically set itself as master, and the ones not detecting an SD card would act as slaves. Done, and very flexible.

author: Jan Audio
author_rank: Frequent Contributor
timestamp: November 05, 2020, 04:18:02 pm
content: Ah nice, havent thought about that.I am working on my first multi-MCU project right now ( with 10 MCUs ), and progressing from that.Still i dont like small risks, i need a clear view over everything, i have to think about this.That way i have to make 2 different circuits.

author: Yansi
author_rank: Super Contributor
timestamp: November 05, 2020, 05:44:44 pm
content: Wow. 10 MCUs.Would be much much easier to use one adult MCU. Then you don't need to lose time thinking about how to split a task between 10 microcontrollers and inventing unnecessary methods for data sharing, instead of thinking about the data processing.DIP/DIL in almost 2021? Only as a retro style project. There is absolutely no need to be afraid of working with SMT on a diy basis. 0.5mm pitch ICs are easy to work with and PCBs are cheap. Even 4 layer ones now.If you are that mach scared of using an SMT component, order a kit. Shit ton of simple basic kits available with modern powerful MCUs. For example Teensy, Nucleo, whatever.

author: Jan Audio
author_rank: Frequent Contributor
timestamp: November 06, 2020, 02:12:11 pm
content: I really would like to get started with SMD, because of the high quality parts.Then i need to invest in a microscope, flat head iron, and all my parts are not usable anymore, i have to invest in new parts also.The biggest problem is the PCB, now i use 39 row experiment board to solder on.Then i need the software for PCBs, and those PCBs are very expensive for the things i make ( big polyfonic synthesizers ).That software wont run on my windowsXP computer, so i also have to buy a modern computer.No SMD for now.I would love to have STM32 with a 8 output or more high quality audio DAC running 400MHz or more with 64 bit floating point.

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 06, 2020, 02:32:43 pm
content: Well, I'm sure you can find proper software for WinXP. We were definitely designing SMD boards at the time.If you still want to go the proto board path, you can always buy small dev boards/proto boards and connect them with cables and wires. It will probably be still less work than what you do currently.As said above, Nucleo boards are cheap and you can find much more powerful MCUs.As to using double-precision FP on STM32 - sure depends on how computing intensive your stuff is.But you can look at the STM32 H7 series: double-precision FPU and a lot of raw power. It would be light years ahead of what you currently use. The NUCLEO-H753ZI board is currently available at Mouser for about 25 euros.

author: Jan Audio
author_rank: Frequent Contributor
timestamp: November 06, 2020, 02:58:46 pm
content: Yes i already bought such a board, i did not look to it because i found out it is arduino compatible, that is unusable, those pins arent straight lined out.Who ever invented arduino is a useless person, maybe they made it like that so you can only be compatible with arduino, so they have more sales ?Dont need anything arduino compatible, and certainly no wires.

author: Yansi
author_rank: Super Contributor
timestamp: November 06, 2020, 03:15:57 pm
content: fuck all the discovery kits with just arduino connectors, they are unusable for anything past good marketing demo. In the old times, even discovery kits had all pins routed and available on headers. Now it is the case with nucleo.Look for any STM32H7 based nucleo board. A few of those 144pin Nucleo boards should be available, some even with ETHernet integrated - which I'd count as a big plus for your experiments, as you may find audio-over-ethernet useful for your experiments.H7 are generally 400 MHz + MCUs, with good availability of audio interfaces (couple of I2S interfaces, couple of other serial audio interfaces such as AC97/TDM and SPDIF etc..)

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 06, 2020, 04:16:34 pm
content: The board I mentioned is a Nucleo-144. It has all the pins you'd ever need for this project (IMO) broken out. And you can solder headers on them and connect your own boards with flat cables. Or you could plug your boards directly above it with headers. It also has an ethernet connection.

author: Jan Audio
author_rank: Frequent Contributor
timestamp: November 06, 2020, 04:30:38 pm
content: I am against the principe that i include unused tech in my products.

author: Yansi
author_rank: Super Contributor
timestamp: November 06, 2020, 06:15:21 pm
content: What unused tech specifically?//BTW, it is forbidden to use the nucleo/discovery boards in commercial products, so if you are selling your devices, then you could get in trouble using these. You better learn to use SMD stuff. Jeez, it is not that hard. It is easy.

author: Jan Audio
author_rank: Frequent Contributor
timestamp: November 07, 2020, 04:25:37 pm
content: Thanks, i will try some day, i know i get enough help in this forum.How do i add a donate button in my profile ?, i also need a modern oscilloscope.

author: Yansi
author_rank: Super Contributor
timestamp: November 07, 2020, 05:04:56 pm
content: DS1054Z is nowhere to be considered expensive, especially for what it can do. Buy one, its just 500 bucks or so.NL is quite rich country I'd say, compared to our post USSR shithole, where even I could spare student money to buy a DS1104Z (and lot of other stuff).

author: james_s
author_rank: Super Contributor
timestamp: November 07, 2020, 06:12:35 pm
content: Quote from: Jan Audio on November 06, 2020, 02:12:11 pmThere's no reason you have to get all new parts, you can easily mix and match SMD and through hole stuff on the same board, I do it often, even on protoboards 603 and 805 parts fit nicely between two holes and SOIC chips can be soldered on them too. PCBs are ridiculously cheap to have made these days and powerful EDA software can be free. There is also the option of using breakout boards, for example I have built many projects using cheap FPGA development boards, at $15 they are cheaper than buying just the bare FPGA. I ran KiCAD on WinXP for many years, I don't know if the current version will run on it but you can still get the older versions and they still work fine.

author: Jan Audio
author_rank: Frequent Contributor
timestamp: November 08, 2020, 03:09:51 pm
content: Quote from: james_s on November 07, 2020, 06:12:35 pmOk, i go try download.About the PCBs, big ones arent cheap, i only need 2, not 100.000.

author: Yansi
author_rank: Super Contributor
timestamp: November 08, 2020, 04:43:18 pm
content: That's especially bullshit nowdays, when you can have a 100 by 100mm 4 layer board manufactured for just under $10 for 5 pcs.That is an extremely friendly price, mind you. DHL shipping may add about $20 or what, but that's how it is.Try getting a quote for yourself:https://pcbshopper.com/

author: Jan Audio
author_rank: Frequent Contributor
timestamp: November 08, 2020, 05:07:07 pm
content: 100 by 100 mm ?And then you expect me to attatch the LCD, encoders and potmeters with wires ?

author: Yansi
author_rank: Super Contributor
timestamp: November 08, 2020, 05:13:42 pm
content: Okay, so 300x100mm 2 layer board to go into the panel, $12 for 5 pcs? What else?So far I see you searching for excuses.

author: james_s
author_rank: Super Contributor
timestamp: November 08, 2020, 07:04:45 pm
content: I just checked and even a huge 400mm x 400mm PCB is only $105 for 5 pcs, that's around $20 each for a board larger than anything I've ever used, you couldn't buy decent quality protoboard for that price.

author: drussell
author_rank: Super Contributor
timestamp: November 08, 2020, 08:06:24 pm
content: In most cases I would expect that if your project requires a larger board than is reasonably priced from the PCB houses, the project would probably benefit from a more modular approach, spread across multiple smaller boards in one way or another, and not just because of the high cost of huge boards in small runs.

author: Jan Audio
author_rank: Frequent Contributor
timestamp: November 09, 2020, 02:16:14 pm
content: Yes i need to have some modulair boards and connect it with pin-headers to the main board.Ok i will invest my money next year, if my current projects are finished.20 dollar for 40 centimeters, i buy a 39 rows half meter for 5,-I can connect the encoders with a wire connector, that connector takes lots of space.