Shop OBEX P1 Docs P2 Docs Learn Events
Slow update speed on ethernet communication from Wiznet W5500 to Computer VB.Net App — Parallax Forums

Slow update speed on ethernet communication from Wiznet W5500 to Computer VB.Net App

avionikerenavionikeren Posts: 64
edited 2014-06-29 13:39 in Propeller 1
I`m using Jinbuhm Kim`s W5500 object and I have managed to establish communication between a propeller and a VisualBasic.Net application.
The problem is the slow update frequency on the messages between the two. I get about one message each second.
The VB application has been used with Wiznet W5100 before and no change has been done to that.

The VB application outputs about 15 messages each second and only one is received by the propeller.

If anyone has any experience with W5500 and this object I would be thankful for all the hints I can get.

Attached is a stripped down main spin code.
Program.spin

Comments

  • Mike GMike G Posts: 2,702
    edited 2014-06-27 08:18
    I believe Jinbuhm Kim`s W5500 driver is uses a SPIN SPI driver. So it will be slow.

    I recently updated my W5100/W5200 PASM SPI driver to work with the W5500 protocol. If you can wait a bit I plan to publish the source on the Spinneret forum.
    The VB application has been used with Wiznet W5100 before and no change has been done to that.
    Did the W5100 handle the 15 requests a second? What kind of requests? HTTP, A packet...
  • avionikerenavionikeren Posts: 64
    edited 2014-06-27 15:30
    It did actually run 100 UDP messages each second with the W5100, but then I increased the amount of bytes in the message and went down to 15.
    About 100 bytes in the message from the computer to the propeller and about 1200 bytes in the response.

    I`m in a hurry since I have to deliver a project to a customer on Monday so I think I will go with my version with the W5100 for now.

    The reason I want to use a new board with the 5500 is that my 5100 board has not a connection for the reset pin.
    Sometimes when I recycle power to my board the 5100 fail to start (not able to ping it) and I think the lack of hardware reset might be the cause, do you guys have any idea if that is correct?
    What does the software reset do? Should a software reset be sufficient?

    Image of the system I`m working on.
    Control System.jpg
    1000 x 805 - 217K
  • avionikerenavionikeren Posts: 64
    edited 2014-06-28 04:52
    I added a wire to the reset pin on the W5100 and that seems to solve the startup issue, but now another problem has appeared.
    After the system has been running for 4-5hours, the W5100 stops responding to pings, but I see on the Rx LED that it still receives broadcast messages or something like that.
    I tried to unplug it from the switch and reconnect, that did not help.
    Then I recycled power to the board and it was up and running again.

    Any ideas what it could be?
  • Mike GMike G Posts: 2,702
    edited 2014-06-28 05:30
    Any ideas what it could be?
    A Bug??? It's impossible to answer your questions with out schematics and complete source code. Edit: the source snippet in post #1 looks very familiar...

    Attached is a simple UDP server using a custom SPI driver for the w5500. You 'll need to update the PIN I/O, IPs, and Ports.
  • avionikerenavionikeren Posts: 64
    edited 2014-06-28 08:50
    AMAZING!!! Your code works perfect!!! You saved my day! Many many thanks Mike!!
    My board with the W5500 now runs perfect with 15 messages like the 5100 did each second.

    I will let it run over night and let you know how it goes.
    My software does a ping check once a second and I constantly log high ping rates and lost packages to a text file.

    I am very exited now thanks to you!
  • avionikerenavionikeren Posts: 64
    edited 2014-06-29 11:07
    The system has now been running with your object for more than 24 hours and it seems to be totally stable.

    My last question: should i use the hardware or software reset at each startup or is that not needed on the w5500?
  • Mike GMike G Posts: 2,702
    edited 2014-06-29 13:39
    My last question: should i use the hardware or software reset at each startup or is that not needed on the w5500?
    I believe the datasheet recommends a soft reset. I can't remember why. Read the documentation to be sure...
Sign In or Register to comment.