SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is...
Transcript of SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is...
![Page 1: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/1.jpg)
SPI 4-Wire3-Wire
![Page 2: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/2.jpg)
Real Time Embedded Systems
www.atomicrhubarb.com/embeddedLecture 1 – January 17, 2012
Topic
![Page 3: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/3.jpg)
Section Topic
• Where in the books– Catsoulis chapter/page– Simon chapter/page– Zilog UM197 (ZNEO Z16F Series Flash Microcontroller Contest Kit User Manual)
– Zilog UM171 (ZiLOG Developer Studio II—ZNEO User Manual)
– Zilog PS220 (ZNEO Z16F Series Product Specification)
– Zilog UM188 (ZNEO CPU Core User Manual)
– Assorted datasheets
![Page 4: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/4.jpg)
![Page 5: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/5.jpg)
Synchronous Serial Buses
1-wire 2-wire 3-wire 4-wire
… but not in this order
![Page 6: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/6.jpg)
Serial Buses
Communication between components Typically between integrated circuit components CPU to peripherals
Typically short distances (at least that was the plan)
Number of wires = number of SIGNAL wires Power & ground not included in the counting
Usually synchronous (data on one line and clock on another)
Lots of variety, lots of similarity.
![Page 7: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/7.jpg)
The nice thing about standards is that there are so many of them to choose from.
- Andrew Tannenbaum (or was it Grace Hopper)
![Page 8: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/8.jpg)
Why so many?
• 1,2,3,4 wire?
![Page 9: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/9.jpg)
Why so many?
4-wire – SPI – Motorola 3-wire – Maxim IC
Microwire – National Semiconductor 2-wire – I2C – Phillips Semiconductor 1-wire – Dallas Semiconductor
SensorPath – National SemiconductorUNI/O - Microchip
![Page 10: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/10.jpg)
SPI (4 wire)
Serial Peripheral Interface 4 wires (really 3 + 1 for each device) Low Cost Simple Intended for CPU to Peripheral
communication and control. Defined by Motorola.
![Page 11: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/11.jpg)
SPI Specification
The Specification is hidden inside the HC08 microcontroller data sheets
Motorola Semiconductor is now Freescale Semiconductor.
Defines 4 signals
![Page 12: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/12.jpg)
SPI Signals
SCLK – Serial Clock MISO – Master In, Slave Out MOSI – Master Out, Slave In SS – Slave Select
Based on shifting data between 2 shift registers.
![Page 13: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/13.jpg)
Whats a shift register?
![Page 14: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/14.jpg)
Shift Register
A cascade of flip flops sharing the same clock. The output of any one but the last flip-flop connected to the input of the next one in the chain. Resulting in a circuit that shifts by one position the one-dimensional "bit array" stored in it.
![Page 15: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/15.jpg)
SPI Signals
• Swap 2 bytes, 1 bit at at time using the BRG as our serial clock.
![Page 16: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/16.jpg)
• Multiple chips can beconnected to the master.
• Individual SS wires are necessary to select theone we want to talk to.
![Page 17: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/17.jpg)
SPI Modes
4 timing modes Based on clock polarity and clock
phase.
![Page 18: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/18.jpg)
![Page 19: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/19.jpg)
![Page 20: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/20.jpg)
Timing
It is common to see a reference to the SPI mode as CKPOL = 0, PHASE = 0
This is by far the most common SPI transfer.
![Page 21: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/21.jpg)
SPI data
Is device specific Some need a single byte Some need multiple bytes Reads follow writes A dummy write is necessary to initiate
a read.
![Page 22: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/22.jpg)
What?
• A dummy write is necessary to initiate a read.
![Page 23: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/23.jpg)
To read THIS data we need to write something (anything) to shift the slave data to the master.
![Page 24: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/24.jpg)
What if...• ... I only have• one SS pin?
?
![Page 25: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/25.jpg)
SPI Devices
IO Expanders Clocks Temperature Sensors Non-volatile memory ... lots of things.
![Page 26: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/26.jpg)
![Page 27: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/27.jpg)
ESPI on the ZNEO
Enhanced Serial Peripheral Interface
![Page 28: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/28.jpg)
ESPI• The Enhanced Serial Peripheral Interface (SPI) is a synchronous
interface allowing several SPI-type devices to be interconnected. SPI-compatible devices include EEPROMs, Analog-to-Digital Converters, and ISDN devices. Features of the SPI include:
• Full-duplex, synchronous, character-oriented communication• Four-wire interface• Data transfers rates up to a maximum of one-fourth the system
clock frequency• Error detection• Write and mode collision detection• Dedicated Baud Rate Generator
![Page 29: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/29.jpg)
ESPI Pins
• PC2 - /SS• PC3 - SCK• PC4 - MOSI• PC5 - MISO
![Page 30: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/30.jpg)
ESPI Block Diagram
![Page 31: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/31.jpg)
What was that thing we could do to access multiple
SPI devices with onlyONE /SS pin?
![Page 32: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/32.jpg)
![Page 33: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/33.jpg)
![Page 34: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/34.jpg)
ESPI
Several Modes Master controller of a single device Slave Device Master controller of multiple devices
![Page 35: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/35.jpg)
ESPI Registers
ESPIDATA – Byte to be transmitted or byte received
ESPITDCR – Transmit Data Command Register ESPICTL – Configuration register ESPISTAT – Status Register ESPISTATE – State register ESPIMODE – More configuration ESPIBRH/L – Baud Rate
![Page 36: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/36.jpg)
ESPIDATA
![Page 37: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/37.jpg)
ESPICTL
![Page 38: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/38.jpg)
![Page 39: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/39.jpg)
![Page 40: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/40.jpg)
SPISTAT
![Page 41: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/41.jpg)
![Page 42: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/42.jpg)
SPIMODE
![Page 43: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/43.jpg)
SPIBRH,L
![Page 44: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/44.jpg)
SPI recipe
SPI
1. Configure SPI pins (alternate function)2. Configure ESPISTL (phase, pol, etc)3. Configure ESPIMODE (ssio, etc)4. Set ESPI BRG5. Write the spi_read functions **6. Write the spi_write functions **7. Write device specific functions8. Configure interrupts if desired9. Write Interrupt Service Routine, set vector10. Configure SPI to generate interrupts
(set DIRQE bit of ESPICTL)10. Enable interrupts (EI)11. Enable SPI (set bit 0 of SPICTL)
** non-trivial
![Page 45: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/45.jpg)
SPI Details
Data read/written is device specific.
![Page 46: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/46.jpg)
DS1722
This is on the ZNEO developer board
![Page 47: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/47.jpg)
![Page 48: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/48.jpg)
DS1722
Get the datasheet !
![Page 49: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/49.jpg)
![Page 50: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/50.jpg)
Note
CE = active HIGH /SS = active LOW
Use the SSPO bit of the ESPIMODE register to control this.
![Page 51: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/51.jpg)
![Page 52: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/52.jpg)
![Page 53: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/53.jpg)
DS1722 Error
![Page 54: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/54.jpg)
3-wire
![Page 55: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/55.jpg)
3-Wire/Microwire
The MICROWIRE protocol is essentially a subset of the SPI interface, specifically CPOL = 0 and CPHA = 0.
The Maxim 3-wire interface is found on some ICs from Maxim. The data flow to and from the device is multiplexed on one pin (DQ) while SPI needs two separate signals (MOSI, MISO).
![Page 56: SPI 4-Wire 3-Wire - Atomic Rhubarb SPI.pdf · • The Enhanced Serial Peripheral Interface (SPI) is a synchronous interface allowing several SPI-type devices to be interconnected.](https://reader030.fdocuments.us/reader030/viewer/2022032611/5ae941467f8b9a36698b629a/html5/thumbnails/56.jpg)
ESPI ExampleExample_SpiDs1722
Read from the DS1722 SPI Temperature sensor