Ethernut Home Hardware Software Tools Download Community
 
 
Search | Legals | Deutsch

FAQ

Frequently Answered Questions



This page will be removed. For the latest version please visit NutWiki.



1. Introduction and General Information
What Is Ethernut?
How Do I Get Started?

2. Boards and Parts
Where can I get an Ethernut Board?
Why is Ethernut so expensive?
Should I buy the parts and build the Ethernut Board myself?
Can I make the PCB myself?
Are there any CAD files for Protel, Orcad, XYZ?
Can I replace the ATmega 103 on my old Ethernut by an ATmega 128?
Why do you use a 14.7456 MHz crystal?
Can I overclock the CPU?
Why does reading the analog inputs fail?
Many other 8-bit systems use the CS8900. Why did you select the Realtek chip?
Is there any 100 Mbps Ethernet Controller supported?
Do capacitors C7 and C8 really need an isolation of 1 kV?
How much RAM space is available?
Can I add addtional SRAM?
Are Ethernuts available for industrial temperature ranges?
How to replace blown fuses on Ethernut 2?

3. In-System-Programming
What is In-System-Programming anyway?
Why does my application stops working after its code became larger?
Which programming software is the best?
Which programming hardware is the best?
Why does program uploading suddenly stops working?
Why didn't Alastair's instructions solve my problem?
Can I use Atmel's STK500 Kit to burn Ethernuts?
The ATmega 128 supports self programming. Do you provide a boot loader?

4. Ethernut Applications
Are there any sample applications available?
Any application using the analog inputs?
What about MP3 applications?

5. Nut/OS Features
Anyway, I don't like your OS. Any alternatives?

5. Nut/Net Features
Does it support PPP or Slip?
I understood, that Ethernut supports TCP. What else?
Any secure protocol support like SSL?
Does it support routing?
Do the hardware drivers use a polling method or are they interrupt driven?
What is the maximum Ethernet transfer rate?
How were these transfer rates tested?

6. Ethernut Programming
What level of programming knowledge is required to write my own programs for the Ethernut board?
Which compilers are supported?
Can I use C++ with Ethernut?
My program doesn't work after upgrading Nut/OS. What to do?
I need to talk to a high speed interface. Will the OS interfere my I/O process?
I found a bug. Where to report?

7. Licensing
Did I get this right? Can I copy Ethernut for commercial products without paying royality?
If it's free, who is maintaining the code?
I want to use the design in a commercial application and need reliable support. Isn't it too risky to rely on open source without warranty?
Can I use the Ethernut logo and product name for selling my own product?
Can I add my changes to software and hardware?



1. Introduction and General Information

Q: What Is Ethernut?
A: Ethernut is the name of an Open Source Hardware and Software Project for building Embedded Ethernet Devices.The hardware part is a small board, also named Ethernut.

Q: How Do I Get Started?
A: In the first place you need the hardware. The hardware design is free, but typically hardware itself costs money. If you are a professional developer, we'd recommend to buy the Ethernut Starter Kit from one of its distributors. This kit will be a good choice unless you are quite experienced in building boards with fine pitch SMD chips.
A cheap solution for experienced hardware cracks will be to order a PCB, get the parts and heat up your solder iron. Last not least all CAD files are available in the download area for those, who want to make their own PCB.
Ethernut's software is available in the download area. However, the first decision, that has to be made, is to select the development platform you want to use. The commercial ImageCraft Compiler offers an advanced IDE and is the first choice of most professional developers using a Windows PC. The GNU compiler is available for Linux and Windows. For the first start however, you can upload one of the precompiled binaries to the Ethernut, which are included in the software archive.



2. Boards and Parts

Q: Where can I get an Ethernut Board?
A: egnite GmbH in Germany is producing fully assembled and tested boards and selling them worldwide. There are also several international distributors.

