SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
Communication Hardware &
Protocols
Prof. Anish Goel
Embedded Systems
Communications
Embedded Systems Prof.Anish Goel2
Serial Communications
Embedded Systems Prof.Anish Goel3
Asynchronous Serial (RS‐232)
Embedded Systems Prof.Anish Goel4
RS232 Voltage levels
Embedded Systems Prof.Anish Goel5
RS232 – Handshaking
Embedded Systems Prof.Anish Goel6
Serial Peripheral Interface
Embedded Systems Prof.Anish Goel7
SPI and the clock
Embedded Systems Prof.Anish Goel8
SPI and the clock
Embedded Systems Prof.Anish Goel9
I2C
Embedded Systems Prof.Anish Goel10
I2C Write a Single Byte
Embedded Systems Prof.Anish Goel11
Other Features
Embedded Systems Prof.Anish Goel12
RS-485
Embedded Systems Prof.Anish Goel13
RS232 is an interface to connect one DTE, data terminal equipment to one DCE, data
communication equipment at a maximum speed of 20 kbps with a maximum cable
length of 50 feet.
This was sufficient in the old days where almost all computer equipment were
connected using modems, but soon after people started to look for interfaces capable
of one or more of the following:
•Connect DTE's directly without the need of modems
•Connect several DTE's in a network structure
•Ability to communicate over longer distances
•Ability to communicate at faster communication rates
RS485 is the most versatile communication standard in the standard series defined by the
EIA, as it performs well on all four points.That is why RS485 is currently a widely used
communication interface in data acquisition and control applications where multiple
nodes communicate with each other.
Differential signals with RS485:
Longer distances and higher bit rates
Embedded Systems Prof.Anish Goel14
•Main problems with RS232 is the lack of immunity for noise on the signal lines.
•The transmitter and receiver compare the voltages of the data- and handshake lines
with one common zero line.
•Shifts in the ground level can have disastrous effects.
•Therefore the trigger level of the RS232 interface is set relatively high at ±3Volt.
•Noise is easily picked up and limits both the maximum distance and communication
speed.
•With RS485 on the contrary there is no such thing as a common zero as a signal
reference.
•Several volts difference in the ground level of the RS485 transmitter and receiver
does not cause any problems.
•The RS485 signals are floating and each signal is transmitted over a Sig+ line and a Sig-
line.
•The RS485 receiver compares the voltage difference between both lines, instead of
the absolute voltage level on a signal line.
•This works well and prevents the existence of ground loops, a common source of
communication problems.
•The best results are achieved if the Sig+ and Sig- lines are twisted.
Noise in straight and twisted pair cables
Embedded Systems Prof.Anish Goel15
•Noise is generated by magnetic fields from the
environment.
•The picture shows the magnetic field lines and
the noise current in the RS485 data lines that is
the result of that magnetic field.
•In the straight cable, all noise current is flowing in
the same direction, practically generating a looping
current just like in an ordinary transformer.
•When the cable is twisted, we see that in some
parts of the signal lines the direction of the noise
current is the opposite from the current in other
parts of the cable.
•Because of this, the resulting noise current is
many factors lower than with an ordinary straight
cable. Shielding—which is a common method to
prevent noise in RS232 lines—tries to keep hostile
magnetic fields away from the signal lines.
Embedded Systems Prof.Anish Goel16
RS 485 Advantages
•Twisted pairs in RS485 communication however adds immunity which is a much
better way to fight noise.
•The magnetic fields are allowed to pass, but do no harm.
•If high noise immunity is needed, often a combination of twisting and shielding is
used as for example in STP, shielded twisted pair and FTP, foiled twisted pair
networking cables.
•Differential signals and twisting allows RS485 to communicate over much longer
communication distances than achievable with RS232. With RS485 communication
distances of 1200 m are possible.
•Differential signal lines also allow higher bit rates than possible with non-differential
connections. Therefore RS485 can overcome the practical communication speed limit
of RS232. Currently RS485 drivers are produced that can achieve a bit rate of
35 mbps.
Embedded Systems Prof.Anish Goel17
Characteristics of RS232, RS422, RS423
and RS485
Embedded Systems Prof.Anish Goel18
CAN
A Controller Area Network (CAN) bus is a high-integrity serial bus system for
networking intelligent devices. CAN busses and devices are common components
in automotive and industrial systems.
Automotive Applications
Embedded Systems Prof.Anish Goel19
Benefits of CAN
• Lower cost from reduced wiring compared to two wire, point-to-point
wiring
• Highly robust protocol
– Built-in determinism
– Fault tolerance
– Reliable—More than a decade of use in the automotive industry
CAN Specifications
• CAN data (up to 8 bytes in a frame)
• Maximum 1 Mbaud/s
• 40 Meters at 1 Mbaud/s
• 6 km at 10 kbaud/s
•Theoretical maximum of 2,032 nodes per bus
– Practical limit is approximately 100 nodes due to transceiver
– Most buses use 3–10 nodes
• Data fields—Arbitration ID (11 bit or 29 bit)
– Indicates message priority
Embedded Systems Prof.Anish Goel20
CAN Frame
•CAN devices send data across the CAN Network on packets called frames.
•A typical CAN frame contains an arbitration ID, a data field, a remote frame, an
error frame, and an overload frame.
Embedded Systems Prof.Anish Goel21
CAN Arbitration
The arbitration ID determines the priority of the messages on the bus. If
multiple nodes try to transmit a message onto the CAN bus at the same time,
the node with the highest priority (lowest arbitration ID) automatically gets
bus access. Nodes with a lower priority must wait until the bus becomes
available before trying to transmit again.The waiting devices wait until the
end of the frame section is detected.
Embedded Systems Prof.Anish Goel22
Data Field
•The data field contains the actual data being transmitted.
•The CAN protocol supports two data field formats as defined in the Bosch Version
2.0 specifications, the essential difference being in the length of the arbitration
•ID.
•In the standard frame format (also known as 2.0A), the length of the ID is 11 bits.
•In the extended frame format (also known as 2.0B), the length of the ID is 29 bits.
Embedded Systems Prof.Anish Goel23
Introduction to USB
General Introduction
The Universal Serial Bus (USB) is a specification
developed by Compaq, Intel, Microsoft and NEC,
joined later by Hewlett-Packard, Lucent and Philips.
These companies formed the USB Implementers
Forum, Inc as a non-profit corporation to publish the
specifications and organise further development in
USB.
The aim of the USB-IF was to find a solution to the
mixture of connection methods to the PC, in use
at the time. We had serial ports, parallel ports,
keyboard and mouse connections, joystick ports,
midi ports and so on. And none of these satisfied
the basic requirements of plug-and-play.
Additionally many of these ports made use of a
limited pool of PC resources, such as Hardware
Interrupts,and DMA channels.
Embedded Systems Prof.Anish Goel24
Data Speeds
The USB specification defines three data
speeds, shown to the right. These speeds are
the fundamental clocking rates of the system,
and as such do not represent possible
throughput, which will always be lower as the
result of the protocol overheads.
Low Speed
This was intended for cheap, low data rate devices like mice. The low speed
captive cable is thinner and more flexible than that required for full and high
speed.
Full Speed
This was originally specified for all other devices.
High Speed
The high speed additions to the specification were introduced in USB 2.0 as a
response to the higher speed of Firewire.
Embedded Systems Prof.Anish Goel25
Architecture
The USB is based on a so-called 'tiered star topology' in which there is a single host
controller and up to 127 'slave' devices.
The host controller is connected to a hub, integrated within the PC, which allows a
number of attachment points (often loosely referred to as ports).
A further hub may be plugged into each of these attachment points, and so on.
However there are limitations on this expansion.
As stated above a maximum of 127 devices (including hubs) may be connected.
This is because the address field in a packet is 7 bits long, and the address 0 cannot be
used as it has special significance. (In most systems the bus would be running out of
bandwidth, or other resources, long before the 127 devices was reached.)
A device can be plugged into a hub, and that hub can be plugged into another hub and
so on. However the maximum number of tiers permitted is six.
The length of any cable is limited to 5 metres.This limitation is expressed in the
specification in terms of cable delays etc, but 5 metres can be taken as the practical
consequence of the specification.
Embedded Systems Prof.Anish Goel26
USB
This means that a device cannot be further
than 30 metres from the PC, and even to
achieve that will involve 5 external hubs, of
which at least 2 will need to be self-powered.
So the USB is intended as a bus for devices
near to the PC. For applications requiring
distance from the PC, another form of
connection is needed, such as Ethernet.
Embedded Systems Prof.Anish Goel27
Host is Master
•All communications on this bus are initiated by the host.
•This means, for example, that there can be no communication directly between USB
devices.
•A device cannot initiate a transfer, but must wait to be asked to transfer data by the host.
The only exception to this is when a device has been put into 'suspend' (a low power
state) by the host then the device can signal a 'remote wakeup'.

