Sunteți pe pagina 1din 22

Communication

Protocols
www.pantechsolutions.net
Outline Communication
Protocols

RS232/422/485

1-wire, I2C, SPI, Microwire

Bluetooth, Zigbee

RFid

Ethernet
Parallel Bus.. Communication
Protocols

Consists of multiple digital inputs/outputs.


 4-bit
 8-bit ( e.g. Centronics )
 16-bit ( e.g. ISA )
 32-bit ( e.g. PCI )

Advantages Disadvantages

• High speed • Large number of microcontroller


• High throughput: Several bits pins that needed for
are transmitted implementing the parallel bus
• on one clock transition
• Low cost
Parallel Bus Communication
Protocols

Example LCD Interface – 4-bit

Example LCD Interface – 8-bit


Serial Bus Communication
Protocols

Asynchronous Synchronous
• 1-wire • 2-wire(I2C
• RS232 • 4-wire(SPI,
• RS422/485 Microwire)
• Ethernet
1-Wire Communication
Protocols

Originated by Dallas Semiconductor ( now part of MAXIM ) to address a variety of peripherals,


sensors, and memory chips from a single wire interface ( DATA and Ground ).

One signal wire carries both operating power and signal.

Usually the network is built using a wire pair where one wire carries the signal and power and
the other wire is ground. The system is sensitive to the right timing to operate well.
1-wire Communication
Protocols

Advantages

• Multiple slave devices can be accessed with only 2 wires


• Low-cost
• Implemented in hardware or software
• Ease to implement, many examples
• Relatively long distance. Theoretically 300 meters
• but this is limited in practice due to noise and cable capacitance

Disadvantages

• Slow speed
• 1-wire slave devices typically has to come from one source: Dallas
Semiconductor
RS-232 Communication
Protocols

Advantages
• Popular interface with many examples

• Many compatible legacy devices

• Relatively long distance, 50 feet maximum for low baud rates although
longer distances work in practice, with low baud rates and error
correction

• Immune to noise due to +/-5 Volts or higher voltage levels for logic “0”
and “1”
RS-232 Communication
Protocols

Disadvantages

• More suitable for system to system communications, not so much for


chip to chip or chip to sensor

• Low speed for long distance, 115200 baud can be achieved with small
microcontrollers using short distances

• Requires transceiver chips which add to system cost ( TTL/CMOS level


RS232 can be used without transceiver chips ).

• Single master/single slave


UART – ARM7(LPC21xx) Communication
Protocols

UART n
Interface
RxDn

TxD1
UART 3 on CTS
LPC2300/2400 DTR
UART 1 RxD1
has IrDA mode Modem
DCD
Interface Interface
RI
RTS signals
DTR

Maximum possible speed of the UART


3.75 Mbps
RS-232 Communication
Protocols
RS 485 Communication
Protocols

Any station can communicate with any other station,


but not at the same time.

Advantages Disadvantages
• Very long distance, thousands • More suitable for system to
of feet system communications, not so
• Widely used in industrial much for chip to chip or chip to
automation sensor
• Higher speeds beyond 115200
baud • Requires transceiver chips and
twisted pair cable with
terminating resistors which add
to system cost.
Ethernet Communication
Protocols

Advantages
• Very high speed ( 10Mbit to 100Mbit/s )

• Very long distance, hundreds of feet can be achieved, more with hubs and
switches, Immune to noise

• Widely used in industrial automation due to noise immunity

Disadvantages
• Cost
• More suitable for system to system comm.,, not so much for chip to chip/sensor
• Requires Ethernet chipset, transformer, jack, special cabling that add to system
cost.
• Complicated to implement
• High code footprint
Ethernet – 10 Mbit Networking Communication
Protocols
SPI Communication
Protocols

4-wire interface with one master and multiple slaves.


Signals: DATA IN, DATA OUT, CLOCK, CS( Chip Select )
Originated by Motorola, SPI bus is a relatively simple
synchronous serial interface for connecting low speed
external devices using minimal number of wires.
SPI is full duplex: Data is simultaneously transmitted
and received.
SPI Communication
Protocols

Advantages Disadvantages

• Multiple slave devices can • Short distance


be accessed with only few • Data and clock lines can be
wires shared but each device
• Low-cost requires a separate Chip
• Implemented in hardware Select
or software • Signal, limiting the number
• Ease to implement, many of devices in
examples • limited I/O systems
• Can be high speed
(e.g.4MHz or higher if
implemented in hardware)
SPI Communication
Protocols
SPI – ARM7(LPC21xx) Communication
Protocols

MISO

MOSI
SPI
Interface
SPICLK

SS

Maximum possible speed of the SPI


7.5 Mbits/sec
I2C Communication
Protocols

2-wire interface with one master and multiple slaves ( multi-


master configurations possible ).

Originated by Philips Semiconductor in the early 80’s to


connect a microcontroller to peripheral devices in TV sets.
I2C Communication
Protocols

Advantages Disadvantages

• Multiple slave devices can • Short distance


be accessed with only 3 • Slow speed: 100 KHz
wires although 400 KHz and 1
• Low-cost to implement MHz slave devise exist.
• Implemented in hardware These can not coexist
or software with slower devices.
• Ease to implement, many • Limited device addresses
examples
• Supports multi-master
configuration
IIC Interfaces Communication
Protocols

SDA
I2C
Interface1
SCL

Some devices SDA


I2C
have multiple
Interface n
I2C interfaces SCL

Maximum possible speed of the I2C

400Kbits/sec
Communication
Protocols

S-ar putea să vă placă și