Electronics

Ethernet Network Module ENC28J60 (Small Board)

AED 26.25

Low stock
1

Description

The ENC28J60 Ethernet LAN Network Module is an Ethernet controller that connects to any development board through the SPI protocol. It uses the Microchip ENC28J60, a well-known Ethernet IC, to function as both a server and a client. Most MCUs may be directly connected to this Ethernet LAN module.


Specifications:

      • ENC28J60-I/SO Ethernet chip
      • 25Mhz Crystal
      • Power LED
      • Size: 56x34mm
      • Fully Compatible with 10/100/1000Base-T Networks
      • 3.3 V power supply pin.
      • Integrated MAC and 10 Base-T PHY
      • Supports Full and Half-Duplex modes
      • SPI Interface with Clock Speeds Up to 20 MHz
      • The network interface of the board RJ45 Connector HR911105A.

      For More info:

      Datasheet: ENC28J60.pdf

       


      Arduino Library:

      Click Here To Download


      Wiring with Arduino :

      PIN Connections (Using Arduino UNO)

       ENC28J60 Arduino UnoNotes
      VCC3.3V
      GNDGND
      SCKPin 13
      MISOPin 12
      MOSIPin 11
      CSPin 10Selectable with the ether.begin() function

      PIN Connections using an Arduino Mega

      ENC28J60      Arduino Mega Notes
      VCC3.3V
      GNDGND
      SCKPin 52
      MISOPin 50
      MOSIPin 51
      CSPin 53Selectable with the ether.begin() function



      Arduino Code for Ethernet Network Module ENC28J60 (Small Board) to Ping Google.com:


      // Ping a remote server, also uses DHCP and DNS.
      #include

      // ethernet interface mac address, must be unique on the LAN
      static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };

      byte Ethernet::buffer[700];
      static uint32_t timer;

      // called when a ping comes in (replies to it are automatic)
      static void gotPinged (byte* ptr) {
      ether.printIp(">>> ping from: ", ptr);
      }

      void setup () {
      Serial.begin(57600);
      Serial.println("\n[pings]");

      // Change 'SS' to your Slave Select pin, if you arn't using the default pin
      if (ether.begin(sizeof Ethernet::buffer, mymac, SS) == 0)
      Serial.println(F("Failed to access Ethernet controller"));
      if (!ether.dhcpSetup())
      Serial.println(F("DHCP failed"));

      ether.printIp("IP: ", ether.myip);
      ether.printIp("GW: ", ether.gwip);

      #if 1
      // use DNS to locate the IP address we want to ping
      if (!ether.dnsLookup(PSTR("www.google.com")))
      Serial.println("DNS failed");
      #else
      ether.parseIp(ether.hisip, "74.125.77.99");
      #endif
      ether.printIp("SRV: ", ether.hisip);

      // call this to report others pinging us
      ether.registerPingCallback(gotPinged);

      timer = -9999999; // start timing out right away
      Serial.println();
      }

      void loop () {
      word len = ether.packetReceive(); // go receive new packets
      word pos = ether.packetLoop(len); // respond to incoming pings

      // report whenever a reply to our outgoing ping comes back
      if (len > 0 && ether.packetLoopIcmpCheckReply(ether.hisip)) {
      Serial.print(" ");
      Serial.print((micros() - timer) * 0.001, 3);
      Serial.println(" ms");
      }

      // ping a remote server once every few seconds
      if (micros() - timer >= 5000000) {
      ether.printIp("Pinging: ", ether.hisip);
      timer = micros();
      ether.clientIcmpRequest(ether.hisip);
      }
      }