There are 34 messages in this thread.
You are currently looking at messages 0 to 10.
Hello all, I've connected a Micro-SD card to my printerport (using very simple 5v to 3v voltage-step-down by three diodes and a resistor, signal step-down by a 1k8, 3k3 resistor combination), and am attempting to read from it. The problem is that I can't seemto be able to get past the initialisation-process. I can send a CMD0 to the card, and a CMD8 too (multiple times), but whenever I try to enter a CMD1 or ACMD41 (CMD55 followed by a CMD41) loop I can write the commands once, sometimes 5 times and than the card stops responding (does not return any status-byte in about a two seconds). It does however respond to a re-start though (I can than again write a CMD0 and get a response). I've currently tried numerous things and read about 8 to 12 different documents (apart from a number of PDFs) that have to do with communicating with a MicroSD card, but have not found any indication to what the cause of the above problem might be. In short : if anyone knows what I should be doing to solve it I would be gratefull. Regards, Rudy Wieser
In article <487f9cf0$0$14357$e...@news.xs4all.nl>, a...@not.available says... > Hello all, > > I've connected a Micro-SD card to my printerport (using very simple 5v to > 3v voltage-step-down by three diodes and a resistor, signal step-down by a > 1k8, 3k3 resistor combination), and am attempting to read from it. > > The problem is that I can't seemto be able to get past the > initialisation-process. I can send a CMD0 to the card, and a CMD8 too > (multiple times), but whenever I try to enter a CMD1 or ACMD41 (CMD55 > followed by a CMD41) loop I can write the commands once, sometimes 5 times > and than the card stops responding (does not return any status-byte in about > a two seconds). It does however respond to a re-start though (I can than > again write a CMD0 and get a response). > > I've currently tried numerous things and read about 8 to 12 different > documents (apart from a number of PDFs) that have to do with communicating > with a MicroSD card, but have not found any indication to what the cause of > the above problem might be. > > In short : if anyone knows what I should be doing to solve it I would be > gratefull. > If the micro-sd card is like the sd card, are you using the SPI mode, or are you using all the bits? If you are using the SPI mode, I've found that one of the first hurdles is always making sure that the card has gone into the SPI mode properly. I think you have to do that before you can start sending commands. If you are getting into the SPI mode and getting good responses to the first commands, I would next try a different brand of card. I've found that all SD cards are not created equal. Mark Borgerson
Mark Borgerson wrote: > If you are getting into the SPI mode and getting good responses to the > first commands, I would next try a different brand of card. I've > found that all SD cards are not created equal. Ditto that. I'd suggest you use a well know brand, eg SanDisk, and a mid-range capacity, say 256MB-1GB, for your initial testing. Regards, -- Mark McDougall, Engineer Virtual Logic Pty Ltd, <http://www.vl.com.au> 21-25 King St, Rockdale, 2216 Ph: +612-9599-3255 Fax: +612-9599-3266
Hello Mark, > If the micro-sd card is like the sd card, are you > using the SPI mode, or are you using all the bits? I'm sorry, I should have mentioned that. I'm using SPI mode. > If you are using the SPI mode, I've found that one > of the first hurdles is always making sure that the > card has gone into the SPI mode properly. I thought that being able to send, for example, a CMD8 and receiving its response would be proof of that ? If not, how can I check (none of the documents I've found mentiones it) ? > If you are getting into the SPI mode and getting good > responses to the first commands, I would next try a > different brand of card. I've found that all SD cards > are not created equal. I've currently got two different brand 2GByte cards, one of them being a Sandisk. Curently all my tests where with the other (cheaper) one. I'll try the Sandisk. A question though : I would (ofcourse) be able to access both/any cards. Is there any generic code known that will service most-of-not-all cards ? If so, where can I find it ? Regards, Rudy Wieser Mark Borgerson <m...@comcast.net> schreef in berichtnieuws M...@newsgroups.comcast.net... > In article <487f9cf0$0$14357$e...@news.xs4all.nl>, > a...@not.available says... > > Hello all, > > > > I've connected a Micro-SD card to my printerport (using very simple 5v to > > 3v voltage-step-down by three diodes and a resistor, signal step-down by a > > 1k8, 3k3 resistor combination), and am attempting to read from it. > > > > The problem is that I can't seemto be able to get past the > > initialisation-process. I can send a CMD0 to the card, and a CMD8 too > > (multiple times), but whenever I try to enter a CMD1 or ACMD41 (CMD55 > > followed by a CMD41) loop I can write the commands once, sometimes 5 times > > and than the card stops responding (does not return any status-byte in about > > a two seconds). It does however respond to a re-start though (I can than > > again write a CMD0 and get a response). > > > > I've currently tried numerous things and read about 8 to 12 different > > documents (apart from a number of PDFs) that have to do with communicating > > with a MicroSD card, but have not found any indication to what the cause of > > the above problem might be. > > > > In short : if anyone knows what I should be doing to solve it I would be > > gratefull. > > > > If the micro-sd card is like the sd card, are you using the > SPI mode, or are you using all the bits? If you are using the > SPI mode, I've found that one of the first hurdles is always > making sure that the card has gone into the SPI mode properly. > > I think you have to do that before you can start sending commands. > > If you are getting into the SPI mode and getting good responses > to the first commands, I would next try a different brand of > card. I've found that all SD cards are not created equal. > > Mark Borgerson
Hello Mark, > Ditto that. I'd suggest you use a well know brand, eg > SanDisk, and a mid-range capacity, say 256MB-1GB, > for your initial testing. Hmmm ... I've got two cards, one of them a Sandisk, but they both are 2GByte. I'll have to see if I can find/buy a smaller card somewhere. Question: what stops the 2GB cards from responding as described in the documents ? And I would like to be able to eventually access both cards, do you know any things I can try ? Regards, Rudy Wieser Mark McDougall <m...@vl.com.au> schreef in berichtnieuws 4...@dnews.tpgi.com.au... > Mark Borgerson wrote: > > > If you are getting into the SPI mode and getting good responses to the > > first commands, I would next try a different brand of card. I've > > found that all SD cards are not created equal. > > Ditto that. I'd suggest you use a well know brand, eg SanDisk, and a > mid-range capacity, say 256MB-1GB, for your initial testing. > > Regards, > > -- > Mark McDougall, Engineer > Virtual Logic Pty Ltd, <http://www.vl.com.au> > 21-25 King St, Rockdale, 2216 > Ph: +612-9599-3255 Fax: +612-9599-3266
"R.Wieser" <a...@not.available> wrote in message news:487f9cf0$0$14357$e...@news.xs4all.nl... > Hello all, > > I've connected a Micro-SD card to my printerport (using very simple 5v to > 3v voltage-step-down by three diodes and a resistor, signal step-down by a > 1k8, 3k3 resistor combination), and am attempting to read from it. Those resistor values are much too high to give clean edges on the clock input of the SD-card. A slow edge will cause noise glitches in the clock signal. You really should use proper levelshifters, or much lower (about 10x) resistor values. At least for the clock. And VERY short lines between buffer and the card clock input. Arie de Muynck
Hello Arie, > Those resistor values are much too high to give clean edges > on the clock input of the SD-card. I got those resistor-values off the Web actually, together with a "it works for me" assurance. Allso, making those resistors 10 times lower would mean you would actually be drawing current from the printer-port, which (ofcourse) allso has a resistor in its high-level output circuit. That would mean two things : to many ports all sourcing a current of about 10 mili-amps could heat-up the driver-chip (controller nowerdays) quite nicely, and would allso bring the voltage-drop over the internal resistor into play. > A slow edge will cause noise glitches in the clock signal. Although the signals do show a few spikes here-and-there (I did put a scope on the signals) its not as bad as the chips own output-signal. :-) > And VERY short lines between buffer and the card clock input. :-) That was what I was thinking to, until I saw the clean signals on the scope (currently I've got a meter-and-a-half printer-cable betweenthe PC and the sd-card). Allso: I currently got one of the two MicroSD cards to work : the Sandisk one (the other still refuses to initialize). I've just my first sectors worth of data (the MBR, which seems to be quite empty apart from the partition-table). I'll first see if I can get the SanDisk card to do what I want, and than try to figure out why the other card does not want to work. I'll maybe even put some line-drivers to the signals (both ways) to see if it changes anything. But as I allready mentioned, I *can* write commands to the (stubborn) card (CMD58 for example) and read the replies. Even multiple times in quick succession. Thanks for your suggestion though. Regards, Rudy Wieser Arie <n...@nospam.com> schreef in berichtnieuws 4880c1a7$0$14354$e...@news.xs4all.nl... > > "R.Wieser" <a...@not.available> wrote in message > news:487f9cf0$0$14357$e...@news.xs4all.nl... > > Hello all, > > > > I've connected a Micro-SD card to my printerport (using very simple 5v to > > 3v voltage-step-down by three diodes and a resistor, signal step-down by a > > 1k8, 3k3 resistor combination), and am attempting to read from it. > > Those resistor values are much too high to give clean edges on the clock > input of the SD-card. A slow edge will cause noise glitches in the clock > signal. You really should use proper levelshifters, or much lower (about > 10x) resistor values. At least for the clock. And VERY short lines between > buffer and the card clock input. > > Arie de Muynck
"R.Wieser" <a...@not.available> wrote in message news:4880ddc3$0$14361$e...@news.xs4all.nl... > Hello Arie, > >> Those resistor values are much too high to give clean edges >> on the clock input of the SD-card. > > I got those resistor-values off the Web actually, together with a "it > works > for me" assurance. Depends on the input capacitance of the card, cable length, etc... Someone might have been lucky. > Allso, making those resistors 10 times lower would mean you would actually > be drawing current from the printer-port, which (ofcourse) allso has a > resistor in its high-level output circuit. > > That would mean two things : to many ports all sourcing a current of about > 10 mili-amps could heat-up the driver-chip (controller nowerdays) quite > nicely, and would allso bring the voltage-drop over the internal resistor > into play. Yes. that's why I always use buffers - or a spec'ed driver and short connections. >> A slow edge will cause noise glitches in the clock signal. > > Although the signals do show a few spikes here-and-there (I did put a > scope > on the signals) its not as bad as the chips own output-signal. :-) Clock edges are most important - rise and fall times must be within spec, and the data / cmd lines stable around them. Or the card must use schmitttrigger inputs on the clock. I'm not sure the spec requires that. >> And VERY short lines between buffer and the card clock input. > > :-) That was what I was thinking to, until I saw the clean signals on the > scope (currently I've got a meter-and-a-half printer-cable betweenthe PC > and > the sd-card). Without reflections? Or are you using a 10 MHz scope? The card allows up to 25 MHz clock, normally that means edges should be < 5 ns rise/fall time. You cannot see noise / glitches on a low-bandwidth scope. > Allso: I currently got one of the two MicroSD cards to work : the Sandisk > one (the other still refuses to initialize). I've just my first sectors > worth of data (the MBR, which seems to be quite empty apart from the > partition-table). > > I'll first see if I can get the SanDisk card to do what I want, and than > try > to figure out why the other card does not want to work. I'll maybe even > put > some line-drivers to the signals (both ways) to see if it changes > anything. > But as I allready mentioned, I *can* write commands to the (stubborn) card > (CMD58 for example) and read the replies. Even multiple times in quick > succession. > > Thanks for your suggestion though. > > Regards, > Rudy Wieser Success! Arie de Muynck
Hello Arie, > Depends on the input capacitance of the card, cable > length, etc... Someone might have been lucky. Ofcourse. That is why I checked with the scope when the card refused to initialize. Just to make sure. > Yes. that's why I always use buffers - or a spec'ed driver > and short connections. If nothing else works I'll surely try it. Currently the setup is acceptable to the SanDisk card. But ... The "bad" card only "gives up" after a number of times (3 to 10 when using CMD1), never at the first time (and that is after the CMD0 has been accepted ofcourse). That seems to indicate that the communication is o.k.. > Without reflections? Or are you using a 10 MHz scope? The card > allows up to 25 MHz clock, normally that means edges should > be < 5 ns rise/fall time. You cannot see noise / glitches on a > low-bandwidth scope. The cards SPI speed is defined as 400 KHz max, and my scope can handle 80 MHz. I think thats enough to be able to see dirty signals Regards, Rudy Wieser Arie <n...@nospam.com> schreef in berichtnieuws 4880ee16$0$14348$e...@news.xs4all.nl... > > "R.Wieser" <a...@not.available> wrote in message > news:4880ddc3$0$14361$e...@news.xs4all.nl... > > Hello Arie, > > > >> Those resistor values are much too high to give clean edges > >> on the clock input of the SD-card. > > > > I got those resistor-values off the Web actually, together with a "it > > works > > for me" assurance. > > Depends on the input capacitance of the card, cable length, etc... > Someone might have been lucky. > > > Allso, making those resistors 10 times lower would mean you would actually > > be drawing current from the printer-port, which (ofcourse) allso has a > > resistor in its high-level output circuit. > > > > That would mean two things : to many ports all sourcing a current of about > > 10 mili-amps could heat-up the driver-chip (controller nowerdays) quite > > nicely, and would allso bring the voltage-drop over the internal resistor > > into play. > > Yes. that's why I always use buffers - or a spec'ed driver and short > connections. > > >> A slow edge will cause noise glitches in the clock signal. > > > > Although the signals do show a few spikes here-and-there (I did put a > > scope > > on the signals) its not as bad as the chips own output-signal. :-) > > Clock edges are most important - rise and fall times must be within spec, > and the data / cmd lines stable around them. > Or the card must use schmitttrigger inputs on the clock. I'm not sure the > spec requires that. > > >> And VERY short lines between buffer and the card clock input. > > > > :-) That was what I was thinking to, until I saw the clean signals on the > > scope (currently I've got a meter-and-a-half printer-cable betweenthe PC > > and > > the sd-card). > > Without reflections? Or are you using a 10 MHz scope? The card allows up to > 25 MHz clock, normally that means edges should be < 5 ns rise/fall time. You > cannot see noise / glitches on a low-bandwidth scope. > > > Allso: I currently got one of the two MicroSD cards to work : the Sandisk > > one (the other still refuses to initialize). I've just my first sectors > > worth of data (the MBR, which seems to be quite empty apart from the > > partition-table). > > > > I'll first see if I can get the SanDisk card to do what I want, and than > > try > > to figure out why the other card does not want to work. I'll maybe even > > put > > some line-drivers to the signals (both ways) to see if it changes > > anything. > > But as I allready mentioned, I *can* write commands to the (stubborn) card > > (CMD58 for example) and read the replies. Even multiple times in quick > > succession. > > > > Thanks for your suggestion though. > > > > Regards, > > Rudy Wieser > > Success! > > Arie de Muynck
R.Wieser wrote: > Hello all, > > I've connected a Micro-SD card to my printerport (using very simple 5v to > 3v voltage-step-down by three diodes and a resistor, signal step-down by a > 1k8, 3k3 resistor combination), and am attempting to read from it. Rudy, I don't know if you are doing this to interface to an embedded system or not, but this is an off the shelf application, that has the hard work done at a cost: http://www.dontronics-shop.com/4d-udrive-usd-g1-tiny-disk-drive-data-storage-module.html Cheers Don... -- Don McKenzie Site Map: http://www.dontronics.com/sitemap E-Mail Contact Page: http://www.dontronics.com/email Xbee Wireless Modules, and low cost Interface Boards. http://www.dontronics-shop.com/xbee-boards.html