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

How to use MMC card as large eeprom ?

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



Joined: 26 May 2009
Posts: 3
Location: Halifax, Nova Scotia, Canada

View user's profile Send private message Visit poster's website

treat MMC card as a big EEPROM
PostPosted: Tue May 26, 2009 8:48 am     Reply with quote

If I just wanna use MMC card as an EEPROM. e.g. just read or write a byte to some address. Is there a simple code to implement? I do not need create a file on the card then read it via the PC. Thanks.
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: treat MMC card as a big EEPROM
PostPosted: Tue May 26, 2009 9:48 pm     Reply with quote

match0927 wrote:
If I just wanna use MMC card as an EEPROM. e.g. just read or write a byte to some address. Is there a simple code to implement? I do not need create a file on the card then read it via the PC. Thanks.


You just need the basic low level SPI drivers. You need to take into account that unlike an EEPROM you cannot just change the location of a single byte but instead must read in the target sector into RAM (512 bytes) modify one or more bytes of interest, then write back the modified sector. Another important consideration is that the write endurance of an EEPROM is orders of magnitude higher than an MMC card.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
Guest








Re: treat MMC card as a big EEPROM
PostPosted: Wed May 27, 2009 6:19 am     Reply with quote

asmallri wrote:
match0927 wrote:
If I just wanna use MMC card as an EEPROM. e.g. just read or write a byte to some address. Is there a simple code to implement? I do not need create a file on the card then read it via the PC. Thanks.


You just need the basic low level SPI drivers. You need to take into account that unlike an EEPROM you cannot just change the location of a single byte but instead must read in the target sector into RAM (512 bytes) modify one or more bytes of interest, then write back the modified sector. Another important consideration is that the write endurance of an EEPROM is orders of magnitude higher than an MMC card.


So is there such a kind of code here? Very thanks?
arunb



Joined: 08 Sep 2003
Posts: 492
Location: India

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

RE:
PostPosted: Fri May 29, 2009 4:21 am     Reply with quote

Quote:

Another important consideration is that the write endurance of an EEPROM is orders of magnitude higher than an MMC card


Do this mean MMC will wear out faster than EEPROM ??

thanks
arunb
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

Re: RE:
PostPosted: Fri May 29, 2009 6:56 am     Reply with quote

arunb wrote:
Quote:

Another important consideration is that the write endurance of an EEPROM is orders of magnitude higher than an MMC card


Do this mean MMC will wear out faster than EEPROM ??

thanks
arunb


Yes.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
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