After all the installation, it is the time for showing how to create a simple TCP connection
In general Software protocol, engineers needs to have a fully understanding about TCP/IP protocol to make it functional. This even required using a lot of space and workload for the processor (MCU) to work with this protocol.
WIZnet’s solution had help user to reduce this kind of pain for developing a functional network feature for you.
Users only need to simply understand the process stage of the Chip and collect the data will be fine.
For coding the Raspberry PI PICO, it required only few steps to activate this progress.
- Import libraries – wiznet5k and WIZnet’s socket
- Activate and set the GPIO pins for SPI communication and reset pin
- Set the network settings
- Set your PICO into TCP server
- TCP Connection and start communicate with your PICO
For more details, please refer the Git-Hub links below.
The provided example code is an Echo TCP example, the coming post will show you how the received sensor data using TCP to communicate.
Links:
- WIZnet Ethernet HAT library and examples – https://github.com/Wiznet/RP2040-HAT-CircuitPython
- WIZnet offical blog about TCP connection on Ethernet HAT with Raspberry Pi Pico – https://maker.wiznet.io/2021/10/21/wiznet-ethernet-hatrp2040-loopback/
- WIZnet networking official samples – RP2040-HAT-CircuitPython/W5x00_Echo_Demo_TCP.py at master · Wiznet/RP2040-HAT-CircuitPython · GitHub
- WIZnet HK version samples (include status identification) – https://github.com/ronpang/WIZnet-HK_Ron/blob/main/TCP/TCP%20server.py
- How to setup WIZnet Library into Raspberry Pi Pico – https://www.iwiznet.cn/2021/12/13/how-to-install-wiznet-library-into-raspberry-pi-pico/
Used software:
- Hercules software: https://www.hw-group.com/software/hercules-setup-utility
- Thonny: https://thonny.org/







