Loading...
Pages: 1 [2]   Go Down
Author Topic: Arduino doesn't get ip  (Read 688 times)
0 Members and 1 Guest are viewing this topic.
Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 50
Posts: 3450
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It does not matter if you are "not using it". If it is inserted into the slot, it connects to the SPI bus. That causes severe problems with the w5100, especially UDP. DHCP and NTP I have found fail if the SD card is not removed, disabled, or initialized.

Are you using IDE v1.0.1? IDE v1.0 and earlier had some issues with that. Just checking...
Logged

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

Okay, that's good to know, but right now it is not in the slot.

Yes, 1.0.1
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 50
Posts: 3450
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I recommend leaving the SD card out until the ethernet stuff is ok.

Have you tried the DhcpAddressPrinter in the ethernet examples? I've compiled it on both Windows and Ubuntu, and it works fine. It may take a minute or so to time out if there is a problem with the dhcp server, or the connection to it. If it doesn't timeout in a couple minutes, you may have a hardware issue.
Logged

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

Well, nothing has happened or timed out. As I said earlier, it probably is hardware, because it used to work fine with the same code.

Is there any way to diagnose/troubleshoot/possibly fix hardware issues? Or is it definite that I need a new board now?

(To be sure I can test my code on another one tomorrow, but as the examples aren't working either I am pretty sure it is hardware.)
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 50
Posts: 3450
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry to hear that. Hope it was not damage due to the w5100 and the SD card fighting over the SPI bus. I'm not sure which device would win that one.
Logged

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

Could that actually cause it?

If such problems occur, why would they put the SD card slot on the Ethernet board/shield?
Logged

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 50
Posts: 3450
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can use them together, but they must be initialized correctly to avoid data collisions on the SPI tx line. The link I gave you above avoids this problem.

I don't know about the damage. I have mistakenly left the SD in and tried code that did not disable it. The ethernet UDP functions failed, but there was no damage to either device.

I don't know what type of bus the SPI is using. Normally, on high speed buses, the tx drivers are tri-state. They can be HIGH, LOW, or Hi-Z (like an INPUT). If two tri-state devices are trying to drive the tx bus at the same time, one will eventually lose the fight.
Logged

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

Okay. The code works fine on someone else's board. I am ordering a new one. Thanks for your help; I am glad that I now know the right way to initialize SD even if that didn't cause the problem.
Logged

Pages: 1 [2]   Go Up
Print
 
Jump to: