8OD – Ethernet shield

ArduinoEthernetShieldV3

The ethernet shield was always on my list of things run with 8OD, but sat in the “too hard” basket, mostly because I was afraid of a difficult software task, which in the end would turn out to be rather simple.

My fears weren’t without basis, however. A lot of years ago, when I was a enthusiastic graduate, I made this thing:

avrsmsc

By contemporary standards, that might seem like a lot of arse-about-face to get an 8-bit AVR based microcontroller online, but back then – It was a tough gig.

At the time, most efforts centred on frankensteining NE2000’s or better Ethernet controllers, designed for greater CPUs, onto silly little things like this board, which meant buses, glue logic, late nights in front of the logic analyser, all sorts of annoying obstacles.

Even having done all of that, the next pain in the backside was having to port (or write) a full TCP/IP stack to make it all work. Any 8-bit microcontroller attempting this needed a lot of flash, and external RAM to have a hope of doing anything other than firing small UDP packets around.

If you were dead-set on getting your coffee machine online without having to attach it to a full blown PC, you had to work at it.

A few years later, things got a little better with the release of Microchip’s PIC18 with built in Ethernet, but with expensive buggy compilers and reams of unintuitive code, it still required significant commitment.

Apparently these days, there’s been changes. Enter the W5100, which the Arduino Ethernet shield is based on. With in-built TCP/IP stack – It’s a really smart chip, which connects dumb things to the net.

8OD (and a lot of other boards this shield can plug into) are sufficiently powerful to run their own TCP/IP stack, but heck, it plugs right in, so let’s put the technical nits aside and give this thing a crack.

Anyway…

I quickly notice, that with the Ethernet shield attached – 8OD occasionally doesn’t boot?

After quickly whipping up a test app which just gives it an IP address, I quickly notice, that with the Ethernet shield attached – 8OD occasionally doesn’t boot? What the hey?! After all the time I had spent making sure this design was robust, how could it be defeated by plugging in a shield!

Quickly the stuffup becomes apparent, and it is not mine. It seems that the designers of the Ethernet shield neglected to put pull up resistors on the CS# signals. Oops.

Not a problem for basic Arduino use cases, but a major bummer for 8OD because it means that an attached SD card, the W5100 and 8OD’s SPI flash are all simultaneously “selected” during the boot up phase, because the GPIO’s are all tristated, as they should be.

There’s no software or hardware solution I can meaningfully apply to 8OD to get around this, and with its fair share of Arduino brain farts already designed into it – It’s got to be the Ethernet shield that has to be fixed.

8OD with Arduino ethernet shield
8OD with Arduino ethernet shield

Which was pretty easy. I just put a pull up resistor on it.

Tidier fix. Pull up resistors added to underside so the top headers can still be used.
Tidier fix. Pull up resistors added to underside so the top headers can still be used.

I can now at least, ping it. Now to make it do something useful.

So far, getting a stable web server has been tough due to software bugs. I’ve written more about that on this, and this post.

One thought on “8OD – Ethernet shield

Leave a Reply

Your email address will not be published. Required fields are marked *