Questions tagged [spi]

Serial Peripheral Interface (SPI) is a serial, synchronous bus commonly used in embedded systems. It is most often used for communication between a microcontroller and peripheral hardware such as memories, shift registers, sensors, displays etc, but can also be used for MCU to MCU communication.

Serial Peripheral Interface (SPI) is a serial, synchronous, full duplex bus commonly used in embedded systems. It is most often used for communication between a microcontroller and peripheral hardware such as memories, shift registers, sensors, displays etc, but can also be used for MCU to MCU communication.

SPI was originally developed by Motorola as a hardware peripheral in their microcontroller products. It has become an industry de facto standard and pretty much every MCU made today has got hardware support for SPI. It is however possible to implement SPI without hardware support: a software-controlled SPI communication can be created by using only general-purpose I/O pins, so called "bit-banging".

SPI can be used either as a point-to-point communication between one node called master and another called slave, or as a system with one master and multiple slaves. The latter can be achieved by using either multiplexer circuitry on the slave select line or a so-called daisy chain implementation.

SPI consists of 4 digital signals:

  • MOSI, Master Output Slave Input. Data line for transmission from the master to the slave.
  • MISO, Master Input Slave Output. Data line for transmission from the slave to the master.
  • SCLK, Serial Clock (sometimes called SCK or just CLK)). The clock used for all synchronization, generated by the master.
  • SS, Slave Select. Chip select for the slave(s), active low signal.

Tag usage

Use this tag in combination with and the tag for the MCU being used, if applicable. For hardware-related questions, use https://electronics.stackexchange.com.


References

1385 questions
-2
votes
1 answer

I cannot use SPI to communicate TI ADS1299 with MSP432P401R in CCS

MSP432P401R is master ADS1299 is slave How to write SPI code, let MSP432P401R read data of ADS1299 The program I am using CCS(Code Composer Studio)
-2
votes
1 answer

SPI registor read write application in UEFI bootloader

I am new in UEFI system. I want to read/write the registors over SPI interface but not found any APIs or application in UEFI. It would be helpful if anyone can suggest the sample application or APIs for the same. Thanks in advance, Hardik
-2
votes
1 answer

Change SPI pins in Arduino

I read in the documentation that SPI pins are 10, 11, 12, 13, but my board has only few ports, so I can't use those specific ports, and I'd like to change them.
user8663266
-2
votes
1 answer

I want to use "spi.h" in raspberrypi (spi.h is header file of arduino)

I would like to use the Arduino sensor in raspberry pi. Since the sample file for the sensor is dedicated to the Arduino, the example header file is also dedicated to Arduino. The example code uses the spi.h file. Can I download the header file and…
-2
votes
1 answer

python install package error and adafruit pureio

enter image description here Hi i don't know how to solve this problem
-2
votes
1 answer

SPI EP93xx (TS7200 board with Linux)

I'm using a 7200 board from Embedded Arm. The board hosts the linux kernel 2.6 and mount an EP9302 arm9. We need to use the SPI interface in order to communicate with an accelerometer (the LIS3DSH) and some PT100 (MAX31865). Our approach to the…
Andak
  • 124
  • 12
-2
votes
1 answer

Raspberry Pi SPI Connection: transition diagram malfunctioning

I am working with the raspberry pi and atmega 32 to use and learn SPI. it should follow a transition diagram but somewhere in the atmega it goes wrong, I don't know where it is going wrong. this is the raspberry code #include…
Georges
  • 3
  • 3
-2
votes
1 answer

Reading 22 bits via SPI

I am trying to read ADC(ADS8320) values using SPI communication. I am using IAR embedded workbench for ARM and SM470R1B1 controller. In the data sheet it says first 6 bits are dummy read and next 16 bits is the actval data. I am trying to read 24…
verendra
  • 223
  • 3
  • 18
-3
votes
1 answer

How to turn on rgb leds connected to PT6965 LED controller using Pic32?

I have interfaced the PT6965 led controller with Pic32 over SPI using microchip harmony. My problem is I am unable to understand what data/ commands to write to led controller using spi that will turn on the 3 rgb leds connected to the led…
abdullah
  • 65
  • 10
-3
votes
1 answer

Communication Protocol for Transmitter Module

I am trying to figure out the communication protocol of the transmitter chip found inside an RC remote (FS-GT2B). Originally, I thought it was I2C but after some research it seems less likely because it is lacking some characteristic lines. The…
Alex
  • 3,441
  • 4
  • 18
  • 30
-4
votes
1 answer

Raspberry Pi C++ I2C/SPI Examples

Hello and please do not delete right away. I'm having trouble finding good CODE examples for the I2C/SPI programming on the Raspberry Pi using C++. I've looked at wiringPi and other sources but they don't give much documentation with their source…
-4
votes
2 answers

ILI9340/41 cheap 2.4" LCD display SPI - can't read from the controller

In one of my projects I use the cheap 2.4" 320x240 TFT display with a ILI9340/41 controller. It works quite good, taking into consideration the price, and I do not have any problems when I display something. But I can’t read anything. I think that…
0___________
  • 60,014
  • 4
  • 34
  • 74
-4
votes
1 answer

how to output a tring from an nfc tag to a text file using arduino uno and pn532?

iam in a deep trouble , I have an Arduino uno and a pn532 connected to it in SPI mode , I want to read a string from an nfc tag and output it to a text file , I have already managed to read from nfc tag and write on it easily , but what Iam facing…
-4
votes
2 answers

how the usb spi flashing device write program to atmega?

the atmega microcontrollers have the internal programmable memory.So the usb flash device write data to internal memory of atmega through spi or it store the program and works as slave?i also want to know can the atmega get program,file in the…
Lan...
  • 105
  • 1
  • 6
-4
votes
1 answer

C difference between char function(void) and void function(void)

For my thesis I'm using an ATmega16 to communicate with MCP2515 over SPI. When we are checking the example code to set up SPI as a slave mode in the Atmega16 datasheet we get next example code. void SPI_SlaveInit(void) { /* Set MISO output, all…
TMJ
  • 71
  • 1
  • 1
  • 7
1 2 3
92
93