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 CCS Technical Support

Library mmcsd.c

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



Joined: 11 Dec 2010
Posts: 60

View user's profile Send private message

Library mmcsd.c
PostPosted: Tue Feb 22, 2011 5:35 am     Reply with quote

Friends I am trying to connect to a PIC16F88 an MMC / SD. The SD card has the function of serving as EEPROM.

When I compile the program, there is an error:

«int g_mmcsd_buffer[MMCSD_MAX_BLOCK_SIZE]» - data item too big

However if you change:

«#define MMCSD_MAX_BLOCK_SIZE 512»

by:

«#define MMCSD_MAX_BLOCK_SIZE 64»

The program already compiles and shows no error.

I'm not very experienced in this and I'm trying to teach myself. I do not know what I mean to change this value. Something negative will happen to the project?

If possible, I would appreciate a simple explanation of this matter.


My thanks!


Regards
Ttelmah



Joined: 11 Mar 2010
Posts: 19498

View user's profile Send private message

PostPosted: Tue Feb 22, 2011 6:46 am     Reply with quote

Problem is memory.
The MMC/SD card, 'talks' in blocks of 512 bytes. This is the 512 value. So, 'no', you can't change this. For use with a PIC, you need to be able to buffer one whole block at a time. Basically your chip has too little RAM to do this. Just 368 bytes.

Best Wishes
Dave_25152



Joined: 11 Dec 2010
Posts: 60

View user's profile Send private message

PostPosted: Tue Feb 22, 2011 2:23 pm     Reply with quote

OK.

Very savvy! Thanks a lot.


Yours sincerely,
David Martins
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