Pages: 1 2 [3] 4 5 ... 7   Go Down
Author Topic: Implementation for Microchip ENC28J60 Ethernet controller  (Read 34571 times)
0 Members and 1 Guest are viewing this topic.
Georgina Ontario
Offline Offline
Sr. Member
****
Karma: 5
Posts: 437
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is the software currently working with the Standard Ethershield? (W5100)

Assuming it is... Does UDP work?

Is it more reliable than the W5100?

Is the reliability of the W5100 a software issue? In that case does this library fix that problem?

Is the ENC28J60 a better shield than the standard W5100 board?
Note: I use the Mega2560 board. The ethershield is the new one with the MicroSD card.
« Last Edit: March 31, 2011, 08:52:31 pm by WillR » Logged

Just another Hacker

Rio de Janeiro, Brazil
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
Software developer, free software activist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Is the software currently working with the Standard Ethershield? (W5100)

My implementation does not support W5100, however, in the future (when I finish the implementation for ENC28J60), I can add some #ifdef so the library can be compiled based on the controller you are using - if do you use W5100, it'll compile the standard library or if you use ENC28J60, it'll use my library.

Assuming it is... Does UDP work?

The standard library (which work with W5100) supports UDP. My library (which work with ENC28J60) does not support UDP yet - but I'm planning to do it in next weeks.

Is it more reliable than the W5100?

Is the reliability of the W5100 a software issue? In that case does this library fix that problem?

As I don't know so much about W5100 internally, I can't answer to you. But my implementations consumes more memory than W5100's implementation, since ENC28J60 does only Ethernet layer and W5100 implements up to socket layer (so my library needs to "work" more than standard library).

Is the ENC28J60 a better shield than the standard W5100 board?
Note: I use the Mega2560 board. The ethershield is the new one with the MicroSD card.

