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

Is it possible to store data on a MMC card without using FAT

 
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

Is it possible to store data on a MMC card without using FAT
PostPosted: Fri Sep 07, 2007 4:58 am     Reply with quote

Hi,

I would like to use a MMC in a datalogger that uses a FRAM and a 16F648A. Instead of storing data using FAT or any other filesystem I would like to directly store data onto the MMC, is this possible ??

arunb
Miniman



Joined: 30 Apr 2007
Posts: 44

View user's profile Send private message

PostPosted: Fri Sep 07, 2007 5:20 am     Reply with quote

Yes it is. You could use the mmc_spi.c driver from ccs
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: Is it possible to store data on a MMC card without using
PostPosted: Fri Sep 07, 2007 7:05 am     Reply with quote

arunb wrote:
Hi,

I would like to use a MMC in a datalogger that uses a FRAM and a 16F648A. Instead of storing data using FAT or any other filesystem I would like to directly store data onto the MMC, is this possible ??

arunb


If you are using the FRAM and the MMC card on the same SPI bus then you have a problem. You need to write 512 byte blocks to the MMC card but you do not have 512 bytes of RAM on this PIC to act as a buffer. Once you start writing to the SD card, you cannot desert the CS until you have written the block - the challenge is how do you read from the FRAM while keeping the MMC card selected.
_________________
Regards, Andrew

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



Joined: 08 Sep 2003
Posts: 492
Location: India

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

RE:
PostPosted: Fri Sep 07, 2007 7:21 am     Reply with quote

Hello,

Thanks for the reply,

The MMC and the FRAM are on different buses.

Data read from the FRAM is transferred to the MMC by the PIC, the same way data read from the MMC is transferred to the FRAM by the PIC.

arunb
renato



Joined: 02 Sep 2005
Posts: 5

View user's profile Send private message

PostPosted: Fri Sep 07, 2007 9:15 pm     Reply with quote

hi, im go work to this mmc_spi.c


im need one exemple the application the include in code.

Plz send me one exemple of code.

10x
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