Page 1 of 1

Ethernet on PIC32MX795F512L

Posted: 30 May 2017 15:58
by ter2
Hi to all,

I'm looking for example on how to use the internal Ethernet controller og PIC32MX795F512L.

I have an Easy PIC Fusion v7 board with a PIC32 MCU card.

All the example that I see is intended to use with Enc28J60 controller.

Thanks for your help

Re: Ethernet on PIC32MX795F512L

Posted: 31 May 2017 12:03
by darko.ilijevski
Hello,

You can find an example for the onboard Ethernet controller in the compiler examples, in the following location:
..\Examples\Development Systems\EasyPIC Fusion v7\Ethernet Demo\

In that demo example, you can see a web page, which is used to control the circles on the TFT (turn off and on "virtual LEDs"), and vice versa - you can check their status on that web page, if you touch the circles, turning them off or on.

You need to set up some things first, according to your network - arrays like myIP[4], gwIpAddr[4], dnsIpAddr[4] and ipMask[4], have to be set, to comply with your network settings. After compiling, you need to point your browser to the myIP address and the page will open, if all has been set correctly.

Best regards

Re: Ethernet on PIC32MX795F512L

Posted: 20 Jun 2017 12:36
by ter2
Hi darko.ilijevski,
Finally I found some time for this activity!

The Example work well.

Unfortunately I did not find what I needed.
The example is base on incoming TCP request. I need to generate a TCP request to a server ( open a socket).

I see in the library that there is a sendUDP function but not a sendTCP.

How can I handle this issue?

Thanks

Re: Ethernet on PIC32MX795F512L

Posted: 27 Jun 2017 08:34
by ter2
@darko.ilijevski

So the library don't allows to open a connection to a remote IP?

Re: Ethernet on PIC32MX795F512L

Posted: 28 Jun 2017 17:07
by darko.ilijevski
Hi,

Unfortunately we do not have an example which does exactly that with the internal Ethernet functions, but we are going to write one soon. As for the references, you can search forum and libstock and of course the help file of the library itself. You can check the library from HERE

A quote from the help file from the library Ethernet_Internal:
TCP Stack features:

Improved Stack can handle almost all posible TCP States like: closed, Established, Listen, SYN Sent, SYN Received...
In other word, We can open socket, send/received data in packets (as many as We want), and finaly close socket.
User can define size of Tx bufer which is used session handling. Only restriction is that the buffer size must be the power of 2 (1, 2, 4, ... 512, ...).
This can be useful because We can choose the amount of RAM We want to occupy. Of course, smaller Tx bufer means more available
RAM and less communication speed (because packets are smaller).

Multiple sockets are supported, and user can define number of sockets required. If You choose more
sockets, less RAM is available, and communication speed will decrease (because there will be more packets to process).

Re: Ethernet on PIC32MX795F512L

Posted: 28 Jun 2017 18:34
by ter2
We can open socket, send/received data in packets (as many as We want), and finaly close socket.
This is what I need, but I can't find the function ( or how to handle the stack) in the help file.

There is a way to do this? Or I must wait for next library release?

Thanks for your time.