Closed GoogleCodeExporter closed 9 years ago
This is intentional for compatibility with the Arduino Ethernet Shield, which
has the W5100 SS pin connected to digital pin 10 of the Arduino board.
Original comment by dmel...@gmail.com
on 1 Oct 2011 at 6:50
For a user’s perspective there is very little information that the ethenet
library silently uses a different pin for SlaveSelect (SS) than in many other
places documented for the Arduino Mega:
1.)
http://arduino.cc/en/Main/ArduinoBoardMega
SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS).
2.)
arduino-0022\hardware\arduino\cores\arduino\pins_arduino.h (52)
#if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
const static uint8_t SS = 53;
const static uint8_t MOSI = 51;
const static uint8_t MISO = 50;
const static uint8_t SCK = 52;
#else
const static uint8_t SS = 10;
const static uint8_t MOSI = 11;
const static uint8_t MISO = 12;
const static uint8_t SCK = 13;
#endif
3.)
arduino-0022\reference\SPI.html
Connections
On the Arduino Duemilanove and other ATmega168 / 328-based boards, the SPI bus
uses pins 10 (SS), 11 (MOSI), 12 (MISO), and 13 (SCK). On the Arduino Mega,
this is 50 (MISO), 51 (MOSI), 52 (SCK), and 53 (SS).
You could consider documenting your inline functions in
libraries\Ethernet\utility\w5100.h(311) initSS(), setSS() and resetSS().
Please mention in a more obvious place that the Ethernet library is using pin
10 SS for the Arduino Mega.
Consider providing some sort of switch in w5100.h with the following options:
1. SPI pins Ethernet compatible pin 10 SS
2. SPI pins ‘regular’ ping 53 SS
Thanks
Markus.
Original comment by go4s...@gmail.com
on 2 Oct 2011 at 1:45
Tom: here's a request to document the pin usage of the Ethernet library,
particularly for those users who are using it with hardware other than the
Ethernet shield. In particular, we should explain that the library always uses
pin 10 for SS, even on the Mega, where that's not the default SS pin.
Original comment by dmel...@gmail.com
on 2 Oct 2011 at 1:49
This has been clarified: http://arduino.cc/en/Reference/Ethernet
Original comment by dmel...@gmail.com
on 16 Dec 2011 at 10:30
Original issue reported on code.google.com by
go4s...@gmail.com
on 1 Oct 2011 at 6:34