Network and Systems Laboratory nslab.ee.ntu.edu.tw se.

Slides:



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

LOGO Lab Supervisor – Dr. WH Lau EE3271 Design Laboratory.
Network and Systems Laboratory nslab.ee.ntu.edu.tw 2010/12/31Wireless Sensor Network And Labs fall
ECE 371 Unit 13 - Part 1 Serial Peripheral Interface (SPI)
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
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
Analog And Digital Interfacing
Peripherals and their Control An overview of industrially available “peripheral devices” Some ideas for Laboratories and Quiz / Exam questions.
HD44780 LCD programming From the Hardware Side Design and implementation details on the way to a valid SPI-LCD interface driver.
Serial Communication Buses: I 2 C and SPI By Brody Dunn.
Guitar Effects Processor Critical Design Review October, 07, 2003 Groups Members: Adam Bernstein Hosam Ghaith Jasenko Alagic Matthew Iyer Yousef Alyousef.
Serial Peripheral Interface (SPI)
SPISPI Term Dr Abdelhafid Bouhraoua Term Dr Abdelhafid Bouhraoua.
SPI Compatible Devices Design and implementation details on the way to a valid SPI-LCD interface driver.
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.
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.
Baseboard Aavikkomursu 7.2. Aavikkomursu Micro- controller Extension port for programming microcontroller and sensor input Resistor RS485 interface chip.
HD44780 LCD programming From the Hardware Side
Network and Systems Laboratory nslab.ee.ntu.edu.tw 2011/12/23Wireless Sensor Network And Labs fall
LSU 10/22/2004Serial I/O1 Programming Unit, Lecture 5.
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
Ballooning Bundle. What is a Microcontroller? Small computer with a processor core, memory and programmable input/output Continuously repeats software.
CRKit RF Control WINLAB – Rutgers University Date : June Authors : Prasanthi Maddala, Khanh Le,
4.0 rtos implementation part II
Analog And Digital Interfacing
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.
Lecture 20: Communications Lecturers: Professor John Devlin Mr Robert Ross.
Network and Systems Laboratory nslab.ee.ntu.edu.tw.
University of Calcutta CBM 1 ROC Design Issues Dr. Amlan Chakrabarti, Dr. Sanatan Chattopadhyay & Mr. Suman Sau.
Network and Systems Laboratory nslab.ee.ntu.edu.tw.
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.
Microprocessor based Design for Biomedical Applications MBE 3 – MDBA XI : Project Outlooks.
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.
Revised: Aug 1, ECE263 Embedded System Design Lessons 27, 28 Serial Peripheral Interface.
Department of Electronic & Electrical Engineering Serial interfaces Serial Interfaces allow communication between devices sending one bit at a time. In.
Serial Peripheral Interface SPI I2C (i-squared cee)
ULTRA LOW CURRENT MEASUREMENT SYSTEM. A full diagram of a mass spectrometer.
SHIFT REGISTERS: CONVERTING BETWEEN SERIAL AND PARALLEL DATA Mark Neil - Microprocessor Course 1 Serial versus Parallel Data Transfers.
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( )
Networked Embedded Systems Pengyu Zhang EE107 Spring 2016 Lecture 8 Serial Buses.
میکرو کنترلرهای AVR Serial Interfaces, I2C and SPI
1 Serial Peripheral Interface What is it? Basic SPI Capabilities Protocol Pros and Cons Uses Serial Peripheral Interface
Serial Communication Buses: I2C and SPI
EE 107 Fall 2017 Lecture 5 Serial Buses – UART & SPI
Chapter D – Serial Connections to the RPi and Analog-to-Digital Converters
HCP – Holub’s Communication Protocol
I2C PROTOCOL SPECIFICATION
BJ Furman ME 106 Fundamentals of Mechatronics 15NOV2012
EEPROM Comparison – Parallel or Serial
SPI Compatible Devices
SPI Compatible Devices
SPI Protocol Sepehr Naimi
SPI Compatible Devices
HD44780 LCD programming From the Hardware Side
HD44780 LCD programming From the Hardware Side
Introduction to Arduino
Presentation transcript:

Network and Systems Laboratory nslab.ee.ntu.edu.tw se

Network and Systems Laboratory nslab.ee.ntu.edu.tw SPI Master–Slave mode Synchronous protocol All transmissions are referenced to a common clock Clock generated by the master (MCU) Four main signals Master Out Slave In (MOSI): data from master to slave Master In Slave Out (MISO): data from slave to master Serial Clock (SCLK or SCK): clock Chip Select (CS): select particular peripheral when multiple peripherals are connected to master

Network and Systems Laboratory nslab.ee.ntu.edu.tw SHT11 Relative humidity and temperature sensors Digital output Manufacturer defined interface two wires bi-direction 1.Use a GPIO pin as clock (SCK), it is always output direction 2.Use another GPIO as DATA, dynamic setting it to input(read) or output(write) direction

Network and Systems Laboratory nslab.ee.ntu.edu.tw Taroko Connections

Network and Systems Laboratory nslab.ee.ntu.edu.tw Start Transmission and Send Command How to start What are the commands available

Network and Systems Laboratory nslab.ee.ntu.edu.tw An Example: SHT11 Timing diagram Pull-up Data pin in output direction Set data pin to input direction, then SHT11 controls the DATA line

Network and Systems Laboratory nslab.ee.ntu.edu.tw Software Implementation

Network and Systems Laboratory nslab.ee.ntu.edu.tw Software Implementation

Network and Systems Laboratory nslab.ee.ntu.edu.tw Software Implementation

Network and Systems Laboratory nslab.ee.ntu.edu.tw Convert to Physical Values 12-bit humidity, 14-bit temperature Temperature Humidity

Network and Systems Laboratory nslab.ee.ntu.edu.tw Device Driver Download here 09/labs/sht11Driver.rar 09/labs/sht11Driver.rar Important functions in SHT1x_sensirion.c void sht1xInit(); void sht1xReset(); char sht1xMeasure(unsigned char *p_value, unsigned char *p_checksum, unsigned char mode); void sht1xCalculate(float *p_humidity,float *p_temperature);

Network and Systems Laboratory nslab.ee.ntu.edu.tw Functions char sht1xMeasure(unsigned char *p_value, unsigned char *p_checksum, unsigned char mode); mode: { TEMP, HUMI } Store measured value to *p_value Store 8-CRC checksum to *p_checksum void sht1xCalculate(float *p_humidity,float *p_temperature); Convert measured value to physical value Put the measured value in *p_humidity, *p_temperature Result will also place in *p_humidity, *p_temperature (overwrite)

Network and Systems Laboratory nslab.ee.ntu.edu.tw Example