Products > Embedded Computing

Detect microSD card connected to Arduino?

<< < (3/3)


--- Quote from: OM222O on April 23, 2019, 04:39:01 pm ---
--- Quote from: Peabody on April 23, 2019, 02:38:40 am ---The main problem with just trying to communicate to see if a card is there is that the user might have other stuff connected to the pins used for SPI, and spewing out clock and data traffic might not be appreciated by whatever is connected there.

--- End quote ---

you said the other connected chips may not like the data and clock signals on the SPI bus. SPI ignores any incoming data when the chip select is high (doesn't latch any data). so if you're worried about that, just don't have them randomly pulled down. you don't need any pull down resistors (even if you say they're 10Gohm!). simple elegant software solution that adds no cost to the project and is 100% reliable (unless the SD card is broken which is another story!). This is actually what many people use in their designs as it has no draw backs compared to a hardware implementation and comes at a low low price of 0$

--- End quote ---

The SPI pins are also regular digital I/O pins, so what's connected to them could have nothing to do with SPI.  And since this would be a bootloader, I don't want to be sending out SPI clock and data streams on those lines every time the Arduino boots up, not knowing what might be connected to those pins.  So I still think I need to use a method of SD card detection that doesn't send out those streams.  And so far the pulldown resistor is what I've come up with.

in which case you need to specify your issue in details when creating a post  >:D
if not then the answers that you will get are only as good as you described your problem.
I'm not sure what your project is that needs to be this modular? are you making your own custom MCU / CPU?
anyways I can't think of any hardware implementation that does not require physical buttons which people suggested will fail in the long run.

I'm still very skeptical as to what this project is, since you must read the data from the SD card to boot anyways (otherwise having it, let alone detecting it! is useless) :-// in which case you can't have the pins as general IO pins?  :palm: please describe what you are trying to achieve clearly

actually I can think of a simple solution ... a 4 x 1:2 demux chip (not sure if you can buy that exact config) to divert the signals either to the SD card, or to the other chips that are present. however I still have a lot of issues with your idea as things just don't add up  ??? :-X


[0] Message Index

[*] Previous page

There was an error while thanking
Go to full version