Main Site Documentation

SD card detection pins - pull up or use two pins?


#1

I am doing a PCB design for a pseudo-shield for a Fez Panda, and it will have a full-size SD card holder on it. The holder I have bought is a surface mount variety, and it has sensors for the write-protect and card insertion detection. They’re really simple, they are just two pins, and when the card is inserted (or it’s write protected) then the two pins will short circuit.

Now to my dilemma. How would people suggest I connect them to a Fez? I’ve debated connecting them at all, but I thought I’d do a design that allowed them to be used, even if I am not going to use them right now. So then the question is how to connect it all up. It’s for a Panda so I have plenty of IOs to play with.
Option 1: simply connect two IO pins to both of the detection pins, set one to TRUE and check if the other is TRUE or FALSE. If TRUE, then the card is inserted.
Option 2: use a pull-up resistor on one side of the detection pin, wire an IO to the other side. When a card is inserted, the pin reading will go TRUE. (perhaps I need pull-down on the IO pin side so it doesn’t float?? and if so do i need stronger on the pull up or down?)

thoughts, suggestions, or random comments all welcome.


#2

In any case, put two small jumpers in so that they can be completely disconnected if you don’t want/need them. Then the IOs aren’t loaded in any way if you use them for other things.


#3

Like Lurch said, it is easy to add a 0ohm resistor that you can optionally populate later.