View previous topic :: View next topic |
Author |
Message |
puppie7777
Joined: 09 Jun 2004 Posts: 25 Location: Monterey, CA
|
memory problem on pic18f452 |
Posted: Thu Aug 19, 2004 1:25 am |
|
|
Hi, there.
I have built in a tcp/ip ppp protocol stack on pic18f452 which is connected with a GPRS modem through RS232. As is known, the standard buffer of tcp/ip protocol stack should be 1024 bytes, but due to the RAM size of pic18f452, i have modify it into 256 bytes. It works fine if the data packet transmitted is less than 190 bytes. but if the data packet is bigger than 196 bytes, it won't work ... ...
anyone has good idea on that? Or for the declare of static array, can i put it on the FRAM (flash memory thr i2c)??
Thx in advanced! |
|
|
treitmey
Joined: 23 Jan 2004 Posts: 1094 Location: Appleton,WI USA
|
|
Posted: Thu Aug 19, 2004 8:18 am |
|
|
I think(I don't know for sure) that the FRAM would be to slow.
experiment and find out. I would try (2) 256 buffers. toggle between them.
buffer1[255]
buffer2[255]
store Rx data in 1 via and IRQ
while the I2C write happens on the other.
- - - - then swap - - -
AND by all means try to do the I2C FRAM write of all 255 bytes at once.
then maybe try 3-255 buffers or 4. Past 4 I think your done. The limiting factor then is probably the slow FRAM.
I would love to give you and equation that says YES or NO the FRAM is too slow,... but I don't have that info. Post your results. |
|
|
puppie7777
Joined: 09 Jun 2004 Posts: 25 Location: Monterey, CA
|
|
Posted: Thu Sep 09, 2004 9:35 pm |
|
|
HI,
There! I am so sorry that i came back to this forum so late, cos leave for quite time.
For the problem of the RAM size of pic18f452, i have to modify the RWIN size for the receive window size advertising to a small buffer. For my application seems OK, cos no require of such high transmission rate.
Thx, anyway! |
|
|
Guest
|
|
Posted: Fri Sep 10, 2004 3:15 am |
|
|
18F4525 and 18F4620 are now available with almost 4 K RAM ! |
|
|
|