W5500以太网控制器

W5500以太网控制器芯片简介

W5500 是一款全硬件 TCP/IP 嵌入式以太网控制器,为嵌入式系统提供了更加简易的互联网连接方案。W5500 集成了 TCP/IP 协议栈,10/100M 以太网数据链路层(MAC) 及物理层(PHY),

使得用户使用单芯片就能够在他们的应用中拓展网络连接。

久经市场考验的 WIZnet 全硬件 TCP/IP 协议栈支持 TCP,UDP,IPv4,ICMP,ARP,IGMP 以及 PPPoE 协议。W5500 内嵌 32K 字节片上缓存以供以太网包处理。如果你使用 W5500,你只需要一些

简单的Socket编程就能实现以太网应用。这将会比其他嵌入式以太网方案 更加快捷、简便。用户可以同时使用8个硬件Socket独立通讯。

W5500 的使用了新的高效 SPI 协议支持 80MHz 速率,从而能够更好的实现高速网络通讯。 为了减少系统能耗,W5500 提供了网络唤醒模式(WOL)及掉电模式供客户选择使用。

产品特色

1、以W5500为核心的W5500 Ethernet with POE Mainboard是一款高度集成且符合IEEE 802.3af行业标准POE供电协议的Arduino Leonardo以太网控制板,通过简单的程序移植便可以使之成为一个简单的Web服务器或者通过网络控制可读写数字口和模拟接口等网络应用。

2、产品大小与Leonardo尺寸相等,板载POE供电电源、外接电源稳压电路、SD卡电路以及Leonardo主控单元电路,引出Arduino标准接口。该主控板采用4层布线设计,元件布局紧凑,大大减小了以往Shield+Arduino主板这种可堆叠设计造成的空间浪费问题,小小的尺寸可以为您创造更大的想象空间。

3、为了避免传统低成本DC-DC供电方式在电源变化时系统可靠性较差的缺点,我们不计成本,采用了更加智能和安全的专业PD电源控制集成芯片,使得整个板上系统在许多复杂异常的环境之下均能够稳定可靠的工作。

4、W5500 Ethernet with POE Mainboard兼容POE供电规则中1236信号线供电与4578空闲线供电两种供电方式使得用户不必考虑供电兼容问题。只要是符合IEEE 802.3af行业标准的POE供电设备,你便可以尽情的使用我们的产品。

版本说明:V2版本 在老版本基础上作了较大的升级,主要是将原来非隔离供电方式升级为隔离供电,进一步提升产品在您应用场景中的稳定性。

产品使用注意事项

应用领域

技术规格

接口定义

板子已额外引出pin7,8,11,12方便连接w5500复位及中断输出引脚。 板子附带跳帽,如果不使用w5500复位及中断输出功能请拔除跳帽,以免影响引脚的正常使用。

供电方式

电源会自动选择最高电压输入源作为输入。

应用实例

使用材料:

标准POE协议以太网交换机 X1

W5500 Ethernet with POE Mainboard V1.0 模块 X1

Micro USB线 X1

网线 X2

以下以图文方式介绍板子使用示例: 第一步:将W5500 Ethernet with POE Mainboard V1.0板子上的A-RST脚通过跳线连接到D11脚。

第二步:将W5500 Ethernet with POE Mainboard V2.0板子接上网线插到POE交换机任意LAN端口,也可使用普通交换机、路由设备或直接连接到PC端网口(当使用普通交换机、路由设备或直连PC端网口时需要为模块提供电源)。

第三步:将Micro USB线插在W5500 Ethernet with POE Mainboard上,另一端接电脑USB口。

第四步:在页面下方“相关下载”栏目按我们给的链接下载WIZnet官方Arduino库,下载后解压压缩包,根据自己使用的IDE版本,选择将解压后Arduino IDE 1.0.x与Arduino IDE 1.5.x两个文件夹之一下的Ethernet文件夹放在Arduino IED的libraries文件内进行覆盖(覆盖原Ethernet库),打开Arduino IDE编译器,主板选择Arduino Leonardo,在 文件 -> 示例 -> Ethernet 里找到 WebServer 样例并打开。

