Hello,
I bought Arduino Nano and additional board with Ethernet module ENC28J60. I connected them accordingly to this scheme:
I installed EtherCard library and I try to run such code:
#include <EtherCard.h>
static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };
byte Ethernet::buffer[500]; // tcp/ip send and receive buffer
int i = 0;
String i_val;
void setup(){
Serial.begin(57600);
Serial.println("\nEthernet test");
}
void loop(){
i_val = i++;
if (ether.begin(sizeof Ethernet::buffer, mymac) == 0) {
Serial.println(i_val+ " Failed to access Ethernet controller");
} else {
Serial.println(i_val+ " Maybe works.");
}
delay(300);
}
When it runs, I got only "Ethernet test" message and nothing happens until... I touch D12 pin (MISO) or cable connected to it (even through isolation). Then loop goes and I got usually "Failed..." messages, but sometimes I got "Maybe works" too in random order. What is more interesting, if I disconnect ground from Ethernet module, then loop runs correctly, mostly with Failed messages, but sometimes I got "Maybe works" messages if I move my hand close to some cables...
It seems there is big ground problem. I'm not sure I haven't damaged anything when I was soldering pins to the Nano board. I've checked all connections with multimeter and they seems to be soldered well. Is there any easy test to check if e.g. SPI bus is working correctly?

