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

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

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