Closed nopnop2002 closed 4 years ago
I flashed this repo to Arduino UNO. https://github.com/njh/W5100MacRaw It work fine.
[W5100MacRaw]
_cs=10
getSn_SR()=42
Len=301
Dest=ff:ff:ff:ff:ff:ff
Src=02:42:0e:95:0f:93
Type=0x0800
I changed the code a little and flashed this repo to ESP8266.
//SPI.setClockDivider(SPI_CLOCK_DIV4); // 4 MHz?
SPI.setFrequency(4000000); // 4MHz
GPIO15 is used for Chip Select in this repo.
The result:
[W5100MacRaw]
_cs=15
getSn_SR()=0
I don't know why it don't work.
The W5100 module is a 5V dedicated module.
On the other hand, the GPIO of ESP8266 is 3.3V.
Maybe MOSI needs a level shift from 3.3V to 5V.
I'll try.
I understood the cause.
I was wrong
I used the board name "Wemod D1 R1".
In this board name, D2 is GPIO16.
I compiled it using the board name "Lolin (WEMOS) D1 R2 & mini".
Everything works fine.
LevelShift is not required.
Hello. W5500 and ENC28J60 work fine. It works very stably.
But W5100 don't work.
My board: WeMos D1 Mini
My code:
Wireing:
W5100 phy only work 5V.
I added debug print to w5100.cpp:
Serial.print:
Do you have any help.
Thanks for the helpful code.