Go Down

Topic: Ethernet Standard CS modification (Read 612 times) previous topic - next topic

LuisSoares

Hi,

I am using a Mega2560 with a board redesign and i wanted to change the standard chip select pin 10 to another pin.

Where on the Ethernet library can i do this?

Thanks

MarkT

Which library, which ethernet shield?
[ I won't respond to messages, use the forum please ]

LuisSoares

Hi,

The Arduino Ethernet Shield and respective library (Ethernet.h).

LuisSoares

Hi,

In the case of Arduino UNO the SShardware pin is used for selecting the W5100 chip to comunicate.

In the case of the Arduino Mega the PB4 (pin 10) pin is used to select the W5100 chip to comunicate.

In the Mega case i cannot find the reference in the core Ethernet library to the PB4 (pin10). I need to find this or the way they do this so i can modify this port and use the one in my specific design.

Does anyone know?

MarkT

<your install>/libararies/Ethernet/utililty/ws100.h has the relevant code I think, the macros
initSS, setSS and resetSS use direct port manipulation.

Create a copy of the Ethernet library, rename the class and alter those macros?  Doesn't look as simple
to do as it ought to be alas.
[ I won't respond to messages, use the forum please ]

LuisSoares

Perfect.

Thanks MarkT

I tested it and it worked.

I tried to find it myself, but seems like lacked the persistence :)

Go Up