Arduino and ethernet shield

hello.
i am trying to build an ethernet shield for my duemilanove based on ENC28J60 (the only ethernet controller that i can find in my area that is not overpriced).
i found a schematic here.i have only one problem, i couldn't find anywhere a 25MHz xtal.
possible stupid question: is it possible to just replace the 25MHz xtal with a 27 MHz one ?
some time ago i read on some forum (can't remember exactly where) that you can turn any atmel MCU into a xtal with a chosen freq.you guys have any idea about this?

thx.

Sorry, you can’t just substitute another frequency in that situation. The Ethernet chipset uses the crystal for its reference clock, and it must be the frequency specified by the chipset manufacturer.

Personally I’d recommend against using the ENC28J60: the library support for it in Arduino is rubbish, and trying to save a couple of bucks now will cause you to spend unnecessary time tearing your hair out when you’re writing sketches to use it.

In terms of crystal substitution, what you’ve probably heard about is running the MCU itself at a different frequency. That can certainly be done within the specs of the MCU (and sometimes a bit beyond), provided you also customise the frequency setting in the Arduino core so that things like the millis() function run at the right speed. There’s an example of it being done here:

That’s not related to using a different crystal on the Ethernet chipset though.

Jon

Freetronics: www.freetronics.com
Practical Arduino: www.practicalarduino.com

By the way, I forgot to mention that if you do end up using the ENC28J60 then I suggest you use my version of the etherShield library which you can get from here:

http://github.com/jonoxer/etherShield

It has a couple of fixes in it compared to the one listed on the NuElectronics site. Seeed Studio used to sell an ENC28J60-based Ethernet shield and distributed my version of the library with it, but they’ve since stopped selling it and now only use the Wiznet chipset that’s supported by the official Ethernet library.

Jon

Freetronics: www.freetronics.com
Practical Arduino: www.practicalarduino.com

solved, got a damaged PCI ethernet card and desoldered the crystal.

thanx for your advice but sometimes i need to keep the costs to a minimum, especially if i want to build more projects with an ethernet interface :slight_smile: