mega-eth - Atmel AVR ethernet board
This project is a basis for developing microcontroller applications connected to an ethernet network.
Hardware components already integrated on the reference design include:
- Atmel ATmega128 RISC microcontroller with standard 10-pin ISP header
- 64 kByte of external SRAM
- USB <-> RS232 interface
- SD/MMC socket
- Ethernet interface with ENC28J60 (IEEE 802.3, 10Base-T)
The hardware design is expandable by connecting additional components to the existing pin header. Several digitial I/Os, A/D inputs as well as the standard SPI and I2C (TWI) serial interfaces are available for user-defined purposes.
The curcuit board is designed as a two-layer board of size 100mm x 80mm. Most components use SMD packages.
The mega-eth board running with a memory card and ethernet connected.
The layout of the revision 1.0 circuit board.
The software is written in pure standard ANSI-C. Sure, it might not be the smallest or the fastest one, but I think it is quite flexible.
By providing the software for this project under the GPLv2, great flexibility is achieved. The following modules are already available:
I implemented a simple command prompt which is accessible via the UART at 115200 Baud. With commands similiar to the Unix shell you can setup the network parameters, browse the SD/MMC memory card and more.
Writes a hexdump of
<file> to the terminal.
Changes current working directory to
Prints date and time from the internal clock.
Starts periodically fetching current date and time from the internet.
- In the official firmware my own server is contacted. This is for illustration purposes only. The service is not guaranteed and should not be used more often than every ten minutes!
Aborts clock synchronization.
Shows card manufacturer, status, filesystem capacity and free storage space.
Starts the DHCP client and tries to configure the network interface.
Aborts the DHCP client.
ip_config [<ip_address> [<ip_netmask> [<ip_gateway>]]]
Displays or changes the network interface configuration.
Shows the content of the current directory.
Ensures all buffered data is written to the card.
The software has been written with reusability in mind. Most modules are hardware independent, and hardware abstraction has been used where hardware access is needed. That said, it should be fairly easily adaptible to different hardware configurations.
By changing the
MCU* variables in the Makefile, you can use other Atmel microcontrollers or different clock speeds. Some modules are configurable, the parameters reside in extra files named for example
If you have comments or found a bug in the software - there might be some of them - you may contact me per mail at email@example.com
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation (http://www.gnu.org/copyleft/gpl.html
). At your option, you can alternatively redistribute and/or modify the following files under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation (http://www.gnu.org/copyleft/lgpl.html