Arduino connection with Ethernet ENC28J60 module


Connecting an Arduino with Ethernet module


1. Installing the library

The first step is download and install the appropriate libraries for Arduino , for example, by github.comfollowed by:

  • Unpack the downloaded archive
  • Wypakowanego to rename the folder for example EtherCard, then move along with all its contents in libraries folder in the Arduino folder
  • Restart the Arduino IDE, a new library needs to be added


2. Connection systems

The next step is the physical connection of the system (for example, with connecting cables). This must be done according to the following table:







3.3 V3.3 V




PIN 13The PIN 52


PIN 12PIN 50


PIN 11PIN 51


PIN 10PIN 53



In addition, the program for Arduino Mega replace the line:

ether.begin(sizeof Ethernet::buffer, mymac)


ether.begin(sizeof Ethernet::buffer, mymac,53)//53 - the-line CS


3. Approximate program

Then you should open backSoon for example, located in the library and adjust the values:

  • myip - the IP address of the Arduino
  • gwip address, gateway (eng. gateway), for example, the address of the network router.
  • mymac - unique MAC address of the module


These values will be used when you can't attempt to configure a dynamic IP address - DHCP server. To disconnect attempting to connect via DHCP, enter a value of 1 when defining a STATIC (default value 0).


The subsequent stages is connected to Arduino via USB, download backSoon with an appropriate configuration of the IP address and default gateway.


To verify, you must:

  • to open the Monitor Serial Port in the Tools Menu of the Arduino environment, set the data transmission rate to 57600 baud (such as in the backSoon)
  • connect the network cable to the wall socket RJ-45 ethernet module
  • restart the Arduino module using the RESET button
  • after a few seconds the Monitor screen Serial Port should appear the IP address of the Arduino
  • you should then test the reaction of the module to ping, run command prompt and typing ping x, where x is the IP address of the Arduino module. You can start the browser and enter the IP address of the module. On the screen you should see a page with the information as shown in the figure below.