embedded ethernet

26
SEMINAR SEMINAR PRESENTATION PRESENTATION ON ON EMBEDDED ETHERNET” EMBEDDED ETHERNET” BY: BY: T.V.G.K T.V.G.K SHASTRI SHASTRI

Upload: vns723er

Post on 26-Mar-2015

198 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: embedded ethernet

SEMINAR SEMINAR PRESENTATIONPRESENTATION

ONON

“ “EMBEDDED ETHERNET” EMBEDDED ETHERNET”

BY:BY: T.V.G.K SHASTRIT.V.G.K SHASTRI

Page 2: embedded ethernet

ETHERNETETHERNET Ethernet is a local area technology, which is

used for reliable and efficient transfer and access of information across the devices connected to the network.

Once a device is attached to the network, it will have the ability to communicate with any other attached device.

This allows the network to expand to accommodate new devices without requiring any modification to those devices already on the network

Page 3: embedded ethernet

EMBEDDED SYSTEMSEMBEDDED SYSTEMS An embedded system is a device that has

computer intelligence and is dedicated to perform a single task, or a group of related tasks.

Embedded systems often perform monitoring and control functions such as gathering and reporting sensor readings or controlling motors and switches.

They’re called embedded systems because the program code is an integral part of, or embedded in, the devices.

Page 4: embedded ethernet

EMBEDDED ETHERNETEMBEDDED ETHERNET Embedded Ethernet is defined as a "single-Embedded Ethernet is defined as a "single-

chip implementation of the Ethernet chip implementation of the Ethernet networking standard." networking standard."

Simply , by putting embedding Ethernet onto Simply , by putting embedding Ethernet onto a device, it has the capability to communicate a device, it has the capability to communicate via Ethernet without using a computer. via Ethernet without using a computer.

We can setup a device with a web server and We can setup a device with a web server and interact with much of its functionality though interact with much of its functionality though a webpage. Instead of needing to physically a webpage. Instead of needing to physically walk by a machine to check its status walk by a machine to check its status signaled by a blinking light or loud buzzard, signaled by a blinking light or loud buzzard, the device itself can communicate its status the device itself can communicate its status directly to us remotely. directly to us remotely.

Page 5: embedded ethernet

WHY EMBEDDED ETHERNETWHY EMBEDDED ETHERNET In case of embedded applications, the lightweight

protocols like SPI, I2C and UART would not add the capability of controlling standalone device from any remote place.

An embedded system can host a Web site, send and receive e-mail, upload and download files, and exchange information of any kind with other computers connected via a network interface.

That is when the need for adding an Ethernet interface to an embedded device is felt…

Page 6: embedded ethernet

EMBEDDED ETHERNET EMBEDDED ETHERNET REQUIREMENTSREQUIREMENTS

EMBEDDED SYSTEM HARDWAREEMBEDDED SYSTEM HARDWARE

A COMPUTER WITH NETWORK A COMPUTER WITH NETWORK CONNECTIVITYCONNECTIVITY

MAC ADDRESS OF EMBEDDED SYSTEM MAC ADDRESS OF EMBEDDED SYSTEM HARDWARE & COMPUTER’S NETWORK HARDWARE & COMPUTER’S NETWORK INTERFACE CARD FOR COMMUNICATION INTERFACE CARD FOR COMMUNICATION WITHIN NETWORKWITHIN NETWORK

TCP/IP OR SOFTWARE PROGRAM FOR TCP/IP OR SOFTWARE PROGRAM FOR COMMUNICATIONCOMMUNICATION

Page 7: embedded ethernet

MICROCHIP’S ENC28J60 I.CMICROCHIP’S ENC28J60 I.C

FEATURES FEATURES Microchip's ENC28J60 Microchip's ENC28J60

is a 28-pin,stand is a 28-pin,stand alone Ethernet alone Ethernet Controller with on Controller with on board MAC, 8 Kbytes board MAC, 8 Kbytes of Buffer RAM and an of Buffer RAM and an SPI serial interface & SPI serial interface & Supports Data Transfer up to 10 Mb/s

Page 8: embedded ethernet

SPECIAL FEATURES OF SPECIAL FEATURES OF EN28CJ60EN28CJ60

A MAC packet consists of a 7 byte A MAC packet consists of a 7 byte preamble, 1 byte start of frame, a 6 byte preamble, 1 byte start of frame, a 6 byte MAC source address, 6 byte MAC MAC source address, 6 byte MAC destination address, 2 byte Type/Length destination address, 2 byte Type/Length packet, 46-1500 data bytes and a 4 byte packet, 46-1500 data bytes and a 4 byte checksum. checksum.

The ENC28J60 will generate the The ENC28J60 will generate the preamble, SOF and CRC checksum, but preamble, SOF and CRC checksum, but the host must generate all the other the host must generate all the other sections and place them in the correct sections and place them in the correct place within the ENC28J60's memory place within the ENC28J60's memory map. map.

Page 9: embedded ethernet

ENC28J60 INTERFACE BOARDENC28J60 INTERFACE BOARD

Page 10: embedded ethernet

CONTINUED…CONTINUED… A driver for the ENC28J60 needs to A driver for the ENC28J60 needs to

be written such that it will contain be written such that it will contain the following accessible functions:the following accessible functions:

