Selecting Mictocontroller for Ethernet Application - Page 1
Forum section: electronics / beginners

author: aju11
author_rank: Contributor
timestamp: February 11, 2019, 06:06:42 am
content: Hello everyone,I am new to Ethernet.I want to select a micro-controller for 10base-T/100base-TX, MII/RMII Ethernet application.1. Is there any guideline available for selecting a micro-controller?2. Which parameters should I focus on to compare the micro-controllers from several manufacturers (ST, TI etc.)?3. Does anyone have a excel sheet comparison?Thank you

author: Jeroen3
author_rank: Super Contributor
timestamp: February 11, 2019, 06:41:55 am
content: Only ethernet, or also internet? For the second, get an small linux SBC or SOC. Much much easier software and future maintainability.

author: kripton2035
author_rank: Super Contributor
timestamp: February 11, 2019, 07:00:29 am
content: the cheapest would be an arduino and a wiznet shield on it (or sometimes called etherduino)I also like the pic 18f6xj6x family that connect directly to ethernet. but the dev boards and softwares for it a more expensive.you should also tell us about the application, as it may require some fast calculations ?or is it "just" about IOT and switching things remotely ?

author: rstofer
author_rank: Super Contributor
timestamp: February 11, 2019, 07:06:21 am
content: Ethernet is pretty useless without the rest of the TCP/IP stack so when shopping around, look to see if the vendor has the entire protocol stack- free, of course!There are a lot of ports of lwIP (Lightweight IP) and it's a pretty decent stack.Actually, the Raspberry Pi is probably the way to go. It has the entire Linux networking stack.Maybe after the project is debugged on the Pi it can be ported to something cheaper but the initial development time will be a lot shorter when using a Pi.

author: kripton2035
author_rank: Super Contributor
timestamp: February 11, 2019, 08:39:37 am
content: I find the raspberry pretty overkill in many IOT applications.and developping on a Pi is completely different than other platforms (as you said you have to adapt to the tcp stack)with arduino+wiznet, you have a free tcp stack inside the woznet.also you can use an esp32 with a lan8720 board. there are examples around. more power than an arduino.

author: rstofer
author_rank: Super Contributor
timestamp: February 11, 2019, 03:41:26 pm
content: Like most of these threads, we don't know the whole story. How much networking is required? Is this going to be a high volume web server, a file server, a print server? How many concurrent connections? Bandwidth? Just an IoT toy?I haven't done it with the Pi but I have used Berkeley Sockets to implement a simple server on Linux. It took just a few lines of code, no more than a dozen, for what I wanted to do.Add a MagJack to the original LPC1768 MBED board and use the provided network stack (based on lwIP). Here you wind up having to implement a state machine to keep track of the connection state but it was pretty easy. I just built a daughter card with a MagJack and the project was complete. Again, I was using Sockets to connect to my LaserJet printer. The reason this was easy is that the lwIP library is known to work on the LPC1768!I have always wondered whether the WizNet devices were capable of multiple connections and decent bandwidth. How many packets in flight? Packet reordering?The nice thing about using the Pi is that you can work at a much higher level. Networking is just a fact, it is known to work. You can spend time working on your application without having to debug the network code.Microchip has a pretty decent stack for their PIC32 devices. I assume they have ported it to their ARM devices.

author: ejeffrey
author_rank: Super Contributor
timestamp: February 11, 2019, 06:28:45 pm
content: Quote from: kripton2035 on February 11, 2019, 08:39:37 amHonestly, this is one reason (of many) that most IoT devices are security dumpster fires.Sure the wiznet gives you a functional TCP/IP stack and a mostly compatible berkley sockets API on top of it. It doesn't implement encryption or authentication. It's parsers for higher level protocols only provide basic functionality, and its API is enough different from true berkley sockets that it isn't always feasible to use existing libraries for those features.Developing on most microcontroller platforms encourage use of limited fixed buffers and poor error checking/handling. The fixed array of sockets is really inconvenient for anything that acts as a server. As a device only accessed on a secure LAN protected by a firewall, especially if it is a client only application the wiznet chips are OK, but I wouldn't put anything based on it on the internet.I have used the wiznet chips they are easy to use as a general rule I don't really like them. For small volume applications where you care more about development time/cost I think using a raspberry pi or similar is a better option. You get way more functionality with less development effort, and a lot more flexibility, and in small quantities they are super cheap. For mass market applications where size or BOM cost are bigger concerns that development cost I think the wiznet is usually too big and expensive. In that case I think using lwIP is a better solution -- it is more flexible and cheaper. But you are going to spend more time developing less features than if you use a SoC solution.