---
title: "How to add W5500 Ethernet to Raspberry Pi Pico (Python) – 1"
url: "https://maker.wiznet.io/WIZnet/projects/how-to-add-w5500-ethernet-to-raspberry-pi-pico-python-%E2%80%93-1/"
markdown_url: "https://maker.wiznet.io/WIZnet/projects/how-to-add-w5500-ethernet-to-raspberry-pi-pico-python-%E2%80%93-1/md"
type: "UCC: User Created Content"
author: "Bongjun Hur"
author_url: "https://www.hackster.io/bjnhur/how-to-add-w5500-ethernet-to-raspberry-pi-pico-python-1-c7340c"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "Bongjun Hur"
original_url: "https://www.hackster.io/bjnhur/how-to-add-w5500-ethernet-to-raspberry-pi-pico-python-1-c7340c"
published: "2023-02-09"
language: "en"
hardware: ["WIZnet WIZ850io", "WIZnet W5500"]
likes: 2
views: 384
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# How to add W5500 Ethernet to Raspberry Pi Pico (Python) – 1

> HOWTO: Raspberry Pi Pico + WIZnet W5500 Ethernet + CircuitPython - Manual IP setting & Ping Demo

Original author: Bongjun Hur (source: https://www.hackster.io/bjnhur/how-to-add-w5500-ethernet-to-raspberry-pi-pico-python-1-c7340c)

## Components

- **WIZnet WIZ850io** x 1 ([docs](https://docs.wiznet.io/Product/ioModule/WIZ850io))
- **WIZnet W5500** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5500))

WIZnet parts: W5500 ([Datasheet](https://docs.wiznet.io/Product/Chip/Ethernet/W5500/datasheet?utm_source=maker&utm_medium=project&utm_campaign=w5500), [product hub](https://maker.wiznet.io/products/w5500/))

## Article

### **1. Circuit Python install first!**

Reason: lots of examples with W5500

<https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython/micropython-or-circuitpython>

> ***CircuitPython has a lot of examples and support!**There are 260+ libraries for the standard CircuitPython API. Most of these will already work. Listed *[*here*](https://circuitpython.readthedocs.io/projects/bundle/en/latest/drivers.html)

- 1. Download the below uf2 file link on your computer

> *CircuitPython 6.2.0 – *[*adafruit-circuitpython-raspberry_pi_pico-en_US-6.2.0.uf2*](https://downloads.circuitpython.org/bin/raspberry_pi_pico/en_US/adafruit-circuitpython-raspberry_pi_pico-en_US-6.2.0.uf2)

- 2. Push and hold the BOOTSEL button and plug your Pico into the USB port of your Raspberry Pi or other computer. Release the BOOTSEL button after your Pico is connected.

- 3. It will mount as a Mass Storage Device called RPI-RP2.

- 4. Drag and drop the CircuitPython 6.2.0 UF2 file onto the RPI-RP2 volume. Your Pico will reboot. You are now running CircuitPython.

> [*https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython/circuitpython*](https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython/circuitpython)

- **if you want, you can install MU editor to make your python code. But I think, it’s not necessary. Just use your PythonIDE** such as Notepad, VSCode, …

Then, you can see “CIRCUITPY” drive on your system.

![circuitpy code.py](https://hackster.imgix.net/uploads/attachments/1283543/pic099_JiYyxplMdS.png?auto=compress%2Cformat&w=740&h=555&fit=max)

circuitpy code.py

Now, we’re ready to enjoy the code on python code.py with CircuitPython!!

Once you edit and save your code on code.py, run your code on the board.

Let’s test “LED on” and “LED off” code.

actually, just visit the below page to blink led on your rpi pico board.

<https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython/blinky-and-a-button>

### **2. Pin connect to W5500, WIZ850io**

use SPI1 on rpi pi board.

![](https://hackster.imgix.net/uploads/attachments/1283577/pic100_Gj7CaiE1gA.png?auto=compress%2Cformat&w=740&h=555&fit=max)

1 / 2

- SPI1_SCK => WIZ850io SCLK

- SPI1_TX => WIZ850io MOSI

- SPI1_RX => WIZ850io MISO

- SPI1_CSn => WIZ850io SCNn

- GP15 => WIZ850io RSTn

, and 3.3V, GND as well.

for your reference,

![Pico connect to WIZ850io](https://hackster.imgix.net/uploads/attachments/1284379/pic110_kxsIl1l88m.png?auto=compress%2Cformat&w=740&h=555&fit=max)

Pico connect to WIZ850io

### **3. W5500 Reset Test**

Copy below RESET_test code to code.py file on your rpi pico board.

> [*https://github.com/bjnhur/pico-W5500/blob/main/W5500_Reset_Test.py*](https://github.com/bjnhur/pico-W5500/blob/main/W5500_Reset_Test.py)

Every 6 second, RESET pin control => See the link on & off

![Link ON](https://hackster.imgix.net/uploads/attachments/1283591/pic102_Ta9O58QuTL.png?auto=compress%2Cformat&w=740&h=555&fit=max)

1 / 2 • Link ON

### **4. W5500 adafruit_wiznet5k python library**

Before, ping test we prepare some libraries from Adafruit learning page.

<https://learn.adafruit.com/ethernet-for-circuitpython/circuitpython-setup>

> *Before continuing, make sure your board’s **lib** folder has at least the following files and folderscopied over:*
> ***adafruit_wiznet5k***
> ***adafruit_bus_device***
> ***adafruit_requests.mpy*(Added** 04-21, 2021) I put the latest files and folders on my github repo. download files from here.

- <https://github.com/bjnhur/pico-W5500/tree/main/lib>

For **adafruit_wiznet5k,** I forked & **modified some code for DHCP operation**. please visit & download code from

- [**https://github.com/bjnhur/Adafruit_CircuitPython_Wiznet5k**](https://github.com/bjnhur/Adafruit_CircuitPython_Wiznet5k)

- Adafruit original lib – <https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k>

OR, original files can be download as belows.

Find and copy **adafruit_bus_device** & **adafruit_requests.mpy** file from [Adafruit’s CircuitPython library bundle](https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/tag/20210409) matching your version of CircuitPython. Don’t copy all files and folder in the library.

- **Download** [**adafruit-circuitpython-bundle-6.x-mpy-20210409.zip**](https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/download/20210409/adafruit-circuitpython-bundle-6.x-mpy-20210409.zip)

- **unzip** and find **adafruit_requests.mpy.**

![file location of adafruit_requests.mpy](https://hackster.imgix.net/uploads/attachments/1283636/pic104_WllP5lmucp.png?auto=compress%2Cformat&w=740&h=555&fit=max)

file location of adafruit_requests.mpy

For **adafruit_bus_device,** download from below link.

- <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>

Last, you copy the files on the lib director of CIRCUITPY drive.

![prepare library for W5500 python code](https://hackster.imgix.net/uploads/attachments/1283649/pic105_CQYGpABEnC.png?auto=compress%2Cformat&w=740&h=555&fit=max)

prepare library for W5500 python code

### **5. W5500 PING Test(UPDATED 04/12/2021) DHCP OK. refer from **[**my repo**](https://github.com/bjnhur/pico-W5500)**. **~~I tried DHCP mode, but failed.~~

so first I’m trying to ping with manual IP setting

For this example, please visit the link.

- <https://learn.adafruit.com/ethernet-for-circuitpython/usage#manual-network-configuration-3058018-20>

- the code from <https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k/blob/master/examples/wiznet5k_simpletest_manual_network.py>

I changed some information as my network env.

please refer my code.

- <https://github.com/bjnhur/pico-W5500/blob/main/Pico_W5500_Ping_Test.py>

just copy the content to code.py on your RPi Pico and save!! Done!!

PING test on my laptop. Result is

![ping success!](https://hackster.imgix.net/uploads/attachments/1283655/pic106_54ZtVwLILh.png?auto=compress%2Cformat&w=740&h=555&fit=max)

ping success!

### **6. REPL, Open serial terminal for printf()**

I found the material for REPL, terminam open from Adafruit page.

> *Now you need to open PuTTY.*
> *Under **Connection type:** choose the button next to **Serial**.*
> *In the box under **Serial line**, enter the serial port you found that your board is using.*
> *In the box under **Speed**, enter 115200.*

![putty serial configuration](https://hackster.imgix.net/uploads/attachments/1284101/image_U523CkCV7C.png?auto=compress%2Cformat&w=740&h=555&fit=max)

putty serial configuration

> *Once your settings are entered, you’re ready to connect to the serial console. Click “Open” at the bottom of the window. A new window will open.*

To see your COM port number, please open “Device Manager” on your Windows.

![window device manager](https://hackster.imgix.net/uploads/attachments/1284099/image_vm14I3K3MU.png?auto=compress%2Cformat&w=740&h=555&fit=max)

window device manager

![COM Port](https://hackster.imgix.net/uploads/attachments/1284100/pic107_Qv507pwQB9.png?auto=compress%2Cformat&w=740&h=555&fit=max)

COM Port

see the terminal screen as follows.

![REPL screen](https://hackster.imgix.net/uploads/attachments/1284103/image_nZxhhaFVIv.png?auto=compress%2Cformat&w=740&h=555&fit=max)

REPL screen

### **7. WebClient Demo**

please visit next project story.

<https://www.hackster.io/bjnhur/how-to-add-w5500-ethernet-to-raspberry-pi-pico-python-2-77c78c>

### **Resource**

All code, you can find the below repo.

<https://github.com/bjnhur/pico-W5500>

---

Source: https://maker.wiznet.io/WIZnet/projects/how-to-add-w5500-ethernet-to-raspberry-pi-pico-python-%E2%80%93-1/