1.1. Write a packet on to the Ethernet Write a packet on to the Ethernet h/w.h/w.

1.1. Try to Read a packet from the MAC. Try to Read a packet from the MAC.

Page 11: embedded ethernet

CONTINUED…CONTINUED… In ENC28J60 Network Interface(Link)

Layer is present, that means Physical layer + MAC layer(comes inside Link layer), with this we can achieve physical connection and link detection.

For Application layer protocols like FTP, HTTP etc. TCP/IP stack should be ported to the embedded device.

Page 12: embedded ethernet

EMBEDDED ETHERNET EMBEDDED ETHERNET COMMUNICATION LAYERSCOMMUNICATION LAYERS

Page 13: embedded ethernet

DATA RECEPTIONDATA RECEPTION Data coming from the network through the cable

will be stored in the Ethernet Buffer, this will be done by the firmware written on the ENC28J60. From the Ethernet Buffer

we can read the data through the SPI pins of the ENC28J60 to the MICROCONTROLLER INTERFACE BOARD.

The following are API's used in the Source code:

enc28j60PacketReceive() - to receive packetsenc28j60Write() - to write register valuesenc28j60SetBank() - to set the address bankenc28j60WriteOp() - to do the write operationenc28j60ReadOp() - to read the data from the buffer

Page 14: embedded ethernet

DATA TRANSFERDATA TRANSFER For sending the data packets through the interface,

the data should be written on Ethernet Buffer which is done by using the SPI.

Then that data will be transmitted from the buffer through the network cable to the network, which is done by the firmware written on the ENC28J60 controller.

The following are API's used in the Source code:

enc28j60PacketSend() - to send packets enc28j60Write() - to write register values enc28j60SetBank() - to set the address bank enc28j60WriteOp() - to do the write enc28j60WriteBuffer() - to write into the buffer

Page 15: embedded ethernet

Wire shark Wire shark is a software application which

is used for network troubleshooting, protocol analysis and for communication protocol development.

Wire shark displays all the packets it sends and receives and also shows sender IP address etc details associated with that protocol.

This application can be used to test the Ethernet Interface Board

Page 16: embedded ethernet

CONTINUED…CONTINUED… Whenever a link is up that corresponding

Network or PC will start sending an ARP request first to the board through Ethernet interface

and in reply an ARP and an IP packet is sent from the board and received which is shown in the above figure as the 3rd and 4th packets.

These ARP and IP packets are generated by The Code.

Page 17: embedded ethernet
Page 18: embedded ethernet

INTERNET CONTROL OVER INTERNET CONTROL OVER EMBEDDED ETHERNETEMBEDDED ETHERNET

uIP:AN OPEN-SOURCE SOFTWARE

Data transfer over the network is achieved through the implementation of TCP/IP application layer.

Porting TCP/IP stack on to our board is needed for the data transfer (using protocols like FTP (file transfer protocol), HTTP (Hypertext Transfer protocol). These are all implemented in TCP/IP application layer.

Page 19: embedded ethernet

APPLICATIONSAPPLICATIONS

Page 20: embedded ethernet

REMOTELY REMOTELY CONTROLLED PRINTERCONTROLLED PRINTER

Page 21: embedded ethernet

COFFEE MACHINE OPERATION COFFEE MACHINE OPERATION FROM BROWSER REMOTELYFROM BROWSER REMOTELY

Page 22: embedded ethernet

AUTOMATED PLANT WATERING AUTOMATED PLANT WATERING STYSTEMSTYSTEM

Page 23: embedded ethernet

AVR WI-FIAVR WI-FI

Page 24: embedded ethernet

CONCLUSIONCONCLUSION An embedded system is a device that has computer intelligence An embedded system is a device that has computer intelligence

and is dedicated for performing a single task, or a group of related and is dedicated for performing a single task, or a group of related tasks. Embedded systems often perform monitoring and control tasks. Embedded systems often perform monitoring and control functions such as gathering and reporting sensor readings or functions such as gathering and reporting sensor readings or controlling motors and switches. They’re called embedded controlling motors and switches. They’re called embedded systems because the program code is an integral part of, or systems because the program code is an integral part of, or embedded in, the devices.embedded in, the devices.

Ethernet is the networking technology used in many offices and Ethernet is the networking technology used in many offices and homes to enable computers to communicate and share resources. homes to enable computers to communicate and share resources. Many Ethernet networks also connect to a router that provides Many Ethernet networks also connect to a router that provides access to the Internet. access to the Internet.

But developments in technology and the marketplace now make it But developments in technology and the marketplace now make it possible for embedded systems to communicate in local Ethernet possible for embedded systems to communicate in local Ethernet networks as well as on the Internet.networks as well as on the Internet.

An embedded system can host a Web site, send and receive e-An embedded system can host a Web site, send and receive e-mail, upload and download files, and exchange information of any mail, upload and download files, and exchange information of any kind with other computers connected via a network interface kind with other computers connected via a network interface

Page 25: embedded ethernet

RESOURCESRESOURCES

1. Embedded Ethernet & internet complete (pdf) by Jan Axelson

2. www.mycontrolledhome.eu

3. www.tuxgraphics.org

4.http://www.lantronix.com/resources/networking.html

Page 26: embedded ethernet