Arduino ethernet spi problem

Hi . I have two Ethernet module based on W5500 chip. I have connected them to arduino nano spi bus with jamper wires . one of Ethernet module always works good but on of them somtimes doesnt work and somtimes lose its connection after random time(one Minute/one hour/or a few seconds :frowning: )
and arduino says Ethernet shield was not found . Suddenly I realized there is a Difference between their
arduino spi connection .

working module: connection spi (mosi miso cs sclk) with 11 , 12 , 10 , 13 pins near usb port
not working module : connection spi (mosi miso cs sclk) with icsp port at the top of the arduino nano

________________________________________________________________________________-


the w5500 is a very EMI sensitive chip

i think the icsp port of spi serial connection at the top of the arduino nano has noisy pins Because of arduino pcb Designing but spi pins near the usb port and atmega328 have clean signal

am i right ?

could this Issue cause this problem?

Hi . I have two Ethernet module based on W5500 chip. I have connected them to arduino nano spi bus with jamper wires . one of Ethernet module always works good but on of them somtimes doesnt work and somtimes lose its connection after random time(one Minute/one hour/or a few seconds :frowning: )
and arduino says Ethernet shield was not found . Suddenly I realized there is a Difference between their
arduino spi connection .

working module: connection spi (mosi miso cs sclk) with 11 , 12 , 10 , 13 pins near usb port
not working module : connection spi (mosi miso cs sclk) with icsp port at the top of the arduino nano

________________________________________________________________________________-


the w5500 is a very EMI sensitive chip

i think the icsp port of spi serial connection at the top of the arduino nano has noisy pins Because of arduino pcb Designing but spi pins near the usb port and atmega328 have clean signal

am i right ?

could this Issue cause this problem?

It sounds like the real problem is simply bad wiring. I thought pins 11,12,13 were just pass-through and the board works through the ICSP cluster only but, from what you say, apparently not. However it does use the cluster to work on the Mega. I guess that is why it is there, and I would assume it should work fine that way on the Nano as well.

The pins on the ICSP port are directly connected to the pins 11, 12 and 13. You also need to have a separate CS pin for each SPI device. That can be any of the Arduino I/O pins and it's not obvious from your description which pin you are using for CS for the non-working module.

...R

I've merged your cross-posts @mortaza_kasiri.

Cross-posting is against the rules of the forum. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend 15 minutes (or more) writing a detailed answer on this topic, without knowing that someone else already did the same in the other topic.

Repeated cross-posting will result in a suspension from the forum.

In the future, please take some time to pick the forum board that best suits the topic of your question and then only post once to that forum board. This is basic forum etiquette, as explained in the sticky "How to use this forum - please read." post you will find at the top of every forum board. It contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

Actually arduino nano icsp doesnt have cs pin so i have used D10 near the usb port for both modules
I cant figure it out that what is the problem
somtimes work and somtimes doesnt work
I think icsp port on arduino nano is away from atmega328 and the traces are near a lot of electronic components like regulator and Oscillator so it can make noise on spi wires

miso and mosi pins aren't pull down
is it the problem?
am i right ?


please help me to find the problem

why spi bus somtimes doesnt work?

I think you are kidding yourself. The Nano has been around for longer than I can remember. If the physical arrangement of its ICSP cluster is a problem, everybody would know about it by now. Further, those pins are directly connected to 11,12,13 anyway. The CS is never part of the ICSP cluster, you just choose a vacant pin. The convention is pin 4, i. e. as the Wiznet board uses with Uno, with pin 10 just called for output. Clearly, your CS is not the problem.

what about jumper wires?

mortaza_kasiri:
Actually arduino nano icsp doesnt have cs pin so i have used D10 near the usb port for both modules

That is the problem. You need separate CS pins for each module. So use pin 10 for one of them and another I/O pin for the other module.

…R

yes

i have two arduino nano for each module

mortaza_kasiri:
i have two arduino nano for each module

Do you mean that you have two nanos and each nano has one ethernet module connected to it?

If so then that creates a very different image in my mind compared to what you wrote in your Original Post

I have two Ethernet module based on W5500 chip. I have connected them to arduino nano spi bus with jamper wires

...R

yes on of them connected with icsp spi and one of them is connected with D10 D11 D11 D13
near usb port

mortaza_kasiri:
yes on of them connected with icsp spi and one of them is connected with D10 D11 D11 D13
near usb port

Why are you not connecting both of them to Pins 10, 11 12 and 13?

...R

yes this is the hint

working module : connected with D10 D11 D12 D13
not working module : connected with icsp port spi

this is the problem why icsp somtimes doesnt work?