SlideShare a Scribd company logo
1 of 31
ARDUINO COURSE
Collected By : MohamedZain Allam
Lecture 5
Serial Communication
(UART)
Introduction :
-Embedded electronics is all about interlinking circuits (processors or other integrated
circuits) to create a symbiotic system.
-In order for those individual circuits to swap their information
-they must share a common communication protocol.
-Hundreds of communication protocols have been defined to achieve this data
exchange
-in general each can be separated into one of two categories: parallel or serial.
Serial
Receiver
Transmitter
Parallel
Receiver
Transmitter
1 bit
1 word
Transmission Illustration :
Parallel vs. Serial :
-Parallel interfaces transfer multiple bits at the same time.
-They usually require buses of data - transmitting across eight, sixteen, or more wires.
-Data is transferred in huge, crashing waves of 1’s and 0’s.
Data Transmission :
ParallelSerial
Cost
Speed
Transmission
Amount
TransmissionLi
nes
TransmissionDi
stance
Example
Cheap
Slow
Single bit
One line to transmit
one to receive
Long distance
Modem
Expensive
Fast
8 bits (8 data lines)
Transmitter & Receiver
8 lines for simultaneous
transmission
Short distance
(synchronization)
Printer Connection
• Synchronous
• Synchronous Peripheral Interface (SPI)
• Asynchronous
• Serial Communication Interface (SCI)
Serial Communications
• Constant transmission of data
• Clocks of Transmitter and Receiver must be synchronized
• No safeguard against error or noise
• Data rates depend on clock rates
• Flexible to communication with peripheral devices
• LCD drivers, A/D converter, other microprocessors
• Simultaneously transmits and receives data
• Transmission line, Receiving line, and Ground
Synchrononous – SPI :
• Transmission of data through “words”
• Continuous transmission unnecessary
• Built-in safeguards against noise and error
• Transmitter and Receiver operate independently
• Requires start and stop bit for each byte of data
• Sends constant ‘1’ for idle
• Sends a ‘0’ for start and “1” for stop bits
• Very reliable data reception
Asynchronous – UART :
• Set the Baud Rate of the Transmitter and Receiver (same value)
• Set the ‘M’ bit of SCCR1 for 8 or 9 bit data for Transmitter/Receiver
• Set ‘TE’ bit of SCCR2 to high to enable Transmitter (‘RE’ for Receiver)
• Load data into SCDR, RDRF bit set when data has been entered into SCSR
• TDRE bit of SCSR goes high to allow another data character into SCDR
Sending & Receiving :
• Data is read from the RDR and stored
• Error check is performed
• TC bit of SCSR goes high and clears the transmit buffer
• Transmitter resumes idle
Sending & Receiving :
• Start Bit
• Data Bit
• Stop Bit
• Parity Bit
Asynchronous Serial Transmission :
• Start Bit –
• Signals the transmission of a word.
• Transition from “1” to “0”. (“Mark-to-space”)
• First bit to be transmitted.
Role of stop, start and parity bits.
Bit Types :
• Stop Bits –
• Bit at the end of a data word.
• Bit set to high “1”.
• Indicates the end of a word.
• Data bits –
• Data bits to be transmitted.
• Sender and receiver have to agree in the number of data bits. (Usually 8 or 9)
• Least significant bit is sent first.
• Can be low or high.
• Parity bit –
• Works as an error check.
• There are two types: odd and even
•Even: if number of 1’s in the data word is even.
•Odd: if number of 1’s in the data word is odd.
• Bit after the data bits and before the stop bit.
• Can prevent single noise signal, but does not recognize when two bits are altered
by noise.
• Used to prevent noise.
Wire & wireless communication
Wire communication between two Arduinos
RF (Radio Frequency)
Types of wireless modules :
RFID RFID tags
Xbee:
Wifi :
Bluetooth
Arduino C :
 Serial.begin(A);
 Serial,print(“B”);
 Serial.println(C);
#NOTE:
A : baud rate
B : word you want to print
C : variable you want to print it’s value
Key pad :
Key pad 4*3
Key pad 4*4
Task
Lec 5

More Related Content

What's hot

Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Ankita Tiwari
 
To count number of external events using LabVIEW
To count number of external events using LabVIEWTo count number of external events using LabVIEW
To count number of external events using LabVIEWAnkita Tiwari
 
Construction of digital voltmeter by Bapi Kumar Das
Construction of digital voltmeter by Bapi Kumar DasConstruction of digital voltmeter by Bapi Kumar Das
Construction of digital voltmeter by Bapi Kumar DasB.k. Das
 
10 adv _revision_notes_term_3
10 adv _revision_notes_term_310 adv _revision_notes_term_3
10 adv _revision_notes_term_3CDI Aljeer
 
