Go Down

Topic: cheap spi ethernet module with arduino - enc28j60 - pinout (Read 5 times) previous topic - next topic

grido

ok, i really tried to find how to connect this cheap module I bought out of chinaland and yet I can't find any details on which pin goes where on the arduino. While i'm a complete rookie on this, i'm sure those of you who builded your own ethernet shield will know what goes where.

pins on the module I can use are:

-vcc
-gnd
-cs
-reset
-si
-sck
-wol
-so
-clkout
-int


I tried looking at the ethernet examples (i.e. web server) but i'm guessing that pins are setup in the ethernet library as I can't find any indication about these.

the picture of what I bought is here:

http://www.flickr.com/photos/38299034@N06/6012219011/in/photostream

thanks for the help! If someone can tell me what goes where I'll write a quick how to so dummy like me will have a place to go! thanks!
------------------------------------------
GriDo

alvarojusten


ok, i really tried to find how to connect this cheap module I bought out of chinaland and yet I can't find any details on which pin goes where on the arduino. While i'm a complete rookie on this, i'm sure those of you who builded your own ethernet shield will know what goes where.

pins on the module I can use are:

-vcc
-gnd
-cs
-reset
-si
-sck
-wol
-so
-clkout
-int


I tried looking at the ethernet examples (i.e. web server) but i'm guessing that pins are setup in the ethernet library as I can't find any indication about these.

the picture of what I bought is here:

http://www.flickr.com/photos/38299034@N06/6012219011/in/photostream

thanks for the help! If someone can tell me what goes where I'll write a quick how to so dummy like me will have a place to go! thanks!


Hello,
I have one of this module and I'm writing an Arduino library to ENC28J60-based Ethernet modules. Please see the library at: https://github.com/turicas/Ethernet_ENC28J60/

About the pins, ENC28J60 communicates with Arduino using SPI - and the pins for SPI in Arduino are digital 10-13, where you need to connect: 10 to CS, 11 to SI, 12 to SO and 13 to SCK. Also connect VCC to 3.3V, GND to GND and RESET to GND.

Please tell me if it works.
Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

grido

hi alvaro,

thanks a lot for this. I will try it out over the week-end and report back here.

stay tune!

thank you
------------------------------------------
GriDo

grido

hi,

tried the web server example in your library (after downloading it) and i`m getting this error message about spi library. I tried looking up the spi library on arduino.cc but they are saying it`s already included in the software.  any idea what i`m doing wrong?

thanks

error below:

In file included from C:\Users\mduperre\Desktop\arduino-0022\libraries\Ethernet_old\Client.cpp:1:
C:\Users\mduperre\Desktop\arduino-0022\libraries\Ethernet_old\utility/w5100.h:14:17: error: SPI.h: No such file or directory

As of Arduino 0019, the Ethernet library depends on the SPI library.
You appear to be using it or another library that depends on the SPI library.
------------------------------------------
GriDo

grido

oups, I only had to add this in the header of your example:

#include <SPI.h>

still doesn't work though. I'm not getting in output in the serial box even when using web server debug example. lights on the nic are blinking up. i removed the link between reset and the gnd as you suggested since it was causing those lights to not blink at all, and the store  where I bought this module finally added some diagram and they are not making this connection either (http://www.geeetech.com/DOCUMENTS/Arduino/arduino%20shield/ENC28J60_Network_Module/ENC28J60.pdf)

i'll keep testing, let me know if you have  an idea why it isn't working. thanks for the good work!
------------------------------------------
GriDo

wortelsoft

Have a look at the nuelectronics ethernet shield. It is enc28j60 based, it comes with schematics and they have example code.

alvarojusten


hi,

tried the web server example in your library (after downloading it) and i`m getting this error message about spi library. I tried looking up the spi library on arduino.cc but they are saying it`s already included in the software.  any idea what i`m doing wrong?

thanks

error below:

