MegaEthernet – an universal Ethernet driver

Status
Not open for further replies.

Vermes

Advanced Member level 4
Joined
Aug 2, 2011
Messages
1,163
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,316
Activity points
22,318


The main advantage of this construction, what differentiates it from the other ones, is the software. None of the other devices allows to use a simple TCP/IP stack. This solution allows simple and easy writing own listening applications or TCP and UDP clients. The code is fully event-oriented.

Actual functions of the device:
  • support of the Ethernet: ARP, ICMP (sending and receiving), IP, UDP
  • lightweight and fast TCP
  • configuration by USB (a special program on PC in a version for Microsoft and Linux systems)
  • full support for 1-wire, searching for devices on rail
  • automatic assignment of IP address by DHCP
  • time from the network, the NTP client
  • Web-bot client Gadu-Gadu
  • HTTP server that supports up to 4MB of memory and operates on files
  • RTC clock with RAM memory, battery maintenance
  • programming via USB bootloader
  • 12 I/O pins for any use

Electronics
From a technical point of view, the device is based on Atmega32 processor (also Atmega644 can be used – it has more FLASH and RAM memory). ENC28J60 system acts as a network controller.
USB interface is realized by a proven solution – FTDI FTT232RL. It has a possibility to reset the main processor by RTS pin.
FLASH memory 4Mb SPI is used to store the data. It is connected to the same rail as the network card.
There is also RTC MCP7940 clock on the plate with battery maintenance.
A 1-wire rail with 3,3V power supply was derived on RJ connector.
It's worth mentioning, that the whole circuit works on 3,3V tension. The stabilizer is adapted to supply voltage of 5V.
The processor takes a clock signal from the network card. It can be set maximally on 25MHz (at this speed ADC doesn't work properly, the frequency has to be lowered to 12,5MHz for the time of measurement).



Software
The code was written in C. It is compiled by AVR-GCC and it uses AVR-LibC.
TCP is multiconnectional. The maximum number of TCP connections depends on the processor's SRAM size. In the case of Atmega32 it's 10 connections. Atmega644 processor can serve about 40 ones.
In app_template.zip there is an example of the server application. It gives a view of this implementation working.

Programming
MegaEthernet can be programmed by JTAG or USB. AsymptoticBootloader with a little modification is uploaded on a remote device reset by RTS pin. Only a computer with USB is needed to program the device.



Change of the settings by USB
The configuration is done with application on PC. It allows the change of IP addresses, passwords, etc.
In the future versions, there would be a possibility to read files from FLASH and save new ones.



FLASH memory
A simple files system is stored in FLASH memory. WWW server uses it. Application files2flash allows to program the memory by USB.
The program is supported from the console. It's easy to write a script in Bash or Windows to automatic uploading all files from a catalog.



WWW server
It works with all browsers. It allows the user authentication. It operates on FLASH files.
In vars.js file, variables in JavaScript format are generated.



Gadu-Gadu client
MegaEthernet connects via TCP with GG server. It logs on and listens for messages. Own commands can be defined.
Authentication is done by preceding the command with the password.



**broken link removed**

Link to original thread (useful attachment) – MegaEthernet - uniwersalny sterownik Ethernetowy
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…