chipKIT® Development Platform

Inspired by Arduino™

Another Network Shield and SD Card Thread

Created Wed, 22 Oct 2014 15:34:22 +0000 by Cosford


Wed, 22 Oct 2014 15:34:22 +0000

Hi guys,

Trying to run a HTTP webserver, with the pages being loaded from an SD card. I'm doing it based on this tutorial, but applying some common sense and the chipKitEthernet library in order to have it work for my MAX32.

I can do all the web server stuff fine and I can load things from the SD Card etc, but as with so many other threads on here, once I initialise the ethernet library, The sd card library no longer works rendering me unable to access the card. I have searched thoroughly through here, but couldn't find a documented solution.

I have tried re-ordering the initialisation of the libraries but this does not help. (IE, sd.begin before ethernet.begin and vice versa.

Any help would be most appreciated.

Jacob Christ

Sat, 25 Oct 2014 14:46:46 +0000

Which version of MPIDE and the chipKIT ethernet library are you using?

There are at least two "official" chipKIT Ethernet libraries (that were created in the order shown below):

  1. The original one based on the Microchip plib

  1. The second was an effort to removed plib (which is non-open source) written by Keith at Digilent. I'm not sure where to get this library but I think it is or soon will be in the core. (when I find a link I will update this post)

So I use the original core all the time, and I know its broken in the latest versions of MPIDE.

Here is a web server that serves pages of the uSD card on the Quick240. I should run on a Max32 but you may need to more your SD chip select line. This code uses the 1st Ethernet library. I've been told by customers that it was pretty easy to swap out to the latest library without a problem.

I haven't spent much time on it, but I know that if there are multiple clients trying to hit this server it tanks. I did get a chance to play with (what I think was an early version of Keith code) at Microchip Masters a few years ago and I purposefully tried to crash it and was pleasantly surprised that it did not. There were about 20 chipKIT boards sending messages to a single chipKIT server every second or so. I upped the rate of my board and it took the punishment thanks to Keith's robust code.

Oh, and here are some notes on three primary versions of MPIDE I use. Its sad, but true, we have to use a specific version of MPIDE base on what we are trying to do. Typically we will make a note at the top of a sketch to remind us which version of MPIDE to use when compiling the sketch.



Wed, 29 Oct 2014 10:42:37 +0000

Hi, thanks for the reply. Apologies in my late response, was away for a long weekend.

I am using the original core ethernet library. I will have a shot with the example you've posted this afternoon and let you know the results.

Many thanks.