Questions tagged [spi]

The SPI bus, Serial Peripheral Interface, is a synchronous serial communication interface for short distance communication, e.g. between components in an embedded system such as the Pi. Devices communicate in full duplex mode using a master-slave architecture with a single master. The master device (typically the Pi) initates all communications.

Filter by
Sorted by
Tagged with
15 votes
3 answers
25k views

Add more than 2 SPI slaves

As what I see on the scheme, there are 2 channels for slaves - CS0 and CS1. Does it mean that I can only connect 2 chips, like MCP3008 or something? Or can I attach more slaves to these 2 attached ...
user avatar
10 votes
1 answer
4k views

Pi 4 I/O interface options... and where to find them

The BCM2711's hardware documentation lists multiple I/O interface options. Among others these are: up to 6 × I2C, up to 6 × UART (muxed with I2C), up to 6 × SPI (only five exposed on Raspberry Pi ...
user avatar
  • 15.5k
9 votes
0 answers
1k views

Cannot Use SPI frequency above 500 kHz

I am running Arch Linux ARM on a Raspberry Pi 2 Model B, and I am attempting to communicate with a TFT display. I am writing a kernel module to interface with the display using SPI, and it works, but ...
user avatar
8 votes
2 answers
12k views

What is the purpose of SCLK pin of SPI protocol?

I read about SPI(Serial Peripheral Interface) protocol and try to understand their pin functionalities. Where i read about SCLK pin, which is provide serial clock to synchronize the master and slave ...
user avatar
  • 622
8 votes
2 answers
20k views

Can Raspberry PI function as SPI slave? [closed]

I am new to Raspberry PI. Could I make Raspberry PI as SPI slave? It does not look like it is possible. Please help.
user avatar
  • 373
7 votes
3 answers
16k views

SPI: Raspberry PI master and Arduino slave

I'm trying to have a Raspberry PI act as a SPI master and send data to an Arduino Nano (one of the cheap clones). I partly succeeded, but I don't get a continuous communication, and some bytes get ...
user avatar
7 votes
1 answer
6k views

Can header pin 11 be used as GPIO17 in Windows 10 IoT?

