Questions tagged [spi]

SPI is a low-level 3 or 4 wire serial bus interface with clock (SCLK), data in (MISO) and data out (MOSI). The fourth wire is a Slave Select to uniquely select a device on the bus. This signal is usually active-low. Slave Select, Chip Select, CS#, SS# stand for the same function, typically. Be sure to check the datasheet, though. The SPI bus is a de facto standard lacking the formal specification.

Further reading:

1714 questions
17
votes
3 answers

SPI max distance

I have a PIC16F877 µController, connected via SPI to a MCP23S17 and the last it connected to an keypad and LCD screen, the distance between the µController and the MCP integrated circuit is 5m. My question is will it work or not? And if it does not…
athil tech
  • 171
  • 1
  • 1
  • 5
10
votes
3 answers

Can SS pin be tied low if only one SPI device is used?

I read online that to start an SPI transaction to an SPI supported device, the SS (slave select, aka chip select) line must be set to low for the entire transaction then be brought high at the end to end transaction. If I make a circuit containing…
user116345
9
votes
4 answers

What are some design concerns for off board SPI communication?

Overview: I am communicating among 3 custom pcb boards with dspic33's on them using SPI. I have a master and 2 slaves, but I am sending both the slaves the same data (and letting them choose what to pay attention to). Hardware setup: The two slaves…
Matt
  • 1,286
  • 11
  • 18
7
votes
1 answer

SPI with chip select to ground

If you have a SPI bus with only one device can you connect chip select to ground? I'm new to electronics, tinkering with a custom split keyboard design. I have a micro controller in the one half and a MCP23S17 IO expanded in the other. I have a five…
everett1992
  • 175
  • 4
6
votes
3 answers

SPI - RX and TX alternative names for MISO and MOSI?

In all datasheets up until now I have only seen MISO and MOSI in use as SPI data line identifiers. However the datasheet of an automotive microcontroller refers to these lines as SPI_TXD and SPI_RXD. I'd assume that this is just a different naming…
pfabri
  • 904
  • 9
  • 19
6
votes
2 answers

SPI communication

I am using TI's DSP 28335 to read data sensors using I2C, and SPI to send this data further to the FPGA. The device is set to use SPI in the slave mode with 8-bit data words, and I use interrupts. I have read SPI wiki page, and various other…
BЈовић
  • 165
  • 3
  • 9
4
votes
2 answers

How to code SPI Slaves?

This is a normal sequence for an SPI Read: I want to code for an SPI slave. How is this normally done? How can the slave respond so quick (in the next bit!) with the appropriate data out after it has received the address of the register the master…
cksa361
  • 3,834
  • 7
  • 35
  • 49
4
votes
1 answer

SPI Reading memory over SPI with Bus Pirate

I'm trying to learn about SPI and I have a old Bluetooth headset with SPI solder points on it. I've already soldered the corresponding {MISO,MOSI,CS,CLK} pins and connected them to the Bus Pirate correctly. The chip on the headset is a CSR-31315…
Aaron
4
votes
1 answer

Do the SPI modes have a specific application?

I recently started learning and applying the SPI protocol with a OLED display and it's been a good learning experience. The sample code of the display used the SPI Mode1. This made me wonder, if there are specific applications for each of the SPI…
J2018
  • 175
  • 1
  • 9
4
votes
5 answers

Does a SPI master always receive data at the same time it sends data?

I'm trying to communicate with the EEPROM using SPI and the image below illustrates the read status register sequence. The program I'm using checks the receive data register each time SPI finishes sending (send data register empty). My question is,…
Lkaf Temravet
  • 583
  • 10
  • 27
4
votes
3 answers

Do any devices support handshaking on SPI-ish bus without extra wires

The 4-wire SPI bus has a considerable speed advantage over I²C, but unfortunately so far as I know has no standard way to perform handshaking without using extra wires beyond the four (and four wires is already annoying enough as it is). For a…
supercat
  • 46,736
  • 3
  • 87
  • 148
3
votes
1 answer

SPI Modes - when to use modes 1 ,2 and 3

We know there are 4 modes in standard 4 wire SPI communication. Which are a result of 2 options for Clock phase (CPHA) and Clock polarity (CPOL). I understand how these 4 different modes work. I am aware of the fact the motorola did not fix the…
3
votes
3 answers

Maximum number of slaves for a single SPI line

In my application, I have to connect a series of SPI sensors to a microcontroller, and I need to understand how many sensors I can connect on a single SPI interface of the MCU. Searching on the internet, I understood that the maximum number of…
Federico Massimi
  • 788
  • 2
  • 15
3
votes
3 answers

SPI broadcast: send / receive to many slaves

SPI Master is connected to the slaves with common MISO, MOSI, and CLK lines, with individualized lines for the selection signals. So, slaves share the MISO, MOSI, and CLK lines. I want to broadcast from master to slaves. If I select all slaves at…
Franks
  • 33
  • 4
3
votes
2 answers

Is the Analog Devices "Introduction to SPI Interface" white paper wrong?

I am looking at the Analog Devices Introduction to SPI Interface and it has this diagram for SPI mode 2... It shows that the first data bits do not appear on MOSI and MISO until after (1) CS goes low, and then (2) CLK goes low. In other words, this…
bigjosh
  • 10,088
  • 32
  • 52
1
2 3 4 5 6 7