Más contenido relacionado

La actualidad más candente

LPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLERLPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLERsravannunna24
 
ARM7-ARCHITECTURE
ARM7-ARCHITECTURE ARM7-ARCHITECTURE
ARM7-ARCHITECTURE Dr.YNM
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Core of Embedded Systems
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I   Core of Embedded SystemsSYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I   Core of Embedded Systems
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Core of Embedded SystemsArti Parab Academics
 
Ppt on six month training on embedded system & IOT
Ppt on six month training on embedded system & IOTPpt on six month training on embedded system & IOT
Ppt on six month training on embedded system & IOTpreetigill309
 
SOC Processors Used in SOC
SOC Processors Used in SOCSOC Processors Used in SOC
SOC Processors Used in SOCA B Shinde
 
Introduction to embedded systems
Introduction  to embedded systemsIntroduction  to embedded systems
Introduction to embedded systemsRAMPRAKASHT1
 
ARM 32-bit Microcontroller Cortex-M3 introduction
ARM 32-bit Microcontroller Cortex-M3 introductionARM 32-bit Microcontroller Cortex-M3 introduction
ARM 32-bit Microcontroller Cortex-M3 introductionanand hd
 
Embedded firmware
Embedded firmwareEmbedded firmware
Embedded firmwareJoel P
 
Controller area network (CAN bus) ppt
Controller area network (CAN bus) pptController area network (CAN bus) ppt
Controller area network (CAN bus) pptRaziuddin Khazi
 
USB Universal Serial Bus
USB Universal Serial BusUSB Universal Serial Bus
USB Universal Serial BusVarun Kambrath
 

La actualidad más candente (20)

LPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLERLPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLER
 
UART
UARTUART
UART
 
ARM Processors
ARM ProcessorsARM Processors
ARM Processors
 
ARM7-ARCHITECTURE
ARM7-ARCHITECTURE ARM7-ARCHITECTURE
ARM7-ARCHITECTURE
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Core of Embedded Systems
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I   Core of Embedded SystemsSYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I   Core of Embedded Systems
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT I Core of Embedded Systems
 
Communication Protocols (UART, SPI,I2C)
Communication Protocols (UART, SPI,I2C)Communication Protocols (UART, SPI,I2C)
Communication Protocols (UART, SPI,I2C)
 
ARM CORTEX M3 PPT
ARM CORTEX M3 PPTARM CORTEX M3 PPT
ARM CORTEX M3 PPT
 
Ppt on six month training on embedded system & IOT
Ppt on six month training on embedded system & IOTPpt on six month training on embedded system & IOT
Ppt on six month training on embedded system & IOT
 
SOC Processors Used in SOC
SOC Processors Used in SOCSOC Processors Used in SOC
SOC Processors Used in SOC
 
OMAP
OMAPOMAP
OMAP
 
Pcie basic
Pcie basicPcie basic
Pcie basic
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
Usb protocol
Usb protocol Usb protocol
Usb protocol
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Introduction to embedded systems
Introduction  to embedded systemsIntroduction  to embedded systems
Introduction to embedded systems
 
ARM 32-bit Microcontroller Cortex-M3 introduction
ARM 32-bit Microcontroller Cortex-M3 introductionARM 32-bit Microcontroller Cortex-M3 introduction
ARM 32-bit Microcontroller Cortex-M3 introduction
 
Embedded firmware
Embedded firmwareEmbedded firmware
Embedded firmware
 
Controller area network (CAN bus) ppt
Controller area network (CAN bus) pptController area network (CAN bus) ppt
Controller area network (CAN bus) ppt
 
USB Universal Serial Bus
USB Universal Serial BusUSB Universal Serial Bus
USB Universal Serial Bus
 
Zigbee Presentation
Zigbee PresentationZigbee Presentation
Zigbee Presentation
 

Destacado

Serial Communication
Serial CommunicationSerial Communication
Serial CommunicationRashmi
 
8086 MICROPROCESSOR
8086 MICROPROCESSOR8086 MICROPROCESSOR
8086 MICROPROCESSORAlxus Shuvo
 
Flag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setFlag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setaviban
 
Operand and Opcode | Computer Science
Operand and Opcode | Computer ScienceOperand and Opcode | Computer Science
Operand and Opcode | Computer ScienceTransweb Global Inc
 
Flags registor of 8086 processor
Flags registor of 8086 processorFlags registor of 8086 processor
Flags registor of 8086 processorFazle Akash
 
