Jump to content

SD card interfacing MBHP question


This N°9

Recommended Posts

I'am building a board with a SD-card slot on it, which should interface with MBHP. I found this schematic:

http://www.midibox.org/forum/index.php?action=dlattach;topic=11484.0;attach=3351;image

now my questions:

- I suppose the data-out of the sdcard is a "active" output, not an open collector? If so, the resistor connecting to +5V from core::J6:SI has to be removed?

-does it matter if I take 3,3K/1,8K combination or 22K/10K ?

Link to comment
Share on other sites

I found this schematic:

Note that I'm using a LM317 based voltage regulator to supply the SD card (same circuit as for the MBHP_USB module). Also a LF33 could be used (same circuit as for the MBHP_CORE_STM32 module) to ensure stable power supply.

The diode circuit could work at your side (as it worked for Ilmenator), but there is no guarantee

- I suppose the data-out of the sdcard is a "active" output, not an open collector? If so, the resistor connecting to +5V from core::J6:SI has to be removed?

I haven't removed this resistor to ensure that the core will read static-1 if no SD card is connected.

does it matter if I take 3,3K/1,8K combination or 22K/10K ?

Yes - with higher resistor values the level conversion will get unstable depending on the input impedance SD card.

Best Regards, Thorsten.

Link to comment
Share on other sites

hm, I suppose the output of the flash card must be on ground when it is low?

Maybe an understanding problem:

If the SD Card is not connected (not plugged into a SD Card slot), the core should read a static value. It doesn't really matter the core reads 1 or 0 - 1 is the best choice, as the pull-up is already available and accordingly no changes are required on the core module.

If you notice a problem with this design measure, please let me know - it works fine at my side :)

From your questions I suppose, that SD Card accesses are not working? Or why do you post this in the Troubleshooting section? Could you please describe your observations more concretely?

Best Regards, Thorsten.

Link to comment
Share on other sites

Maybe an understanding problem

Yes. I just imagined that the 5V+ connected to the pin could "override" the communication. But if the output pin of the SDcard is grounded when it is low (which seems logic now if I think about it), this will make no difference. The concept of having a high state when nothing is connected is clear to me.

From your questions I suppose, that SD Card accesses are not working?

no, to be honest, I have to solder the components first  :)

Or why do you post this in the Troubleshooting section?

Ok, it should be in the trouble-avoiding section  :) When I started the the thread, it seemed to be the best place to go, maybe it should be in parts questions or design concepts. sorry about that.

Link to comment
Share on other sites

Yes. I just imagined that the 5V+ connected to the pin could "override" the communication. But if the output pin of the SDcard is grounded when it is low (which seems logic now if I think about it), this will make no difference.

We neither connect 5V directly to the SD Card output, nor we ground the pin.

The current drain through the 10k pull-device is (only) ca. 0.5 mA when SD Output=0V, ca. 0.17 mA when SD Output=3.3V, and 0A when SD output in tristate (CS not enabled).

I'm writing approximated values, as the voltage level at SD output won't be exactly 3.3V, but a bit higher caused by the pull-up resistor and the output impedance - which is advantageous! Because it shifts the voltage level much higher than PIC's Vih_max=3.0V (@5V supply) - as an effect, faster transfers are possible.

If you would use a pull-down, the effective high level could be lower than 3V, the slope on signal changes would be weak, etc... -> slower transfer rates

Best Regards, Thorsten.

Link to comment
Share on other sites

We neither connect 5V directly to the SD Card output, nor we ground the pin.

what I wanted to say is that if SD out is 0V, the wire is on ground level, pulling the 5V down to 0V, which results in logic low for the PIC input. That's what I didn't understand before.

The concept of the 10K pull-up is clear to me now, and I also see it's advantage.

thanks for your explanations, this

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...