Shop OBEX P1 Docs P2 Docs Learn Events
Propeller Web Server Software.... — Parallax Forums

Propeller Web Server Software....

Timothy D. SwieterTimothy D. Swieter Posts: 1,613
edited 2010-04-28 07:11 in Propeller 1
Have you heard about the Propeller Network Server/Propeller Web Server product that Parallax has under development? Parallax announced the product development in another thread on the forum: http://forums.parallax.com/showthread.php?p=875702 The core of the product is the Propeller and Wiznet W5100 Ethernet IC but there will be some other great items in the product such as RTC, SD card, etc.

Ken, David and I have been talking about the software for the Propeller Network Server and Parallax has invited me to develop the software for the product. David and I are very excited about the prospects of this product and we are also excited about the community involvement in the design and review process. David is busy working on the hardware design and once the hardware is available I understand Parallax will release it - that is to say with or without the firmware finished so that we all have a development platform to work from.

The firmware plan at the moment is to finish the Brilldea generic W5100 SPI and Indirect address drivers. These drivers will be posted in the object exchange and I hope that several people are able to test them and provide feedback to make the drivers faster and more useful. Once those generic drivers are released I will then assemble a design of the Propeller Network Server software such as the various objects needed, the features to include (mostly from the first Parallax post referenced above). I am looking forward to the design portion of the project and planning the design and APIs and seeing what the community has to say regarding the design. I have some design concepts in mind already but I know there is a wealth of ideas from the forum that will only make the product design better.

With a design in hand I will begin putting together the firmware pieces and offer previews of the code on the forum. Once the overall firmware is finished Parallax will be releasing it so that it can be modified and enhanced as desired by the end-user. I suspect the process could take a couple of months depending on my work schedule and the complexity of the design. The end results should be great though....I have high expectations.

Stay tuned to this thread for updates on the progress. Over this past weekend I worked on the UDP portion of the W5100 generic driver and I see the following as the next steps:
  • Create the TCP portion of generic driver.
  • Review of what to include in assembly and what to be in SPIN of the generic driver. The goal is to get high performance so I want to have the most important items done in ASM. All code well documented of course.
  • Creating the indirect/parallel version of the driver from the SPI version. This should be a matter of simply swapping out the SPI asm routine and dropping in the parallel routine. The SPIN methods shouldn't have to change.
  • Posting of the drivers in the OBEX and getting community feedback.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" 16:9 LCD Composite video display, eProto for SunSPOT, PropNET, PolkaDOT-51
www.tdswieter.com

Post Edited (Timothy D. Swieter) : 3/27/2010 7:06:45 AM GMT

