Ethernet ENC28J60 - TUXGraphics

Hello there,

I'm mounting the ethernet + AVR as in the site:

http://tuxgraphics.org/electronics/200606/article06061.shtml

but I'm experiencing some trouble to make the comunication work.

Following the steps to check if the circuit is working, I could upload a blinking LED program to the ATMEGA and when I plug an RJ45 cable, the link LED goes on. (both ATMEGA and ENC28j60 are plugged here)

The problem is when I try to start the comunication to Ethernet. Using the program avaiable in the website, everytime the AVR runs enc28j60PacketReceive(BUFFER_SIZE, buf); the link LED blinks off and I don't have any data received (I'm trying to ping it)

Do you guys have any idea where probably is the problem in my circuit? I've checked the connections and they seen to be all right and there are no short circuits.

The SPI communication may be the reason for that, but as I see that shouldn't affect the link LED, is that right?

The Magjack I used was this:http://ww2.pulseeng.com/products/datasheets/J414.pdf

And I'm using a ATMEGA168P and ENC28J60, both DIP

Thanks for the help.

Have you tried this?

http://blog.thiseldo.co.uk/?p=422

Thanks for the reply, but I checked the code and it is a lot like the one I'm using.

I think it's something to do with the hardware, but I can't find where the problem is. Do you guys know if ESD is critical here? (MISO and MOSI crossing and stuff like that)

Did you build the tuxgraphics from scratch, or are you trying to use tuxgraphics.hex on a arduino with enc28j60 ethernetshield?

If so, it probably won't work, cause the tuxgraphics uses 12,5Mhz clocking from the enc28j60. but there is a simples solution to use tuxgraphics avr on an arduino board with enc28j60 ethershield:

Bend up pin 9 and 10 on avr, solder a wire from avr pin 9, to enc28j60 pin 3.

Then you have a Tuxgraphics on an Arduino board with 5V!!

I flashed the avr with an external USBASP before mounting the avr back on the Arduino board. The next thing to try, will be to flash the avr from arduino hex uploader with the arduino bootloader intact...

Sorry my english....

http://bixit.blogspot.com/2010/11/tuxgraphics-on-arduino.html

I built it from scratch. I've done the whole board again and I'm testing it now and it looks like it's working now. I couldn't find what was the problem though.

I'm using the internal oscillator of the ATMEGA168 as I couldn't make the the AVR work with the external clock (and yes, I have one dead AVR now, which I shall try to fix the fuses soon).

Anyway, the next thing I shall do is to add and logical converter, to make my AVR work with 5V and not 3V3, as it's now.

As soon as I get that right, I shall post something here..

Anyway, what you said probably will be helpful to the ones who are trying to use the arduino with tuxgraphics...

\o/