Communication protocol in Embedded System | Synchronous & Asynchronous communication
Summary
TLDRIn this 'Foolish Engineer' video, we explore how embedded electronic systems communicate, focusing on various communication protocols. The video uses analogies to explain the importance of synchronization, speed, and language in data transmission between devices. It distinguishes between synchronous and asynchronous communication, illustrating these concepts with the help of a ball-tossing analogy. The video also touches on different protocols like SPI, I2C, UART, and CAN, providing a foundational understanding of how electronic devices exchange information.
Takeaways
- 😀 Human communication is compared to how embedded electronic systems interact, highlighting the need for a common language or protocol.
- 🔍 Communication in embedded systems involves components like sensors, microcontrollers, and displays that need to exchange information effectively.
- 📱 An example given is the motion sensor in mobile phones that communicates with the microprocessor to respond to user gestures, like tilting the phone during a racing game.
- 🤝 For proper communication, devices must synchronize their data transmission and reception speeds to ensure a proper handshake and no data loss.
- 🗣️ Analogies are used to explain synchronous and asynchronous communication, comparing electronic processes to human interactions.
- 🔄 Synchronous communication involves devices sharing the same clock pulses, eliminating the need for clock synchronization.
- 🕒 Asynchronous communication does not require a shared clock; devices operate at predefined intervals, like throwing boxes every 2 seconds in the analogy.
- 📦 In the synchronous analogy, 'boxes' represent data packets that are sent with attention and acknowledgment between the transmitter and receiver.
- 📈 Asynchronous communication is characterized by a predefined baud rate, which dictates the speed of data packet transmission without continuous acknowledgment.
- 🛠️ The video discusses various communication protocols, including SPI, I2C for synchronous, and UART, CAN for asynchronous, which are essential for different electronic systems.
Q & A
How do embedded electronic systems communicate with each other?
-Embedded electronic systems communicate through various communication protocols, which are like languages that allow different components such as sensors, microcontrollers, and displays to share information.
What is the role of a motion sensor in a mobile phone while playing a racing game?
-The motion sensor, specifically the accelerometer in a mobile phone, detects the tilt of the phone and provides data to the microprocessor, which then adjusts the car's direction on the screen accordingly.
What are the requirements for effective communication between electronic devices?
-Effective communication requires that devices communicate at similar speeds, are synchronized, and have a mechanism for notifying the receiver that data is being sent and acknowledging its receipt.
What is the difference between synchronous and asynchronous communication protocols?
-In synchronous communication, devices share the same clock pulses, whereas in asynchronous communication, devices do not share a clock and instead rely on predefined time intervals or baud rates for data transmission.
How does the analogy of throwing boxes between two people illustrate synchronous communication?
-In the analogy, the person throwing the boxes (transmitter) grabs the attention of the receiver, waits for a response, and then throws the next box. This represents the synchronized clock pulses and the need for acknowledgement in synchronous communication.
What is the role of a clock signal in synchronous communication?
-The clock signal in synchronous communication ensures that the transmitter and receiver are synchronized, allowing data to be sent and received at specific intervals, much like the shared understanding of when to throw and catch boxes in the analogy.
How does the asynchronous communication protocol handle the lack of clock synchronization?
-Asynchronous communication protocols use an internal clock for each device and rely on a predefined baud rate to determine when to send and receive data, without the need for continuous clock synchronization.
What are some common synchronous communication protocols used in embedded systems?
-Common synchronous communication protocols include SPI (Serial Peripheral Interface) and I2C (Inter-Integrated Circuit), which are used for high-speed communication between devices.
What are some common asynchronous communication protocols used in embedded systems?
-Common asynchronous communication protocols include UART (Universal Asynchronous Receiver/Transmitter) and CAN (Controller Area Network), which are used for slower speed communication where clock synchronization is not required.
How does the transmitter know if the receiver has successfully received data in synchronous communication?
-In synchronous communication, the receiver sends an acknowledgement bit after successfully receiving all data. If the transmitter does not receive this acknowledgement, it assumes the data was not received and may resend the data.
Outlines
💬 Introduction to Embedded Systems Communication
This paragraph introduces the topic of how embedded electronic systems communicate with each other. The analogy of human communication using languages is drawn to explain the concept of communication protocols in embedded systems. The script describes how everyday electronic devices, such as mobile phones, use sensors and microcontrollers to share information. An example is given where a mobile phone's accelerometer communicates with the microprocessor to respond to the user's movements while playing a racing game. The paragraph sets the stage for a deeper exploration of communication requirements and protocols in embedded systems.
🔄 Synchronous Communication Protocols Explained
The second paragraph delves into synchronous communication protocols, where devices share the same clock pulses, eliminating the need for clock synchronization. An analogy is used where two individuals, Akshay and Parag, communicate by throwing and catching boxes, symbolizing the transfer of data packets. The process involves Akshay grabbing Parag's attention, throwing the box, and Parag acknowledging receipt after catching it. This cycle continues until all data is transferred. The electronic equivalent involves transmitters and receivers with shift registers and D flip flops, synchronized by a clock signal. The transmitter sends a closing bit after data transmission, and the receiver sends an acknowledgement bit upon successful data receipt. If no acknowledgement is received, the data is resent, illustrating the mechanism of synchronous communication.
⏲ Asynchronous Communication Protocols Overview
The final paragraph discusses asynchronous communication protocols, which, contrary to the name, still require a form of synchronization. The analogy continues with Akshay and Parag, but this time, they agree on a time interval for throwing boxes, representing the baud rate or transmission speed. Unlike synchronous communication, there is no direct acknowledgement of each box (data packet), and Akshay assumes Parag is catching all boxes as planned. In electronic terms, this means the transmitter and receiver operate on internal clock signals set to the same baud rate before communication begins. The paragraph concludes by mentioning various types of synchronous and asynchronous communication protocols, such as SPI, I2C, UART, and CAN, and invites viewers to ask questions or revisit the video for clarity.
Mindmap
Keywords
💡Embedded Electronic Systems
💡Communication Protocols
💡Sensors
💡Microprocessor
💡Data Transmission
💡Synchronization
💡Synchronous Communication
💡Asynchronous Communication
💡Baud Rate
💡SPI, I2C, UART, CAN
Highlights
Embedded electronic systems communicate using different communication protocols.
Electronic devices in daily life consist of chips, sensors, and microcontrollers that share information.
An example of system communication is a mobile phone's motion sensor affecting the screen display.
The accelerometer in mobile phones senses motion and provides data to the microprocessor.
Communication requirements include a common language and similar data transmission speeds.
Synchronization is necessary for proper communication between devices.
Synchronous communication protocols involve devices sharing the same clock pulses.
Asynchronous communication protocols do not require clock synchronization.
An analogy for synchronous communication is throwing and catching boxes with a shared clock.
In synchronous communication, data is shifted between a transmitter and receiver with clock synchronization.
Asynchronous communication is like throwing boxes at timed intervals without acknowledgement.
The baud rate in asynchronous communication is analogous to the timing of box throws.
SPI and I2C are examples of synchronous communication protocols.
UART and CAN are examples of asynchronous communication protocols.
The video explains various communication protocols with practical analogies for better understanding.
The importance of proper communication for the functioning of embedded systems is emphasized.
Transcripts
hey guys welcome to another video from
foolish engineer
in this video we'll check out how do
embedded electronic systems
talk with each other we'll see
different communication protocols and
the analogies
so let's go for right
[Music]
we human beings communicate with each
other
to share our thoughts and feelings to
talking
or many other mediums if we are talking
we use certain languages like english
hindi
german japanese many more just like that
there are different communication
protocols in the embedded system
if you see electronic devices in our
day-to-day life
it consists of small chips sensors
and microcontrollers
actually we are surrounded by all of
this
but have you ever wondered how do they
share information
for example you are playing a racing
game on your mobile phone
when you tilt your mobile left or right
while playing
your car also turns on the screen
this happens because of the motion
sensor
and there is an accelerometer in our
mobile phones
the accelerometer is a sensor which
senses the motion
and provides the information accordingly
so this sensor gives the data
to the microprocessor of our mobile
phone
so this sensor gives the data when we
tilt a mobile phone
to the microprocessor of our mobile
phone
it analyzes this data and it turns our
vehicle
while playing this is just a small task
and to complete that it needs some
communication
to get things working so the sensor
microprocessor and display of the mobile
phone
need to talk with each other
that's where the communication comes
into picture and we are going to check
that now
well there are certain requirements for
communication
for example two people need to talk in
same language to understand each other
now assuming both are talking in the
same language
say english but while talking
one is talking very fast and in a
different accent
due to that the other guy is not able to
understand
what he is talking about so
the guy who is talking needs to talk in
a speed
where this guy will understand
if we talk in electronic terms the speed
of data transmission
and reception of both devices should be
similar
so that the devices will have a proper
handshake
and no loss of data
there will be another scenario as well
where a guy
is speaking but the other guy with whom
he is talking to
is not listening at all
well in this case as well there is no
proper communication between two people
to avoid this both people need to be
available for each other
one must speak and other must listen
carefully
so in electronic terms we call it
synchronization
when a device sends data to a system it
needs to notify the receiver
that it is sending some data then it
should send the data
and after the reception of full data
stream the system
needs to provide an acknowledgement
notifying that it has
received all of the data
there are two types of communication
protocols in electronic embedded system
one is synchronous communication
protocol
and secondly it's asynchronous
communication protocol
in synchronous communication protocol
the devices which are communicating with
each other
share the same clock pulses and in a
synchronous communication
protocol there is no need of clock
synchronization
let's see an easy analogy of synchronous
communication
let's imagine there are two people
standing in front of
each other but there is a ball between
both of them
this guy whose name is akshay needs to
deliver some boxes to the other guy
who is standing at the other side of the
wall whose name is parag
both of them are unable to see each
other because of this wall
so akshay will throw the boxes and parag
needs to catch them
in order to do so both should know each
other's
status now what will akshay do
initially he'll call paraga and grab his
attention saying
i'm sending the first box to you
now assuming akshay got parag's
attention he will throw first box
and wait for barak to catch it manaksha
throws the box
barak catches it as soon as he catches
the box
he will let akshay know that i caught
the box
now you can throw the next box and
actually understand
and he will throw this second box and
this cycle keeps on repeating
until akshay delivers all of his boxes
now let's see this analogy in electronic
terms
daksa is our transmitter parag is our
receiver
the boxes are nothing but the packets of
data
which needs to be analyzed by the
receiver
each data storage equipment has a shift
register
the interval where each process is being
completed
it's synchronized with clock signal
there are d flip flops as the
transmitter and receiver side
the data in the transmitter is shifted
from transmitter
and its output is connected to the input
of the receiver now the transmitter
notifies the receiver
that it is about to send the data and
receiver
prepares for it after that
the data stream of ones and zeros is
shifted from
transmitter to the receiver in each
interval of clock pulse
after transmission of full data the
transmitter sends a closing bit
to notify the receiver that it has sent
all of the information
if the receiver gets the data the
receiver sends an
acknowledgement bit saying it has
received
all of the data and the communication
was successful
but if the transmitter doesn't receive
any acknowledgement
the transmitter will understand that the
receiver did not get the packet of data
and it will send the same data stream to
the receiver again
this cycle keeps on repeating and that's
how
the synchronous communication takes
place
now we will see the asynchronous
communication protocol
well asynchronous doesn't mean that
there is no synchronization
between transmitter and receiver
let's see the analogy of a synchronous
communication
so there are our two guides standing in
front of each other
and there is a wall just like earlier
case
akshay needs to deliver the boxes to
parak
so in this case initially akshay will
grab barak's attention
and mutually they will decide that
akshay will throw a box
after 2 seconds that means
akshay will throw the first box then
he'll wait for the 2 second
and then he'll throw the second box
again
he'll wait for the two seconds and after
that akshay will throw the third box
and it keeps going on
remember parag is not giving any
acknowledgement regarding the delivery
of boxes
and akshay assumes that parag is
catching all of his boxes
so he throws boxes until all of the
boxes gets delivered
if we compare it with two electronic
terms akshay and paraga transmit and
receiver
boxes are the data packets now
two seconds which they have decided is
the baud rate of communication
we can say it is the transmission speed
of the data packet
sent by the transmitter the transmitter
and receiver has d flip flop
there is no sharing of the clock between
transmitter
and receiver but both of them has
internal clock signals
which are generated by their timers
before the communication we configure
same baud rate for the transmitter
and receiver which we have seen many
times
when we use arduino ide we set the baud
rate of the communication
for example 9600 that means
9600 bauds per second is the rate of
data transmission
and that's how a synchronous
communication works
well there are multiple types of
synchronous communication protocol and
asynchronous communication protocol in
synchronous communication
there are spi i2c and many more
and in asynchronous communication
protocol there are uart
and can we'll see about
all of these communication protocols one
by one
i hope you got something from this if
you haven't
you can watch the video again still if
you don't
you can ask your doubts in the comment
box below hit the like button if you
like this video
subscribe to my channel and finally
thanks for watching
Weitere ähnliche Videos ansehen
Arduino Uno - Pins Overview
Bilgisayar, 1 ve 0'ın Ne Olduğunu Nereden Biliyor?
What is Modbus and How does it Work?
Redes de computadores - Protocolo TCP IP - Informática para concursos - Professor Danilo Vilanova
Pull-up and pull-down resistors explained
01 | Introduction To ASP.NET Web API | What Is Web API ? Web API In ASP.NET | Web API (Hindi/Urdu)
5.0 / 5 (0 votes)