View previous topic :: View next topic |
Author |
Message |
Prefekt
Joined: 21 Oct 2010 Posts: 85
|
data from rs232 to eeprom |
Posted: Fri Dec 02, 2016 2:55 am |
|
|
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
|
|
Posted: Fri Dec 02, 2016 3:10 am |
|
|
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. |
|
|
|