chipKIT® Development Platform

Inspired by Arduino™

Ethernet lib for C

Created Fri, 01 Feb 2013 04:18:02 +0000 by ahagele


ahagele

Fri, 01 Feb 2013 04:18:02 +0000

Hi, I'm new to chipKIT and a bit confused on the Ethernet library for C.

I ran some Arduino examples under MPIDE from the "chipkit network and USB Libs". That worked fine.

But now I want to use it with 'native' C under MPLAB. How do I go about that? Using the same library? And some API glue? Or the TCP/IP stack from Mircochip?

Is there a MPLAB example for a network shield. Something like the TelnetServer or similar.

Sorry if that question has been asks here before. I've searched the forum but couldn't find much.

Thanks for you help.

Cheers Andreas


MCHPSupport

Thu, 07 Mar 2013 15:53:03 +0000

Hello,

To do this in C you may be able to use the Microchip TCP/IP Stack, which is part of the Microchip Library of Applications (http://www.microchip.com/mla).

This stack does support the PIC32MX795F512L, which is on the MAX32. The stack may not support the device as it is configured though, since this board configuration isn't supported by the stack. This means you may be required to do some porting to get it to work with this board configuration.

To do this porting, I'd recommend looking at the supported Microchip Demo boards for the TCP/IP stack, and their schematics vs. those of the MAX32 and the Network Shield. You'll then need to make changes to the source code as needed, to configure it to work with this board.

I wouldn't expect too many changes to be needed, but haven't done this, so can't say for sure.

Regards, MCHPSupport


Andres

Fri, 15 Mar 2013 13:02:04 +0000

Hi, Any improve on this line. I'm struggling with the same problem. Im trying to use the AN1108A microchip library, but I do not manage to turn on the ethernet interface.

Thanks


Andres

Fri, 15 Mar 2013 13:21:56 +0000

Hello, Any progress on this line. I'm trying to achive the same objetive using the AN1108A library from microchip, but I'm not able to turn on the ethernet interface yet.

Please report your progress.

Thank you very much


Andres

Thu, 21 Mar 2013 18:21:47 +0000

Hello again, I have manage to make the TCP IP Stack work with the MPLAB X on the MAX32 (pic32mx795f512l) with the Network Shield of the (LAN8720), using the ChipKITEthernetAPI. But only on debug mode witch is absurd... Stoping on the begging of each loop. .- It respond to the ICMP packets (ping) .- And make/respond the ARP packets

Any idea to make it run, instead of debug step by step. PLEASE!!!!!!!!

#pragma config FPLLODIV = DIV_1, FPLLMUL = MUL_20, FPLLIDIV = DIV_2, FWDTEN = OFF,  POSCMOD = XT, FNOSC = PRIPLL, CP = OFF,FPBDIV = DIV_2
#pragma config FMIIEN = OFF, FETHIO = ON	// external PHY in RMII/alternate configuration

#pragma config UPLLEN = ON,UPLLIDIV = DIV_2, FVBUSONIO = ON, FUSBIDIO = ON
#pragma config FSOSCEN = OFF, FCKSM = CSECMD

#define GetSystemClock()		(80000000ul)			// Hz
#define GetInstructionClock()	(GetSystemClock()/1)	
#define GetPeripheralClock()	(GetSystemClock()/1)

EDITED

It wasn't working for me becaouse I didnt have the Interrupts enabled


tahoe250

Tue, 15 Apr 2014 15:02:36 +0000

I am facing the same thing i cant get my application to even ping. Where did you enable the interrupts if you don't mind me asking.