To implement Water level control using LabVIEW and analog input signals from ...
To implement Water level control using LabVIEW and analog input signals from ...To implement Water level control using LabVIEW and analog input signals from ...
To implement Water level control using LabVIEW and analog input signals from ...Ankita Tiwari
 
The fundemental of electronics ebook
The fundemental of electronics ebookThe fundemental of electronics ebook
The fundemental of electronics ebookLe Thanh Nhan
 
Concept of Digital measurement, block Diagram & study of Voltmeter
Concept of Digital measurement, block Diagram & study of VoltmeterConcept of Digital measurement, block Diagram & study of Voltmeter
Concept of Digital measurement, block Diagram & study of VoltmeterAbhishek Choksi
 
To study the relay operation from digital control signal using LabVIEW.
To study the relay operation from digital control signal using LabVIEW.To study the relay operation from digital control signal using LabVIEW.
To study the relay operation from digital control signal using LabVIEW.Ankita Tiwari
 
To interface temperature sensor with microcontroller and perform closed loop ...
To interface temperature sensor with microcontroller and perform closed loop ...To interface temperature sensor with microcontroller and perform closed loop ...
To interface temperature sensor with microcontroller and perform closed loop ...Ankita Tiwari
 
Degital 1
Degital 1Degital 1
Degital 1hnaita
 
Real Life Application of Digital Electronics
Real Life Application of Digital ElectronicsReal Life Application of Digital Electronics
Real Life Application of Digital ElectronicsTaslima Yasmin Tarin
 
Digital voltmeter using 89c51 microcontroller
Digital voltmeter using 89c51 microcontrollerDigital voltmeter using 89c51 microcontroller
Digital voltmeter using 89c51 microcontrollerSaylee joshi
 
Key vocabulary 10 & 11 g
Key vocabulary 10 & 11 gKey vocabulary 10 & 11 g
Key vocabulary 10 & 11 gCDI Aljeer
 
protection on lineman while working on transmission line report
 protection on lineman while working on transmission line report protection on lineman while working on transmission line report
protection on lineman while working on transmission line reportRavi Phadtare
 
04 Arduino Peripheral Interfacing
04   Arduino Peripheral Interfacing04   Arduino Peripheral Interfacing
04 Arduino Peripheral InterfacingWingston
 
Arduino Hackday: Rebooting Computing
Arduino Hackday: Rebooting ComputingArduino Hackday: Rebooting Computing
Arduino Hackday: Rebooting Computingrebooting_computing
 
How to Build Digital Weighing Scales
How to Build Digital Weighing ScalesHow to Build Digital Weighing Scales
How to Build Digital Weighing ScalesTacuna Systems
 

What's hot (20)

Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.
 
Embedded unit ii
Embedded unit iiEmbedded unit ii
Embedded unit ii
 
To count number of external events using LabVIEW
To count number of external events using LabVIEWTo count number of external events using LabVIEW
To count number of external events using LabVIEW
 
Construction of digital voltmeter by Bapi Kumar Das
Construction of digital voltmeter by Bapi Kumar DasConstruction of digital voltmeter by Bapi Kumar Das
Construction of digital voltmeter by Bapi Kumar Das
 
10 adv _revision_notes_term_3
10 adv _revision_notes_term_310 adv _revision_notes_term_3
10 adv _revision_notes_term_3
 
To implement Water level control using LabVIEW and analog input signals from ...
To implement Water level control using LabVIEW and analog input signals from ...To implement Water level control using LabVIEW and analog input signals from ...
To implement Water level control using LabVIEW and analog input signals from ...
 
The fundemental of electronics ebook
The fundemental of electronics ebookThe fundemental of electronics ebook
The fundemental of electronics ebook
 
Measurements upload
Measurements uploadMeasurements upload
Measurements upload
 
Concept of Digital measurement, block Diagram & study of Voltmeter
Concept of Digital measurement, block Diagram & study of VoltmeterConcept of Digital measurement, block Diagram & study of Voltmeter
Concept of Digital measurement, block Diagram & study of Voltmeter
 
To study the relay operation from digital control signal using LabVIEW.
To study the relay operation from digital control signal using LabVIEW.To study the relay operation from digital control signal using LabVIEW.
To study the relay operation from digital control signal using LabVIEW.
 
To interface temperature sensor with microcontroller and perform closed loop ...
To interface temperature sensor with microcontroller and perform closed loop ...To interface temperature sensor with microcontroller and perform closed loop ...
To interface temperature sensor with microcontroller and perform closed loop ...
 
Degital 1
Degital 1Degital 1
Degital 1
 
Real Life Application of Digital Electronics
Real Life Application of Digital ElectronicsReal Life Application of Digital Electronics
Real Life Application of Digital Electronics
 
