0% found this document useful (0 votes)
58 views19 pages

MKN2013 Lecture 9

Lecture 9 covers serial communication in the context of the Internet of Things (IoT), explaining the advantages of serial over parallel data transmission. It highlights the benefits of fewer wires, lower costs, and reliability over long distances, as well as the differences between synchronous and asynchronous serial communication. The lecture also discusses the Universal Asynchronous Receiver-Transmitter (UART) and its role in converting data between parallel and serial interfaces.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views19 pages

MKN2013 Lecture 9

Lecture 9 covers serial communication in the context of the Internet of Things (IoT), explaining the advantages of serial over parallel data transmission. It highlights the benefits of fewer wires, lower costs, and reliability over long distances, as well as the differences between synchronous and asynchronous serial communication. The lecture also discusses the Universal Asynchronous Receiver-Transmitter (UART) and its role in converting data between parallel and serial interfaces.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Faculty of Art, Computing, & Creative Industry

MKN2013 Internet of Things (IOT)

Lecture 9: Serial Communication

Copyright © 2022 Universiti Pendidikan Sultan Idris


Topics Covered
Lecture 9: Serial Communication
• Knowing basic types of data transmission
• Understanding serial communication and why it's preferred in IOT
ecosystem
Data Transmission Types

Data Transmission

Parallel Serial

Synchronous Asynchronous
Data Transmission Types
• 2 main types
• Serial
• Telegraph
• Light Signal
• Parallel
• Integrated Services Digital Network (ISDN) line
• Factory line
Parallel Transmission
• Data is sent and received more than one bit at a time
• Transmission on multiple wires
Parallel Transmission
• Many lines of communication, synchronized bursts of data
Serial Transmission
• Data is sent and received one bit at a time
• Transmission on single wire
Serial Transmission
• One line of communication, long string of data
Serial Interfaces
• RS232: Typical computer COM port
• SCI: Serial Communication Interface - uses the universal asynchronous
receiver/transmitter or UART
• SPI: Serial Peripheral Interface - part of Port D
Why Serial is Preferred for IOT
Devices?
• Fewer wires means i.e.
• Lower cost
• Simpler set-up
• More reliable over long distance without suffering from "skew". "Skew" may
occur in parallel transmission due to slightly different properties in each
parallel wire, which could result in different bits travel at different speeds
• Serial may transmit data at a higher frequency (high bit rate) without
suffering "crosstalk". Crosstalk is when a signal transmitted on one wire
creates an undesired effect in another wire.
Synchronous Serial
• Sender and receiver have their clocks synchronized
• Transmissions occur at specified intervals
• Advantage:
• Faster
• Disadvantages:
• More costly
• More complex
• Information cannot be sent immediately
Asynchronous Serial
• Devices are not synchronized
• Transmissions happen at unpredicted intervals
• Advantages:
• Simpler
• Cheaper
• More robust
• Information can be sent when ready
• Disadvantage:
• Slower due to overhead
Asynchronous Serial Interface:
UART
• Universal Asynchronous Receiver-Transmitter
• A computer component that handles asynchronous serial communication
• It is the tool microcontrollers use to convert their data on a parallel bus to
and from a serial interface; create the serial packets and control those
physical hardware lines
• Remember the UART comm cable to connect the Arduino last time?
• Intermediary between parallel and serial interfaces. On one end of the UART
is a bus of eight-or-so data lines (plus some control pins), on the other is the
two serial wires - RX and TX.
Asynchronous Serial Interface:
UART
Asynchronous Serial Interface:
UART
• In our Arduino case, how does UART semantically work?
• The data goes through serial USB and when it reaches the board, it
goes through parallel buses
Asynchronous Serial Interface:
UART
• Arduino Uno is based on the ATmega328 - has just a single UART,
while the Arduino Mega - built on an ATmega2560 - has four UARTs
PS:
• Both synchronous and asynchronous must have agreed upon bit
transfer rate between transmitter and receiver
Tinkercad Exercise 1
• Draw the following Arduino serial communication on Tinkercad
Tinkercad Exercise 2: with
Temperature sensor
• Draw the following Arduino serial communication on Tinkercad

You might also like