Pages: [1]   Go Down
Author Topic: Ethernet Standard CS modification  (Read 557 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 1
Posts: 196
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Shannon Member
****
Karma: 215
Posts: 12455
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Which library, which ethernet shield?
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Full Member
***
Karma: 1
Posts: 196
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

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

Offline Offline
Full Member
***
Karma: 1
Posts: 196
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Shannon Member
****
Karma: 215
Posts: 12455
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

<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.
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Full Member
***
Karma: 1
Posts: 196
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Perfect.

Thanks MarkT

I tested it and it worked.

I tried to find it myself, but seems like lacked the persistence smiley
Logged

Pages: [1]   Go Up
Jump to: