mega644 and ethernet

Go To Last Post
19 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Anyone know of a board with a 20mhz mega644 and an eth chip like a CS8900A? I'd use an xport, except I cant figure out how to get 600k bytes/sec out of it. The xport serial only goes to 96k bytes/sec. Any of those other eth chips have a fast interface from them?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't think any little $100 micro-based scheme can sustain 4.8Mbps as you require. Seems like a job for $500 SBC with an ARM7/9 and 100BT.

The WizNet 810MJ I'm working with might do that, but connected by 4MHz SPI it would be too slow. Connected by memory mapped I/O, it might get close, but I have my doubts whether the buffer transfers to/from a mega128@10MHz would be the bottleneck rather than the firmware within the 810MJ. The TCP overhead on the LAN would be an issue; less so if UDP.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No, I could receive 1K UDP pkts almost back to back with a 16mhz mega128 and a cs8900... about 1 megabyte per sec. So I'm pretty sure we could build the board, but its a chicken-egg thing with the boss... he doesnt want to build one till its sold, and you cant sell it till its built. My multiply and accumulate mixing subroutine runs 1.5ms at 16mhz, so I think the 20mhz 644 (with a 22mhz xtal?) will have enough mips, specially if I keep the pkts arriving every 1ms < than 1K

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I guess that if I'd want to do it "right", I'd start with something like the SAM7X with DMA and built-in Ethernet support.

Barring that, it sounds like a great job for the Xmega with somewhat faster clock rates and DMA.

How things have changed: In ~1985 Intel came out with their first Ethernet chip, that we interfaced to an 80186 running at a few MHz. The chip ran so hot that if you accidentally touched it you'd raise a blister on your finger. On a dedicated 10base5 segment with a dedicated VAX 11/780 on the other end, packet echo sequences with no storing or processing could only reach throughput rates of about 100k bytes/second with random packet lengths, and 2-3 times that with the "optimal" length.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
Any of those other eth chips have a fast interface from them?

The units aren't 100% clear, but here's a couple of pages with manufacturer performance tests for the W5100/WIZ810MJ:
(I assume it's in MB/s...)

              TCP Server   TCP Client       UDP
Direct mode       2.62MB       2.64MB    2.56MB
Indirect mode     0.70MB       0.70MB    0.69MB
SPI mode          0.17MB       0.17MB    0.17MB

I haven't tried doing any performance tests myself.

Obviously, YMMV...

--Phil.

P.S. Apparently there's a new W5300 chip with faster throughput, but I don't know when it'll ship.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The table, above shows "MB" which by convention is megabytes.
However, the textual description for the 16MHz mega128L they did refers to 5.5Mbps.

So this looks to be bits, not bytes, per second? Or it's inconsistent.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
No, I could receive 1K UDP pkts almost back to back with a 16mhz mega128 and a cs8900... about 1 megabyte per sec. So I'm pretty sure we could build the board, but its a chicken-egg thing with the boss... he doesnt want to build one till its sold, and you cant sell it till its built. My multiply and accumulate mixing subroutine runs 1.5ms at 16mhz, so I think the 20mhz 644 (with a 22mhz xtal?) will have enough mips, specially if I keep the pkts arriving every 1ms < than 1K

receive 1K UDP pps. Was this an ethernet NIC that has a memory-mapped interface to the AVR, rather than what WizNet calls indirect (slower, fewer I/O pins), or even fewer I/O with SPI (I'm using SPI at 4MHz clock rate).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:
No, I could receive 1K UDP pkts almost back to back with a 16mhz mega128 and a cs8900... about 1 megabyte per sec. So I'm pretty sure we could build the board, but its a chicken-egg thing with the boss... he doesnt want to build one till its sold, and you cant sell it till its built. My multiply and accumulate mixing subroutine runs 1.5ms at 16mhz, so I think the 20mhz 644 (with a 22mhz xtal?) will have enough mips, specially if I keep the pkts arriving every 1ms < than 1K

receive 1K UDP pps (of size x bytes ea.). Was this an ethernet NIC that has a memory-mapped interface to the AVR, rather than what WizNet calls indirect (slower, fewer I/O pins), or even fewer I/O with SPI (I'm using SPI at 4MHz clock rate).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

We had a board with a CS8900 on the memory bus. I timed how long it took to read in a bunch of packets I was sending from the pc. Right at 1 megabyte. I have a memory to memory copy that benchmarks at right about 2 megabytes, so that seems about right. I see the wiznet chips have a memory option as well as the spi option... their table has all the fast rates using the memory interface. The wiznet website also has a board with a wiz810 module on a board with a mega128 and an lcd. Wonder how much that one costs? I have about 1.5 ms of mixing to do every ms, so I wanted to run it on a 20mhz cpu and even goose it up a couple mhz if necessary.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

R working on an device my self now using the WIZ810MJ together with mega32 and later hopefully mega644 when I get my hands it.

However, I could not find that mega128 / wiz810 bundle at wiznet which you mentioned, did you mean W5100E01-AVR? This is rated for app. 200$ but it does not use wiz810 but rather its own layout. It promises up to 12Mbit/s using an 16MHz crystal, but I guess this is burst performance. Whit this kit you get all the source code you would need as well to start off.

Regards
Vidar (Z)

----------------------------------------------------------

"The fool wonders, the wise man asks"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

bobgardner wrote:

The wiznet website also has a board with a wiz810 module on a board with a mega128 and an lcd. Wonder how much that one costs? I have about 1.5 ms of mixing to do every ms, so I wanted to run it on a 20mhz cpu and even goose it up a couple mhz if necessary.

I have two WizNet 810's - which can connect easily to an AVR via memory map (fastest) or 4MHz SPI (easiest). Nice to have exernal RAM, but not necessary. I'm using a strategy where data flows to the 810 (web server) direct from flash or small RAM buffer, rather than first building an impage of the IP/UDP packet's payload in a big AVR RAM buffer then copying that to the 810's 2048 byte buffer (one per socket, 4 sockets).

I've been working with the '810 for several weeks. It's been a bear, at least for me, due mostly to lack of info/dialog with this Korean company. But I have DHCP, HTTP server working, sort of, with my own code under AVRX. The WizNet eval kits are not what I want for a target product platform. And the sample code is very much eval-board specific. The bare drivers from WizNet for the '5100 chip are, er, ah, { expletive deleted }, hence, my learning curve to have my own baseline.

The 810's price is certainly excellent, given it is a full TCP stack with four socket level interfaces, and 2K per socket buffers for both transmit and receive. Built-in ARP and ICMP/Ping too.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have used a Lantronix/Digi Xport3... thats 10/100 but it comes out a 3.3V TTL at 960kbits max... I wonder if they have an spi version or a bus version? Have to go look again. Was only looking for an eth to serial converter before. Now I need something faster.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a Lantronix/Digi WiPort - you can add your own code to it's ancient high power/hot microprocesor but it's a chore to understand. Uses old Borland C compiler. Good FAE support.

They don't have I2C or SPI implemented, though there are I/O pins for one or the other.

If you don't want to go into that muck (and the lowest price XPort cannot be altered, only the higher priced one with more memory), you have to talk to it via a 3.3V serial port at 115Kbaud max. I've done so, from AVRs. Easy. But not super high speed.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
They don't have I2C or SPI implemented,...

The WIPORT NR is said to have SPI, I2C and CAN on some of its I/O port pins, but there is no further info in the docs. Ask their FAE.

BR, Jörg.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bob

An ethernut board comes w. a M128 (and a realtek 10Mb chip) or an arm7 w. a 100Mbit chip.

Else grab your soldering iron and do this one , M644 and an ENC28J60 :-)
Maybe you can get the SPI to deliver 4Mbit@20Mhz

http://www.ulrichradig.de/home/i...

http://www.mikrocontroller.net/t...

The PCB is on sale here
http://shop.ulrichradig.de/produ...

There is also some modules here (including the cs8900)
http://www.propox.com/products/t...

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JBecker wrote:
Quote:
They don't have I2C or SPI implemented,...

The WIPORT NR is said to have SPI, I2C and CAN on some of its I/O port pins, but there is no further info in the docs. Ask their FAE.

BR, Jörg.

they told me that they haven't implemented these and there's no firm plan to do so.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
JBecker wrote:
Quote:
They don't have I2C or SPI implemented,...

The WIPORT NR is said to have SPI, I2C and CAN on some of its I/O port pins, but there is no further info in the docs. Ask their FAE.

BR, Jörg.

they told me that they haven't implemented these and there's no firm plan to do so.

Means that what they state on their homepage about this product is bullshit:

Quote:
WiPort NR features Include:

* Two serial ports
* 10Base-T/100Base-TX Ethernet connectivity (using external RJ45 jack)
* 2MB of Flash memory for OEM web pages
* 11 GPIOs
* Available CAN, SPI and I2C interfaces
* PoE-capable with external circuitry
* Programmable e-mail alerts
* 256-bit AES Rijndael encryption for secure communications
* Extensive networking protocol including full TCP/IP stack

But at least its good to know that they do not support SPI and CAN at the moment. I was going to ask for this during the next days because I would have liked to use both in a project.

BR,
Jörg.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe they've added this in the last year or so.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you happen to have an ATmega644 board with prototyping area, there is a CS8900 proto board, by Olimex.

AT32UC3B can be only slightly bigger than ATmega644 and the SPI bandwidth easily exceeds double of your requirements. If only they were available :)