This N°9 Posted December 16, 2008 Report Share Posted December 16, 2008 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;imagenow 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 ? Quote Link to comment Share on other sites More sharing options...
TK. Posted December 16, 2008 Report Share Posted December 16, 2008 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. Quote Link to comment Share on other sites More sharing options...
This N°9 Posted December 16, 2008 Author Report Share Posted December 16, 2008 I haven't removed this resistor to ensure that the core will read static-1 if no SD card is connected.hm, I suppose the output of the flash card must be on ground when it is low? Quote Link to comment Share on other sites More sharing options...
TK. Posted December 16, 2008 Report Share Posted December 16, 2008 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. Quote Link to comment Share on other sites More sharing options...
This N°9 Posted December 16, 2008 Author Report Share Posted December 16, 2008 Maybe an understanding problemYes. 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. Quote Link to comment Share on other sites More sharing options...
TK. Posted December 16, 2008 Report Share Posted December 16, 2008 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 ratesBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
This N°9 Posted December 19, 2008 Author Report Share Posted December 19, 2008 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.