Q: Why is Ethernut so expensive?
A: It isn't, it's very cheap!
Seriously, while talking about Open Source Software and specially Open Source Hardware commercial topics are not out of bounds. When production started in 2001, this project was a cash burner. In the meantime the product became a success and egnite creates a noticeable part of its profits from selling Ethernuts.
During the past years several competitive products appeared on the market, some of which are significantly cheaper than the Ethernut.
Some boards are offered at low prices for single quantities, but prices do not significantly drop for larger quantities. Ethernut prices are calculated on real costs and are significantly lower on higher volumes.
Ethernuts are produced in quantities of a few hundreds, while some larger companies produce their products by some thousands. Initial production costs are high, and thus low volume production is much more expensive.
Ethernuts are exclusively produced in Germany for two reasons. First it doesn't make much sense to organize low volume production half around the globe. Second there's not enough time and money left to be spend for traveling. Therefore we are not able to watch environmental issues in countries far away from us. Of course we are aware, that the components we use are produced all over the world.
Anyway, we are trying hard to further reduce the price by optimizing our production or buying larger quantities of components. If you are from a university with a small budget or if you are a private person living in a developing country, contact egnite by email and ask for a special reductions.
Sometimes there are fully tested boards available, which failed to pass our visual inspection. They are technically OK, but got minor marks from production or repair. These boards are available for reduced prices too.

Q: Should I buy the parts and build the Ethernut Board myself?
A: That depends on your experience. Specially the fine pitch SMD parts are not intended for unexperienced people. You should be sure that you can assemble it. Most parts should be available from your local distributor. Bare PCBs and hard to get parts can be ordered from egnite,

Q: Can I make the PCB myself?
A: Probably not the same board in low quantities for a low price. The PCB has 4 layers with solder mask, hot air leveling finish and component print. Each has been electrically tested against the Gerber data. However, it is possible, to create a 2 layer PCB from the schematics, which may be cheaper. If you want to do that or if you need a specific layout or different board dimensions, then you can download the original CAD files from the download area. The layout has been done with Eagle 4.0 from CadSoft. This software had been choosen because it is relatively cheap and easy to use. CadSoft supports Windows and Linux and offers a limited freeware version as well as a low cost, non profit version.

Q: Are there any CAD files for Protel, Orcad, XYZ?
A: Mohammad Reza Khalaj kindly contributed a version for Protel DXP.

Q: Can I replace the ATmega 103 on my old Ethernut by an ATmega 128?
A: Yes, and you can also replace the 3.6864 MHz crystal with 14.7456 MHz.

Q: Why do you use a 14.7456 MHz crystal?
A: Baudrates for the serial ports depend on the CPU crystal. For the 16 MHz ATmega 128, 14.7456 MHz is the optimal crystal frequency to allow most standard baudrates. For the 6 MHz ATmega 103, 3.6864 MHz is the frequency of choice. If you don't need standard baudrates, you can change the crystal to the maximum CPU frequency.

Q: Can I overclock the CPU?
A: We won't do that, but it has been reported, that the 6 MHz ATmega 103 had been successfully driven by a 11 MHz crystal on the Ethernut board. No overclocked ATmega 128 had been reported so far.

Q: Why does reading the analog inputs fail?
A: The silk print at the analog connector of Ethernut 1.3 is mirrored.

Q: Is the Ethernet Controller attached to the CPU address and data bus?
A: Yes, in order to provide maximum performance the Ethernet Controller is connected to the address and data bus.

Q: How much address space is used by the RTL8019AS?
A: The Realtek controller has an on-chip address decoder. On the Ethernut board it occupies addresses 8300 through 831F hex.

Q: Many other 8-bit systems use the CS8900. Why did you select the Realtek chip?
A: In the early design stage we've been told, that the Crystal chip can't handle interrupts reliable in 8-bit mode. So the sample, which had been kindly provided by Crystal never made it on a board. We are not able to confirm the above statement, but we have to learn, that the Realtek has some flaws. For a long time Ethernuts crashed under heavy traffic. Luckily we were able to solve these problems by software.
Back to the CS8900. It is working fine in polled mode, but when running in 8 bit mode, the chip suddenly stops generating interrupts. This could be provoked by ping flooding the controller. Using a hybrid method looks like a reliable solution. That means, that the driver will use interrupts and additionally poll the device in timed intervals. When the chip stops generating interrupts, the next poll will reenable them. Jon Anders Haugum reported, that this worked excellent on another embedded system.
Mike Cornelius contributed a polling CS8900 Ethernut driver, which has been recently added to the distribution.

Q: Is there any 100 Mbps Ethernet Controller supported?
A: Yes, on Ethernut 2 boards you will find a LAN91C111 from SMSC. This device supports 10 and 100 Mbps Ethernet.

Q: Do capacitors C7 and C8 really need an isolation of 1 kV?
A: That depends on the environment where Ethernut is installed. In your office near the PC you may even run the board without these capacitors. But the difference of electrical potentials might become very high with long twisted pair cables in industrial environments. If running in less electrically noisy office areas, 500 volts may provide sufficient isolation.

