Hi Jim, Sorry for the late reply. I have my old code that I used to communicate with an MMC from a Windows machine thru a parallel port. Please tell me if you wish to have the source code. I can mail you off the list. It is a VC++ COM component, a VB application also uses an external library to access the parallel port directly in a Windows machine. It took me this long to get this from my pile of backup CDs. Regards, Somasundaram, ----- Original Message ----- From: "Jim Swensen" To: Sent: Monday, December 31, 2001 7:48 PM Subject: [PIC]: BS2 to Sandisk MMC memory card? > I've been trying for sometime to interface a Sandisk 16MB > MultiMediaCard with a Parallax Basic Stamp 2 without success. > The 5v Stamp pin signals have been converted to MMC levels (~3.18v) > and using various application documents that I've found, > I think I've got the physical construction right (logic probe looks > good) but it doesn't act exactly the way it should. Specifically: > To power up the card and initialize it into SPI mode (which I need to > use), the documentations says to > 1)send at least 74 (80 is suggested) clock pulses > 2)set CS pin to LOW > 3)send the reset command (CMD0), which is 0x4000 0x0000 0x0095 (I'm > using SHIFTOUT/MSBFIRST) > 4)send 8 clock pulse as delay > 5)SHIFTIN 8 bit response code > [until response code is 0x01, keep sending CMD0] > 6)8 pulse delay > 7)send the init command (CMD1), which is 0x4100 0x0000 0x0000 > (SHIFTOUT/MSBFIRST) > 8)8 pulse delay > 9)SHIFTIN 8 bit response code > [until response code is 0x00, keep sending CMD1] > > At this point, the MMC should be in SPI mode and awaiting a command > to read/write a block of data. > The problem is that I can't get to that point. First, I cannot get > ANY response from the card unless I > send 21 plus a multiple of 25 clock pulses (21, 46, 71, 96, etc...). > When I do that, I can send CMD0 > and loop the SHIFTIN of 8bits. This is what is (always in this order) > shifted in: > 1) 0111 1110 > 2) 0000 0011 > 3) 1111 1111 > 4) 1111 1111 > 5) 1111 1111 > 6) 1111 1111 > 7) 1111 1111 > 8) 1111 1111 > 9) 1111 1110 > 10)0000 1011 > ...bytes 3 through 10 then loop indefinitely. > > If, instead of looping the SHIFTIN, I continue sending CMD0 in order > to get the 0x01 response code, I never get it. > If I just continue on to issuing CMD1, the same thing happens which > is shifting in that loop of blocks 3 through 10 > as if it's ignoring my CMD0 and CMD1 commands. > > I think I've exhaused every PDF and HTML document I could find on the > subject and I'm hoping someone might > have had the same problem and figured it out. > ANY HELP IS APPRECIATED!!! > > thanks > Jim Swensen > [jswensen*volcanomail,com] > > > > > > > > _____________________________________________________________ > Get your own FREE e-mail account at http://www.volcanomail.com > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics