This is an old revision of the document!
Table of Contents
WIOpico 16 I/O ETH
WIO Overview → WIOesp & WIOpico
- WIO Overview | WIO Setup | WIO Control | User Bitmaps | WIO Firmware | WIO Mobile | Cable | LEDScript | IOScript | WIOpi
Description
Goal is to provide a Pico with an ethernet connection W5500.
The W5500 is controlled by SPI and the WIOpico-ETH will use the same pin mapping as the WIOpico 16 I/O CAN.
Features
- Only available for Pico's without WiFi shield. ✔️
- Looking up the Rocrail server by mDNS. ✔️
- Transparent communication between WiFi and Ethernet. ✔️
- Same pin mapping as the WIOpico 16 I/O CAN. ✔️
Setup
Use the following terminal command to activate the EthCon in WIO:
*ethcon=1
This is bit 0 in options7.
A reboot is needed.
Wiring
Ethernet Library
To be able to set the hostname the Ethernet Library must be modified.
In Arduino/libraries/Ethernet/src/Dhcp.cpp
the following code must be added/extended:
const char* g_DhcpHostName = ""; // ***** NEW code line void DhcpClass::send_DHCP_MESSAGE(uint8_t messageType, uint16_t secondsElapsed)
// OPT - host name buffer[16] = hostName; // ***** start NEW code lines if( strlen( g_DhcpHostName ) > 0 ) { buffer[17] = strlen(g_DhcpHostName); strcpy((char*)&(buffer[18]), g_DhcpHostName); } else { // ***** end NEW code lines buffer[17] = strlen(HOST_NAME) + 6; // length of hostname + last 3 bytes of mac address strcpy((char*)&(buffer[18]), HOST_NAME); printByte((char*)&(buffer[24]), _dhcpMacAddr[3]); printByte((char*)&(buffer[26]), _dhcpMacAddr[4]); printByte((char*)&(buffer[28]), _dhcpMacAddr[5]); } // ***** NEW code line
W5500-EVB-Pico
Restrictions
This board connects the W5500 Reset and Interrupt to GP20 and GP21 which reduces the number of servos to two.
If NeoPixel has been activated the second servo pin GP26 is used for this and is no longer available for servos.
PCB
For the W5500-EVB-Pico the same PCB can be used as for the WIOpicoCAN without mounting U2 and U3. (MCP2515/MCP2562)