Pages: [1]   Go Down
Author Topic: ENC28J60 + EtherCard == Fails to Initialize??  (Read 1933 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have an arduino Uno that I have been learning to tinker with recently, tried adding a Ardruino Ethernet Shield v1.1 with the goal of having a networked client upload sensor data to a remote server

trick is that no existing libraries have been working

tried several

the process goes that while running through setup() the initialization for ether.begin causes the system to hang

I've tried this using IDE 1.0.0, 1.0.1, 1.0.2, and 1.0.3

if I set a static IP for a server example then I am able to ping the server but otherwise get no-where

the ethercard example I referred to has an added snippet at line 29

Code:
  if (ether.begin(sizeof Ethernet::buffer, mymac) == 0)
    Serial.println( "Failed to access Ethernet controller");
  Serial.println("Greetings Ethernet");

so that it will print to the serial monitor regardless of pass or fail, seems that either I've connected something wrong (likely) or something is wrong with the library (unlikely since it's been in use for a bunch of others)

trick is I don't know what I hooked up wrong, the shield slides into the Uno properly... -- that and being able to ping an IP has me scratching my head

got this shield from eBay so perhaps it has an odd configuration that I'm not aware of??


hope the rambling isn't too difficult to follow  -- trying to include anything that would be useful to debug
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 40
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi amites,

I actual also work woth the ENC28J60. I use a pollin board where this chip is embedded.
I had the same problems getting even a ping running.

After searching a while I found this answer (An overloaded begin):
Code:
ether.begin(sizeof Ethernet::buffer, mymac, 4)


The 4 is the Digital Arduino pin where the Chip Select (CS) from the ENC28J60 is connected.
4 is the Pin which is used for my board. So I would suggest to see if this fits to your board.

Dominik
Logged

Grüße Dominik
www.logview.info

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 631
Posts: 50098
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
tried adding a Ardruino Ethernet Shield v1.1 with the goal of having a networked client upload sensor data to a remote server

trick is that no existing libraries have been working

tried several

    https://github.com/jcw/ethercard
    https://github.com/turicas/Ethernet_ENC28J60
The Arduino Ethernet Shield does not use an ENC28J60 chip. It uses a W5100. Why are you trying to use these libraries with that chip?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

moelski -- THANK YOU!!!

had to set line 26 to

Code:
  if (ether.begin(sizeof Ethernet::buffer, mymac, 10) == 0)

in examples/webClient

working

PaulS:: The ENC28J60 chip is the one one this board, all I did was write what I can read on the board -- not saying this is an OFFICIAL Arduino Ethernet Shield -- that's simple what's printed on the board
Logged

Pages: [1]   Go Up
Jump to: