Mega 2560 china clone compatibility with ENC28J60

Hi everyone.
I begin my project for a little home automation. I have a problem when used Mega 2560 china clone with ethernet ENC28J60. I already connected pin from Mega 2560 to ENC28J60 as below:
SO --- 51 or ICSP-4
S1 --- 50 or ICSP-1
SCK --- 52 or ICSP-3
CS -- 53
VCC-- VCC
GND --GND

and already set IP address:
#include <SPI.h>
#include <UIPEthernet.h>

byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
};
IPAddress ip(192, 168, 1, 11);

EthernetServer server(80);

void setup() {
Serial.begin(9600);
while (!Serial) {
;
}

Ethernet.begin(mac, ip);
server.begin();
Serial.print("server is at ");
Serial.println(Ethernet.localIP());
}
.
.
.
etc

but why from my PC can not ping to 192.168.1.11 ? is there any pin problem ?

Need your advice for my problem.

Thanks

SO to 50 and SI to 51. do you see mnemonics?
it is Slave Out and Slave In

please use the EthernetENC library for new Arduino projects

Hi Juraj,
Thanks for your reply. for ethernet ENC library i used UIPEthernet but actually I also found njh/EtherCard, which I should used ? or do you have an update for EthernetENC library as well ?

@devilution, your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with your project. See About the Installation & Troubleshooting category.

what update? did you fix your wiring?

okay, Noted with thanks

Hi Juraj,
Yes I already change the wiring right now is:
ENC28J60 | MEGA
SO -----> 50
S1 -----> 51
SCK -----> 52
CS -----> 53
VCC -----> VCC (3.3V)
GND -----> GND

but i still can not ping the destination IP 192.168.1.11.
action have been done:
add and install:
#include <SPI.h>
#include <UIPEthernet.h>
#include <Ethernet.h>

tested with LED for each pin (50,51,52,53) --> result OK

thanks and appreciate with your help

try to add Ethernet.init(53);

you have a enc28j60 module powered with 3.3 V?

EthernetENC is the name of the new library for enc28j60. I maintain UIPEthernet library and I created a better version called EthernetENC

1 Like

Hi Juraj,
after change power to 5V DC the ping already replied.

i also considered to use EthernetENC library as you recommended.

Thank you very much for your help.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.