Digital voltmeter using 89c51 microcontroller
Digital voltmeter using 89c51 microcontrollerDigital voltmeter using 89c51 microcontroller
Digital voltmeter using 89c51 microcontroller
 
Key vocabulary 10 & 11 g
Key vocabulary 10 & 11 gKey vocabulary 10 & 11 g
Key vocabulary 10 & 11 g
 
protection on lineman while working on transmission line report
 protection on lineman while working on transmission line report protection on lineman while working on transmission line report
protection on lineman while working on transmission line report
 
04 Arduino Peripheral Interfacing
04   Arduino Peripheral Interfacing04   Arduino Peripheral Interfacing
04 Arduino Peripheral Interfacing
 
Arduino Hackday: Rebooting Computing
Arduino Hackday: Rebooting ComputingArduino Hackday: Rebooting Computing
Arduino Hackday: Rebooting Computing
 
Rebooting Computing chalkwell
Rebooting Computing chalkwellRebooting Computing chalkwell
Rebooting Computing chalkwell
 
How to Build Digital Weighing Scales
How to Build Digital Weighing ScalesHow to Build Digital Weighing Scales
How to Build Digital Weighing Scales
 

Similar to Lec 5

Universal Serial Communication Interface
Universal Serial Communication InterfaceUniversal Serial Communication Interface
Universal Serial Communication InterfaceSandesh Agrawal
 
Serial Communication In Atmega 16
Serial Communication In Atmega 16Serial Communication In Atmega 16
Serial Communication In Atmega 16Suren Kumar
 
spi-180501092933-converted.pptx
spi-180501092933-converted.pptxspi-180501092933-converted.pptx
spi-180501092933-converted.pptxsauryakumar3
 
Raspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication ProtocolsRaspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication ProtocolsMohamed Abdallah
 
UART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPTUART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPTSai_praneeth
 
serial-200505101453.pdf
serial-200505101453.pdfserial-200505101453.pdf
serial-200505101453.pdfKiranG731731
 
Serial Communication
Serial CommunicationSerial Communication
Serial CommunicationUshaRani289
 
Embedded Communications Protocols UNIT 3PDF.pdf
Embedded Communications Protocols UNIT 3PDF.pdfEmbedded Communications Protocols UNIT 3PDF.pdf
Embedded Communications Protocols UNIT 3PDF.pdfkanyaakiran
 
Serial Data Communication
Serial Data CommunicationSerial Data Communication
Serial Data CommunicationDesty Rahayu
 
SPI AND UART COMMUNICATION PROTOCOLS
SPI AND UART COMMUNICATION PROTOCOLSSPI AND UART COMMUNICATION PROTOCOLS
SPI AND UART COMMUNICATION PROTOCOLSDHIVYA MANI
 
Microcontrollers and microprocessors in electrical communication engineering....
Microcontrollers and microprocessors in electrical communication engineering....Microcontrollers and microprocessors in electrical communication engineering....
Microcontrollers and microprocessors in electrical communication engineering....ANKUSH445845
 
Deepu Kumar Shah.pptx
Deepu Kumar Shah.pptxDeepu Kumar Shah.pptx
Deepu Kumar Shah.pptxDeepuShah
 

Similar to Lec 5 (20)

Universal Serial Communication Interface
Universal Serial Communication InterfaceUniversal Serial Communication Interface
Universal Serial Communication Interface
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
 
Serial Communication In Atmega 16
Serial Communication In Atmega 16Serial Communication In Atmega 16
Serial Communication In Atmega 16
 
SPI Bus Protocol
SPI Bus ProtocolSPI Bus Protocol
SPI Bus Protocol
 
8251 USART
8251 USART8251 USART
8251 USART
 
spi-180501092933-converted.pptx
spi-180501092933-converted.pptxspi-180501092933-converted.pptx
spi-180501092933-converted.pptx
 
8251 USART.pptx
8251 USART.pptx8251 USART.pptx
8251 USART.pptx
 
Raspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication ProtocolsRaspberry Pi - Lecture 3 Embedded Communication Protocols
Raspberry Pi - Lecture 3 Embedded Communication Protocols
 
8251 a basic
8251 a basic8251 a basic
8251 a basic
 
UART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPTUART(universal asynchronous receiver transmitter ) PPT
UART(universal asynchronous receiver transmitter ) PPT
 
serial-200505101453.pdf
serial-200505101453.pdfserial-200505101453.pdf
serial-200505101453.pdf
 
Serial Communication
Serial CommunicationSerial Communication
Serial Communication
 
Chapter 3 esy
Chapter 3 esy Chapter 3 esy
Chapter 3 esy
 
Embedded Communications Protocols UNIT 3PDF.pdf
Embedded Communications Protocols UNIT 3PDF.pdfEmbedded Communications Protocols UNIT 3PDF.pdf
Embedded Communications Protocols UNIT 3PDF.pdf
 
