---
title: "[FRDM-KL25Z(mbed)]WIZ550io Shield-A Porting Guide"
url: "https://maker.wiznet.io/WIZnet/projects/%5Bfrdm-kl25z-mbed-%5Dwiz550io-shield-a-porting-guide/"
markdown_url: "https://maker.wiznet.io/WIZnet/projects/%5Bfrdm-kl25z-mbed-%5Dwiz550io-shield-a-porting-guide/md"
type: "UCC: User Created Content"
author: "Anonymus"
author_url: "http://kaizen8501.blogspot.com/2014/10/frdm-kl25zwiz550io-shield-porting-guide.html"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Anonymus"
original_url: "http://kaizen8501.blogspot.com/2014/10/frdm-kl25zwiz550io-shield-porting-guide.html"
published: "2023-05-17"
language: "en"
hardware: ["WIZnet WIZ550io", "NXP FRDM-KL25Z"]
likes: 0
views: 206
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# [FRDM-KL25Z(mbed)]WIZ550io Shield-A Porting Guide

> WIZ550io Shield-A is arduino shield for using ethernet more easy.

Original author: Anonymus (source: http://kaizen8501.blogspot.com/2014/10/frdm-kl25zwiz550io-shield-porting-guide.html)

## Components

- **WIZnet WIZ550io** x 1 ([docs](https://docs.wiznet.io/Product/ioModule/wiz550io))
- **NXP FRDM-KL25Z** x 1

## Article

Original post: <http://kaizen8501.blogspot.com/2014/10/frdm-kl25zwiz550io-shield-porting-guide.html>

WIZ550io Shield-A is arduino shield for using ethernet more easy. FRDM-KL25Z is also compatible with arduino shiled. So If WIZ550io Shield-A attach on FRDM-KL25Z, it can use ethernet easily.

But WIZ550io Shield-A has some problem. If using Arduino Board, it has two method to use spi signal.
First, it can use Digital pin 9 to 12 for SPI communication. ( 9: SCSn, 10: MOSI, 11: MISO, 12: SCLK )
Second method is using ICSP.

But WIZ550io can support only second method for using SPI. So I did need some work for modifying WIZ550io Hardware in order to use digital pin 9 to 12 for SPI communication as below picture. ( I think that it will be changed for solving this problem. )

[![](http://2.bp.blogspot.com/-oc4FcqmbrKc/VEBfGE6Z80I/AAAAAAAAE8U/_h4KCzhZFwc/s1600/WIZ550io_1.jpg)](http://2.bp.blogspot.com/-oc4FcqmbrKc/VEBfGE6Z80I/AAAAAAAAE8U/_h4KCzhZFwc/s1600/WIZ550io_1.jpg)

* *

There is WIZ550io picture about attached with FRDM-KL25Z board.

[![](http://4.bp.blogspot.com/-YI7p4PqpGW8/VEBfGE20ghI/AAAAAAAAE8Q/TsZPwUyYMTA/s1600/WIZ550io_2.jpg)](http://4.bp.blogspot.com/-YI7p4PqpGW8/VEBfGE20ghI/AAAAAAAAE8Q/TsZPwUyYMTA/s1600/WIZ550io_2.jpg)

## Software

WIZ550io(W5500) library already exist in mbed site. If you want download W5500 library, [Click it](http://developer.mbed.org/teams/EthernetInterfaceW5500-makers/)

At this place, I could use example application. In this post, I used webSocket example.

This is source code about webSocket example using FRDM-KL25Z.

```plaintext
#include "mbed.h"
#include "EthernetInterface.h"
#include "Websocket.h"

#define _DHCP
Serial pc(USBTX, USBRX); // tx, rx

int main()
{
    int ret;
    pc.baud(115200);
    pc.printf("Start Applicationrn");

    SPI spi(D11, D12, D13); // mosi, miso, sclk
    EthernetInterface eth(&spi, D10, D9);//scs(D10), nRESET(PTA20)

    wait(1);

#ifdef _DHCP
    eth.init();
    ret = eth.connect();
#else
    ret = eth.init("192.168.11.10","255.255.255.0","192.168.11.1");
#endif

    if(!ret)
    {
        pc.printf("Initialized, MAC: %srn", eth.getMACAddress());
        pc.printf("Connected, IP: %s, MASK: %s, GW: %srn",
               eth.getIPAddress(), eth.getNetworkMask(), eth.getGateway());
    }
    else
    {
        pc.printf("Error eth.init() - ret = %drn",ret);
        return -1;
    }

    Websocket ws("ws://sockets.mbed.org:443/ws/demo/rw");
    ws.connect();

    char str[100];
    for(int i=0; i<0x10; ++i) {
        sprintf(str, "%d WebSocket for WIZnet W5500 Hello World over Ethernet : No Sensor", i);
        ws.send(str);

        // clear the buffer and wait a sec...
        memset(str, 0, 100);
        wait(0.5f);

        // websocket server should echo whatever we sent it
        if (ws.read(str)) {
            pc.printf("rcv'd: %srn", str);
        }
    }
    ws.close();
    eth.disconnect();
}
```

">#include "mbed.h" #include "EthernetInterface.h" #include "Websocket.h" #define _DHCP Serial pc(USBTX, USBRX); // tx, rx int main() { int ret; pc.baud(115200); pc.printf("Start Applicationrn"); SPI spi(D11, D12, D13); // mosi, miso, sclk EthernetInterface eth(&spi, D10, D9);//scs(D10), nRESET(PTA20) wait(1); #ifdef _DHCP eth.init(); ret = eth.connect(); #else ret = eth.init("192.168.11.10","255.255.255.0","192.168.11.1"); #endif if(!ret) { pc.printf("Initialized, MAC: %srn", eth.getMACAddress()); pc.printf("Connected, IP: %s, MASK: %s, GW: %srn", eth.getIPAddress(), eth.getNetworkMask(), eth.getGateway()); } else { pc.printf("Error eth.init() - ret = %drn",ret); return -1; } Websocket ws("ws://sockets.mbed.org:443/ws/demo/rw"); ws.connect(); char str[100]; for(int i=0; i&lt;0x10; ++i) { sprintf(str, "%d WebSocket for WIZnet W5500 Hello World over Ethernet : No Sensor", i); ws.send(str); // clear the buffer and wait a sec... memset(str, 0, 100); wait(0.5f); // websocket server should echo whatever we sent it if (ws.read(str)) { pc.printf("rcv'd: %srn", str); } } ws.close(); eth.disconnect(); }

And this picture is log message on serial terminal.

[![](http://4.bp.blogspot.com/-seekUeY6xTU/VEBfGGHavII/AAAAAAAAE8Y/usMP2Nea7fQ/s1600/WIZ550io_3.jpg)](http://4.bp.blogspot.com/-seekUeY6xTU/VEBfGGHavII/AAAAAAAAE8Y/usMP2Nea7fQ/s1600/WIZ550io_3.jpg)

---

Source: https://maker.wiznet.io/WIZnet/projects/%5Bfrdm-kl25z-mbed-%5Dwiz550io-shield-a-porting-guide/
