T-Display-S3 + Ethernet W5500
-
I try to connect an ethernet W5500 port to my T-Display-S3 but I don't get it seen. Has anyone a suggestion which pins to use to get it running?
-
@dusty said in T-Display-S3 + Ethernet W5500:
W5500
Some questions:
What programming IDE?
What W5500 board?
What W5500 library?
Is your LilyGO T-Display S3 a touch screen type? -
@teastain2 Sorry, as I struggled with the PIN-Selection I missed giving the details.
- I am using VisualStudioCode with PIO.
- The Board is a HW-243 (https://www.sunsky-online.com/de/p/TBD05722754/HW-243-W5500-Ethernet-Network-Module-Hardware-TCP-IP-51-STM32-Single-Chip-Program.htm)
W5500-Library: Default Arduino-Ethernet-Library 2.0.2. - Yes it's a LilyGo T-Display-S3 Touch
I am trying to port a Code which works fine on my ESP32-Devkit-V4 board, but the GPIOs I used there are not available on the T-Display.
-
@dusty I ask about Touch because it is i2c on this model, no problem.
I understand that the W5500 is SPI?
GPIO 10 - 13 are SPI on the LilyGO T-Display S3 are the SPI pins.
Does your sketch have a means to specify the pins? ( I don't have one to test)
Anyway, just some food for thought. -
@teastain2 Further investigating:
It seems that Arduino, and by extension possibly PIO is a walled garden and they don't want you to worry about trivialities such as pins!
I found a tutorial and a snippet gives me this for my LilyGO T-Display S3
MOSI: 11
MISO: 13
SCK: 12
SS: 10
The tutorial also tells how to edit this:
https://randomnerdtutorials.com/esp32-spi-communication-arduino/
Hope this helps
-Terry -
@teastain2 Hi, unfortunately I still do not get it working.
I made a minimal test-script as follows:#include <Arduino.h> #include <SPI.h> #include <Ethernet.h> #include <Wire.h> #define PIN_ETH_SS 10 #define PIN_ETH_MOSI 11 #define PIN_ETH_SCK 12 #define PIN_ETH_MISO 13 byte ip[4]={ 0xc0, 0xa8, 0x7a, 0x7b }; byte mac[]={ 0x1E, 0xE8, 0x09, 0xE7, 0x56, 0xD8 }; void setup() { Serial.begin(9600); Serial.println("Starting ..."); SPI.begin(PIN_ETH_SCK,PIN_ETH_MISO,PIN_ETH_MOSI,PIN_ETH_SS); Ethernet.init(PIN_ETH_SS); Serial.println("Initializing NIC"); Ethernet.begin(mac,ip); if(Ethernet.hardwareStatus()==EthernetNoHardware) { Serial.println("Ethernet-Interface not found!"); } else if (Ethernet.linkStatus() == LinkOFF) { Serial.println("Ethernet cable not connected"); } Serial.println(Ethernet.localIP()); } void loop() { delay(100); }
Unfortunately it only outputs:
Ethernet-Interface not found!
0.0.0.0On my ESP32-DEVKIT (with the correct ports ( SS = 5, MOSI = 23, SCK=18 and MISO =19) this code is working as expected.
-
@teastain2 ... OMG ... I got it running ... and I am almost to embarrsed to tell the reason ... obviously the breadboard I was using for the T-Display was broken and did not have contact for pin 13 Changing the breadboard solved the problem, Ethernet is now working correctly!