View previous topic :: View next topic |
Author |
Message |
Dave_25152
Joined: 11 Dec 2010 Posts: 60
|
Library mmcsd.c |
Posted: Tue Feb 22, 2011 5:35 am |
|
|
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: 19561
|
|
Posted: Tue Feb 22, 2011 6:46 am |
|
|
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
|
|
Posted: Tue Feb 22, 2011 2:23 pm |
|
|
OK.
Very savvy! Thanks a lot.
Yours sincerely,
David Martins |
|
|
|