Q: How much RAM space is available?
A: Ethernut boards with an ATmega 103 CPU provide 32672 bytes of RAM, while boards equipped with an ATmega 128 CPU provide 32512 bytes only. In order to have a simple address decoder, the lower RAM addresses of the external RAM are overlaid by the on-chip RAM and CPU registers. In other words, the lower 4096 bytes of external SRAM on the ATmega 103 board and the lower 4352 bytes on the ATmega 128 board are not used.

Q: Can I add addtional SRAM?
A: Yes, but this requires some hardware changes for the address decoder. A board with 128 kByte SRAM on two pages is on the todo list.

Q: Are Ethernuts available for industrial temperature ranges?
A: Not Ethernut 1.3, because the Realtek Controller doesn't support this. Fortunately a special Ethernut 2 version will be available for extended temperature ranges.

Q: How to replace blown fuses on Ethernut 2?
A: Ethernut 2 provides some extra protection on the DC input. An overvoltage protector shorts the wires as soon as the input reaches 18 Volts. This, or any similar shortcut, will blow the fuse immediately. That's the white part just behind the DC connector. Fortunately the fuse is mounted with a socket, so you can replace it easily. The fuse is manufactured by Littlefuse, it's catalog number is 0453 001. egnite ships the boards with a spare fuse.



3. In-System-Programming

Q: What is In-System-Programming anyway?
A: In the dark ages, when microcontrollers appeared on our planet for the first time, they often used EPROMs for their non-volatile memory. These erasable programmable read only memories got a tiny window, which was used to erase the contents by exposing the chip to an UV lamp. Sure it would have been possible doing it In-System. However, programming these chips required exotic voltages and timings, which were typically not available on the target boards. They are removed from the target board, put into an UV eraser for a few minutes and then put into a special programmer for reloading a new contents.
Today's flash based memories need not to be removed for reprogramming. Many modern microcontrollers, like the ATmega128 used on the Ethernut Board, can even reprogram themselves. The flash memory is divided into an application and a boot loader area, both of which can update each other.
You may now ask yourself, if the Ethernut would be able to reprogram itself over the Ethernet or RS232 interface. Sure, this is supported. More information is given below.

Q: Why does my application stops working after its code became larger than 64k bytes?
A: Some time ago we found out, that almost any programming software provided a version, which failed to program the upper 64k of the ATmega flash. Make sure, you got the latest version of your software.
If you are using ICCAVR, note, that programs larger than 64k bytes require the professional version of the compiler.
AVRGCC automatically puts program memory data before the code, but all program memory data must fit in the lower 64k.

Q: Which programming software is the best?
A: No idea, there are too many.
We prefer uisp with AVR-GCC. This had been working fine with the parallel port dongle, but the Windows version failed with the serial port dongle. Fortunately this problem disappeared in the latest versions.
ICCAVR has a build-in programmer, which worked great with the parallel and the serrial port dongle. Internally the IDE called stk500.exe, which is part of the AVR Studio package. Unfortunately, starting with version 6.29, ImageCraft implemented its own programming software, which failed to work with our serial port dongle. One temporarely solution is to use AVR Studio.

Q: Which programming hardware is the best?
A: Again no idea.
The Ethernut Starter Kit has been initially shipped with a STK200 compatible adapter, which provides the cheapest solution. But it's connected to the PC's parallel port, which sometimes introduces problems.
In 2003 we switched to the STK500 compatible adapter, which is connected to the PC's serial port. Although in the same housing, it can be easily recognized by it's yellow LED.
Atmel's own product, the ATJTAGICE, may look expensive, but is worth the money. Programming over JTAG is much faster than the STK200 conterpart and you get an In-Circuit Emulator for free. :-) Remember, that the ATmega103 doesn't provide a JTAG interface. The original Ethernut design was based on this chip and doesn't provide a JTAG connector. Typically the ATJTAGICE comes with a tiny adapter, which can be used to connect it to the Ethernut. More information is available here.
Ruben Mileca successfully used the ICE50 with Ethernut.