The ENC28J60 shield is unexpensive compared to W5100 (~50% of the cost), so I think even you are using more memory, it is good since you can pay less for have an Ethernet connection in your Arduino. In terms of performance, probably it is slower than W5100, since the TCP/IP stack is implemented in hardware in W5100 and is being implemented (I'm implementing) in software in ENC28J60.
Logged

Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

Georgina Ontario
Offline Offline
Sr. Member
****
Karma: 5
Posts: 437
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for the helpful answers.

I guess I will have to stick with the "Official" Ethernet shield.
Logged

Just another Hacker

Offline Offline
Edison Member
*
Karma: 23
Posts: 1375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does anyone know what is the function of the D2 connection on the shield? It is connected to the ICP1 pin, but I can't find an explanation in the code why it has to be connected.

I would like to change the pin, as the mega board doesn't have the ICP1 pin accessible
Logged

Mercadillo electrónico. Kit iniciación a Arduino, shield LCD a color y más cosas!

Rio de Janeiro, Brazil
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
Software developer, free software activist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Does anyone know what is the function of the D2 connection on the shield? It is connected to the ICP1 pin, but I can't find an explanation in the code why it has to be connected.

I would like to change the pin, as the mega board doesn't have the ICP1 pin accessible

I really don't know. For me it just uses SPI pins:

Code:
#define ENC28J60_CONTROL_CS     10
#define SPI_MOSI                11
#define SPI_MISO                12
#define SPI_SCK                 13
Logged

Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

Offline Offline
Edison Member
*
Karma: 23
Posts: 1375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Knowing that D2 isn't used in the libraries, that makes it pretty easy to add compatibility with Mega boards, and in fact I have already sent the code to alvarojusten and should be added soon to the libraries.

Also, Sure electronics's ENC28J60 based ethernet board is also compatible with the libraries as expected, but couldn't find any information about that before buying it.
Logged

Mercadillo electrónico. Kit iniciación a Arduino, shield LCD a color y más cosas!

Rio de Janeiro, Brazil
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
Software developer, free software activist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Knowing that D2 isn't used in the libraries, that makes it pretty easy to add compatibility with Mega boards, and in fact I have already sent the code to alvarojusten and should be added soon to the libraries.

I accepted your pull request. Now supporting Mega! Thanks.

Also, Sure electronics's ENC28J60 based ethernet board is also compatible with the libraries as expected, but couldn't find any information about that before buying it.

I'll contact them later.
Logged

Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

Offline Offline
Edison Member
*
Karma: 23
Posts: 1375
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh! I forgot, the mega compatibility has the same issue, with shields that do not get SPI signals from the ICSP header, than the old ethernet shield, you have to bend the pins and connect cables to the SPI pins of the Mega board.

http://mcukits.com/2009/04/06/arduino-ethernet-shield-mega-hack/

This should be indicated in the readme, so the newcomers are warned, as the famous nuelectronics shield has this issue, in fact, all the shields listed in the reosurce file have this issue.

Also, in the resource file there is a link to http://blog.thiseldo.co.uk/?p=344 , but he has already released a newer one v1.6, http://blog.thiseldo.co.uk/?p=504
Logged

Mercadillo electrónico. Kit iniciación a Arduino, shield LCD a color y más cosas!

Rio de Janeiro, Brazil
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
Software developer, free software activist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh! I forgot, the mega compatibility has the same issue, with shields that do not get SPI signals from the ICSP header, than the old ethernet shield, you have to bend the pins and connect cables to the SPI pins of the Mega board.

http://mcukits.com/2009/04/06/arduino-ethernet-shield-mega-hack/

This should be indicated in the readme, so the newcomers are warned, as the famous nuelectronics shield has this issue, in fact, all the shields listed in the reosurce file have this issue.

Ok, it's on "Usage" section on README.markdown now. Thanks.

Also, in the resource file there is a link to http://blog.thiseldo.co.uk/?p=344 , but he has already released a newer one v1.6, http://blog.thiseldo.co.uk/?p=504

It had link to all those posts. Now it is organized and you can read using GitHub's markdown converter: https://github.com/turicas/Ethernet_ENC28J60/blob/master/resources/resources.markdown
Logged

Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

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

Hello, alvarojusten!

This is great idea to make ENC28J60 - W5100 compatible library!

I spent a lot of time with "official" ENC28J60 lib, yes it works, but any changes or any code writing are kinda hell.

But accidentally, I found another realization of the library:

http://jeelabs.net/projects/cafe/repository/entry/EtherCard

EtherCard based on official ENC lib, but there are a lot rewritten code, DNS realization, cool http server, new tcp-ip stack & etc.

For compatibility with Arduino you must change
   
#define ENC28J60_CONTROL_CS 8
to
#define ENC28J60_CONTROL_CS 10
at enc28j60.cpp

at least for me it worked.

This lib works not 100% stable, but it pretty simple than original lib.

I hope it can help you or others.

Please continue to develop your library, we all really need for it smiley

Regars.
« Last Edit: April 07, 2011, 07:53:25 am by WEBAFF » Logged

Rio de Janeiro, Brazil
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
Software developer, free software activist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

But accidentally, I found another realization of the library:

http://jeelabs.net/projects/cafe/repository/entry/EtherCard

EtherCard based on official ENC lib, but there are a lot rewritten code, DNS realization, cool http server, new tcp-ip stack & etc.

Nice! I added this library to resources/resources.txt in my repository, thanks.
I saw the code and it still needs improvements since it consists only in helper functions (like the original libraries, but EtherCard is easier to use) - it is not a socket layer and is not compatible with Ethernet.h code. But perhaps I can use some code this guy used (like DNS query) to improve my library.
Logged

Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

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

Server side works great !

Can you tell when client side will be ready ?

Thanks
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Alvaro.
I'm from brazil too.
It's a good implementation, your interface is clean equal the oficial etherShield.
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 133
Posts: 6753
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
what is the function of the D2 connection on the shield?
Allows you to catch interrupts from the network.  D2 is one of the pins that can use "AttachInterrupt()"
It appears to require bridging a small jumper/solderbridge connection before it is actually connected.
Logged

Rio de Janeiro, Brazil
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
Software developer, free software activist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Server side works great !

Can you tell when client side will be ready ?

Server side has a lot of limitations, but work in some simple cases. smiley
I'm now implementing TCP three-way handshake for TCP client connections but don't know yet when it'll be done.
Logged

Blog pt_BR: http://blog.justen.eng.br/
Curso de Arduino (Arduino Course, in Brazil) - http://www.CursoDeArduino.com.br/

Pages: 1 2 [3] 4 5 ... 7   Go Up
Jump to: