Presentation is loading. Please wait.

Presentation is loading. Please wait.

SPI By Alexander Maroudis. Outline What is SPI? SPI Configuration SPI Operation Master Slave Setup SPI Transactions SPI Digital Potentiometer Example.

Similar presentations


Presentation on theme: "SPI By Alexander Maroudis. Outline What is SPI? SPI Configuration SPI Operation Master Slave Setup SPI Transactions SPI Digital Potentiometer Example."— Presentation transcript:

1 SPI By Alexander Maroudis

2 Outline What is SPI? SPI Configuration SPI Operation Master Slave Setup SPI Transactions SPI Digital Potentiometer Example (EE 583) SPI Peripheral Types SPI and Microcontrollers ESBUS

3 SPI (Serial Peripheral Interface) Developed by Motorola Developed by Motorola Also known as MicroWire (National Semiconductor), QSPI (Queued),MicrowirePlus Semiconductor), QSPI (Queued),MicrowirePlus Synchronous Serial Communication

4 SPI Configuration Primarily used for serial communication between a host processor and peripherals. Can also connect 2 processors via SPI SPI works in a master slave configuration with the master being the host microcontroller for example and the slave being the peripheral

5 SPI Operation For SPI, there are Serial Clocks (SCLK), Chip Select lines (CS), Serial Data In (SDI) and Serial Data Out( SDO) There is only one master, there number of slaves depends on the number of chip select lines of the master. Synchronous operation, latch on rising or falling edge of clock, SDI on rising edge, SDO on falling edge Operates in 1 to 2 MHz range Master sends out clocks and chip selects. Activates the slaves it wants to communicate with

6 Master Slave Setup In this setup, there are 3 slave devices. The SDO lines are tied together to the SDI line of the master. The master determines which chip it is talking to by the CS lines. For the slaves that are not being talked to, the data output goes to a Hi Z state Multiple Independent Slave Configuration

7 Master Slave Setup Multiple slave cascaded In this example, each slave is cascaded so that the output of one slave is the input of another. When cascading, they are treated as one slave and connecting to the same chip select

8 SPI Timing Diagram EEPROM Read

9 SPI Digital POT (EE 583) We used a Microchip digital POT in EE 583 with SPI interface. Motorola 68HC12 had SPI built in hardware, very easy to use. Data we sent to POT via SPI consisted of 2 bytes. Command Byte- XXC1C0XXP1P0 C1C0 determines type of command, eg. 01 = Write Data 10 =Shutdown P1P0 Determines which potentiometer is affected by the command 00 = Nothing affected 01 = Command executed on POT 0 10 = Command executed on POT 1 11 = Command executed on both POT’s Data byte indicates value of the wiper

10 SPI Potentiometer Transaction

11 SPI Peripheral Types Converters (ADC, DAC) Memories (EEPROM, RAM’s,Flash) Sensors (Temperature, Humidity, Pressure) Real Time Clocks Misc- Potentiometers, LCD controllers, UART’s, USB controller, CAN controller,amplifiers

12 Peripherals Vendors that make these peripherals : Atmel –EEPROM, Dig. POT’s Infineon- Pressure Sensors, Humidity Sensors Maxim- ADC, DAC, UART, TI- DSP’s, ADC, DAC National Semiconductor- Temperature Sensors, LCD/USB controllers

13 SPI and Microcontrollers Motorola 68HC12 Has SPI built in hardware. Easy to integrate. See EE583 Intel 8051 Depending on Models, Most Cygnal products have I 2 C and some have SPI also built in hardware for easy integration.

14 Esbus Sensors bus Being developed by Esensors Inc, (see www.eesensors.com for more info)www.eesensors.com 6 wire sensor bus with modular connector based on modified SPI Byte of data is exchanged between the master and slave Optical isolators provide ground isolation for safety and noise reduction Data is transmitted from master along EDI lines The signal is connected to the data input to SPI serial bus on microcontroller Sensor information from slave are transmitted on EDO line to output of remote sensor Data line is connected to SDO in sensor end. Isolated DC to DC supply is used to retain ground isolation (optional)


Download ppt "SPI By Alexander Maroudis. Outline What is SPI? SPI Configuration SPI Operation Master Slave Setup SPI Transactions SPI Digital Potentiometer Example."

Similar presentations


Ads by Google