Controller Area Network (Basic Level Presentation)
Controller Area Network (Basic Level Presentation)Controller Area Network (Basic Level Presentation)
Controller Area Network (Basic Level Presentation)Vikas Kumar
 
CAN (Controller Area Network) Bus Protocol
CAN (Controller Area Network) Bus ProtocolCAN (Controller Area Network) Bus Protocol
CAN (Controller Area Network) Bus ProtocolAbhinaw Tiwari
 
DC GENERATOR CHARACTERISTICS
DC GENERATOR CHARACTERISTICSDC GENERATOR CHARACTERISTICS
DC GENERATOR CHARACTERISTICSRitabrata Roy
 
Automotive lighting - Led road lighting
Automotive lighting - Led road lightingAutomotive lighting - Led road lighting
Automotive lighting - Led road lightingCaner Göksel Sonuzun
 
PLC, DCS and PLC vs DCS Presentation by Jitender Singh Shekhawat
PLC, DCS and PLC vs DCS Presentation by Jitender Singh ShekhawatPLC, DCS and PLC vs DCS Presentation by Jitender Singh Shekhawat
PLC, DCS and PLC vs DCS Presentation by Jitender Singh ShekhawatJitender Singh Shekhawat
 
Tower crane Basics
Tower crane BasicsTower crane Basics
Tower crane Basicsrama24x7
 
Ppt local tracking and gps
Ppt local tracking and gpsPpt local tracking and gps
Ppt local tracking and gpsmassab
 
Electro magnetic interference and compatibility(ECM,ECI)
Electro magnetic interference and compatibility(ECM,ECI)Electro magnetic interference and compatibility(ECM,ECI)
Electro magnetic interference and compatibility(ECM,ECI)Palani murugan
 
Emi emc-pdf
Emi emc-pdfEmi emc-pdf
Emi emc-pdfnagastra
 
cc tn aed aetc am&e p&p 2 tractors, farm equipments., ...
cc tn aed aetc am&e p&p 2 tractors, farm equipments., ...cc tn aed aetc am&e p&p 2 tractors, farm equipments., ...
cc tn aed aetc am&e p&p 2 tractors, farm equipments., ...Chidambaram Coomarasamy
 

Destacado (20)

Serial Communication
Serial CommunicationSerial Communication
Serial Communication
 
8086 MICROPROCESSOR
8086 MICROPROCESSOR8086 MICROPROCESSOR
8086 MICROPROCESSOR
 
Flag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction setFlag registers, addressing modes, instruction set
Flag registers, addressing modes, instruction set
 
Operand and Opcode | Computer Science
Operand and Opcode | Computer ScienceOperand and Opcode | Computer Science
Operand and Opcode | Computer Science
 
Flags registor of 8086 processor
Flags registor of 8086 processorFlags registor of 8086 processor
Flags registor of 8086 processor
 
Serial data transfer
Serial data transferSerial data transfer
Serial data transfer
 
Embedded Systems in Automotive
Embedded Systems in Automotive Embedded Systems in Automotive
Embedded Systems in Automotive
 
Controller Area Network (Basic Level Presentation)
Controller Area Network (Basic Level Presentation)Controller Area Network (Basic Level Presentation)
Controller Area Network (Basic Level Presentation)
 
CAN (Controller Area Network) Bus Protocol
CAN (Controller Area Network) Bus ProtocolCAN (Controller Area Network) Bus Protocol
CAN (Controller Area Network) Bus Protocol
 
DC GENERATOR CHARACTERISTICS
DC GENERATOR CHARACTERISTICSDC GENERATOR CHARACTERISTICS
DC GENERATOR CHARACTERISTICS
 
Automotive lighting - Led road lighting
Automotive lighting - Led road lightingAutomotive lighting - Led road lighting
Automotive lighting - Led road lighting
 
PLC, DCS and PLC vs DCS Presentation by Jitender Singh Shekhawat
PLC, DCS and PLC vs DCS Presentation by Jitender Singh ShekhawatPLC, DCS and PLC vs DCS Presentation by Jitender Singh Shekhawat
PLC, DCS and PLC vs DCS Presentation by Jitender Singh Shekhawat
 
Tower crane Basics
Tower crane BasicsTower crane Basics
Tower crane Basics
 
Ppt local tracking and gps
Ppt local tracking and gpsPpt local tracking and gps
Ppt local tracking and gps
 
Plc & scada report 6
Plc & scada report 6Plc & scada report 6
Plc & scada report 6
 
Electro magnetic interference and compatibility(ECM,ECI)
Electro magnetic interference and compatibility(ECM,ECI)Electro magnetic interference and compatibility(ECM,ECI)
Electro magnetic interference and compatibility(ECM,ECI)
 
