I’m using the 1.6.1 driver, and I’m porting it to LPC1768 replacing the SPI call definitions.
The problem is the W5100 doesn’t answer me any packet, so I’m thinking it doesnt communicate at all.
I’m using the official Arduino Ethernet shield with a proprietary hardware (Shield compliant).
Here are some screenshots from an oscilloscope capture:
(MOSI + CLK) from set IP command:
(MISO + CLK) from get IP command:
(CS + CLK) from get IP command:
dl.dropbox.com/u/5949163/atio/W … tIP_cs.PNG
EDIT: I was sending 5 bytes in the read process. I corrected it, now I’m sending 3 bytes (0x0F, addr1, addr2) and then a dummy byte for read data. Still without working.
Thanks in advance,
Thanks for your interest in w5100.
After 0x000F register write the data transmission ends, configure /SS as ‘high’
Please refer to manual and keep operation timing.
When register read, the opcode value have to use 0x0F.
Problem of your picture
You not use /SS as high ,whenever one data transmission end.
You have to wait for reception complete.
You haven’t shown the read operation.
Reference page of manual : V1.2.4 - 6.3.3 Process of using general SPI Master device(P62), SPI Timing(P64)
Hi, first of all thanks for your reply.
I have a two channel oscilloscope, thats because I only show two signals.
In the fist picture I’m showing how I send the SET IP command to set IP to 10.10.0.45 (0xF0, 0x00, 0x0F, 0x0A for the fist octet).
In the second one, MISO and CLOCK signals are shown for the GET IP command. As you can see, I sent the wrong amount of bytes (5 instead of 4). I corrected it and I’m having the same behaviour. But you can see there the received data: 0x00, 0x01, 0x02, 0x00. The first three bytes are as specified in the W5100 datasheet, but the third one is meant to be the first IP octet (I set it as 0x0A in the previous picture).
The third one shows the same packet sent in the previous picture, but showing /SS and CLK.
I didn’t check if the W5100 send me 0x00, 0x01, 0x02, 0x03 in a write operation.
Before start sending the first byte (OP-CODE), I assert the /SS to low, and then to high right after sending the 4th and last byte.
The SPI data rate is about 2MHz
Thanks in advance,
I solved my problem. As you told me, I wasn’t driving well the /SS pin. I observed that the W5100 was going to HI-Z at the middle of the packet, so I checked for the /SS and it was going low at the same point.
I wasn’t waiting for the SPI to shift out all bytes.
Now I’m having IP and the ping response is very fast.
I’m glad everything worked out fine.
If you need anything, don’t hesitate to ask.
I have almost the same problem. The W5100 chip doesn’t send answer.
I get this result every time when I try to read any register.
it’s my test code:
i = GetW5100register (SIPR1);
Thanks in advance
The sequence of writing and reading are these…
Result = ReadByte()
SPI settings that work are those :
Set the SPI Clock Idle Low on the Rising Edge
Set the SPI Sample on End
Yes, I do this sequence… but I’ve been surprised with signals in inappropriate place (during addressing sequence) and no answer at all.
But I’ve found solution for this problem, I wait longer after reset sequence.
I was surprised that in datasheet it isn’t mentioned. Only strange time like “/RESET to internal PLOCK” time - 10ms maximum.
in fact it would have been my next suggestion… the verification of the reset that must not be active too long.
It could do with a capacitor as happens in Arduino.
My init sequence:
SPI Enable Sequence here
Delay 500 uSec
Buffer init sequence here