khoih-prog / EthernetWebServer

This is simple yet complete WebServer library for AVR, AVR Dx, Portenta_H7, Teensy, SAM DUE, SAMD21/SAMD51, nRF52, STM32, RP2040-based, etc. boards running Ethernet shields. The functions are similar and compatible to ESP8266/ESP32 WebServer libraries to make life much easier to port sketches from ESP8266/ESP32. Coexisting now with `ESP32 WebServer` and `ESP8266 ESP8266WebServer` libraries. Ethernet_Generic library is used as default for W5x00 with custom SPI
MIT License
180 stars 51 forks source link

Arduino Mega not work pin SS #4

Closed BorgMcz closed 4 years ago

BorgMcz commented 4 years ago

Good day,

if I use Arduino Mega output number 53 for SS pin, wiznet 5500 is not functional. If I use pin 10 Arduino, everything works.

Used standard ethernet library in version 2.0.0.

khoih-prog commented 4 years ago

Dear @BorgMcz

The EthernetWebServer depends on many other libraries, such as Ethernet, Ethernet2, etc. and can not do the work alone if there is bug or connection is not correct or a new variation of board is used.

The best way to solve a similar issue is to run a simple example from the underlying libraries (Ethernet, Ethernet2, etc. ) to verify if the pin usage is working before using the higher level of libraries, such as EthernetWebServer.

If you still have the problem with the underlying libraries, it's better to open an issue there so that the issue could be solved completely at the correct place.

I still can investigate later, if the problem can be solved, can just provide you a quick-fixing kludge / patch for the library.

But as you known, W5x00 CS/SS normally is pin 10, and some Mega / SAM DUE boards have the internal SPI bus pins assigned to pins 50, 51, 52, 53 or the ICSP connector so that W5100 can be used more easily.

Thanks for your sharing of experience.

Regards,