Cranes ppt
Cranes pptCranes ppt
Cranes ppt
 
DC GENERATOR
DC GENERATORDC GENERATOR
DC GENERATOR
 
Emi emc-pdf
Emi emc-pdfEmi emc-pdf
Emi emc-pdf
 
cc tn aed aetc am&e p&p 2 tractors, farm equipments., ...
cc tn aed aetc am&e p&p 2 tractors, farm equipments., ...cc tn aed aetc am&e p&p 2 tractors, farm equipments., ...
cc tn aed aetc am&e p&p 2 tractors, farm equipments., ...
 

Similar a Serial Communication Interfaces

BluetoothPPT.pdf
BluetoothPPT.pdfBluetoothPPT.pdf
BluetoothPPT.pdfPpupu
 
Unit 3 ppt-idc
Unit 3 ppt-idcUnit 3 ppt-idc
Unit 3 ppt-idchiya123jes
 
Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...
Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...
Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...Soumen Santra
 
R5232- RS422- 20mA Current Loop and 1EE488 are typical standard interf.docx
R5232- RS422- 20mA Current Loop and 1EE488 are typical standard interf.docxR5232- RS422- 20mA Current Loop and 1EE488 are typical standard interf.docx
R5232- RS422- 20mA Current Loop and 1EE488 are typical standard interf.docxacarolyn
 
Chapter 02 - Wan Router
Chapter 02 - Wan RouterChapter 02 - Wan Router
Chapter 02 - Wan Routerphanleson
 
NOTA ELEKTRONIK KABEL.pptx
NOTA ELEKTRONIK KABEL.pptxNOTA ELEKTRONIK KABEL.pptx
NOTA ELEKTRONIK KABEL.pptxMuhammad Taufik
 
Ecw course
Ecw courseEcw course
Ecw courseshubcoep
 
Bluetooth - Comprehensive Presentation
Bluetooth - Comprehensive PresentationBluetooth - Comprehensive Presentation
Bluetooth - Comprehensive PresentationMuhammed Afsal Villan
 

Similar a Serial Communication Interfaces (20)

Chapter 3 esy
Chapter 3 esy Chapter 3 esy
Chapter 3 esy
 
Bluetooth
BluetoothBluetooth
Bluetooth
 
Lan
LanLan
Lan
 
Networking
NetworkingNetworking
Networking
 
Networking
NetworkingNetworking
Networking
 
Serial buses
Serial busesSerial buses
Serial buses
 
Modem
ModemModem
Modem
 
thunderbolt interface
thunderbolt interfacethunderbolt interface
thunderbolt interface
 
BluetoothPPT.pdf
BluetoothPPT.pdfBluetoothPPT.pdf
BluetoothPPT.pdf
 
Thunderbolt pdf
Thunderbolt pdfThunderbolt pdf
Thunderbolt pdf
 
Peripherals
PeripheralsPeripherals
Peripherals
 
HIGH SPEED U.S.B 3.0
HIGH SPEED U.S.B 3.0HIGH SPEED U.S.B 3.0
HIGH SPEED U.S.B 3.0
 
Unit 3 ppt-idc
Unit 3 ppt-idcUnit 3 ppt-idc
Unit 3 ppt-idc
 
Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...
Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...
Basic networking hardware: Switch : Router : Hub : Bridge : Gateway : Bus : C...
 
R5232- RS422- 20mA Current Loop and 1EE488 are typical standard interf.docx
R5232- RS422- 20mA Current Loop and 1EE488 are typical standard interf.docxR5232- RS422- 20mA Current Loop and 1EE488 are typical standard interf.docx
R5232- RS422- 20mA Current Loop and 1EE488 are typical standard interf.docx
 
Chapter 02 - Wan Router
Chapter 02 - Wan RouterChapter 02 - Wan Router
Chapter 02 - Wan Router
 
NOTA ELEKTRONIK KABEL.pptx
NOTA ELEKTRONIK KABEL.pptxNOTA ELEKTRONIK KABEL.pptx
NOTA ELEKTRONIK KABEL.pptx
 
Ecw course
Ecw courseEcw course
Ecw course
 
Bluetooth - Comprehensive Presentation
Bluetooth - Comprehensive PresentationBluetooth - Comprehensive Presentation
Bluetooth - Comprehensive Presentation
 
9781111306366 ppt ch8
9781111306366 ppt ch89781111306366 ppt ch8
9781111306366 ppt ch8
 

