Mega + wiz811mj + Arduino 1.x

Greetings,

I had my Mega running with this module before without any problem. I was using software 0.22 with the small change on spi.h to accommodate the pin configuration of Mega.

This evening I've tried the same hardware with a software compiled with Arduino 1.01 platform. It is not working and when I looked up the spi.h to reconfigure the pins ... the lines of code are not there ?

Do you guys have any idea how to make this work ? What did change on the Ethernet library ?

cheers, MaLi

... a bit more. The same software run flawlessly on a Duemilanove. This was my bench test before moving to Mega. This aspect leads me to think that there is something between the Ethernet library and Mega.

Why did you modify spi.h for a Mega? How do you have the module connected to the Mega? It should be MISO -> D50 MOSI -> D51 SCK -> D52 SS -> D10

Thank you. A ha, so Slave Select is on D10 not on 53 !!! I will try tonight.

cheers, MaLi

The w5100 slave select is D10 in the ethernet library.

The default slave select for the SPI bus is D53 on the Mega, but that is not used for the w5100. D53 is set to OUTPUT in the SPI library startup so the SPI bus will be in master mode, but that is the only function in this case.

Thank you. So, do I still have to declare 53 as an output and send it HIGH ?

cheers, MaLi

The SPI library startup does that for you. It doesn't hurt if your code does that also, but is a bit redundant.