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

Data Item Too Big

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







Data Item Too Big
PostPosted: Thu Nov 13, 2008 5:19 pm     Reply with quote

Hey, I'm trying to interface between an SD card in FAT16 format 512 byte sector size with a PIC16F877A. I need to create a size 512 character buffer array to send to and receive from the SD card, but when I enter:

#include "16F877A.h"
#include <stdlib.h>
#include <stdio.h>

char buffer [512];

into CCS, it comes up with the error, "Data Item Too Big". After seeing some projects actually use this code in their implementation, I know this is definitely possible. What am I doing wrong?

KN
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Nov 13, 2008 5:28 pm     Reply with quote

Quote:
char buffer [512];

Look at the table at the bottom of page 3 (in the Acrobat reader)
in the 16F877A data sheet. It shows the total RAM available in this PIC:
http://ww1.microchip.com/downloads/en/DeviceDoc/39582b.pdf

Also see this post:
http://www.ccsinfo.com/forum/viewtopic.php?t=27958
naganumakr
Guest







Data Item Too Big
PostPosted: Thu Nov 13, 2008 5:36 pm     Reply with quote

Thanks for guiding me there--

I noticed those earlier when I was looking---

I've looked at the Register File Map and it only looks as though it can only handle up to 96 + 80 + 96 +96 = 368 bytes of data.

If that's true, and I can only use 368 bytes, is it at all possible to interface between a 512 byte sector size SD card and PIC16F877A?

What do you suggest?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Nov 13, 2008 6:38 pm     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?t=32222
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