WIZnet WIZ550io/W5500 Ethernet module

WIZnet WIZ550io/W5500 Ethernet module
ORIGINAL POST
By espruino
components
Hardware Components
WIZ550io
X 1
Espruino Pico Shim
X 1
details

20220321_100615.png

The WIZnet WIZ550io module contains a W5500 chip – it implements TCP/IP on-chip, so you just plug an Ethernet cable in one end, and SPI into the other.

For the WIZnet W5100, see this page

Support is provided in Espruino, but you will have to use a special build of Espruino designed for it as there isn’t enough space in flash to hold both CC3000 and WIZnet drivers.

To get the latest WIZnet binary:

Easy way

  • Open the Web IDE, and click on Settings in the top-right
  • Click on Flasher
  • Click Flash Firmware
  • If prompted, select your device
  • If your device has multiple pre-built firmwares you’ll be prompted and can choose the WIZnet one

Hard way

  • Go to http://www.espruino.com/binaries and look for a file titled espruino_XXX_espruino_1r3_wiznet.bin, where XXX is the latest version and espruino_1r3 is the board you’re interested in.
  • Right-click on it, and click Copy Link Address
  • Open the Web IDE, and click on Settings in the top-right
  • Click on Flasher
  • Paste the link into the Advanced Firmware Update text box
  • Click the Advanced Firmware Update button and follow the instructions.

You can also get a recent Espruino Git build or can build it yourself.

To build yourself, follow the instructions here and build with WIZNET=1 RELEASE=1 BOARD=ESPRUINOBOARD make.

Espruino Pico Shim

WIZnet W550io shim

The Shim available for the Espruino Pico helps to adapt the W550io to fit onto the Pico. Please see the video below:

Wiring Up

Just wire up J1 as follows. J2 does not need wiring up.

WIZ550io J1NameEspruino
1GND
2GNDGND
3MOSIB5
4MISOB4
5SCKB3
6CSB2
73V33V3
83V3

On the Espruino Pico, the adaptor shim uses the following connections:

WIZ550io J1NameEspruino
1GND
2GNDGND
3MOSIB15
4MISOB14
5SCKB13
6CSB10
73V33V3
83V3

Software

Just connect as follows:

var eth = require("WIZnet").connect();

Or for the Espruino Pico adaptor:

SPI2.setup({ mosi:B15, miso:B14, sck:B13 });
var eth = require("WIZnet").connect(SPI2, B10);

You can check your IP with:

eth.getIP()

The module gets its own IP, however it does not configure DNS by default (for looking up domain names). To do this either:

eth.setIP({ dns : "8.8.8.8" }); // google's DNS

Or use DHCP:

eth.setIP();

Create an HTTP server like this:

require("http").createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.write('Hello World');
  res.end();
}).listen(80);

Or load a webpage like this:

require("http").get("http://192.168.1.50", function(res) {
  res.on('data', function(data) { console.log(data);    });
});

20220321_100615.png

The WIZnet WIZ550io module contains a W5500 chip – it implements TCP/IP on-chip, so you just plug an Ethernet cable in one end, and SPI into the other.

For the WIZnet W5100, see this page

Support is provided in Espruino, but you will have to use a special build of Espruino designed for it as there isn’t enough space in flash to hold both CC3000 and WIZnet drivers.

To get the latest WIZnet binary:

Easy way

  • Open the Web IDE, and click on Settings in the top-right
  • Click on Flasher
  • Click Flash Firmware
  • If prompted, select your device
  • If your device has multiple pre-built firmwares you’ll be prompted and can choose the WIZnet one

Hard way

  • Go to http://www.espruino.com/binaries and look for a file titled espruino_XXX_espruino_1r3_wiznet.bin, where XXX is the latest version and espruino_1r3 is the board you’re interested in.
  • Right-click on it, and click Copy Link Address
  • Open the Web IDE, and click on Settings in the top-right
  • Click on Flasher
  • Paste the link into the Advanced Firmware Update text box
  • Click the Advanced Firmware Update button and follow the instructions.

You can also get a recent Espruino Git build or can build it yourself.

To build yourself, follow the instructions here and build with WIZNET=1 RELEASE=1 BOARD=ESPRUINOBOARD make.

Espruino Pico Shim

WIZnet W550io shim

The Shim available for the Espruino Pico helps to adapt the W550io to fit onto the Pico. Please see the video below:

Wiring Up

Just wire up J1 as follows. J2 does not need wiring up.

WIZ550io J1NameEspruino
1GND
2GNDGND
3MOSIB5
4MISOB4
5SCKB3
6CSB2
73V33V3
83V3

On the Espruino Pico, the adaptor shim uses the following connections:

WIZ550io J1NameEspruino
1GND
2GNDGND
3MOSIB15
4MISOB14
5SCKB13
6CSB10
73V33V3
83V3

Software

Just connect as follows:

var eth = require("WIZnet").connect();

Or for the Espruino Pico adaptor:

SPI2.setup({ mosi:B15, miso:B14, sck:B13 });
var eth = require("WIZnet").connect(SPI2, B10);

You can check your IP with:

eth.getIP()

The module gets its own IP, however it does not configure DNS by default (for looking up domain names). To do this either:

eth.setIP({ dns : "8.8.8.8" }); // google's DNS

Or use DHCP:

eth.setIP();

Create an HTTP server like this:

require("http").createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.write('Hello World');
  res.end();
}).listen(80);

Or load a webpage like this:

require("http").get("http://192.168.1.50", function(res) {
  res.on('data', function(data) { console.log(data);    });
});

COMMENTS

Please Login to comment
  Subscribe  
Notify of
POSTED BY
Reusable S/W