Shop OBEX P1 Docs P2 Docs Learn Events
Propeller and TCP/IP — Parallax Forums

Propeller and TCP/IP

william chanwilliam chan Posts: 1,326
edited 2006-03-21 15:30 in Propeller 1
Hey!

Does anyone know whether the Propeller can be easily interfaced to 10baseT and do TCP/IP?

Thanks.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-03-15 15:36
    In theory, but like all applications of the propeller, it is up to the designer to write the protocol in software. The propeller follows the SX mindset of no dedicated peripherals (though the video assistant is an exception to this, but even that is a generalized peripheral to enable the generation of many different kinds of video signals). The counters in each of the processors is sophisticated enough to ease the creation of the layer just above physical.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-03-17 15:39
    I just wonder what the Propeller might do on a network.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-03-17 16:15
    Mouser provides a complete all in 1 tcp/ip on a chip, around $90.00. I'm sure the propeller would do very well.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2006-03-17 22:34
    It is my intent to write a TCP/IP stack for the propeller in the future.

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
  • william chanwilliam chan Posts: 1,326
    edited 2006-03-18 01:17
    $90 for a TCP/IP chip is too expensive.....

    How many pins and what external circuitry would be needed to connect directly to the RJ45 socket?

    Just copy the SX52 TCP/IP code and modify a bit, right? cool.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my

    Post Edited (william chan) : 3/18/2006 1:21:03 AM GMT
  • Harrison.Harrison. Posts: 484
    edited 2006-03-18 03:37
    I don't know if it is possible to do all the impedence matching, manchester encoding, packet buffering, and packet filtering all on the propeller since the buffering requires a somewhat large amount of memory.

    If I was doing something like this, I would use the ENC28J60 ethernet controller from microchip.· This chip has a 8kbyte buffer and a spi interface.· Microchip also has an excelent C tcp/ip stack that may be portable to spin with some work.

    Harrison
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-03-18 03:49
    The propeller has 32K central memory and 16k memory divided between the 8 processors. I have no doubt TCP/IP could be implemented on the propeller. I supsect the video peripheral could be jury rigged to provide the serial out (only a suspicion, details of the VP haven't been made availible). The counters can be configured in differential output (cant remember if ethernet does differential or not), so the video serializer could likely be looped through a counter to provide true 10Mbit/s differential.

    The impedence matching just requires proper design, I remember seeing a RJ45 connector that had the transformer built in, but can't remember where. All the other stuff is just a matter of programming, and you have 8 processors each which can handle its own layer of the communication.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10

    Post Edited (Paul Baker) : 3/18/2006 3:59:47 AM GMT
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-03-18 12:19
    The problem with TCP/IP on a network is the SPEED and data-sizes which needs to be handled at one time.
    At 10Mb/s, and the need to buffer up to 1500Bytes(or so) I just can't see how the Propeller can do it.
    Using Spin is too slow, really, and the need to use the HUB RAM for buffering will make it difficult to solve in Assembler, too.
    Maybe by using two COGs in tandem? both reading the first few Bytes, then one starts analyzing while the other just discards the header and continues capturing until it either reaches the end and the data can be transferred to HUB RAM for processing by other COGs, or the other COG tells it to 'stop and flush' as the package is for another machine.

    TCP/IP over a serial link (PPP or whatever), is another matter, as the data arrives so slowly that you can analyze packet-headers in realtime, and THEN decide whether or not to receive the packet body.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • inakiinaki Posts: 262
    edited 2006-03-18 12:57
    The Ethernet implementations I have used on PIC platform rely on a well known Realtek chip. This chip manages all Ethernet stuff and even provides some buffering. Even then the programming of the Realtek chip is not a piece of cake. Fortunately this chip is documented and there are many programing examples on the net.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • GadgetmanGadgetman Posts: 2,436
    edited 2006-03-18 14:49
    Do you have a link to the datasheet of that chip?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't visit my new website...
  • inakiinaki Posts: 262
    edited 2006-03-18 20:42
    Gadgetman, check this link:
    ftp://202.65.194.18/cn/nic/rtl8019as/spec-8019as.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-03-19 03:42
    And who distributes the chip? I cant find anyone.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Guy WinslowGuy Winslow Posts: 4
    edited 2006-03-19 22:29
    I agree with the analysis that the propeller chip would not be a good TCP/IP stack chip. In fact it's very well geared for implementing an individual tasks that needs to run autonomously. Network protocols or more than likely change over the span of years, but controlling machines, devices, lights, heating always require independent autonomous operations that can interact with one another. From what I've seen, the propeller chip is perfect for this situation. There are numerous ways to connect a device through tethered links, either through radio or network. Having some experience developing network clients myself on the Mac and the PC platform I suggest using a specialized chip or different processor connected to a network device. This allows the network transceivers to filter and transmit autonomously to handle the network protocol operations from second to second. In this way the other chip or chips connecting you to the network handle the heavy load of the data rates on the wire or air. The propeller chip then can use the appropriate data received specifically for the operation the data was intended for. A good example of this would be, a machine that has a shuttle that runs from one and to another. A shuttle is going to have to stop at various points along the way, and monitor both ends of the track to make sure it doesn't run off of either end. You would probably want an individual process to monitor a switch at every stop along the shuttle as well as each end. You would probably want each one of those switches to execute a program as well when the shuttle gets to that switch, this is where the independent processes come in. This can be done in a single threaded environment, but in a large machine with hundreds or thousands of these operations going on all depending on one another the propeller chip looks pretty good for this task. On the other hand a network receiver must monitor all the data coming in, filter it, check for faults, reassemble it, and then make sure it's appropriate for the individual device or action that was receiving. In this all has to happen at the speed of the data on the wire or radio transmission. As you can probably see a highly efficient filter or chip doing this filtering is a lot more effective than a dozen processors spinning independently. jumpin.gif
  • inakiinaki Posts: 262
    edited 2006-03-20 12:47
    Paul I can check some contacts to see where to locate and buy the RTK chip but this may take some days. Are you truly interested ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-03-20 14:20
    Honestly Im curious how much they are, I know what the intented ballpark for the propeller is, and I want to know how they compare in price.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Ryan ClarkeRyan Clarke Posts: 738
    edited 2006-03-20 15:12
    The point here was "because it's there" - No, the intent was not merely to take the SX TCP/IP stack and port it, but to develop one in ASM for the Propeller. Granted there are better solutions out there for this- (and RJ45s with the requisite magnetics, etc are easy to find)-

    Ryan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ryan Clarke
    Parallax Tech Support

    RClarke@Parallax.com
  • inakiinaki Posts: 262
    edited 2006-03-20 15:30
    Paul, FYI, the chip sells for $6 in small amounts (less than 100). This price is from the Realtek distributor in Europe. Minimum order is 6 units.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-03-20 15:44
    Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • SteveWSteveW Posts: 246
    edited 2006-03-20 17:34
    I'd be very tempted to use a proper PHY chip - this will give you the proper drivers & receivers that'll bolt straight up to the magnetics, whether they're in the RJ45 or not. (Ethernet receivers aren't completely trivial, nor are compliant transmitters)
    At that point, you get a nice 4-bit clocked interface for each of transmit and receive - at 10Mbit, that's a leisurely 2.5MHz clock rate. Definitely far easier than bolting Propeller pins up to the magnetics directly, and PHYs are a small number of dollars. (sub-one, in quantity).
    Teridian 78Q2123 get my vote at the moment, but they're a bit small for homebrew. There are loads of candidates, though. At that point, you 'just' have to write the rest of the stack, but at least the symbols are slower and trustable...

    Steve
  • Harrison.Harrison. Posts: 484
    edited 2006-03-20 21:44
    Not to repeat myself or anything, but the ENC28J60 is less than $5.00 in single quantities for the 28 pin PDIP version.· It only requires 3 to 4 pins on the host controller, compared to the 8 - 16 required by other chips.

    Harrison
  • SteveWSteveW Posts: 246
    edited 2006-03-21 10:57
    Indeed - it's pretty spiffy, but you still have to write the Ethernet stack to make sense of the packets, it only gets you a bit more functionality than a Phy, at 5 dollars more... If someone _can_ write a PHY driver for the Propeller, then it's tempting. Probably not a concern for a hobbyist, but of overwhelming concern in a volume product. Plus, it'd be cool [noparse]:)[/noparse]
    (That ENC28J60 makes more sense when attahced to a micro that absolutely _couldn't_ do Ether itself, where you're listening for specific packets on the net, that you can use the on-chip filtering to discard all others...), or when you kust want to send status packets from time to time.

    (Also, if someone writes a driver for a phy, it opens up the crazy world of powerline and cable TV data transmission, since some of those chips present MII interfaces)

    Steve
  • Kaos KiddKaos Kidd Posts: 614
    edited 2006-03-21 15:30
    SteveW... sound like your trying to make a very small packet sniffer.... something someone of the 'black arts' would most assuridly pay mega bucks for... Interesting... then again, someone with ligitmate goals would pay a decent amount of money...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Just tossing my two bits worth into the bit bucket


    KK
    ·
Sign In or Register to comment.