COMMUNICATION INTERFACE
4 SEM -18CS44-Microcontrollers & Embedded Systems 5/15/2020
Types:
4 SEM -18CS44-Microcontrollers & Embedded
Systems
5/15/2020
1. Onboard Communication Interfaces
a.I2C Bus
b.SPI Bus
c.UART
d.1-Wire Interface
e.Parallel Interface
2. External Communication Interfaces
a.RS-232 C
b.USB
c.Fire wire
d.IrDA
e.Bluetooth
f.Wi-Fi
g.ZigBee
1.Onboard Communication Interfaces
(Device/Board level Communication Interfaces):
a)InterIntegratedCircuit(I2C)Bus:
Itisasynchronousbi-directionalhalf-duplextwowireserial
interfacebus.
–TheI2Cbuscompriseoftwobuslines:
•SerialClock(SCLline)–responsibleforgeneratingsynchronization
clockpulses
•SerialData(SDAline)–responsiblefortransmitting
–I2CbusisasharedbussystemtowhichmanynumberofI2Cdevicescanbe
connected.DevicesconnectedtotheI2Cbuscanactaseither'Master'or
'Slave’.
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
•The'Master'deviceisresponsibleforcontrollingthecommunication.
•'Slave'deviceswaitforthecommandsfromthemasterandrespond.
•Thesynchronizationclocksignalisgeneratedbythe'Master'deviceonly.
•I2Csupportsmultimastersonthesamebus
•Boththebuslinesshouldbepulledtothesupplyvoltageusingpull-up
resistors.Thetypicalvalueofresistorsusedinpull-upis2.2K.
The sequence of operations for communicating
with an I2C slave device is listed below:
•Themasterdevicepullstheclockline(SCL)to'HIGH'
•Themasterdevicepullsthedataline(SDA)'LOW
•Themasterdevicesendstheaddressofthe‘slave’
•ThemasterdevicesendstheReadorWritebit
•Themasterdevicewaitsfortheacknowledgementbitfromtheslave
device
•Theslavedevicewiththeaddressrequestedbythemasterdevice
respondsbysendinganacknowledgebit(Bitvalue1)overtheSDAline
•Uponreceivingtheacknowledgebit,theMasterdevicestartsthe
communication.
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
b)SerialPeripheralInterface(SPI)Bus:
–TheSerialPeripheralInterfaceBus(SPI)isa
synchronousbi-directionalfullduplexfour-wireserial
interfacebus.
–TheconceptofSPIwasintroducedbyMotorola.
–SPIisasinglemastermulti-slavesystem.
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
SPI requires four signal lines for communication. They are:
•Master Out Slave In (MOSI) –Signal line carrying the data from master to slave
device. It is also known as Slave Input/SIave Data In (SI/SDI)
•Master In Slave Out (MISO) –Signal line carrying the data from slave to master
device. It is also known as Slave Output (SO/SDO)
•Serial Clock (SCLK) –Signal line carrying the clock signals
•Slave Select (SS) –Signal line for slave device select. It is an active low signal
•Masterselectstherequiredslavedevicebyassertingthe
correspondingslaveselectsignal'LOW’.
•TheserialdatatransmissionthroughSPIbusisfullyconfigurable
•SPIdevicescontainacertainsetofregisterswhichareSerial
peripheralcontrolregister&statusregister
•SPIworksontheprincipleof'ShiftRegister’
•Themasterandslavedevicescontainaspecialshiftregisterforthe
datatotransmitorreceive.
•Theshiftregistersof'master'and'slave'devicesformacircular
buffer
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
d)1-Wire Interface:
•1-wire interface is an asynchronous half-duplex communication
protocol developed by Maxim Dallas Semiconductor
•It makes use of only a single signal line (wire) called DQ
•One of the key features of 1-wire bus is that it allows power to be sent
•Every 1-wire device contains a unique 64bit identification number stored
within it.
•The identifier has three parts: an 8 bit family code, a 48 bit serial number
and an 8 bit CRC.
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
The sequence of operation for communicating with a 1-wire slave device is listed
below:
•Themasterdevicesendsa'Reset'pulseonthe1-wirebus.
•Theslavedevice(s)respondwitha'Presence'pulse.
•ThemasterdevicesendsaNetAddressCommandfollowedbythe64-bit
addressofthedevice.
•Themasterdevicesendsaread/writefunctioncommandbit.
•ThemasterinitiatesaReaddata/Writedatafromthedeviceortothedevice
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
e)Parallel Interface:
•Theon-boardparallelinterfaceisusedforcommunicatingwith
peripheraldeviceswhicharememorymappedtothehostofthesystem
•Thecommunicationthroughtheparallelbusiscontrolledbythecontrol
signalinterface
•Onlythehostprocessorhascontroloverthe'Read'and'Write'control
signals.
•Theexternaldeviceisnormallymemorymappedtothehostprocessor
andarangeofaddressisassignedtoit.
•Whentheaddressselectedbytheprocessor,theprocessorthencanread
orwritefromortothedevicebyassertingthecorrespondingcontrolline
(RD\andWR\respectively).
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
COMMUNICATION INTERFACE
2.External Communication Interfaces
(Product level Communication Interfaces):
a)RS-232 C:
RecommendedStandardnumber232,revisionCisafullduplex,wired,
asynchronousserialcommunicationinterface.RS-232supportstwo
differenttypesofconnectors:
•DB-9:9-Pinconnector
•DB-25:25-Pinconnector
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
.
•TheRS-232interfacedefinesvarioushandshakingandcontrolsignalsforcommunication
•ThereareDataTerminalEquipment(DTE)andDataCommunicationEquipment(DCE)inRS
232.
•Ifnodataflowcontrolisrequired,onlyTXDandRXDsignallinesandgroundline(GND)are
requiredfordatatransmissionandreception.
•Ifhardwaredataflowcontrolisrequiredforserialtransmission,variouscontrolsignallines
oftheRS-232connectionareusedappropriately.
•TheRequesttoSend(RTS),ClearToSend(CTS),DataTerminalReady(DTR)andDataSet
Ready(DSR)signalsco-ordinatethecommunicationbetweenDTEandDCE.
•AspertheEIAstandardRS-232Csupportsbaudratesupto20Kbps(Upperlimit19.2Kbps)
•Thecommonlyusedbaudratesbydevicesare300bps,1200bps,2400bps,9600bps,
11.52Kbpsand19.2Kbps.
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
b)Universal Serial Bus (USB):
•Universal Serial Bus (USB) is a wired high-speed serial bus for
data communication.
•The USB communication system follows a star topology with a USB
host at the Centre and one or more USB peripheral devices/USB
hosts connected to it.
5/15/2020
4 SEM -18CS44-Microcontrollers & Embedded
Systems
•USB transmits data in packet format
•The USB communication is a host initiated one.
•The USB host contains a host controller
•The physical connection between a USB peripheral device
and master device is established with a USB cable which
supports communication distance of up to 5 metres
•USB interface has the ability to supply power to the
connecting devices
•It can supply power up to 500 mA at 5 V.
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
USBsupportsfourdifferenttypesofdatatransfers
–Controltransfer:UsedbyUSBsystemsoftware
–Bulktransfer:Usedforsendingablockofdata
–Isochronousdatatransfer:Usedforreal-timedata
communication.
–Interrupttransfer:Usedfortransferringsmallamountof
data
5/15/2020
4 SEM -18CS44-Microcontrollers &
Embedded Systems
c)IEEE 1394 (Fire wire):
–IEEE 1394 is a wired, isochronous high-speed serial communication bus.
–It is also known as High Performance Serial Bus (HPSB). It supports 400-
3200Mbps data rate.
–The interface cable supports 3 types of connectors, namely; 4-pin connector, 6-pin
Connector (alpha connector) and 9 pin connector (beta connector).
–The 6 and 9 pin connectors carry power.
–IEEE 1394 doesn't require a host for communicating between devices.For example,
you can directly connect a scanner with a printer for printing
5/15/2020
4 SEM -18CS44-Microcontrollers & Embedded
Systems
COMMUNICATION INTERFACE
2.External Communication Interfaces
(Product level Communication Interfaces):
d)Infrared (IrDA):
• Infrared(IrDA)isaserial,halfduplex,lineofsight
basedwirelesstechnologyfordatacommunication.
•Infraredcommunicationtechniqueusesinfraredwavesofthe
electromagneticspectrumfortransmittingthedata.
•Itsupportspoint-pointandpoint-to-multipointcommunication
•ThecommunicationrangeforIrDAliesintherange10cmto1
m.
•IRsupportsdataratesrangingfrom9600bits/secondto
16Mbps.
5/15/2020
4 SEM -18CS44-Microcontrollers & Embedded
Systems
Depending on the speed of data transmission IR is
classified into:
Serial IR (SIR) –supports data rates ranging from 9600bps to 115.2kbps.
Medium IR (MIR) –supports data rates of 0.576Mbps and 1.152Mbps.
Fast IR (FIR) –supports data rates up to 4Mbps.
Very Fast IR (VFIR) –supports high data rates up to 16Mbps.
Ultra Fast IR (UFIR) –targeted to support a data rate up to 100Mbps
IrDA communication, Infrared Light Emitting Diode (LED) is the IR
source for transmitter and at the receiving end a photodiode acts as
the receiver.
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
e)Bluetooth(BT):
–Bluetoothisalowcost,lowpower,shortrangewirelesstechnology
fordataandvoicecommunication.
–Bluetoothoperatesat2.4GHzoftheRadioFrequencyspectrumand
usestheFrequencyHoppingSpreadSpectrum(FHSS)techniquefor
communication.
–Itsupportsadatarateofupto1Mbpsandarangeof30feetfordata
communication.
–Bluetoothcommunicationhastwoparts–aphysicallinkpartanda
protocolpart.
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
–EachBluetoothdevicewillhavea48-bitunique
identificationnumber
–Bluetoothsupportspoint-to-pointandpoint-to-multipoint
wirelesscommunication.
–Thepoint-to-pointcommunicationfollowsthemaster-slave
relationship.
–Bluetoothisthefavoritechoiceforshortrangedata
communicationinhandheldembeddeddevices.
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
f)Wi-Fi:
–WirelessFidelityisthepopularwirelesscommunication
techniquefornetworkedcommunicationofdevices.
–Wi-FifollowstheIEEE802.11standard.
–Wi-Fiisintendedfornetworkcommunicationanditsupports
InternetProtocol(IP)basedcommunication.
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
•IPaddressandWi-Firouter/WirelessAccessPointare
requiredforWi-Fibasedcommunication.
•Wi-Firouterisresponsibleforrestrictingaccesstothe
network,assigningIPaddresstothedevices,routingdata
packetstotheintendeddevices.
•Wi-Fienableddeviceswillbehavingwirelessadaptor.
•Wi-Fioperatesat2.4GHzor5GHzofRadiospectrum.
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
g)ZigBee:
•ZigBeeisalowpower,lowcost,wirelessnetworkcommunicationprotocol
basedontheIEEE802.15.4-2006standard.
•ZigBeeoperatesworldwideattheunlicensedbandsofRadiospectrum,mainly
at2.400to2.484GHz,902to928MHzand868.0to868.6MHz
•ZigBeesupportsanoperatingdistanceofupto100metresandadatarateof
20to250Kbps
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems
In the ZigBee terminology, each ZigBee device falls under any one
of the following ZigBee device category:
–ZigBee Coordinator (ZC)/Network Coordinator
•The ZigBee coordinator acts as the root of the ZigBee network.
–ZigBee Router (ZR)/Full function Device (FFD)
•Responsible for passing information from device to another device
or to another ZR.
–ZigBee End Device (ZED)/Reduced Function Device (RFD)
•End device containing ZigBee functionality for data
communication.
•It can talk only with a ZR or ZC and doesn't have the capability to
act as a mediator for transferring data from one device to another.
5/15/20204 SEM -18CS44-Microcontrollers & Embedded Systems