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
14
votes
3answers
24k 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 ...
10
votes
1answer
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 ...
9
votes
0answers
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 ...
8
votes
2answers
19k 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.
7
votes
2answers
11k 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 ...
7
votes
3answers
15k 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 ...
7
votes
1answer
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 ...
6
votes
2answers
14k 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
6
votes
3answers
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 ...
6
votes
1answer
7k 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 ...
6
votes
1answer
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 ...
6
votes
1answer
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 ...
5
votes
2answers
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 ...
5
votes
1answer
109 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 ...
5
votes
1answer
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 ...
4
votes
3answers
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-...
4
votes
3answers
416 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 ...
4
votes
1answer
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 ...
4
votes
1answer
5k 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 ...
4
votes
1answer
821 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 (...
4
votes
1answer
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 ...
4
votes
1answer
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 ...
4
votes
1answer
1k 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 ...
4
votes
1answer
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 ...
4
votes
1answer
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 ...
4
votes
1answer
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 = [] ...
4
votes
1answer
983 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 ...
3
votes
1answer
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 ...
3
votes
1answer
5k 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, ... }; ...
3
votes
3answers
12k 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?...
3
votes
2answers
5k 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 ...
3
votes
2answers
883 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/...
3
votes
2answers
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,...
3
votes
1answer
346 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) ...
3
votes
3answers
13k 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 ...
3
votes
1answer
860 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-...
3
votes
1answer
337 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 ...
3
votes
1answer
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 ...
3
votes
3answers
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 ...
3
votes
2answers
1k 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 ...
3
votes
0answers
156 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 ...
3
votes
1answer
502 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 ...
3
votes
1answer
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 ...
3
votes
0answers
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 ...
3
votes
0answers
500 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 ...
2
votes
3answers
2k 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 ...
2
votes
4answers
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 ...
2
votes
2answers
657 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 ...
2
votes
2answers
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 https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md Ran this ...
2
votes
2answers
1k views

What are my options for using my Raspberry Pi 3 as an SPI-Slave?

It seems that it isn't officially supported (no official drivers) according to a similar question on this site. Do I have to write the driver myself or are there inofficial drivers that I can use? Is ...

1
2 3 4 5
9