Shop OBEX P1 Docs P2 Docs Learn Events
Ethernet ideas for Prop2 — Parallax Forums

Ethernet ideas for Prop2

pedwardpedward Posts: 1,642
edited 2013-04-18 13:56 in Propeller 2
There is a DE0-nano on its way to me and I've started looking for Ethernet parts. The part that seems to be the right solution for the job is an integrated MAC controller such as http://www.micrel.com/_PDF/Ethernet/datasheets/ksz8851-16mll_ds.pdf

This is an integrated MAC/PHY that handles the ethernet frame I/O, including the generation of CRC checksums. The device implements 10/100 and has a simple 8 or 16 bit interface. It seems all that is needed is an integrated magnetic jack like this one: https://www.sparkfun.com/products/8534

Offloading all of that MAC stuff to an ASIC, for about the same cost as just a PHY, seems like a no-brainer. This would allow the Prop2 to actually run near line speed with 100Mbit Ethernet.

Whatcha guys think?

Comments

  • tonyp12tonyp12 Posts: 1,951
    edited 2013-03-19 20:33
    If the Prop2 can handle it by itself in 1cog, It would be hard to spend $5 (100 unit cost) to off-load the job to an external ic.
    There are many new Ethernet ic's out there.
    http://www.mouser.com/Semiconductors/Communication-Networking-ICs/Ethernet-ICs/_/N-5cfymZscv7?Ns=Pricing%7c0
  • pedwardpedward Posts: 1,642
    edited 2013-03-19 21:41
    I would happily spend $5 for a MAC/PHY when it is only $3 more or than a bare PHY. The total cost for Ethernet would run about $7, leaving cycles for TCP stack, since the MAC is handling the heavy lifting.
  • pedwardpedward Posts: 1,642
    edited 2013-04-08 00:53
    I was thinking about this subject some more and looked at the Microchip MAC controllers.

    Microchip has 3 chips, the venerable 28J60, 424J600, and 624J600.

    The first is the SPI bus 10Mb MAC/PHY controller that is typically used with Arduinos. It's capable of 10Mb performance and uses SPI for communication.

    The 424J600 is a 10/100Mb MAC/PHY with SPI or 8b interface options.

    The 624J600 is the 64TQFP package of the 424 and has an optional 16b interface as well.

    Eval boards are $40, far less than the Micrel part, and the cost is less for the Microchip part too.

    I wonder, given the bad blood between Microchip and Parallax, if I should stay away from developing a solution around these chips.

    What is the opinion of this forum?
  • mindrobotsmindrobots Posts: 6,506
    edited 2013-04-08 03:45
    WiFi

    Unless you are going to go GigE is there any reason to plug physically something into a network? If you do need a wired 10/100 solution then use one of the eBay $10 breakout boards. A good WiFi solution is much mote flexible.
  • LeonLeon Posts: 7,620
    edited 2013-04-08 04:37
    What is the "bad blood between Microchip and Parallax"? Parallax uses lots of PICs in the various Stamp modules.
  • cgraceycgracey Posts: 14,206
    edited 2013-04-08 08:00
    There are no problems between Microchip and Parallax. We use Microchip parts all the time.

    Perry was referring to a lawsuit from 17 years ago where Microchip accused Parallax of stealing its trade secrets and violating its patents after we helped Scenix Semiconductor (later Ubicom) design the SX chips, which were extensions of the PIC16C5x architecture, but ran 20x faster. After the expense of wrangling for four years, Scenix agreed to stop manufacturing SX chips by 2010 and, meanwhile, limit their sales to 2M units a year.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2013-04-08 11:11
    As far as throughput is concerned, I don't think the xj6x chips aren't nearly as fast as say, the pic32 + external phy, on udp, its probably close to 10:1.

    Also, I have seen that some folks have trouble with a strong 200mhz signal coming from some of those xj6x series when they are trying to pass fcc testing.

    Don't discount wired connections. Wireless will never be as bulletproof.

    It seems that doing the mac in a cog would give more flexibility, but then you would have to buy a mac number IC from MC, or similar.
  • pedwardpedward Posts: 1,642
    edited 2013-04-08 13:38
    Just a quick note.

    Any time you need to do Ethernet, whether it be wired or not, you need a MAC address. These aren't random and are not free, but rather the prefix is doled out by an authority.

    Doing all the MAC in software, and only requiring a MII, means you need to come up with a unique MAC. Unfortunately this requires some centralized infrastructure to monitor and assign numbers to customers, etc.

    By purchasing a MAC controller with MAC address already burned in, you avoid this hassle. Microchip offers their chips with MAC present, so we don't need to invent one, at least that's what I recall from their datasheet.

    There are many different MAC controller manufacturers, I'm just looking for cheap dev boards, reasonably priced chips, and availability. Micrel doesn't seem to exist much outside Taiwan, so developer support and other concerns make me shy away.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2013-04-08 13:58
    Correct, I think all the encj parts have a mac address. They also sell unique mac address IC's for pretty cheap.

    No doubt, the encj parts will be less work.

    Some performance data from the Microchip TCP/IP Stack Help

    Throughput

    PIC32 + ENC624J600 SPI 13.33mhz TCP 154-784 Kb/sec UDP 784Kb/Sec
    PIC32 + ENC624J600 PSP Mode 5 PMP TCP 200-2071 Kb/sec UDP 2071Kb/Sec
    PIC32 + PHY TCP 393-2543 Kb/sec UDP 8449Kb/Sec
    PIC32 + MRF24WB0M(Wifi) TCP 9-84 UDP 44 (Kinda pathetic, don't understand this one)
  • tonyp12tonyp12 Posts: 1,951
    edited 2013-04-08 14:27
    The first 6 letters ( up to 0xFF-0xFF-0xFF) of a MAC is assigned to a company.
    Could Parallax not request one, and we will request from Parallax the other 6 letters?
    16million for our pool of Parallax administered numbers to be given out, should be OK.
  • pedwardpedward Posts: 1,642
    edited 2013-04-08 15:59
    Correct, I think all the encj parts have a mac address. They also sell unique mac address IC's for pretty cheap.

    No doubt, the encj parts will be less work.

    Some performance data from the Microchip TCP/IP Stack Help

    Throughput

    PIC32 + ENC624J600 SPI 13.33mhz TCP 154-784 Kb/sec UDP 784Kb/Sec
    PIC32 + ENC624J600 PSP Mode 5 PMP TCP 200-2071 Kb/sec UDP 2071Kb/Sec
    PIC32 + PHY TCP 393-2543 Kb/sec UDP 8449Kb/Sec
    PIC32 + MRF24WB0M(Wifi) TCP 9-84 UDP 44 (Kinda pathetic, don't understand this one)

    Can you clarify the units you are using? The literature from the datasheets says that the SPI interface is good for 13Mbps, and the 16b interface is good for 160Mbps.
  • pedwardpedward Posts: 1,642
    edited 2013-04-08 16:01
    tonyp12 wrote: »
    The first 6 letters ( up to 0xFF-0xFF-0xFF) of a MAC is assigned to a company.
    Could Parallax not request one, and we will request from Parallax the other 6 letters?
    16million for our pool of Parallax administered numbers to be given out, should be OK.

    While Parallax *could* do that, it means more resources they don't have, to administer the database.

    There are lots of neat things they can do once they aren't under so much pressure. A USB database would be nice too.
  • TorTor Posts: 2,010
    edited 2013-04-08 16:19
    The MAC problem isn't that big. In practice you only need to be unique up to and including the first router.

    -Tor
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2013-04-08 18:38
    Thats the numbers out of the ethernet stack help. I wasn't sure about copyright so I didn't post the table.

    Explorer 16, Fast 100Mbps Ethernet PICtail Plus on the enc624j600

    Pic32 ethernet starter kit on the other.

    That is measured throughput using the MC stack, and obviously the tcp throughput is packet size dependent.
  • jazzedjazzed Posts: 11,803
    edited 2013-04-08 19:19
    Simple idea for DIYers is to find one of those old Ethernet boards you planned to discard and recycle its MAC address :) That number could be worth more than the paper it's printed on or the gold in those chips!
  • localrogerlocalroger Posts: 3,452
    edited 2013-04-08 19:29
    Setting the $02 bit in the first byte of the MAC address marks it as "locally administered." There is still a risk of collision with someone else who did the same thing but there's no risk of collision with a valid authority-granted MAC address because none of those have $02-XX-XX-XX-XX-XX set. And the only risk of collision is with devices on the local ethernet subnet up to the first router.

    And the ENC28J60 definitely does not come with its own MAC address, which is why Harrison's example code uses 02-01-02-03-02-05. I suspect that second 02 was to avoid a too-obvious collision.
  • tonyp12tonyp12 Posts: 1,951
    edited 2013-04-08 19:58
    >more resources they don't have, to administer the database.
    I was thinking of an auto responder, anyone can one get a block of 256 mac-id's
    Maybe sending a text-message to verify phone number as phones is harder to get many off vs multi-email addresses.

    A block of 4k units to verified bulk purchaser of Prop2 ICs, is handled manually.
  • pedwardpedward Posts: 1,642
    edited 2013-04-08 22:00
    localroger wrote: »
    Setting the $02 bit in the first byte of the MAC address marks it as "locally administered." There is still a risk of collision with someone else who did the same thing but there's no risk of collision with a valid authority-granted MAC address because none of those have $02-XX-XX-XX-XX-XX set. And the only risk of collision is with devices on the local ethernet subnet up to the first router.

    And the ENC28J60 definitely does not come with its own MAC address, which is why Harrison's example code uses 02-01-02-03-02-05. I suspect that second 02 was to avoid a too-obvious collision.

    From the 424/624J600 datasheet:

    (Features)
    Factory Preprogrammed Unique MAC Address

    6.1.3 SOURCE ADDRESS
    ...
    Each ENC424J600/624J600
    device has a unique address which is loaded into the
    MAADR registers on power-up. This value can be used
    as is, or the registers may be reconfigured with a
    different address.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2013-04-09 04:17
    http://www.digikey.com/product-detail/en/24AA02E48T-I%2FOT/24AA02E48T-I%2FOTCT-ND/2003468

    I think the pmp mode is 16 bit mode, but I am unclear on that.
  • pedwardpedward Posts: 1,642
    edited 2013-04-18 13:56
    Just ordered one of the 624J600 eval boards.
Sign In or Register to comment.