Comments

  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2010-03-27 07:09
    A quick status on the Propeller Web Server:
    • Work on the generic W5100 driver is still on-going. Got basic TCP/UDP working. The driver is a combo of SPIN/ASM.
    • Researched a couple books to checkout, read, and research regarding embedded ethernet and design patters for implementing Application Layer protocols, etc.
    • Have had a lot of ideas regarding a very targeted W5100 driver based on using the W5100 interrupt scheme.

    This weekend I hope to get more time to work on the generic driver and add any additional functionality. What else? Oh yeah...the Parallax product official name is Propeller Web Server. I adjusted the title of the thread and I'll try and be consistent when referring to the product in my future posts. I will probably abbreviate it at times as PWS.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" 16:9 LCD Composite video display, eProto for SunSPOT, PropNET, PolkaDOT-51
    www.tdswieter.com
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2010-04-08 11:53
    Status Check:

    I didn't get time over Easter weekend to work on the indirect driver, however I did read the data sheet a bit and don't think it will be too complicated to put together. For the next week or so I will be focusing exclusively on studying for the PE test so there won't be much of an update. I will be traveling from SG to Orlando, FL to take the test too. Once I am past the test I can refocus on the software again and I hope to make good strides in the design.

    I ordered a couple books to review as reference material. I was looking for some design patterns on methods, names and code structure. I picked up the following books:
    • TCP/IP Application Layer Protocols for Embedded Systems by M. Tim Jones
    • Networking and Internetworking with Microcontrollers by Fred Eady
    • BSD Sockets Programming from a multi-language perspective by M. Tim Jones

    The two books by M. Tim Jones were really great price, so I couldn't pass them up. I will see what I can get out of these books. There are a couple others that looked promising too, however they were around US$100 and so I didn't get them and am hoping these books will serve me well.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" 16:9 LCD Composite video display, eProto for SunSPOT, PropNET, PolkaDOT-51
    www.tdswieter.com
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2010-04-08 12:25
    @Tim,

    Good luck with your PE exam. yeah.gif

    Here's a free online TCPIP guide for you: (it has some really nice diagram outlines to follow)

    www.tcpipguide.com/free/index.htm
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2010-04-08 12:37
    @Timothy,

    I used to teach the Cisco equivalent for TCP/IP (CCNA), the link that Bob gave you pretty much covers it.
    The hardest thing students would struggle with was sub-netting an IP address, otherwise it's straightforward stuff.
    You should do well. [noparse]:)[/noparse] Good Luck!

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Are you Propeller Powered? PropellerPowered.com
    Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
  • Patrick1abPatrick1ab Posts: 136
    edited 2010-04-08 13:44
    @Timothy,

    I wish you good luck with your exam. wink.gif



    As I had a bit time over Easter, I transformed the SPI version of the driver into a indirect bus version.
    The compiler tells me that there is no syntax error in my code, however I have not tested it until now.


    Apart from that, there is still one thing which isn't implemented yet (but should be in the future):

    - a fast writing method using the address auto increment function of the W5100

    Although this is only useful while reading or writing to the RX / TX buffers, this should get us an enormous increase of efficiency.



    Oops, a bit too fast. I have forgotten the initilization...
    ...second attempt:

    Post Edited (Patrick1ab) : 4/8/2010 2:01:09 PM GMT
  • edlikestoboogieedlikestoboogie Posts: 71
    edited 2010-04-10 05:49
    How do I connect the W5100 to the prop for indirect/parallel use? Just connect pins D0-D7 instead of MISO, MOSI, SCS, SCLK to the propeller (assuming we start with the Hydra EtherX schematic)? Do I need 10k pull down resistors for D0-D7? Looks like the SPI connections used 10k pull down resistors. oh and also tie SEN to Ground.
  • edlikestoboogieedlikestoboogie Posts: 71
    edited 2010-04-10 05:59
    Hey Patrick1ab,

    I was looking at your code, and could you describe how you hooked up _A0, _A1, _CS, _RD, _WR, _INT pins from the prop and the W5100. I have no idea what these pins are to the pinout of the W5100. And I am confused about whether to use 10k pull down resistors, because in the hydra etherX schematic, almost every input pin for the W5100 has a 10k pulldown except pin OPM1, which has a 10k pull up resistor. Just a little bit confused why that one is a pullup and the rest are pulldowns.

    thanks
  • Patrick1abPatrick1ab Posts: 136
    edited 2010-04-10 10:11
    Hi edlikestoboogie,

    if you take a look into the W5100 datasheet, you will see that /RD, /WR, /CS, /INT and /Reset are active low pins.
    So, if you like to connect them to a defined potential, you should use pull up resistors.
    A0, A1 and D0-D7 are active high pins. So here I would connect pull down resistors.

    edlikestoboogie said...

    I have no idea what these pins are to the pinout of the W5100.

    _CS is the chip select pin (Propeller output)
    _RD tells the W5100 that we are going to read the next data (Propeller output)
    _WR tells the W5100 that we are going to write the next data (Propeller output)
    _INT interrupt pin of the W5100; to see what can be the cause of an interrupt, please look into the W5100 datasheet (Propeller input)
    _A0, _A1 are the pins for the first two bits of the address with which address $00 to $03 can be selected (page 60 of the datasheet) (Propeller output)
    _D0 to _D7 are the data lines, where the actual data is being transmitted (can be both input or output depending on _RD or _WR)


    I hope that this has been of some help to you
    If there are still questions, don't hesitate to ask wink.gif
  • edlikestoboogieedlikestoboogie Posts: 71
    edited 2010-04-11 03:42
    Thanks Patrick1lab,

    I get it now, is there a huge loss of speed between the Direct 15 pin address method and the Indirect method you are using that utilizes only 2 address bits? I would hate to use up 15 more pins.. eek. And do you know the purpose of the 3 operation mode bits that the hydra EtherX seems to use, and again why is OPM1 pulled up with a resistor while the other OPM pins are pulled down? is this because OPM1 is an active low pin as well?

    thanks again,
    Ed.
  • Patrick1abPatrick1ab Posts: 136
    edited 2010-04-11 12:27
    edlikestoboogie said...

    I get it now, is there a huge loss of speed between the Direct 15 pin address method and the Indirect method you are using that utilizes only 2 address bits? I would hate to use up 15 more pins.. eek.

    I haven't tested (implemented) this yet, but if you choose address auto increment, there should not be a noticeable difference in terms of speed.

    edlikestoboogie said...

    And do you know the purpose of the 3 operation mode bits that the hydra EtherX seems to use, and again why is OPM1 pulled up with a resistor while the other OPM pins are pulled down? is this because OPM1 is an active low pin as well?

    No, according to the data sheet these OPM pins are active high.
    I guess the engineers who designed the Hydra EtherX board did that to set the operation mode "Auto-negotiation with 10 BASE-T FDX/HDX ability" as default on startup.

    Post Edited (Patrick1ab) : 4/11/2010 12:33:49 PM GMT
  • Patrick1abPatrick1ab Posts: 136
    edited 2010-04-13 20:55
    Has anyone tried the indirect version yet?

    I tested it today and I can't get it to work. I made some changes to stick to the AC Characteristics, but no change...
    When I try to read the values I've just set (MAC address, IP address, subnet), I always get incorrect data.

    Found an error in the initialization, but still not working...




    further changes I made:

    Added some standard functions to send strings and decimal values:

    - str (_socket, _dataPtr)
    - dec (_socket, value)

    Post Edited (Patrick1ab) : 4/14/2010 3:58:21 PM GMT
  • KPRKPR Posts: 189
    edited 2010-04-14 00:49
    So correct me if I'm wrong, what one saves on cogs and ram space are used up in the number of pins needed to drive the w5100..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New ICON coming, gotta wait for the INK to heal, now we have colour!
  • Patrick1abPatrick1ab Posts: 136
    edited 2010-04-14 01:08
    KPR said...
    So correct me if I'm wrong, what one saves on cogs and ram space are used up in the number of pins needed to drive the w5100..

    It's not about cogs and ram space, as you can have that with the SPI mode aswell.
    It's about the maximum bandwidth you can get.

    I'm dreaming of several hundred Kbytes per second.

    And compared to direct mode, indirect mode really saves pins smilewinkgrin.gif
  • Patrick1abPatrick1ab Posts: 136
    edited 2010-04-15 16:30
    I'm really frustrated, as I can't make this indirect driver work. I found some potential bugs, but no change...
    I am pretty sure that this is a timing problem, but I can't figure out where it is. Except that I needed to cheat a little to make it work with a Propeller running at 80MHz (50ns per instruction).

    for example:
    Register/Memory Read


    datasheet (at least 80ns read cycle):

    set address, wait at least 8ns before setting /cs, /rd has to be set within the next nano second, valid data has to be set within the next 80ns, ...


    my driver (1,5us +):

    set address (100ns), set /rd (100ns), set data (at least 1,15us), set /cs (50ns), wait 50ns (nop), clear /cs
  • edlikestoboogieedlikestoboogie Posts: 71
    edited 2010-04-28 06:07
    Hey Patrick,

    Any luck getting the indirect W5100 driver working? My project would love to have this driver, I would give you a donation if it would speed up development. Please let us know how its going.
  • Patrick1abPatrick1ab Posts: 136
    edited 2010-04-28 07:11
    Hi edlikestoboogie,

    Thanks for the offer, but a donation won't be able to speed things up smilewinkgrin.gif
    What I really need is a beta tester (or several) and their feedback.

    For the latest progress, see my post from yesterday on this thread:

    http://forums.parallax.com/showthread.php?p=877210
Sign In or Register to comment.