In file included from C:\Users\mduperre\Desktop\arduino-0022\libraries\Ethernet_old\Client.cpp:1:
C:\Users\mduperre\Desktop\arduino-0022\libraries\Ethernet_old\utility/w5100.h:14:17: error: SPI.h: No such file or directory

As of Arduino 0019, the Ethernet library depends on the SPI library.
You appear to be using it or another library that depends on the SPI library.


Please remove (or move to another place) any Ethernet* directories at your "libraries" folder. Arduino IDE has a bug and in your tests it is compiling the library at "Ethernet_old" -- and how I can see in the error, it uses the standard Arduino Ethernet library, because the error occurs at line 14 of file "utility/w5100.h". So, move this folder, put Ethernet_ENC28J60 folder at libraries and try again with File > Examples > Ethernet_ENC28J60 > WebServerSimpleLED or other.
Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

grido

Hi alavaro,

i'm red of shame, I should have noticed it was complaining about my old ethernet library. I removed thse other libraries and it's seems to be working now. I'm able to ping and get a reply from my module (ye!) but the web server ain't working. I'm guessing it's because i'm using firefox. I'll give the pachube a try later today when I have some time. thanks a lot!!! I'll report any bugs.
------------------------------------------
GriDo

alvarojusten


i'm red of shame, I should have noticed it was complaining about my old ethernet library. I removed thse other libraries and it's seems to be working now. I'm able to ping and get a reply from my module (ye!) but the web server ain't working. I'm guessing it's because i'm using firefox. I'll give the pachube a try later today when I have some time. thanks a lot!!! I'll report any bugs.


Very nice! Please test WebServerSimpleLED example using a light browser like wget or curl (for now the library have some memory issues with the size of the request).
Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

al1fch

#9
Aug 07, 2011, 07:15 pm Last Edit: Aug 07, 2011, 08:43 pm by al1fch Reason: 1
Hi !
WebServerSimpleLED runs on my side .... whis some greater buffer
utility/socket.c    : #define BUFFER_SIZE         650



alvarojusten


Hi !
WebServerSimpleLED runs on my side .... whis some greater buffer
utility/socket.c    : #define BUFFER_SIZE         650



Very nice! Thanks for testing - wait for new versions of the library. ;-)
Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

tasosstr

:)

Very Very Nice Library ! ! !

Now the code it is clear and you can print only the code you need :-)


Well Done ! ! !

I would like to ask you for an example because i have stuck.

I want to put a text box in the web form to get time for example how much sec. the pin 4 stay on, so my question is how to the value ? the number it is not standard e.g. 10 Sec, 250 Sec ....

for to get the box it is the easy, but ...

client.println("<form METHOD=get action=\"http://192.168.2.20\">");
client.println("<br>Set time On<input type=\"text\" name=\"timehold\">");
client.println("<input type=hidden name=cmd value=4>");
client.println("<input type=submit value=\"Stay on\" ></form><br><br>");

How can i read the values from timehold ?

Do i have any error on above code ?

Thank you in advance.

tasosstr

and that

client.println("<form Action = \"/\"  Method =\"GET\" >");
client.println("<p>Enter Time On:</p> ");
client.println("<input type =\"text\"  name =\"timetext\"  size = \"4\"  value =\"1\"> ");
client.println("<input type = \"submit\"  value =\"OK\" > ");
client.println("</form>");

but i don't know how to hold the the timetext :-(

tasosstr

Hello,

Can some one tell me how i will get the last numbers in a variable after the cmd ?

http://127.0.0.1:90/?cmd=133
http://127.0.0.1:90/?cmd=1
http://127.0.0.1:90/?cmd=1335
http://127.0.0.1:90/?cmd=A1
e.t.c.

Thank you in advance.

tkbyd

Code for that sort of thing is part of...

http://www.sheepdogguides.com/arduino/art5serv.htm


... and yes, it is code for the Ethernet controller chip you have, not the more widely used (and more expensive!) W5100

But... it uses a different library, I think. Details there, though.

Go Up