I'm trying since several hours to get an Arduino Nano and a ENC28J60 shield up and running. I verified the ENC28J60 shield using one of my spare Arduino Unos by using the same wiring as the Nano. However, the Nano stuck at the ether.begin call in the setup() procedure. (Post ether.begin is not written to serial)
Here is my test-code:
#include <SPI.h>
#include <EtherCard.h>
#include <IPAddress.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte Ethernet::buffer[700];
void setup() {
Serial.begin(9600);
Serial.println("Before ether.begin");
ether.begin(sizeof Ethernet::buffer, mac,10);
Serial.println("Post ether.begin");
}
void loop() {
// put your main code here, to run repeatedly:
delay(100);
}
The wiring is as follows:
Nano PIN
ENC28J60 PIN
Cable Color
13
SCK
green
12
SO
purple
11
SI
blue
10
CS
yellow
GND
GND
brown
3V3
VCC
red
RST
RST
orange
WOL, NT and CLK are not connected to the Arduino Nano board. This drives me crazy because it is working on the Uno using the exact same wiring.... >:( >:( >:(
Hopefully, some of you guys can help me to solve this issue....
mmichael999:
Thanks for your reply. The wiring is correct and the same as in your link.
When using UIP with LOG_INFO the following message will be posted to the serial port in an infinite loop:
beginPacket: success
bytes written: 24
endPacket: success
what does that mean?
Hi!
This means: The ENC28j60 configured and working properly.
The UdpClient.ino sketch send UDP datagram to 192.168.0.1 port 5000 infinite.
The UdpServer.ino sketch listen on 192.168.0.6 UDP port 5000 and answer to client.
mmichael999:
Yes I tried UdpClient.ino but it does not work - when I connect my ethernet cable no link led on the RJ45 Jack on - neither link-led nor activity-led.
Using the same cable, switch and module with an Arduino Uno it is working as expected....
Hi!
Maybe not enough the power for ENC28j60.
Try it with external 3,3V power supply.