Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

dual SD cards

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR-DOS
View previous topic :: View next topic  
Author Message
jeremywilson

Bascom Member



Joined: 11 Jul 2011
Posts: 79
Location: United States

usa.gif
PostPosted: Tue Mar 26, 2019 8:27 pm    Post subject: dual SD cards Reply with quote

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.
Back to top
View user's profile AIM Address
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1257
Location: SYDNEY

australia.gif
PostPosted: Wed Mar 27, 2019 8:23 am    Post subject: Reply with quote

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
Back to top
View user's profile
jeremywilson

Bascom Member



Joined: 11 Jul 2011
Posts: 79
Location: United States

usa.gif
PostPosted: Wed Mar 27, 2019 5:19 pm    Post subject: Reply with quote

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...
Back to top
View user's profile AIM Address
Paulvk

Bascom Member



Joined: 28 Jul 2006
Posts: 1257
Location: SYDNEY

australia.gif
PostPosted: Thu Mar 28, 2019 8:42 am    Post subject: Reply with quote

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
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR-DOS All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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