I have an Energenie RF transmitter add-on board which fits onto the Raspberry Pi header (for more details, see https://energenie4u.co.uk/res/pdfs/ENER314%20UM.pdf). This board allows the Raspberry Pi ...
user avatar
  • 81
6 votes
2 answers
15k views

What is MOSI in Pi?

What is the significance of these pins MOSI MISO and SS? I am looking at SparkFun DeadOn RTC Breakout - DS3234
user avatar
  • 81
6 votes
3 answers
12k views

How to use SPI on Raspberry Pi 3?

I have a Raspberry Pi 3, and I would like to use it to communicate with an SPI device. The pins from the SPI device have been connected to the appropriate headers on the board. Windows 10 IoT ...
user avatar
  • 198
6 votes
1 answer
8k views

Raspberry Pi as slave

I am using a Pi compute module and wish to make two of them to communicate to each other. I have hooked up some slave I2C devices to it (RTC, Temperature sensor). So I don't think making Pi as slave ...
user avatar
  • 383
6 votes
1 answer
2k views

Does overclocking affect the SPI (APB) clock?

The current config.txt allows one to change arm_freq, gpu_freq, core_freq, h264_freq, isp_freq, and v3d_freq. In addition, there is support for the kernel to change clocks on demand and based on ...
user avatar
  • 1,491
6 votes
1 answer
3k views

Pi to Pi Communication over GPIO / USB

I have a Pi Zero that I would like to use to communicate with a B+. In theory I can connect an adaptor cable and a WiFi or Ethernet USB dongle to the Zero, and do the same on the B+. However, as an ...
user avatar
  • 173
5 votes
2 answers
13k views

Connecting to an RC522 RFID reader

I'm trying to connect an RC522 RFID reader to the a Raspi via its SPI port. Up till now, I have tried several different pieces of code that are supposedly working, however, I have had no success with ...
user avatar
  • 151
5 votes
1 answer
164 views

raspberry pi 4 using SPI 4 & 5 at the same time causes kernel oops and crashes the whole system

intro i want to use multiple SPI busses at the same time. but when i use to use SPI 4 and SPI 5 at the same time it crashes the whole system it doesn't crash instantly sometimes it takes 10 seconds ...
user avatar
  • 51
5 votes
1 answer
2k views

SPI (spidev) Communication with PLL

I am trying to program a PLL device with SPI on the RPI using spidev inside Python. I want to rewrite all the values inside the registers on the AD9553 device to allow for a very specific ...
user avatar
4 votes
3 answers
19k views

Rpi3 missing spi-bcm2708 module

I installed Raspbian 4.1.18-v7+ on my new RPi 3 and WiFi works great however when I proceed with instructions for connecting the MCP3009 ADC I don't find spi-bcm2708 listed in /etc/modprobe.d/raspi-...
user avatar
  • 41
4 votes
3 answers
440 views

What hardware peripherals might be capable of reading 6.144, or better yet, 9.216 megabits/second?

I'm hoping to interface a Raspberry Pi 4 with an 8 channel, 48 kHz ADC. Ideally a 24 bit ADC, which if my math is right means 9.216 megabits per second. But a 16 bit ADC would be acceptable: that ...
user avatar
4 votes
1 answer
10k views

Control seconds SPI interface with SpiDev

Is there any option to control the second SPI interface of Raspberry Pi 2 B with SpiDev? http://pinout.xyz/pinout/spi Pin 19, 21, 23 are SPI0 and Pin 35, 38, 40 are SPI1. SPI0 works perfect, but if ...
user avatar
  • 43
4 votes
3 answers
15k views

How to enable SPI1 and SPI0 at the same time?

I have installed a LCD screen that use my SPI0 bus and I2C but i want to connect my RFID reader to the same raspberry. My lcd screen can you see here: https://www.adafruit.com/product/1601 SPI1 will ...
user avatar
4 votes
1 answer
6k views

SPI enabled in device tree, but I can't use it

I am trying to use SPI interface on Raspberry Pi 1 B (OS: Raspbian July 2017, kerenl 4.9.5). To do this, I am using wiringPi. I confirmed that wiringPi works via gpio readall To load SPI: gpio load ...
user avatar
  • 279
4 votes
1 answer
873 views

Raspberry Pi SPI and interbyte delay

I've got a position sensor that I need to read out via SPI from the Raspberry Pi. The sensor is a MLX90316, that requires interbyte spacing in the SPI message. Typically, I need something like this (...
user avatar
4 votes
1 answer
2k views

Trouble using spidev after RPi.GPIO

I'm using a Pi 3B to interface with an SPI device. My program is written in Python 2, the Pi is the SPI master and the external device is the slave. I am using both the spidev module and the RPi.GPIO ...
user avatar
  • 75
4 votes
1 answer
5k views

How to control digital potentiometer using the SPI interface

I'm trying to control a digital potentiometer using RPi's SPI interface but for some reason it is failing, and I can't figure out why. I have successfully controled the potentiometer by manually ...
user avatar
  • 195
4 votes
1 answer
2k views

What cable do I need to connect an SPI (4-wire) interface?

I have received an e-ink display as a gift. The connection interface is SPI. I would assume that I need to find a cable/adaptor that would output to different GPIO (I have a breadboard so it should be ...
user avatar
4 votes
1 answer
2k views

How can I use SPI to communicate with 3 or more Arduinos?

I have 3 arduino's each with 6 LDR (light sensors) for a total of 18 analog inputs giving 0 to 1023 of data. What I'd like to do is to get all 18 sensor data from each arduino within 1 second. I ...
user avatar
4 votes
1 answer
3k views

How to connect Raspberry Pi and Arduino with SPI?

I'd like to connect my Raspberry Pi and my Arduino Uno with SPI. I saw a solution here, but sy wrote at the end that this is wrong, because Raspberry Pi transmitting/recieving 3,3V on the pins and ...
user avatar
  • 111
4 votes
1 answer
1k views

Sampling on the Pi using MCP3004

I am trying to sample an analog voltage signal on the Raspberry Pi using an MCP3004 ADC. I am using the spidev package and the basic code is something like: import spidev import time list = [] ...
user avatar
4 votes
1 answer
1k views

SPI access via C# .NET Core console app

I do not have much experience with C# or Linux/Raspbian so would like some advice/guidance please. Basically I need to write a C# .NET Core console app which will run on a Raspberry Pi Compute 3 ...
user avatar
  • 41
3 votes
1 answer
2k views

Write to spi EEPROM in Raspberry Pi 4

The Pi4 has 512Kb of EEPROM which hold the bootloader. Does anyone know if it is possible to write to spi memory to be used in programs in the user space without corrupting the bootloader? Is there ...
user avatar
3 votes
1 answer
6k views

SPI transfer fails with buffer size greater than 4096

I'm trying to 8192 bytes over SPI in a single transfer, but for some reason anything over 4096 bytes fails to send. How can I enable larger data transfers? int ret; uint8_t txn[] = { 0x00, ... }; ...
user avatar
  • 133
3 votes
3 answers
13k views

Are the SPI pins 5V tolerant?

I am looking at programming a ATMEGA328/Arduino Uno over the SPi pins and Adafruit has a tutorial on how to do it - > https://learn.adafruit.com/program-an-avr-or-arduino-using-raspberry-pi-gpio-pins?...
user avatar
3 votes
2 answers
6k views

How to check if SPI is enabled and functional on Raspi 3b+?

I have run raspi-config and enabled SPI and also verified that /boot/config.txt contains the line: dtparam=spi=on However, when I run lsmod | grep spi I get the following: spidev ...
user avatar
  • 135
3 votes
2 answers
1k views

Re-configure SPI-CS as gpio while using SPI

I am on a raspberry pi 4. Using both SPI's with no need for either chip select. I'm running out of I/O and could really use those. Does anyone know if there is a way to repurpose the SPI chip selects ...
user avatar
3 votes
2 answers
1k views

Rpi reading only zero output results from SPI 10-bit ADC MCP3008 problem

I am attempting to make a temperature monitor based on these links: 1. https://bitbucket.org/pschow/rpiadctherm/src/dbfe8101eeb4/basiclogmcp.py?at=master 2. https://www.paulschow.com/2013/08/...
user avatar
3 votes
2 answers
5k views

Mono C# SPI interface

Is there any way that I can interface with an SPI pin extender from a Mono C# application running in Arch Linux on the RPi? EDIT: I want to use the hardware SPI interface like can be done with SpiDev,...
user avatar
  • 307
3 votes
1 answer
418 views

High level of noise of SPI pins on RPi Zero W

I have a zero W powered via USB from a laptop. I have setup up for the SPI drivers and run a very simple test program which is: import spidev import time spi = spidev.SpiDev() spi.open(0, 0) ...
user avatar
3 votes
1 answer
881 views

SPI module on Raspberry Pi 2 not working

I followed all steps on SPI module on Raspberry Pi 2, without success, no way to make this work on a Pi2... On /boot/config/txt there is: dtparam=spi=on dtoverlay=spi-bcm2835 On /etc/modules: spi-...
user avatar
3 votes
1 answer
369 views

Why is I2C disabled by default?

It seems that, to use I2C, we need to: un-blacklist I2C with sudo nano /etc/modprobe.d/raspi-blacklist.conf enable I2C kernel module with sudo nano /etc/modules Why is it disabled + blacklisted by ...
user avatar
  • 674
3 votes
1 answer
3k views

Delay between bytes using py-spidev for SPI communication on Raspberry Pi

I am attempting to read/transfer data between an instrument and Raspberry pi 2, using the RPi as the Master and instrument as the slave. The data sheet states I must have a 9 ms delay between sending ...
user avatar
3 votes
3 answers
11k views

SPI library installation error

I want to read and write RC522 RFID by using raspberry pi. For that I want configure SPI communication. First I enable SPI in raspi.config. After that I tried to download SPI-Py package to enable SPI ...
user avatar
  • 189
3 votes
2 answers
2k views

SPI DMA and continuous transfers

I'm building a project using the MCP3914 8-channel analog front end (ie ADC) device connected to the Raspberry Pi's SPI peripheral. The device has a continuous read mode where you request the value ...
user avatar
  • 171
3 votes
1 answer
1k views

Pi Zero SPI too slow (spi_bcm2835)

I am running a display using SPI. When running it on my Pi Model B, everything runs fine and fast. But when connecting it to my Zero instead, it runs very slow. Then I put the SD card of my Zero in ...
user avatar
  • 147
3 votes
1 answer
944 views

Read synchronous serial communication with Raspberry Pi

I am evaluating different Linux Plattforms and would like to know: Is it possible to read synchronous serial data at 300 to 350 kbaud with any Raspberry Pi? I am getting the data as RS422. Thus I ...
user avatar
3 votes
0 answers
196 views

How to write a Kernel module using SPI properly?

I have no experience writing kernel modules. I build some examples with gpio interrupts and they worked prety well. Now I want to use SPI from my kernel module and I will explain why I need it. I am ...
user avatar
3 votes
1 answer
558 views

Conflicting dtoverlays and framebuffer

I have a RPi3 with latest standard kernel. I am making use of spi1. In config.txt I have the line: dtoverlay=spi1-3cs. I have 2 ADC's connected to spi1 and all seems fine, using an HDMI screen to ...
user avatar
3 votes
0 answers
2k views

Pi4J and Mifare RC-522 via SPI

I am having problems with coding a program that allows me to read RFID Tags with Pi4J on my Raspberry Pi 2 Model B. I am totally new to Python and would prefer a program written in Java to save some ...
user avatar
3 votes
0 answers
505 views

Raspbian Jessie+ breaks SPI (RFID Reader MFCR 522)?

Long version: I have a very odd problem: I connected a Mifare MFRC 522 RFID Reader to my raspberry Pi (it handles communication via SPI). For that I used one of the many Tutorial already on the ...
user avatar
2 votes
3 answers
3k views

How can Rpi read ADS1256 ADC Data

I am using the AD/DA Hat from WaveShare https://www.waveshare.com/wiki/High-Precision_AD/DA_Board I want to realize a continuous readout of the data. It worked very well so far, but I am not so ...
user avatar
2 votes
4 answers
2k views

Multiple Rpi Serial Ports Problem

So I am undergoing a project where I will need to add 20 UART (RX/TX) to a single raspberry Pi 3. Each device runs at 9600 After looking at the pi, I found it only has 1 UART on it. What would be ...
user avatar
  • 123
2 votes
2 answers
12k views

Unable to test SPI interface

I followed the instructions given in the blog and everything got executed without any errors. But in the end Link Ran this script: wget https://raw.githubusercontent.com/raspberrypi/linux/rpi-3.10.y/...
user avatar
  • 161

1
2 3 4 5
10