Difference between revisions of "Ethernet Module"
m |
|||
Line 68: | Line 68: | ||
===Software Implementation=== | ===Software Implementation=== | ||
− | ===Driver=== | + | ====Driver==== |
*Download [http://chungyan5.no-ip.org/vc/trunk/demo_posix/dspic/drivers/?root=freertos_posix dm9000a.c] | *Download [http://chungyan5.no-ip.org/vc/trunk/demo_posix/dspic/drivers/?root=freertos_posix dm9000a.c] | ||
*Download [http://chungyan5.no-ip.org/vc/trunk/demo_posix/dspic/drivers/include/?root=freertos_posix dm9000a.h] | *Download [http://chungyan5.no-ip.org/vc/trunk/demo_posix/dspic/drivers/include/?root=freertos_posix dm9000a.h] | ||
Line 79: | Line 79: | ||
**'''void dmfe_interrupt(void)''': process the transmit interrupt from DM9000A | **'''void dmfe_interrupt(void)''': process the transmit interrupt from DM9000A | ||
− | ===[[uIP]]=== | + | ====[[uIP]]==== |
*Light-weight TCP/IP stack designed for 8-bit/16-bit embedded systems | *Light-weight TCP/IP stack designed for 8-bit/16-bit embedded systems | ||
− | ===[[lwIP]]=== | + | ====[[lwIP]]==== |
*Light-weight TCP/IP stack designed for 8-bit/16-bit embedded systems | *Light-weight TCP/IP stack designed for 8-bit/16-bit embedded systems | ||
*consume more resource than uIP | *consume more resource than uIP |
Revision as of 23:54, 16 February 2009
Contents
Objectives
The Internet provides an indispensable means to exchange information over long distances. Connection to the Internet is enabled by following the implementation of the Open Systems Interconnection Reference Model (OSI model). In simple words, internet applications require a TCP/IP stack to pack and unpack information into data packets for proper transmission and reception over the Internet. The TCP/IP stack is usually implemented by software and included in the Operating System. Applications can use the stack transparently through socket programming.
Since a full-scale TCP/IP stack consumes a large amount of memory and processing power, a number of small footprint TCP/IP stacks have been devised for embedded systems, such as uIP and lwIP. Nevertheless, these TCP/IP stacks are usually not compatible to socket programming, and being implemented by software, still consumes a considerable amount of system resources. Therefore, hardware chips that implemented the TCP/IP stack (e.g. WIZNET W5300) emerged in recent years so as to offload the computation power from the host microcontroller unit (MCU).
This project aims to devise a driver and Linux socket wrapper inside freertos_posix for a hardware implemented TCP/IP stack. It is to be used in conjunction with a 8/16 bits embedded system such as (but not restricted to) the dsPic33F development board. Based on the Linux socket API, common application protocols (DHCP/HTTP/DNS/SMTP/SNMP/TELNET) are devised to enable remote control and monitoring.
Benefits
- provide a means to perform remote control and monitoring via Internet
- offload TCP/IP stack to chip, freeing memory and processing power of MCU to perform other tasks (e.g. HTTPS)
- socket API implementation allows more extensible framework for future development and upgrades
- enable remote control and monitoring via
- web browser on desktop computer (better web page design and implementation)
- SNMP agents, controlling and monitoring several instruments simultaneously
- TELNET applications for command prompt control and monitoring
- SMTP by sending out email when critical events occur
Limitations
- higher cost chips compare to software stack
- need to change hardware if features in stack are updated
Architecture
- See here for block diagram
Development Roadmap
- Contains directions for development
Connection Schemes
Software TCP/IP Stack Solution
Circuit and PCB
- In gEDA format and its gEDA sym and footprints
Special Item | Description | Quantity |
---|---|---|
DM9000AEP | Ethernet Controller from Davicom | 1 |
HR911102A | RJ45 Connector with Integrated Magnetics for 10/100 Base-TX | 1 |
93LC46B-I/SN | 1K Serial EEPROM | 1 (Optional) |
25MHz Crystal | Crystal | 1 |
22pF | For Crystal Use | 2 |
220uF | For RXVDD25/TXVDD25 | 1 |
49.9ohm | For RX+/RX-/TX+/TX- | 4 |
6.8kohm | For BGRES/BGGND | 1 |
510ohm | For LEDs | 2 |
- DM9000A Description
- DM9000A Datasheet
- Application Circuit
- Layout Guidelines
- Application Note
- DM9000A Official Drivers
Software Implementation
Driver
- Download dm9000a.c
- Download dm9000a.h
- Base on FreeRTOS and dsPIC33 platform
- Using POSIX-like API:
- int dmfe_open(int flags): initialize the Ethernet controller for 10MHz Half-Duplex
- int dmfe_close(): turn off the PHY layer
- int dmfe_read(void): copy a packet to the default buffer
- int dmfe_write(unsigned char device, unsigned char *buf, int count): copy count bytes of the data from buf and transmit
- void dmfe_interrupt(void): process the transmit interrupt from DM9000A
uIP
- Light-weight TCP/IP stack designed for 8-bit/16-bit embedded systems
lwIP
- Light-weight TCP/IP stack designed for 8-bit/16-bit embedded systems
- consume more resource than uIP