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

data from rs232 to eeprom

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



Joined: 21 Oct 2010
Posts: 85

View user's profile Send private message

data from rs232 to eeprom
PostPosted: Fri Dec 02, 2016 2:55 am     Reply with quote

Hello,

I use a PIC18F2525 and have to store a string (2800 Bytes) from rs232. To store the data in a variable I have not enough RAM. For this reason I tried to put the received data directly in the eeprom, but I lose data. It seem the eeprom write command is to slow!

I use the timed_getc function from the examples, and put the data with this in the internal eeprom (500 bytes for test).

Code:

char c;
int16 j=0;

while(j<500)
{
  c=timed_getc();
  write_eeprom(j, c);
  j++; 
}


Has anybody a solution for this Problem?

bye
Volker
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Dec 02, 2016 3:10 am     Reply with quote

Quote:

I use a PIC18F2525 and have to store a string (2800 Bytes) from rs232.

According to the 18F2525 data sheet, it has 3986 bytes of RAM, but
only 1024 bytes of eeprom. So it seems a more suitable choice for your
data storage would be in RAM.

The eeprom write time is 4ms typical, according to the data sheet. If you
have bytes coming in every 1.04 ms (at 9600 baud), you can't write them
to eeprom fast enough. You will lose data. The PIC data sheet doesn't
say anything about "page mode" being supported for the data eeprom.
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