Más de anishgoel

Computer Organization
Computer OrganizationComputer Organization
Computer Organizationanishgoel
 
Learning vhdl by examples
Learning vhdl by examplesLearning vhdl by examples
Learning vhdl by examplesanishgoel
 
Dot matrix module interface wit Raspberry Pi
Dot matrix module interface wit Raspberry PiDot matrix module interface wit Raspberry Pi
Dot matrix module interface wit Raspberry Pianishgoel
 
Input interface with Raspberry pi
Input interface with Raspberry piInput interface with Raspberry pi
Input interface with Raspberry pianishgoel
 
Learning Python for Raspberry Pi
Learning Python for Raspberry PiLearning Python for Raspberry Pi
Learning Python for Raspberry Pianishgoel
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pianishgoel
 
learning vhdl by examples
learning vhdl by exampleslearning vhdl by examples
learning vhdl by examplesanishgoel
 
Digital System Design Basics
Digital System Design BasicsDigital System Design Basics
Digital System Design Basicsanishgoel
 
digital design of communication systems
digital design of communication systemsdigital design of communication systems
digital design of communication systemsanishgoel
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos conceptsanishgoel
 
8051 Microcontroller Timer
8051 Microcontroller Timer8051 Microcontroller Timer
8051 Microcontroller Timeranishgoel
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O portsanishgoel
 
Embedded systems ppt iv part d
Embedded systems ppt iv   part dEmbedded systems ppt iv   part d
Embedded systems ppt iv part danishgoel
 
Embedded systems ppt iv part c
Embedded systems ppt iv   part cEmbedded systems ppt iv   part c
Embedded systems ppt iv part canishgoel
 
Embedded systems ppt iv part b
Embedded systems ppt iv   part bEmbedded systems ppt iv   part b
Embedded systems ppt iv part banishgoel
 
Embedded systems ppt ii
Embedded systems ppt iiEmbedded systems ppt ii
Embedded systems ppt iianishgoel
 
Embedded systems ppt iii
Embedded systems ppt iiiEmbedded systems ppt iii
Embedded systems ppt iiianishgoel
 
Embedded systems ppt iv part a
Embedded systems ppt iv   part aEmbedded systems ppt iv   part a
Embedded systems ppt iv part aanishgoel
 
Embedded systems ppt i
Embedded systems ppt iEmbedded systems ppt i
Embedded systems ppt ianishgoel
 

Más de anishgoel (20)

Computer Organization
Computer OrganizationComputer Organization
Computer Organization
 
Learning vhdl by examples
Learning vhdl by examplesLearning vhdl by examples
Learning vhdl by examples
 
Dot matrix module interface wit Raspberry Pi
Dot matrix module interface wit Raspberry PiDot matrix module interface wit Raspberry Pi
Dot matrix module interface wit Raspberry Pi
 
Input interface with Raspberry pi
Input interface with Raspberry piInput interface with Raspberry pi
Input interface with Raspberry pi
 
Learning Python for Raspberry Pi
Learning Python for Raspberry PiLearning Python for Raspberry Pi
Learning Python for Raspberry Pi
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
learning vhdl by examples
learning vhdl by exampleslearning vhdl by examples
learning vhdl by examples
 
Digital System Design Basics
Digital System Design BasicsDigital System Design Basics
Digital System Design Basics
 
digital design of communication systems
digital design of communication systemsdigital design of communication systems
digital design of communication systems
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos concepts
 
8051 Microcontroller Timer
8051 Microcontroller Timer8051 Microcontroller Timer
8051 Microcontroller Timer
 
8051 Microcontroller I/O ports
8051 Microcontroller I/O ports8051 Microcontroller I/O ports
8051 Microcontroller I/O ports
 
Embedded systems ppt iv part d
Embedded systems ppt iv   part dEmbedded systems ppt iv   part d
Embedded systems ppt iv part d
 
Embedded systems ppt iv part c
Embedded systems ppt iv   part cEmbedded systems ppt iv   part c
Embedded systems ppt iv part c
 
Embedded systems ppt iv part b
Embedded systems ppt iv   part bEmbedded systems ppt iv   part b
Embedded systems ppt iv part b
 
Embedded systems ppt ii
Embedded systems ppt iiEmbedded systems ppt ii
Embedded systems ppt ii
 
Embedded systems ppt iii
Embedded systems ppt iiiEmbedded systems ppt iii
Embedded systems ppt iii
 
Embedded systems ppt iv part a
Embedded systems ppt iv   part aEmbedded systems ppt iv   part a
Embedded systems ppt iv part a
 
