Anurag Dwivedi Rudra Pratap Suman. Scope of Communica tion Telephones and Cell Phones.

Slides:



Advertisements
Similar presentations
TECHKRITI LECTURE SERIES Communication BY: Ashutosh Kumar.
Advertisements

Serial Communications Interface (SCI) Michael LennardZachary PetersBao Nguyen.
ECT 357 Ch 18 UART. Today’s Quote: Be careful that your marriage doesn’t become a duel instead of a duet. Be careful that your marriage doesn’t become.
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
Serial Buses. Serial Bus Features Allows several devices to be connected to a set of common signal wires Reduces inter-connections and complexity Asynchronous.
Serial Interfaces, Part Deux -I 2 C and SPI December 4, 2002 Presented by Eugene Ho.
SPI Serial Peripheral Interface. SPI Serial Peripheral Interface is communication between two devices, one bit at a time sequential one bit at time over.
Lecture 8: Serial Interfaces
Serial Communication Buses: I 2 C and SPI By Brody Dunn.
Starting with serial Chapter Ten 10.1, 10.2,
Serial Peripheral Interface (SPI)
SPISPI Term Dr Abdelhafid Bouhraoua Term Dr Abdelhafid Bouhraoua.
USART and Asynchrono us Communica tion The USART is used for synchronous and asynchronous serial communication. USART = Universal Synchronous/Asynchronous.
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
INTRODUCTORY LECTURE ON ARDUINO. Open-source electronics prototyping platform You can make your own board, or buy one. Easy-to-use hardware and software.
Local Asynchronous Communications. Bit-wise data transmission Data transmission requires: Encoding bits as energy Transmitting energy through medium Decoding.
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 13.
Technology Training that Works Hands of Data Communications, Networking & TCP/IP Troubleshooting.
Serial Peripheral Interface (SPI) Bus. SPI Bus There is no official specification for the SPI bus. It is necessary to consult the data sheets of the devices.
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
Simplex, Half Duplex & Duplex Serial & Parallel transmission Synchronous & Asynchronous Bit & Baud Rate.
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
4.0 rtos implementation part II
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
7/23 Inter-chip Serial Communication: SPI and I 2 C Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee.
Volume. 1-the idea of the program is to increase, decrease the volume. 2-the program does the following: A-PF8:decrease the volume B-Pf9:increase the.
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
Universal Asynchronous Receiver/Transmitter (UART)
ECE 353 Introduction to Microprocessor Systems Michael Schulte Week 13.
Embedded System Design Laboratory October 4, 2002Stanford University - EE281 Lecture #3#1 Lecture #3 Outline Announcements AVR Processor Resources –UART.
Scott Baker Will Cross Belinda Frieri March 9 th, 2005 Serial Communication Overview ME4447/6405.
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
Universal Asynchronous Receiver/Transmitter (UART)
1 Synchronous Serial IO Send a separate clock line with data –SPI (serial peripheral interface) protocol –I 2 C (or I2C) protocol Encode a clock with data.
Real-time Systems Lab, Computer Science and Engineering, ASU Quark SPI Interface (ESP – Fall 2014) Computer Science & Engineering Department Arizona State.
OCRP RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
AS Computing Data transmission. Basic data transmission Baud The rate that the voltage changes is called the Baud. If the voltage changes 10 times every.
OCRP RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
Essentials of Communication This simple model requires many guarantees. Sender Receiver Communication Link Data.
Unit 1 Lecture 4.
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
Communicating. The ATmega16 communicates through one of the following ways: Serial Peripheral Interface (SPI) Universal Synchronous and Asynchronous serial.
CE-2810 Dr. Mark L. Hornick 1 Serial Communications Sending and receiving data between devices.
Embedded Communication Protocols Don Heer 10/18/10 1.
Networked Embedded Systems Sachin Katti & Pengyu Zhang EE107 Spring 2016 Lecture 9 Serial Buses – SPI, I2C.
BIRLA VISHVAKARMA MAHAVIDYALAY SUBJECT: SPI PROTOCOL & MAX7221 DISPLAY INTERFACING SUBMITTED BY: KISHAN AVASTHI( ) MANSI CHANDEGARA( )
میکرو کنترلرهای AVR Serial Interfaces, I2C and SPI
1 Serial Peripheral Interface What is it? Basic SPI Capabilities Protocol Pros and Cons Uses Serial Peripheral Interface
©F.M. Rietti Communication Lines Fundamentals. ©F.M. Rietti LM-18 Computer Science SSI Embedded Systems I 2 Communication Lines Generally used to connect.
Serial Communications
Serial Communication Originally created by Anurag Dwidedi and Rudra Pratap Suman.
Serial Communication Buses: I2C and SPI
EE 107 Fall 2017 Lecture 5 Serial Buses – UART & SPI
SERIAL PERIPHERAL INTERFACE
Atmega32 Serial Programming Basics
DIGITAL DATA COMMUNICATION TECHNIQUES
EEPROM Comparison – Parallel or Serial
SPI Protocol and DAC Interfacing
DIGITAL DATA COMMUNICATION TECHNIQUES
Asynchronous Serial Communications
Serial Communication Interface: Using 8251
SPI Protocol and DAC Interfacing
UART Protocol Chapter 11 Sepehr Naimi
DIGITAL DATA COMMUNICATION TECHNIQUES
SPI Protocol Sepehr Naimi
Serial Communication 19th Han Seung Uk.
Serial Communications
Presentation transcript:

Anurag Dwivedi Rudra Pratap Suman

Scope of Communica tion Telephones and Cell Phones

Scope of Communica tion Internet

Scope of Communica tion Wireless networks

Scope of Communica tion Satellite Networks

Our Interests !!

Arduino Ethernet Shield Uses SPI to communicate with Master board

Accelerome ters Communicat ion through SPI

JPG Color Camera Uses UART to communicate with Master board

Essentials of Communication But this simple model requires many guarantees. Sender Receiver Communication Link Data

Guarantees in Communications The communication link exists. The communication link is sound. The sender and receiver are the correct nodes. The sender is sending the correct data. The receiver is able to correctly interpret the incoming data.

Protocols in Communication In order to have robust communication, the guarantees needs to be realized. To do so, we need an elaborate and standardized mechanism. These standard rules that defines the parameters of communications and ensures these guarantees are called protocol.

Advantages of Protocols Standardized, so interoperability is ensured. Usually include error-detection and error-correction mechanisms. Are available as implemented chips that can be directly used.

Types of Protocols There are different ways of categorizing protocols First Categorization : Second Categorization : Serial Mode Transfer Parallel Mode Transfer Synchronous Mode Transfer Asynchronous Mode Transfer

Serial and Parallel Mode SENDER RECIEVER SERIAL MODEPARALLEL MODE

Serial Vs Parallel Mode Parameter Reliability Speed Power Cost Complexity Range Serial Mode Parallel Mode ReliableUnreliable SlowFast LowHigh HighLow LongShort

Synchronous and Asynchronous Mode Pertains to sender-receiver synchronization. Sender sends data at a certain speed. For flexibility, protocols allow for multiple speeds.

Need of Synchronization SENDER T RECEIVER T/ Suppose Sender sends data with a Time Period of T What if Receiver doesn’t know the speed and assume it to be say T/2 The Data received will be

Synchronous Mode Sender sends a clock signal along with data at every rising / falling edge of the clock, the data value is read by the receiver. SENDER SENDER CLOCK RECIEVER

Asynchronous Mode There is no clock signal. The receiver and the sender communicate at a predetermined speed (bauds or bits per second). Baud Rate : Baud Rate is a measurement of transmission speed in asynchronous communication. The devices that allows communication must all agree on a single speed of information - 'bits per second'.

Synchronous Vs Asynchronous Mode Parameter Reliability Cost Complexity Synchronous Asynchronous Reliable Error Prone Expensive Inexpensive Complicated Simple

Transmission Modes SENDERRECIEVER Simplex Only one way transmission takes place

Transmission Modes SENDERRECIEVER Half-Duplex Two way transmission takes place but only one end can communicate at a time

Transmission Modes SENDERRECIEVER Full-Duplex Two way transmission takes place and both end can communicate simultaneously

SPI – Serial Peripheral Interface

SPI Serial ?? Because it works on serial mode of transfer. It is also synchronous and full duplex. Peripheral Interface. Because it has the capability of communicate with many nodes. How?? Let us see.

SPI In SPI, the sender and receiver follows a master-slave relationship. There may be multiple nodes in the network. One node is master, the rest are slaves. The communication is always initiated by the master. The slaves can communicate only with the master. How do master selects the slave??

SPI Schematics: Single Slave

SPI Pins CLK is generated by Master and is used as the mode is synchronous. MOSI is Master Out Slave In: Data sent by Master to Slave. MISO is Master In Slave Out: Data sent by Slave to Master. S ̅ S ̅ is slave select: Slave communicates with Master only if this pin’s value is set as LOW.

SPI Schematics: Single Slave

SPI Schematics: Multiple Slaves

Data Transfer in SPI M0 M1 M2 M3 M4 M5 M6 M7 S0 S1 S2 S3 S4 S5 S6 S7 MASTER SLAVE MOSIMISO

Data Transfer in SPI M1 M2 M3 M4 M5 M6 M7 S0 S1 S2 S3 S4 S5 S6 S7 M0 MASTER SLAVE MOSIMISO

Data Transfer in SPI M2 M3 M4 M5 M6 M7 S0 S1 S2 S3 S4 S5 S6 S7 M0 M1 MASTER SLAVE MOSIMISO

Data Transfer in SPI S0 S1 S2 S3 S4 S5 S6 S7 M0 M1 M2 M3 M4 M5 M6 M7 MASTER SLAVE MOSIMISO

SPI in Atmega 16

SPI Coding

Clock Polarity (CPOL) The value of CPOL bit decides the value of Clock (SCK) in its idle state. When CPOL = 1, SCK is 5V in idle state. When CPOl = 0, SCK is 0V in idle state. CPOLLeading (First) EdgeTrailing (Last) Edge 0 (low)RisingFalling 1 (high)FallingRising

Clock Phase ( CPHA) The settings of the Clock Phase bit (CPHA) determine if data is sampled on the leading (first) or trailing (last) edge of SCK CPHASample 0 (half)Leading Edge 1 (start)Trailing Edge

Modes of SPI Two - Two possible values of CPOL and CPHA bits gives rise to 4 modes of SPI ModeClock Polarity (CPOL)Clock Phase (CPHA)

SPI Transfer Format with CPHA = 0

SPI Transfer Format with CPHA = 1

Simple SPI Code char data = SPITransmit(‘a’); In case of master, the data is written on the register and send to the slave. In case of slave the data is written on the register and it waits for the master to transmit the data, when it also transmits its own data.

Master Code DDRB = 0b ; // configure SPI Master Pins ISR(INT0_vect) { // External Interrupt 0 data = SPITransmit(0x01); // when switch is pushed // send data }

Slave Code DDRB = 0b ; // configure SPI Slave Pins ISR(SPI_STC_vect) { // SPI Transceiver Interrupt data = SPDR ; // read the data if(data == 0x01){ PORTA = ~PORTA; // if data is correct toggle Led }

Thank You Question??