Vous êtes sur la page 1sur 16

Unit 5 : Network Protocols

Electronics and Communication Engineering Geethanjali College of Engineering and Technology


Cheeryal (V), Keesara (M), RR Dt. AP 501301 Email: gcetcse@gmail.com

Prepared by : Prof. K S Rao, E C E Dept

Topics:

Serial communication protocols Ethernet protocol SDMA channel IDMA and External Bus Interface

Prepared by : Prof. K S Rao

Topics:
Reference:

1. Text book Embedded Systems By Raj Kamal Chapter 3 Section 10 - for Serial communication protocols
Section 12.5 for Ethernet protocol 2. MPC 8260 power Quicc user manual & other internet sources for SDMA, IDMA and external bus interface

Prepared by : Prof. K S Rao

Serial communication protocols


Serial communication protocols
I2C bus Inter IC connect bus is a two lines synchronous serial bus for connecting various circuits in a plant or a process. The standards are Industrial 100 kbps I2C, 100 kbps SM I2C, and 400 kbps I2C. This was originally developed by Philips Semiconductors. The two lines are clock (SCL) and bidirectional data (SDA).

I2C Protocol:

A Start bit, slave address field of 7 bits, 1 control bit indicating read or write, 1 control bit indicating the present data is an acknowledgement or original data, 8 bit data, 1 bit as NACK ( Negative acknowledgement) whether the acknowledgement is not needed or needed from the slave, 1 bit as stop bit.

Prepared by : Prof. K S Rao

Serial communication protocols

I2C bus protocol


Prepared by : Prof. K S Rao

Serial communication protocols


Serial communication protocols
CAN bus Controller area network bus originally developed for automobile use, for connecting distributed embedded controller in a car like brakes, engine, electric power, lamps, inside temperature control, air-conditioning, etc. A single twisted pair cable is used for communication for a max. length of 40 mtrs. at a max speed of 1 Mbps. In idle condition, the line is pulled to 1 (recessive state). Each node sends data as a frame. A frame starts always with 1 and ends with 7 zeros. The frame format is First field : Arbitration field : 12 bits : 11 bits -> destination address, 1 bit :RTR -> if 1, indicates the data is for destination and if 0, the data is requested from the destination. Second field : 6 bits : it is control field. 1st bit is identifier extension, 2nd bit is always 1, 4 bits are code for data length. Third field: 0 to 64 bits data. Fourth field : CRC 15 bits CRC code & 1 bit delimiter. Fifth field : 2 bits : 1st bit : Transmitter sends as 1, and the receiver sends 0 if it receives error. 2nd bit is the ACK limiter bit. Sixth field : end of frame always 7 zeros. Prepared by : Prof. K S Rao

Serial communication protocols


CAN BUS Block diagram

CAN Bus Protocol

Prepared by : Prof. K S Rao

Serial communication protocols


Serial communication protocols
USB bus Universal Serial Bus is a bus between a host system and a number of interconnected peripheral devices. A max. of 127 devices can be connected to the host. Speed upto 12 Mbps. Devices are pen drives, cameras, printer, mice, video games etc. USB device can be hot plugged, configured, used and detached. USB device can be self powered or bus powered. USB uses four wires, one for 5V, one for GND, and two for data transmission and reception. Max. length : 5 Mtrs. Serial signals are NRZI and clock is encoded by inserting a synchronous code field before each data packet. The data transfer is of 4 types Controllder data transfer, bulk data transfer, interrupt driven data transfer, iso-synchronous transfer.

Prepared by : Prof. K S Rao

Serial communication protocols


Serial communication protocols
Firewire bus (IEEE 1394) Digital Video cameras, digital camcorders, digital video disk, set-top boxes, music systems, multimedia peripherals, etc. interfaces with PC using Firewire Speed is 800 Mbps. These are isosynchronous data transfers. A single device can interface upto 63 devices. It supports plug and play, hot plugging, self powered or bus powered. The connector is 6 pin, two pins are used for power, 2 pins are used as TPA (Receive data) and 2 pins are used as TPB ( Transmit data) Advanced Serial High Speed buses Many other high speed buses are recently available for connecting ESs. Examples are Wireless LAN, Gigabit Ethernet, SONET, etc.

Prepared by : Prof. K S Rao

Serial communication protocols


Comparison of various serial communication protocols;
Name: Expansion: Usage No. of wires I2C Bus Inter IC Bus Among different ICs 2 ( One for clk, & one for data) CAN Bus Control Area network bus In automobile units 2 ( twisted pair for data) 1 Mbps 40 Mtrs 2047 USB Firewire Universal serial IEEE1394 bus bus many serial devices Multimedia Application 4 ( two for data 6 ( two for & two for power) Power, 2 for Tx 2 for Rx.) 12Mbps 800 Mbps 5 Mtrs 127 63 varies

Speed 400 Kbps Max. Length: Max. No. of devices 127 connected Protocol length 1+7+1+1+8+1+1

1+12+6+x+16+1+7 varies

Prepared by : Prof. K S Rao

10

Ethernet Protocol
Ethernet LAN is very popular now a days. About of 1/3 of the LANs in the world are Ethernet LANs. Ethernet LAN standard is IEEE 802.3. It is a protocol for local network of computers, workstations and devices. LAN is used for sharing the local computers with printers, hard disk space, software and data. PROTOCOL DETAILS: Data is fragmented (made as packets) as Frames. The frame has a header. The header has 8 bytes which defines preamble and is used to start of the frame for synchronization. This is 10101010 byte 7 times and 10101011 as 1 byte and is used as frame delimiter. 6 Bytes of destination address. 6 bytes of source address 6 Bytes of type field ( tag 4 bytes and length 2 bytes) for virtual LAN applications. 72 bytes to 1500 bytes of data (Payload). 4 bytes of the CRC check. There is an inter-frame gap of 12 bytes. which is 9.6 s for 10 Mbit/s Ethernet, 960 ns for 100 Mbit/s (fast) Ethernet, 96 ns for 1 Gbit/s (gigabit) Ethernet, and 9.6 ns for 10 Gbit/s (10 gigabit) Ethernet. This is the idle period between Prepared by : Prof. K S Rao transmission of frames.

11

Ethernet Protocol
For more details, pl see the Ethernet.ppt

Prepared by : Prof. K S Rao

12

SDMA channel
SDMA means serial DMA. These are used to transfer data to and from the serial ports in SIU like I2C, SCC ( generally in an CPM) and memory. SDMA channel has access to the system bus and the local bus. The internal memory is connected to the local bus and the external memory is connected to the system bus. A typical block diagram is enclosed. The flow diagram of SDMA is also enclosed.
For transfer of data, the SDMA should first acquire the bus. While transferring of data to local memory, the system activities will not get affected and other operations on the external bus can continue. The typical time from a single access to internal RAM from the CPM using local bus requires 4 bus cycles. Registers: SDMA status register : SDSR gives the status and errors of the SDMA transfer. SDMA bus arbitration and bus transfers: SDMA on bus request, will become external bus master, after arbitration with other other internal devices. Once an SDMA channel becomes system bus master, it remains bus master for one transaction ( which can be a byte, half-word, word, burst or extended specail burst) before it releases the bus.

Prepared by : Prof. K S Rao

13

SDMA channel

Prepared by : Prof. K S Rao

14

SDMA channel

Prepared by : Prof. K S Rao

15

IDMA and External bus interface


IDMA means Independent DMA. For further details, pl see the IDMA.ppt

Prepared by : Prof. K S Rao

16