Go Down

Topic: Ethernet library set HIGH to PIN #10 (Read 1 time) previous topic - next topic



I'm writing a program which for LCD shield & W5100 Shield.
For testing my software modules I plugged only the W5100 shield. OK
Now I plug only the LCD module which uses the pin #10 to power the backlight.

But when I call W5100.readSnSR(i) the pin #10 is setting HIGH.

Each time I watch "W5100.readSnSR(_sock)", I replaced it by:
Code: [Select]

        digitalWrite(10, LOW);
  out = W5100.readSnSR(_sock);
        digitalWrite(10, LOW);

The parameter is 0.

And, there is another thing which power up the pin #10 but I don't locate yet it.


Well, I list all functions which modify the pin #10:


In the "socket" constructor:
W5100.writeSnMR(s, protocol | flag);
W5100.writeSnPORT(s, port);
W5100.execCmdSn(s, Sock_OPEN);

As I'm beginning to learn C language, these functions are mysterious for me  :smiley-sad-blue:



Arduino communicates with both the W5100 and SD card using the SPI bus (through the ICSP header). This is on digital pins 11, 12, and 13 on the Duemilanove and pins 50, 51, and 52 on the Mega. On both boards, pin 10 is used to select the W5100 and pin 4 for the SD card. These pins cannot be used for general i/o. On the Mega, the hardware SS pin, 53, is not used to select either the W5100 or the SD card, but it must be kept as an output or the SPI interface won't work.

You'll have to use a different pin for your LCD module.


Thanks a lot!

Damned, if I plug the LCD 1602 shield on, I can't set the backlight  =(


Sep 16, 2012, 12:29 pm Last Edit: Sep 16, 2012, 12:35 pm by SurferTim Reason: 1
If you are an experimenter, you can "pin bend" digital pin 10 on the LCD module so it does not plug into anything, then connect a jumper from pin 10 to digital pin 9. Then you can control the backlight with pin 9 (or any other unused digital pin).

edit: The LCD must be the top shield to use this. The ethernet shield needs digital pin 10 connected to the Arduino.


Interesting. Yes, this shield is designed to be on the top.

Do you have a link to a documention about "pin blinding"?
I cut the pin #10 of the LCD shied then I join the whole #10 with another pin?
Or an assembly can prevent cutting the pin #10?


Don't cut the pin!! Just bend it very slightly, just enough so it does not insert into the ethernet shield, but is just outside the connector.

I used pin 9 as the example because it is right next door to pin 10, and easy to jumper with a wire or a small solder bridge.

The older version ethernet shields needed this when used with a Mega. Here is an article and a few pics on "pin bending".
It has digital pins 11-13 bent. Don't bend those, but digital pin 10 in the same fashion.



Well, I do it as soon as I receive my Arduino kit… with wires :p


This shield can help you "shift" pin connections:
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Go Up