Go Down

Topic: Due and (No Rev3)-Ethernet-Shield (Read 939 times) previous topic - next topic

hk007

Hi,
does anybody made experiences with a DUE and an Ethernet-Shield without the IOREF-PIN. Looking on the "arduino-ethernet-shield-05-schematic.pdf", I see, that the WIZ5100 is powered with 3,3V.
All signals (SS,MISO,MOSI,RESET,SCK) should work with the 3,3V on both sides.

Only problem I see, is the SD-Card, cause these signals are going through a voltage divider to get 3,3V out of 5V level from arduinos like UNO.

Looks like the older Ethernet-Shields could run on the DUE without smoking him.

Anybody already tried?
Arduino 1.8.5

rmartins


SurferTim

#2
Jan 01, 2016, 04:14 pm Last Edit: Jan 01, 2016, 04:22 pm by SurferTim
I use the non-R3 ethernet shield with a Due, and both the w5100 and SD card work fine.

edit: One caveat with the Due and the SPI bus. DO NOT set D10 as an OUTPUT. If you want to start the SD card before the w5100, set D10 to HIGH to activate the weak pullup. The reason is that there are two processor pins connected to the D10 pin on the Due. One is D10, and the other is a hardware SPI slave select. Setting D10 to OUTPUT will cause a real problem with the SPI slave select connected to D10.

davidreeves20

Wow SurferTim! 

Would you please share which shield(s) you use? 

And do you use it with the standard ethernet library?

I have been trying to get both ethernet and SD to work in the same program.  I keep getting the incorrect ip address when I define a static IP at begin...even when using your abbreviated startup code.

Not defining D10 as output info is a huge revelation!  Somehow I've missed that.  I had always thought that you had to define a pin as output in order to do a digitalwrite high but just tried it and certainly now see that it does work!   I could provide a long list of shields that I have tested and wouldn't work correctly but maybe it is something else.  I've had the write high to 4 and 10.  I've even added pullup resistors to CS and a voltage divider on miso.  Was almost convinced it was impossible.  Perhaps I should create a new topic?

Thank you!

SurferTim

#4
Jan 04, 2016, 04:01 pm Last Edit: Jan 04, 2016, 04:12 pm by SurferTim
The problem with the Due's D10 is the CPU has two pins connected to the single D10 I/O pin. One is actually D10, and the other is a SPI hardware slave select. If you set D10 as an OUTPUT, the SPI.begin(10) call sets the SPI hardware slave select as OUTPUT. Now you have two CPU pins connected, and both set to OUTPUT. This situation is not good.

I use a standard Arduino R2 model ethernet shield with a SD card.

I do have a small problem with starting the Due without either opening the serial monitor or resetting it. It appears to lock up with just a power up. There is a hardware fix, but I have not implemented it.

edit: I just noticed D4 has the same setup as D10. Two CPU pins connected to D4 I/O. It hasn't caused me any problem, but try the abbreviated startup code without setting D4 as an OUTPUT, just set it HIGH.

D4 -> PA29 and PC26
D10 -> PA28 and PC29

Go Up