第五步:在WebServer 样例代码起始处添加复位管脚初始化代码。


/*
  Web Server

 A simple web server that shows the value of the analog input pins.
 using an Arduino Wiznet Ethernet shield.

 Circuit:
 * Ethernet shield attached to pins 10, 11, 12, 13
 * Analog inputs attached to pins A0 through A5 (optional)

 created 18 Dec 2009
 by David A. Mellis
 modified 9 Apr 2012
 by Tom Igoe

 */

#include <SPI.h>
#include <Ethernet.h>

#define SS     10U    //W5500 CS
#define RST    11U    //W5500 RST

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
};
IPAddress ip(192, 168, 1, 177);

// Initialize the Ethernet server library
// with the IP address and port you want to use
// (port 80 is default for HTTP):
EthernetServer server(80);

void setup() {

  pinMode(SS, OUTPUT);
  pinMode(RST, OUTPUT);

  digitalWrite(SS, LOW);

  digitalWrite(RST,HIGH);  //Reset this module
  delay(200);
    digitalWrite(RST,LOW);
  delay(200);
  digitalWrite(RST,HIGH);
 delay(200);
  // Open serial communications and wait for port to open:
  //Serial.begin(9600);
  //while (!Serial) {
  //  ; // wait for serial port to connect. Needed for Leonardo only
  //}


  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
  server.begin();
  //Serial.print("server is at ");
  //Serial.println(Ethernet.localIP());
}


void loop() {
  // listen for incoming clients
  EthernetClient client = server.available();
  if (client) {
    //Serial.println("new client");
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        Serial.write(c);
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: text/html");
          client.println("Connection: close");// the connection will be closed after completion of the response
          client.println("Refresh: 5");  // refresh the page automatically every 5 sec
          client.println();
          client.println("<!DOCTYPE HTML>");
          client.println("<html>");
          // output the value of each analog input pin
          for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
            int sensorReading = analogRead(analogChannel);
            client.print("analog input ");
            client.print(analogChannel);
            client.print(" is ");
            client.print(sensorReading);
            client.println("<br />");
          }
          client.println("</html>");
          break;
        }
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        }
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(1);
    // close the connection:
    client.stop();
    //Serial.println("client disconnected");
  }
}

第六步:编译并烧写。烧录完毕后可以拔掉Micro USB线(若使用普通交换机或路由设备请不要拔掉Micro USB线除非有其它外接电源的情况下),打开浏览器->输入IP地址->回车打开网页。

在页面中我们可以看到板子6路模拟口输入值在网页上按5S/次的频率自动刷新显示,此时说明我们创造的一个小型Web Server已经正常工作了。

异常情况解决办法:

对于计算机浏览器出现“网页无法加载”问题的小伙伴儿先不要着急,请按照如下步骤配置你的网络适配器:

1、打开控制面板-->网络和 Internet-->网络和共享中心-->更改适配器设置

2、找到你连接模块的网络-->右键-->属性-->在网络选项卡中找到“Internet协议版本4(TCP/IPv4)"并双击进入属性设置

3、输入下图所示参数并点击确定。在此之后再按照上面示例中第六步操作就行了....

接下来....... 小伙伴儿们,充分发挥你们的想象吧.....

POE供电简介参考度娘百科

相关下载

FAQ

免责声明

DFRobot致力于为广大客户提供最好的各类电子套件,在上文中所描述的所有参数均为我们在自己的实验环境下测出的“典型”参数值,这意味着在不同的应用环境中上述参数会有所不同。因此,DFRobot对上述描述之完整性与准确性将不作任何承诺。应用实例所描述也仅为作为演示。DFRobot保留进行更改而不另行通知的权利。 未经DFRobot书面许可,该产品禁止于任何可能造成人身威胁或生命维持系统中使用,若因此造成重大人身伤害或死亡,DFRobot将拒绝承担任何责任。 DFRobot产品一般不用于军事应用,产品尤其不得应用于大规模杀伤性武器系统之中,包括(但不限于)核、生物化学武器或导弹等各种大规模杀伤性武器。

DFshopping_car1.png购买W5500以太网主控器(集成ATmega32u4和POE供电) (SKU:DFR0342)