Q: Why does program uploading suddenly stops working?
A: This happened and still happens to many users. It's not a specific Ethernut problem, but related to the ATmega128. Several fuse settings are available to make the CPU stop working.
Never ever fiddle around with fuse settings unless you know what you do. Also make sure, that the programming software and hardware you are using is reliable.
In most cases users misprogram the oscillator option fuses and the CPU clock stops. Without CPU clock the ISP is disabled too. One solution is using the ATJTAGICE to properly set the fuses. If you do not own this device, there's still a way out of this desaster, thanks to Alastair Jeremy. We specially like his idea of always buying two boards :-). Seriously, you can use any kind of clock source, despite Alastair's advice, people reported, that a few kHz are sufficient.
To assist those people who might blow up an ethernut in the future, here is how I fixed it:
1. Make sure you have a second Ethernut which you haven't killed yet (or any other clock source)
2. If you have a signal generator, then I presume that you could use it to make a 5V square wave at a fairly high frequency, so then you don't need to use the Ethernut.
3. Make an Ethernut program that toggles a port pin quite fast. See below for mine.
4. Program this program into the working ethernut
5. Connect GND of both ethernut boards
6. Connect power supply inputs (unregulated) of both boards, make sure that the polarity is the same for both boards, (yes, even though it is on the input side of the recitfication diodes)
7. Connect a port pin (I used one from port D) from the 'working' Ethernut to the XTAL1 pad of the non-working ethernut
8. Connect the programming cable to the 'dead' ethernut.
9. Power up! (This should power up both boards at the same time)
10. Program the fuse bits back to normal. If you can't read the fuse bits or write to them then there must be some other problem. I used PonyProg (the same thing I used to kill it ;).
11. Power off. Remove all interconnections. Now the board should work as per normal. Just remember to avoid destroying those fuse bits!! Essentially the second ethernut is being used to generate a square wave. So a signal generator could be used instead of course. This is why I always buy two units of something that I am going to 'play' with. One to use, and one to pull out when I break the first one :)

Q: Why didn't Alastair's instructions solve my problem?
A: There are many possibilities to kill your Ethernut. One of it is the simple wear out of the flash memory. Many people aren't aware, that flash memory has a limited number of erase/write cycles. The ATmega datasheet guarantees an endurance of 1000 cycles, which surely makes some people panic now.
In reality I wear out one single ATmega103 based board. One university reported the same problem (students, you know what I mean :-)), but we are still waiting for their board being returned. Inofficial voices reported, that, after Atmel switched the production process for the ATmega128, 10,000 cycles should be no problem.
Another possibility is to completely misprogram the fuses, so not even an external clock will help. To do this, you need an ATJTAGICE. It will enable you to disable both serial programming methods, the ISP interface and the JTAG interface. There's still the possibility to use the parallel programming mode, but we do not have any idea how to do this with an Ethernut Board. In such a case we replace the ATmega128. If you feel lost, talk to us and we will try to help you.
Btw., do not mix up parallel programming mode with parallel programming ISP dongle. ISP and JTAG use serial mode programming (see the ATmega128 datasheet). ISP programming adapters for serial mode programming are available for the PC parallel or serial port, nowadays even for USB or Ethernet.

Q: Can I use Atmel's STK500 Kit to burn Ethernuts?
A: We thought yes, but William D. Carroll wrote: "For the STK500 the 10-Pin ISP socket does not work as expected. Your circuit uses pin 3 on the ISP to control the 4053 and select either the ISP socket or the RS232 interface. Pin 3 on the STK500 is a NC pin and therefore carries no signal. To get around this here is what I did using the supplied 2-pin cable in the STk500 Kit connect ISP Pins 1-2,5-6,7-8 and 9-10 to EtherNut ISP Pins 1-2,5-6,7-8 and 9-10 and place a jumper on the ethernut ISP between pins 2-3 this will allow you to program and verify and read the ATMega103."
On newer Ethernuts with version 1.3 you will find a jumper near the ISP interface. You can use a one to one flat cable and close this jumper.

Q: The ATmega 128 supports self programming. Do you provide a boot loader?
A: Yes, a TFTP based bootloader with DHCP support is available in the download area.
Recently another boot loader had been published, which supports the XMODEM protocol over RS232.



4. Ethernut Applications

Q: Are there any sample applications available?
A: Currently only simple examples are included to demonstrate some of the features. Although simple, they include a Webserver with CGI support or a RS-232 server, which can route serial input and output between the on-board UART and a telnet client.

Q: Any application using the analog inputs?
A: Not yet.

Q: What about MP3 applications?
A: A driver for the VS1001K MP3 decoder is included.