Embedded systems ppt i
Embedded systems ppt iEmbedded systems ppt i
Embedded systems ppt i
 
Cpld fpga
Cpld fpgaCpld fpga
Cpld fpga
 

Último

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 

Último (20)

Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 

Serial Communication Interfaces

  • 1. Communication Hardware & Protocols Prof. Anish Goel Embedded Systems
  • 4. Asynchronous Serial (RS‐232) Embedded Systems Prof.Anish Goel4
  • 5. RS232 Voltage levels Embedded Systems Prof.Anish Goel5
  • 6. RS232 – Handshaking Embedded Systems Prof.Anish Goel6
  • 7. Serial Peripheral Interface Embedded Systems Prof.Anish Goel7
  • 8. SPI and the clock Embedded Systems Prof.Anish Goel8
  • 9. SPI and the clock Embedded Systems Prof.Anish Goel9
  • 11. I2C Write a Single Byte Embedded Systems Prof.Anish Goel11
  • 12. Other Features Embedded Systems Prof.Anish Goel12
  • 13. RS-485 Embedded Systems Prof.Anish Goel13 RS232 is an interface to connect one DTE, data terminal equipment to one DCE, data communication equipment at a maximum speed of 20 kbps with a maximum cable length of 50 feet. This was sufficient in the old days where almost all computer equipment were connected using modems, but soon after people started to look for interfaces capable of one or more of the following: •Connect DTE's directly without the need of modems •Connect several DTE's in a network structure •Ability to communicate over longer distances •Ability to communicate at faster communication rates RS485 is the most versatile communication standard in the standard series defined by the EIA, as it performs well on all four points.That is why RS485 is currently a widely used communication interface in data acquisition and control applications where multiple nodes communicate with each other.
  • 14. Differential signals with RS485: Longer distances and higher bit rates Embedded Systems Prof.Anish Goel14 •Main problems with RS232 is the lack of immunity for noise on the signal lines. •The transmitter and receiver compare the voltages of the data- and handshake lines with one common zero line. •Shifts in the ground level can have disastrous effects. •Therefore the trigger level of the RS232 interface is set relatively high at ±3Volt. •Noise is easily picked up and limits both the maximum distance and communication speed. •With RS485 on the contrary there is no such thing as a common zero as a signal reference. •Several volts difference in the ground level of the RS485 transmitter and receiver does not cause any problems. •The RS485 signals are floating and each signal is transmitted over a Sig+ line and a Sig- line. •The RS485 receiver compares the voltage difference between both lines, instead of the absolute voltage level on a signal line. •This works well and prevents the existence of ground loops, a common source of communication problems. •The best results are achieved if the Sig+ and Sig- lines are twisted.
  • 15. Noise in straight and twisted pair cables Embedded Systems Prof.Anish Goel15 •Noise is generated by magnetic fields from the environment. •The picture shows the magnetic field lines and the noise current in the RS485 data lines that is the result of that magnetic field. •In the straight cable, all noise current is flowing in the same direction, practically generating a looping current just like in an ordinary transformer. •When the cable is twisted, we see that in some parts of the signal lines the direction of the noise current is the opposite from the current in other parts of the cable. •Because of this, the resulting noise current is many factors lower than with an ordinary straight cable. Shielding—which is a common method to prevent noise in RS232 lines—tries to keep hostile magnetic fields away from the signal lines.
  • 16. Embedded Systems Prof.Anish Goel16 RS 485 Advantages •Twisted pairs in RS485 communication however adds immunity which is a much better way to fight noise. •The magnetic fields are allowed to pass, but do no harm. •If high noise immunity is needed, often a combination of twisting and shielding is used as for example in STP, shielded twisted pair and FTP, foiled twisted pair networking cables. •Differential signals and twisting allows RS485 to communicate over much longer communication distances than achievable with RS232. With RS485 communication distances of 1200 m are possible. •Differential signal lines also allow higher bit rates than possible with non-differential connections. Therefore RS485 can overcome the practical communication speed limit of RS232. Currently RS485 drivers are produced that can achieve a bit rate of 35 mbps.
  • 17. Embedded Systems Prof.Anish Goel17 Characteristics of RS232, RS422, RS423 and RS485
  • 18. Embedded Systems Prof.Anish Goel18 CAN A Controller Area Network (CAN) bus is a high-integrity serial bus system for networking intelligent devices. CAN busses and devices are common components in automotive and industrial systems. Automotive Applications
  • 19. Embedded Systems Prof.Anish Goel19 Benefits of CAN • Lower cost from reduced wiring compared to two wire, point-to-point wiring • Highly robust protocol – Built-in determinism – Fault tolerance – Reliable—More than a decade of use in the automotive industry CAN Specifications • CAN data (up to 8 bytes in a frame) • Maximum 1 Mbaud/s • 40 Meters at 1 Mbaud/s • 6 km at 10 kbaud/s •Theoretical maximum of 2,032 nodes per bus – Practical limit is approximately 100 nodes due to transceiver – Most buses use 3–10 nodes • Data fields—Arbitration ID (11 bit or 29 bit) – Indicates message priority
  • 20. Embedded Systems Prof.Anish Goel20 CAN Frame •CAN devices send data across the CAN Network on packets called frames. •A typical CAN frame contains an arbitration ID, a data field, a remote frame, an error frame, and an overload frame.
  • 21. Embedded Systems Prof.Anish Goel21 CAN Arbitration The arbitration ID determines the priority of the messages on the bus. If multiple nodes try to transmit a message onto the CAN bus at the same time, the node with the highest priority (lowest arbitration ID) automatically gets bus access. Nodes with a lower priority must wait until the bus becomes available before trying to transmit again.The waiting devices wait until the end of the frame section is detected.
  • 22. Embedded Systems Prof.Anish Goel22 Data Field •The data field contains the actual data being transmitted. •The CAN protocol supports two data field formats as defined in the Bosch Version 2.0 specifications, the essential difference being in the length of the arbitration •ID. •In the standard frame format (also known as 2.0A), the length of the ID is 11 bits. •In the extended frame format (also known as 2.0B), the length of the ID is 29 bits.
  • 23. Embedded Systems Prof.Anish Goel23 Introduction to USB General Introduction The Universal Serial Bus (USB) is a specification developed by Compaq, Intel, Microsoft and NEC, joined later by Hewlett-Packard, Lucent and Philips. These companies formed the USB Implementers Forum, Inc as a non-profit corporation to publish the specifications and organise further development in USB. The aim of the USB-IF was to find a solution to the mixture of connection methods to the PC, in use at the time. We had serial ports, parallel ports, keyboard and mouse connections, joystick ports, midi ports and so on. And none of these satisfied the basic requirements of plug-and-play. Additionally many of these ports made use of a limited pool of PC resources, such as Hardware Interrupts,and DMA channels.
  • 24. Embedded Systems Prof.Anish Goel24 Data Speeds The USB specification defines three data speeds, shown to the right. These speeds are the fundamental clocking rates of the system, and as such do not represent possible throughput, which will always be lower as the result of the protocol overheads. Low Speed This was intended for cheap, low data rate devices like mice. The low speed captive cable is thinner and more flexible than that required for full and high speed. Full Speed This was originally specified for all other devices. High Speed The high speed additions to the specification were introduced in USB 2.0 as a response to the higher speed of Firewire.
  • 25. Embedded Systems Prof.Anish Goel25 Architecture The USB is based on a so-called 'tiered star topology' in which there is a single host controller and up to 127 'slave' devices. The host controller is connected to a hub, integrated within the PC, which allows a number of attachment points (often loosely referred to as ports). A further hub may be plugged into each of these attachment points, and so on. However there are limitations on this expansion. As stated above a maximum of 127 devices (including hubs) may be connected. This is because the address field in a packet is 7 bits long, and the address 0 cannot be used as it has special significance. (In most systems the bus would be running out of bandwidth, or other resources, long before the 127 devices was reached.) A device can be plugged into a hub, and that hub can be plugged into another hub and so on. However the maximum number of tiers permitted is six. The length of any cable is limited to 5 metres.This limitation is expressed in the specification in terms of cable delays etc, but 5 metres can be taken as the practical consequence of the specification.
  • 26. Embedded Systems Prof.Anish Goel26 USB This means that a device cannot be further than 30 metres from the PC, and even to achieve that will involve 5 external hubs, of which at least 2 will need to be self-powered. So the USB is intended as a bus for devices near to the PC. For applications requiring distance from the PC, another form of connection is needed, such as Ethernet.
  • 27. Embedded Systems Prof.Anish Goel27 Host is Master •All communications on this bus are initiated by the host. •This means, for example, that there can be no communication directly between USB devices. •A device cannot initiate a transfer, but must wait to be asked to transfer data by the host. The only exception to this is when a device has been put into 'suspend' (a low power state) by the host then the device can signal a 'remote wakeup'.