Serial Data Communication
Serial Data CommunicationSerial Data Communication
Serial Data Communication
 
SPI AND UART COMMUNICATION PROTOCOLS
SPI AND UART COMMUNICATION PROTOCOLSSPI AND UART COMMUNICATION PROTOCOLS
SPI AND UART COMMUNICATION PROTOCOLS
 
Microcontrollers and microprocessors in electrical communication engineering....
Microcontrollers and microprocessors in electrical communication engineering....Microcontrollers and microprocessors in electrical communication engineering....
Microcontrollers and microprocessors in electrical communication engineering....
 
Deepu Kumar Shah.pptx
Deepu Kumar Shah.pptxDeepu Kumar Shah.pptx
Deepu Kumar Shah.pptx
 
Serial data transfer
Serial data transferSerial data transfer
Serial data transfer
 
ES UNIT3.pptx
ES UNIT3.pptxES UNIT3.pptx
ES UNIT3.pptx
 

Recently uploaded

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

Lec 5

  • 1. ARDUINO COURSE Collected By : MohamedZain Allam
  • 3. Introduction : -Embedded electronics is all about interlinking circuits (processors or other integrated circuits) to create a symbiotic system. -In order for those individual circuits to swap their information -they must share a common communication protocol. -Hundreds of communication protocols have been defined to achieve this data exchange -in general each can be separated into one of two categories: parallel or serial.
  • 5. Parallel vs. Serial : -Parallel interfaces transfer multiple bits at the same time. -They usually require buses of data - transmitting across eight, sixteen, or more wires. -Data is transferred in huge, crashing waves of 1’s and 0’s.
  • 6. Data Transmission : ParallelSerial Cost Speed Transmission Amount TransmissionLi nes TransmissionDi stance Example Cheap Slow Single bit One line to transmit one to receive Long distance Modem Expensive Fast 8 bits (8 data lines) Transmitter & Receiver 8 lines for simultaneous transmission Short distance (synchronization) Printer Connection
  • 7. • Synchronous • Synchronous Peripheral Interface (SPI) • Asynchronous • Serial Communication Interface (SCI) Serial Communications
  • 8. • Constant transmission of data • Clocks of Transmitter and Receiver must be synchronized • No safeguard against error or noise • Data rates depend on clock rates • Flexible to communication with peripheral devices • LCD drivers, A/D converter, other microprocessors • Simultaneously transmits and receives data • Transmission line, Receiving line, and Ground Synchrononous – SPI :
  • 9. • Transmission of data through “words” • Continuous transmission unnecessary • Built-in safeguards against noise and error • Transmitter and Receiver operate independently • Requires start and stop bit for each byte of data • Sends constant ‘1’ for idle • Sends a ‘0’ for start and “1” for stop bits • Very reliable data reception Asynchronous – UART :
  • 10. • Set the Baud Rate of the Transmitter and Receiver (same value) • Set the ‘M’ bit of SCCR1 for 8 or 9 bit data for Transmitter/Receiver • Set ‘TE’ bit of SCCR2 to high to enable Transmitter (‘RE’ for Receiver) • Load data into SCDR, RDRF bit set when data has been entered into SCSR • TDRE bit of SCSR goes high to allow another data character into SCDR Sending & Receiving :
  • 11. • Data is read from the RDR and stored • Error check is performed • TC bit of SCSR goes high and clears the transmit buffer • Transmitter resumes idle Sending & Receiving :
  • 12. • Start Bit • Data Bit • Stop Bit • Parity Bit Asynchronous Serial Transmission :
  • 13. • Start Bit – • Signals the transmission of a word. • Transition from “1” to “0”. (“Mark-to-space”) • First bit to be transmitted. Role of stop, start and parity bits. Bit Types :
  • 14. • Stop Bits – • Bit at the end of a data word. • Bit set to high “1”. • Indicates the end of a word. • Data bits – • Data bits to be transmitted. • Sender and receiver have to agree in the number of data bits. (Usually 8 or 9) • Least significant bit is sent first. • Can be low or high.
  • 15. • Parity bit – • Works as an error check. • There are two types: odd and even •Even: if number of 1’s in the data word is even. •Odd: if number of 1’s in the data word is odd. • Bit after the data bits and before the stop bit. • Can prevent single noise signal, but does not recognize when two bits are altered by noise. • Used to prevent noise.
  • 16.
  • 17. Wire & wireless communication
  • 19. RF (Radio Frequency) Types of wireless modules :
  • 20.
  • 22. Xbee:
  • 25. Arduino C :  Serial.begin(A);  Serial,print(“B”);  Serial.println(C); #NOTE: A : baud rate B : word you want to print C : variable you want to print it’s value
  • 26. Key pad : Key pad 4*3
  • 28.
  • 29.
  • 30. Task