Shop OBEX P1 Docs P2 Docs Learn Events
SX -> ENC28J60 -> Ethernet Feasibility Question — Parallax Forums

SX -> ENC28J60 -> Ethernet Feasibility Question

Sparks-R-FunSparks-R-Fun Posts: 388
edited 2008-03-25 00:14 in General Discussion
SX -> ENC28J60 -> Ethernet Feasibility Question

I would like to open a discussion regarding the feasibility and practicality of trying to establish an Ethernet connection on an SX using a ENC28J60 to handle the network signaling. I must confess, I fully expected someone would have done this by now! However, I am not aware of anyone having accomplished this with an SX even through several other small micro-controllers have been connected in this way.

Is there a practical reason this had not been done with an SX?

To clarify my expectations, I am not seeking a full featured web server. Displaying a simple web page that can display data from the SX and receive new input would be nice. Simply being able to send and receive UDP packets of a fixed format but variable content would probably suffice.

Am I expecting too much? roll.gif


Your informed opinions are appreciated!


Thank you.

- Sparks

Comments

  • Harrison.Harrison. Posts: 484
    edited 2008-03-21 16:30
    I've seen the SX used with the RTL8019AS chip before. The SX came out a way before the ENC28J60 was even conceived so it's likely everyone stuck to the RTL8019AS since Scenix/Ubicom provided a reference design for that. Of course it used ASM and was severely limited in it's ability to function on routed networks.

    I was about to start on a ENC28J60 + SX project, but then the Propeller showed up and I went with that instead. It wouldn't be hard to do UDP only, since it is a really simple protocol (you would only need ARP and UDP to get it to function). TCP would be a tight fit since most designs today expect the microcontroller to fit the entire ip packet/frame in the microcontroller memory. It may be possible, but it wouldn't be very fun since you would have to access the ENC28J60 SRAM constantly to read/write your packet data.

    One last note: It seems as though Ethernet only comes to microcontrollers that have a very good C toolchain available. The SX doesn't seem to have a single widely accepted C compiler. I decided to take the plunge with the Propeller and make my own stack in SPIN from the ground up. It takes a lot of time to write and debug one from the ground up. Most people just use something prewritten like uIP...
  • Sparks-R-FunSparks-R-Fun Posts: 388
    edited 2008-03-24 22:42
    After looking into this possibility some more over the weekend it definitely seems to me that some kind of Ethernet networking communication using an ENC28J60 can be handled by the SX. Even if it is very minimal it should be enough to serve my purposes.


    Harrison,

    Thanks for the tips and the encouragement that this may be possible in some form. The fact that you were considering it assures me that it is not a hopeless endeavor! I had concerns that perhaps others knew something that I did not about why this could not be done or was not worth attempting.

    The Propeller sounds nice though I have not had the opportunity to play with one and do not know how to program in Spin. I am sure that day will come! In the mean time, I have not maxed out the capabilities of the mighty SX chips yet. (Although fitting everything I want into the tiny program space and dividing the processor time appropriately between various tasks has always been very challenging. I am so glad it is FAST!)

    I am going to take your advise and focus on ARP and UDP support. That should be sufficient for my needs.


    - Sparks
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-03-25 00:14
    Code and documents regarding the Scenix/Ubicom design·using the RTL8019AS chip:
    http://www.sxlist.com/techref/ubicom/lib/io/osi3/tcpip/index.htm
    The higher level code (not directly controlling the used chip) may be useful.

    regards peter
Sign In or Register to comment.