5. Nut/OS Features

Q: Does it support PPP or Slip?
A: Nut/OS supports PPP, but not SLIP.

Q: I understood, that Ethernut supports TCP. What else?
A: The following base protocols are supported: ARP, IP, ICMP, UDP and TCP. In addition the higher level protocols DHCP and HTTPD are included.

Q: Any secure protocol support like SSL?
A: No.

Q: Does it support routing?
A: Yes, the TCP stack supports host, net and default routing.

Q: Do the hardware drivers use a polling method or are they interrupt driven?
A: The Ethernet driver for the Realtek and the SMSC chip as well as the UART driver are fully interrupt driven. The Ethernet driver for the Crystal chip uses polling.

Q: What is the maximum Ethernet transfer rate?
A: The 14.7456 MHz ATmega 128 board reaches 256 kByte and the 3.6864 Mhz ATmega 103 about 50 kByte per second.

Q: How were these transfer rates tested?
A: The test uses a simple (telnet like) transfer between an Ethernut Board and a Windows NT PC, connected via an Ethernet switch. 8 Mbytes of data were transfered in one direction first, then the same amount of data was transfered back.

Q: Anyway, I don't like your OS. Any alternatives?
A: At least one company we know of uses the commercial RTOS offered by CMX.
Adam Dunkels ported the Contiki Operating System to the Ethernut hardware.



6. Ethernut Programming

Q: What level of programming knowledge is required to write my own programs for the Ethernut board?
A: Your C experience shouldn't let you stumble over structure types with pointers to pointers. But the provided samples can be used as templates for own developments. Some experience with socket and multithreaded programming will be an advantage. If you want to change or enhance the Nut/OS code, you probably need some low level programming experience including assembler programming.

Q: Which compilers are supported?
A: The current version of Nut/OS requires AVRGCC version 3.2 or ImageCraft ICCAVR 6.28. Later versions may or may not work.

Q: Can I use C++ with Ethernut?
A: We never tried, but it may work using AVRGCC. Files with extension .cc or .cpp will be automatically compiled by the C++ compiler. But note, that libstdc++ is not available and you must add compiler option -fno-exceptions.

Q: My program doesn't work after upgrading Nut/OS. What to do?
A: Check the history page in the Nut API documentation for changes, that may break your application. However, most often the problem is on the compiler side. Go to the installation directory and type make clean followed by make install to rebuild the libraries with your compiler version. Then rebuild your application.

Q: I need to talk to a high speed interface. Will the OS interfere my I/O process?
A: Neither Nut/OS nor the TCP/IP stack depend on any background process. Use NutEnterCritical and NutExitCritical to disable and resp. to re-enable all interrupts. Between these two Statements the CPU is completely your's. About 6 kByte of incoming Ethernet frames can be stored in the Ethernet controller without CPU intervention. Of course, if your application stays for a too long time in the critical section, you may lose incoming Ethernet frames or UART characters.

Q: I found a bug. Where to report?
A: Please fill out the form at Sourceforge.



7. Licensing

Q: Did I get this right? Can I copy Ethernut for commercial products without paying royality?
A: Yes. Schematics and board layout may be used in private or commercial products without paying any fee. Although many parts of the software had been taken from other projects, they can be used without paying royality fee and may be re-distributed in binary form with or without source code. But note, that you are not allowed to remove any copyright notices. You must present the copyright notice also in your documentation. Not doing so is at least unfair.

Q: If it's free, who is maintaining the code?
A: The code is maintained by egnite Software GmbH. The company sells custom applications based on the Ethernut design and believes in the Open Source Movement. But carefully note, that the software is provided without any warranties.

Q: I want to use the design in a commercial application and need reliable support. Isn't it too risky to rely on open source without warranty?
A: This topic can't be discussed here in full detail. Just one thought: Unlike PC software, the lifetime of embedded system software is measured in decades, not years. Our point is, that well written and documented source code in a widely used standard language is the best choice. Opinions differ, however.

Q: Can I use the Ethernut logo and product name for selling my own product?
A: No, Ethernut is a registered trademark. You are welcome to refer to the Ethernut design, but you can't sell it under that name.

Q: Can I add my changes to software and hardware?
A: Yes, you can. And, unlike other licensing schemes, the Ethernut copyright doesn't require to publish your changed sources. However, the Ethernut community would appreciate it very much, if you do.