CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Confusion regarding MMC pins and MMC driver...

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

View user's profile Send private message Send e-mail

Confusion regarding MMC pins and MMC driver...
PostPosted: Sat Sep 08, 2007 2:13 am     Reply with quote

Hi,

I am using the MMC driver in the CCS folder to read and write to a MMC card.

However I need help in identifying the pins.

According to the MMC specification version 3.1 the 7 pins of the card are named as

Pin 1 RSV NC
Pin 2 CMD I/O/PP/OD Command/Response
Pin 3 VSS1 S Supply voltage ground
Pin 4 VDD S Supply voltage
Pin 5 CLK I Clock
Pin 6 VSS2 S Supply voltage ground
Pin 7 DAT

In the MMC driver code the pins are named as

#define MMC_CLK PIN_B1
#define MMC_DI PIN_B0
#define MMC_DO PIN_B3
#define MMC_CS PIN_B2

The supply, ground and the clock pins are clear enough, but where should the pins CMD and DAT be connected....???

thanks
arunb
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Sep 09, 2007 3:16 pm     Reply with quote

Download the Sandisk MMC manual:
http://www.sandisk.com/Assets/File/OEM/Manuals/manual-rs-mmcv1.0.pdf
Look at Table 5-1 on page 69 in the Acrobat reader.
It shows the signal names for MMC mode and for SPI mode.
Now you can clearly see how to connect the pins.
Code:

PIC MMC_CLK PIN_B1  to SCLK on MMC card (pin 5)
PIC MMC_DI PIN_B0   to DO on MMC card (pin 7)
PIC MMC_DO PIN_B3   to DI on MMC card (pin 2)
PIC MMC_CS PIN_B2   to CS on MMC card (pin 1)

Also, the signal levels are important. THe MMC card is intended for 3.3v
operation. It's easier if you run the PIC at +3.3v. If you run the PIC
at +5v, then you need to put in some level converters. Be very careful
about this. There are articles in the forum archives on this topic.
Search the archives for the keyword: MMC

Also note the requirement for pull-up resistors on two pins, per ckielstra:
http://www.ccsinfo.com/forum/viewtopic.php?t=28732&start=14
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group