ENC28J60 Rx Tx Buffer

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
cruzxia
Posts: 88
Joined: Wed Jan 04, 2006 7:34 am
Been thanked: 8 times
Contact:

ENC28J60 Rx Tx Buffer

Post by cruzxia »

I have been setting up the ENC28J60 with a DSpic24.
I have set my micro buffer size to 2000b.
I have found that if my HTML page code exceeds around 1300b then the page wont load.
Reading the ENC28J60 data sheet, the 8kb buffer is split into two partitions, read and write.
It appears that the read buffer is set to 6655b, so the write buffer is the leftover 1345b

I suspect that with the header information the write buffer is overflowing causing it to fail.

Is there an easy way to change the size partitioning of the buffer in the ENC28J60 component?

Cruzxia

cruzxia
Posts: 88
Joined: Wed Jan 04, 2006 7:34 am
Been thanked: 8 times
Contact:

Re: ENC28J60 Rx Tx Buffer

Post by cruzxia »

After doing some research the TX buffer is limited to the Ethernet packet size (1536) so no need to change the TX and RX buffer allocation.

So I need to send 2 Packets to send out my larger HTML page data.
Something like this.
Html page is 2000 bytes
Split it into 2 pages (packets) of data Html(A) and Html(b)

When the HTML page is requested
Send first packet Html(A)
PacketSend
Send second packet Html(B)
MakeTcpAckFromAny
MakeTcpAckWithData


Is this the correct way to split the data into two packets? or am I missing something.
Cruzxia

cruzxia
Posts: 88
Joined: Wed Jan 04, 2006 7:34 am
Been thanked: 8 times
Contact:

Re: ENC28J60 Rx Tx Buffer

Post by cruzxia »

I found an article that allows the ENC28J60 to handle large TCP packets with a small buffer size.

It allows the data to be broken up into smaller packets and sent sequentially, overcoming the 1500 byte page limitation.
This will work especially well when using a 8bit pic micro with a buffer limited to 255 bytes.
In the article the buffer is limited to 150 bytes and all the data is uploaded to the browser.

http://www.atasoyweb.net/Modifying-The- ... CP-Packets

Is it possible to revise the ENC28J60 component have this ability?
Cruzxia

Post Reply