Joined: 11 Jul 2011 Posts: 79 Location: United States
Posted: Tue Mar 26, 2019 8:27 pm Post subject: dual SD cards
I currently use AVR-DOS with single SD card circuits with no problems. However, I need to add a second SD card. With AVR-DOS, I can only define one chip select (CS) pin.
Is there a way to add a second CS (I don't do assembly language) with AVR-DOS?
Would it be better or easier to just use an MCU pin to power the SD cards, then turn on the one I need to write to? (bad thing to frequently power SD card on/off?)
I could add glue logic ICs to route the CS signal, but prefer not to.
I used a multiplexer to run two LCDs off one micro
you could do similar with logic gates and another
cpu pin to chose which sd card the CS activates
Regards Paul
Joined: 11 Jul 2011 Posts: 79 Location: United States
Posted: Wed Mar 27, 2019 5:19 pm Post subject:
I may have to use a multiplexer or switch. Or MCU-controlled mosfets to power the cards.
I think there will be other issues with AVR-DOS, though, such as, reading data from one card and writing to the other card. Probably would have to read some data and store in MCU RAM, initialize other card, then write data to it, then re-init first SD, etc...
The mega1284 is good for a task like that with its 16K of ram and 20mhz
you can make large buffers.
I have to re initialize the LCDs as well
Regards Paul
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum