4.0 rtos implementation part II

Slides:



Advertisements
Similar presentations
Chapter 14 Communications Introduction
Advertisements

Anurag Dwivedi Rudra Pratap Suman. Scope of Communica tion Telephones and Cell Phones.
Computing Machinery Chapter 10: Microcontrollers.
Serial Buses. Serial Bus Features Allows several devices to be connected to a set of common signal wires Reduces inter-connections and complexity Asynchronous.
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Guest Lecturer Pat Pannuto Lecture 10: Serial buses Oct 6, 2011.
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
EECS 373 Design of Microprocessor-Based Systems Prabal Dutta
PH4705 ET4305 Interface Standards A number of standard digital data interfaces are used in measurement systems to connect instruments and computers for.
RADIO FREQUENCY MODULE. Introduction  An RF module is a small electronic circuit used to transmit and receive radio signals.  As the name suggests,
Serial Communication Buses: I 2 C and SPI By Brody Dunn.
SPISPI Term Dr Abdelhafid Bouhraoua Term Dr Abdelhafid Bouhraoua.
7-1 Digital Serial Input/Output Two basic approaches  Synchronous shared common clock signal all devices synchronised with the shared clock signal data.
18 Nov 2003Ryan Kittredge Digital Communications Ryan Kittredge Technical Topic Report 19 November 2003.
ECE 353 Introduction to Microprocessor Systems Michael G. Morrow, P.E. Week 13.
Haptic Belt team Informational Presentation.  I 2 C is a form of control bus (multi-master) which allows communication between multiple integrated circuits.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Interfaces A practical approach. Lesson 2 I2C and SPI
SPI By Alexander Maroudis. Outline What is SPI? SPI Configuration SPI Operation Master Slave Setup SPI Transactions SPI Digital Potentiometer Example.
1 EECS 373 Design of Microprocessor-Based Systems Prabal Dutta University of Michigan Lecture 10: Serial buses Oct 6, 2011.
Technology Training that Works Hands of Data Communications, Networking & TCP/IP Troubleshooting.
USART Communication using the RS standard ETEC6416.
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)
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
Arduino Josh Villbrandt February 4, Digital Circuits Analog versus digital – What’s the difference? – How to represent an analog signal in a computer?
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK–
7/23 Inter-chip Serial Communication: SPI and I 2 C Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee.
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.
DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK
University of Calcutta CBM 1 ROC Design Issues Dr. Amlan Chakrabarti, Dr. Sanatan Chattopadhyay & Mr. Suman Sau.
11/16/2006 WSN Mote- MCU & Sensor Hardware 1 ECET 581 Wireless Sensor Networks Mote – MCU & Sensor Hardware 2 of 3 Fall 2006
1 Chap. 3 Interface. 2 Interface  Physical connection between node and transceiver  Network interface card (NIC)  Physical connection between transceivers.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
EECS 373 Design of Microprocessor-Based Systems Prabal Dutta
OCRP RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
©2008 R. Gupta, UCSD COSMOS Summer 2008 Peripheral Interfaces Rajesh K. Gupta Computer Science and Engineering University of California, San Diego.
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.
Communicating. The ATmega16 communicates through one of the following ways: Serial Peripheral Interface (SPI) Universal Synchronous and Asynchronous serial.
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( )
Genova May 2013 Diego Real – David Calvo IFIC (CSIC – Universidad de Valencia) CLBv2 1.
میکرو کنترلرهای AVR Serial Interfaces, I2C and SPI
Digital Signal Processor HANYANG UNIVERSITY 학기 Digital Signal Processor 조 성 호 교수님 담당조교 : 임대현
MICROCONTROLLER AND INTERFACING Presented by: Shefali Jethva ( ) Shivali Panchal ( ) Komal Soni ( ) Roll no. :- 14EC308.
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.
Lab 9 Multiprocessor, Buses, SPI, I2C. Multiprocessors Why multiprocessors? The structure of multiprocessors. Elements of multiprocessors: – Processing.
USING TV REMOTE AS A CORDLESS MOUSE FOR THE COMPUTER
CORDLESS MOUSE FEATURES BY TV REMOTE USING PIC MICROCONTROLLER
Serial Communication Originally created by Anurag Dwidedi and Rudra Pratap Suman.
Serial Communication Buses: I2C and SPI
Serial Communication Protocols And Embedded IoT
EE 107 Fall 2017 Lecture 5 Serial Buses – UART & SPI
SERIAL PERIPHERAL INTERFACE
EEPROM Comparison – Parallel or Serial
Asynchronous Serial Communications
SPI Compatible Devices
SPI Protocol Sepehr Naimi
Programmable Data Communication Blocks
CHAPTER SERIAL PORT PROGRAMMING. Basics of Serial Communication Computers transfer data in two ways: ◦ Parallel  Often 8 or more lines (wire.
Serial Communication 19th Han Seung Uk.
Serial Peripheral Interface Bus
Presentation transcript:

4.0 rtos implementation part II BEH30802 :: REAL-TIME EMBEDDED SYSTEM Mohamad Fauzi bin Zakaria mfauzi@uthm.edu.my 4.0 rtos implementation part II

ChibiOS/RT – Part II 4.5. Introduction to Serial Communication Protocol 4.6. Universal Asynchronous Receiver Transmitter (UART) 4.7. Inter-integrated Communication (I2C) 4.8. Serial Peripheral Interface (SPI)

Overview Serial Parallel Receiver Receiver 1 bit 1 word Transmitter

Serial vs parallel SERIAL PARALLEL COST Cheap Expensive SPEED Slow Fast TRANSMISSION AMOUNT Single bit 8 bits (8 data lines) Transmitter & Receiver TRANSMISSION LINES One line to transmit one to receive 8 lines for simultaneous transmission TRANSMISSION DISTANCE Long Short distance (synchronization)

Data transmission

Serial communication method

In-vehicle network

RS232 - UART Common baud rate: 9600 or11.2k bps Signal level: TTL (direct) or RS232(needs line driver) Was set by the Electronics Industries Association (EIA) in 1960, before the advent of TTL logic family. Therefore, logic 1 is represented by “-3 to -25V”, and logic 0 is “+3 to +25V”. Two types of RS232 pins: DB-25 and DB-9. Most important pins are Tx, Rx, and ground. To interface with microcontroller, we need line driver such as MAX232 (need capacitors) or MAX233 (no capacitors).

RS232 vs TTL RS232 TTL

Example of ttl uart

Inter-Integrated Circuit (I2C) Developed by Philips Semiconductor for TV sets in the 1980’s I2C devices include EEPROMs, thermal sensors, and real-time clocks Used as a control interface to signal processing devices that have separate data interfaces, e.g. RF tuners, video decoders and encoders, and audio processors. Limited to about 10 feet for moderate speeds

I2C Bus Configuration 2-wire serial bus – Serial data (SDA) and Serial clock (SCL) Half-duplex, synchronous, multi-master bus No chip select or arbitration logic required Lines pulled high via resistor

I2C Protocol Communication Speed (Data rate) Normal mode: 100 kHz Fast mode: 400 kHz Fast mode plus: 1MHz High-speed mode: 3.4MHz Ultra-fast mode: 5MHz

I2C Tradeoffs Advantages Disadvantages Good for communication with on-board devices that are accessed occasionally. Easy to link multiple devices because of addressing scheme Cost and complexity do not scale up with the number of devices Advantages The complexity of supporting software components can be higher than that of competing schemes (for example, SPI ). Disadvantages

Serial Peripheral Interface (SPI) Defined by Motorola on the MC68HCxx line of microcontrollers Generally faster than I2C, capable of several Mbps Applications: Like I2C, used in EEPROM, Flash, and real time clocks Better suited for “data streams”, i.e. ADC converters Full duplex capability, i.e. communication between a codec and digital signal processor

SPI Bus Configuration Synchronous serial data link operating at full duplex Master/slave relationship MOSI – master data output, slave data input MISO – master data input, slave data output 2 data signals: SCLK – clock /SS – slave select (no addressing) 2 control signals:

SPI vs. I2C Less overhead than I2C due to lack of addressing, plus SPI is full duplex. For point-to-point, SPI is simple and efficient More effort and more hardware than I2C For multiple slaves, each slave needs separate slave select signal

Spi protocol Master and slave must agree on parameter pair values in order to communicate CPOL CPHA Active edge Rising 1 Falling 2 Parameters, Clock Polarity (CPOL) and Clock Phase (CPHA), determine the active edge of the clock

SPI Protocol (cont.)