This project is an example of building Ethernet using the XIAO-RP2040 and W5100S.
I have done a lot of projects related to RP2040. We always used the Pico board to proceed. I used a lot of W5100S-EVB-Pico, an Ethernet-enabled board in Pico. Now, I want to make a smaller and more efficient board than this board and proceed with the project.
- High Performance: Powered by Raspberry Pi 2040 chip, dual-core operating up to 133 MHz, equipped 264KB of SRAM, and 2MB of onboard flash memory
- Ultra-small Design: 21 x 17.5mm, Seeed Studio XIAO series classic form-factor, suitable for wearable devices
- Multiple Development Interfaces: 2x buttons, 11x digital / 4x analog pins, 1x I2C interface, 1x UART port, 1x SPI port, and 1x SWD Bonding pad interface
- Multiple Develop Platform: Support Arduino / Micropython / CircuitPython development, friendly for beginners, satisfied for electronics enthusiasts
- Perfect for Production: Breadboard-friendly & SMD design, no components on the back
The XIAO board is the smallest configuration based on various MCUs. It's made very small like the image.
- W5100S is a TCP/IP Ethernet chip.The W5100S helps the MCU communicate easily via SPI.
Once you have your XIAO-RP2040 and W5100S Ethernet module mounted, as shown in the figure below, you are ready to get started.
Now let's set up Micropython in our environment. Connect Raspberry Pi Pico to desktop or laptop using 5 pin micro USB cable.
Development environment configurationMicroPython Thonny IDE
Install Thonny IDE
on Raspberry Pi Pico by referring to the link
Thonny IDE Link : Thonny
1. The drive will be called RPI-RP2 on all RP2040 boards. Download the UF2(rp2_w5100s_20221111_v2.0.0.uf2) file from the link below and put the file in Pico.
F/W Download link : W5100S-XIAO-RP2040
2. You can also access the firmware installation menu if you click on MicroPython (Raspberry Pi Pico) in the status bar and choose ‘Configure interpreter …’.
3. Look at the Shell panel at the bottom of the "Thonny" editor. You should see something like this:
Now that we're done setting up our environment, let's implement TCP/IP Ethernet.
Import the Ethernet source from the link below, which is a basic TCP/IP send/receive example from the Loopback sample.
https://github.com/min-hs/w5100s-xiao-rp2040.git
Since the W5100S-XIAO board will be acting as a server, enable the server_loop() function and run the code to wait for the client to connect. When you run the code, the IP address information appears as shown below.
When a client connects, an RGB LED lights up on the board.
Comments