Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
0 votes
2 answers
21 views

Using SPI and GPIO in Pi OS Bookworm on Pi 3b v1.2

How can I control GPIO from the CLI when I have SPI enable. I need to add a Reset signal to an application that issues the reset via a shell script, prior to launching the application. ( the ...
Andys's user avatar
  • 1
0 votes
0 answers
19 views

Delay between writes of two spi.xfer for sending data to DAC

I am using Raspberry pi 3 for sending data through a DAC through SPI communication. Right now I am using AD5686 which is connected to the raspberry pi using SPI communication SPI0 (SCLK to CLK of DAC, ...
Guadrian BM's user avatar
-1 votes
0 answers
15 views

Synchronous data acquisition in Raspberry pi

Sir, I have an FPGA which is generating synchronous data and clock in range of few (~10) MHZ. I have one clock line (2 Mhz) and 8 data lines. All these 8 data bits are synchronous to clock line. I ...
Ranjeet's user avatar
-1 votes
1 answer
37 views

Digital potentiometer X9C104P with a Raspberry Pi 5

I've tried using a Raspberry Pi 5 to control a digital potentiometer X9C104P. I followed this wiring diagram: Potentiometer (POT) - Raspberry Pi INC: GPIO20 UD: GPIO21 Vh: 5V Vss: GND Vcc: 5V CS: ...
samia bouchfar's user avatar
0 votes
0 answers
22 views

Reading from MT6816 magnetic encoder with SPI connection using Python on Raspberry Pi 4

I am totally new to the field, don't really know what I'm doing and in need of help. I'm trying to read an absolute angle using an MT6816 14-bit magnetic encoder via SPI connection using Python on ...
Kannidhis's user avatar
0 votes
0 answers
22 views

Problem when testing module DAC MCP4922 with Raspberry Pi

I'm encountering an issue while testing a custom-designed DAC module that utilizes an MCP4922 chip as its primary processor. The vendor provided C language test code for ESP32-S3, but I intend to test ...
Hien_lee's user avatar
0 votes
0 answers
20 views

Implementing Precise Timing between values with Raspberry Pi and 16-bit DAC using py-spidev

I want to send values from an RPi to a DAC in order to generate an analog signal. The DAC is 16 bits, and I'm using the py-spidev library. Let's say I have a pre-prepared list of 1000 16-bit values ...
Thomas1234's user avatar
0 votes
0 answers
33 views

Raspberry Pi SPI2 Interface Not Working with MCP251xFD CAN Interfaces

I am working on a project involving a Raspberry Pi (RPi) where I need to access three CAN interfaces via three MCP251xFD chips. I have set up these interfaces using the RPi's SPIs (SPI0, SPI1, and ...
JohnA.Zoidberg's user avatar
0 votes
0 answers
31 views

Which Cable Should I Use to Send Serial Data From my PCB to a Raspberry Pi via USB?

My PCB has a 16-pin male connector with a 2.54mm pitch. I was going to connect this to my Raspberry Pi via its GPIO, but I have a PiSound sitting on it now, so my only other option is to connect to it ...
Jelani Thompson's user avatar
0 votes
1 answer
36 views

Changing SPI buffer size on ubuntu 22.04 LTS

Im trying to change buffer size for SPI communication for RPi with Ubuntu 22.04 LTS. There is no /boot/cmdline.txt. I have added line options spidev bufsiz=8192 to /etc/modprobe.d/spidev.conf but it ...
Adam Wasilewski's user avatar
0 votes
1 answer
25 views

Attaching an interrupt on SPI MISO pin

I am reading an ADC that signals when the data conversion is complete by setting the SPI MISO pin low. I would like to set an interrupt on that pin, but using the GPIO library to do so isn't working. ...
Scott's user avatar
  • 129
0 votes
0 answers
59 views

How can I use my Raspberry Pi as a CH341A Programmer(BIOS writer)?

I am trying to flash a custom BIOS to my motherboard. The motherboard's built-in software won't let me flash it because it's modded. I was told to get a CH341A Programmer to flash the modded BIOS ...
mranonymous7122's user avatar
0 votes
0 answers
39 views

Chip Enable CE0 or CE01 not working with spidev

I have enabled SPI via raspi-config and I can see /dev/spidev0.0 and /dev/spidev0.1. I can successfully execute the spidev_test.c (https://github.com/torvalds/linux/blob/master/tools/spi/spidev_test.c)...
kx3247's user avatar
  • 1
0 votes
1 answer
26 views

RPi4 - pigs bscx SPI slave not working

I have an ESP32 set to an SPI Master with 100kHz, Mode 2 and just want to send 0x19 to the RPi4 as a slave running pigpiod and using shell for output. When I use piscope, everything seems fine for me ...
karlo922's user avatar
0 votes
1 answer
27 views

Using SPI0 on Raspberry Pi for 3 to 4 slaves

I've been having troubles to use several readings using SPI on a raspberry pi 3B and I would like to get any solution, all my code is in python since everything then goes to a GUI So I have three ...
Ángel Navarro's user avatar
0 votes
0 answers
41 views

How to run SPI1 and SPI0 at the same time?

I am currently attempting to send and receive data from SPI0 to SPI1 on a singular raspberry pi. My Current code is as follows; from multiprocessing import Process import spidev import time import sys ...
Ben's user avatar
  • 11
0 votes
0 answers
58 views

Waveshare ePaper display via IT8951 hat driver for Raspberry pi 4 model B

I bought the 10.3 epaper display which I am trying drive it from a Raspberry Pi 4. The official wiki instructions (https://www.waveshare.com/wiki/10.3inch_e-Paper_HAT) is using BCM2835 which I assume ...
Kabira  K's user avatar
  • 101
0 votes
0 answers
42 views

Play Video on an LCD connected through SPI

How can I play a video on an lcd connected through SPI? I want to find a video player, a tool, a library, but all that I have found so far is designed for HDMI display. My actual solution is based on ...
Davide Davide's user avatar
0 votes
0 answers
38 views

WaveShare Touchscreen RPI4 B kivy Input are doubled

I am on a projet for school using kivy on Rasp pi 4 Model B and I am using a WaveShare 7" Touchscreen. Normal setup (Touchscreen plug on RPI) : When i use my mouse (pluged to the RPI), function ...
DamanZ4's user avatar
0 votes
1 answer
82 views

How to draw on a small TFT screen, after the end of the linux boot, (on a rPI)

I managed to have a TFT screen (160*128) working on my PI (via SPI) When the system boots, I can see the end of the boot and at the very end, the "login:" I would like to have a program (...
KrissNC's user avatar
0 votes
1 answer
204 views

SPI sending and receiving data

I hope you can help. I am currently using a raspberry pi 4b and want to be able to use the SPI capabilities. For my pi I have SPI0 and SPI1. The pins used are as follows; SPI0_MOSI - pin 19 (BCM_10) ...
Ben's user avatar
  • 11
0 votes
0 answers
106 views

Connect Raspberry Pi Pico to 93C46 trought Microwire (3-wire Protocol)

i searched to know if someone did that before, but i didn't find anything, some C code to read and write using Arduino, but when i try to convert it i failed because i'm new at MicroPython and ...
Hitotam's user avatar
0 votes
1 answer
316 views

Connecting Two SPI LCD to raspberry pi GPIO pins

I am doing my NEA project right now and I have a problem using 2 TFT LCD. Here are more details about the LCD 2.8" LCD SPI, Driver: ili9341 with touch version 1.2, this a picture of it: I have ...
Mohamed Ahmed's user avatar
0 votes
1 answer
598 views

Failed to add edge detection - Raspberry Pi 4 GPIO

I am trying to run a LoRa receiver using python from time import sleep from SX127x.LoRa import * from SX127x.board_config import BOARD BOARD.setup() class LoRaRcvCont(LoRa): def __init__(self, ...
Guilherme Gomes Zucco's user avatar
-1 votes
1 answer
55 views

Why My Spi Connection Is Not Getting started?

Hello Guys I Am New To Embedded & Rasberry PI. So In Order To Understand SPI Connection I Made An PI-PI SPI Setup PS. I am Using Two Rasbrry Pi Model 4 B with Raspi OS & i did the followings ...
Its_MEDev's user avatar
1 vote
1 answer
113 views

Need Help with nRF905 Transceiver Module on Raspberry Pi Zero

I recently bought a nRF905 Transceiver Module from Jaycar and am wondering how to use it. It is meant for an Arduino and I have found some libraries for it (nRF905 Library For Arduino - GitHub) I need ...
Arlo Michael's user avatar
0 votes
0 answers
285 views

Raw wiring to a ILI9341 TFT display

I'm trying to connect a RPi Zero W to a Winstar WF24LTYAJDNN0 LCD module with integrated ILI3941 controller. The LCD comes with the typical 40 pin flat cable with the following pinout: The LCD is ...
weirdgyn's user avatar
  • 122
2 votes
1 answer
197 views

Extending the SPI buffer size beyond 65536 bytes

I am trying to use the Raspberry Pi 4 model B to program the Lattice ICE40 FPGA chip via SPI. It requires continuous clock signal throughout the whole transmission of the bitfile, which is easily ...
martin.havelka's user avatar
0 votes
0 answers
75 views

TFT HSD - 9190J-D1 connection to Raspberry Pi model B

I have Raspberry Pi 4 Model B I want to connect SPI TFT 4" LCD HSD-9190J-D1 using GPIO pins. Kindly help me up with proper connections and necessary drivers required for the LCD to work as ...
Jiwan Rai's user avatar
0 votes
1 answer
52 views

Use different clock for SPI receive and send data on RPI4B

Has anyone here ever used two different clocks to synchronize sent and received data via SPI ? By that I mean, using a PIN clock1 for transmission and a PIN clock2 for reception. I don't know if it is ...
rdpdo's user avatar
  • 3
1 vote
1 answer
27 views

Outputting to SH1106 display with PIL only works from loaded files [closed]

I'm dealing with a maddening bug when trying to use an OLED module (sh1106 clone, interfaced over SPI) with a raspberry pi. I have stolen the following function from https://github.com/8TN/Raspberry-...
catalogue_number's user avatar
0 votes
0 answers
25 views

COM disconnects and program fails when including code trying to initialize SD card (RP2040 Pi Pico W running Arduino)

I'm having an issue where anytime I run a program such as the SD card read write example (Below) the COM port disconnects. The only changes I have made to the example code is I am using SPI1 instead ...
Rian Noble's user avatar
0 votes
0 answers
21 views

How to write to multiple outputs on a TLV5620CN over SPI?

How can I write to multiple output DACs at the same time? This is the function I am using. int DACCodes[4]; void writeVoltageSPI(int channel, float v, float maxV) { int code = (int)(256 * v / maxV)...
EOsgood's user avatar
0 votes
2 answers
153 views

SPI clock is not switching on RPi

I need to use SPI for a project I'm working on with a Raspberry PI, but the little bit of test code I wrote doesn't seem to work. #test program for spi import spidev import RPi.GPIO as GPIO from time ...
AMacDonald's user avatar
0 votes
1 answer
198 views

can't send spi message: Invalid argument

I'm using the SPI library SPI-Py with MFRC522 RFID Library. I'm getting this error when I run REad.py. This issue is related to the SPI-Py library can't send spi message: Invalid argument I have ...
niranjan's user avatar
1 vote
1 answer
169 views

SPI loaded but MOSI as input

I wrote a script to display data on a led matrix, controlled by a few GPIO for line selection and SPI to feed data for this line. This was working perfectly 2 days ago, I let the script display random ...
low's user avatar
  • 11
1 vote
0 answers
20 views

Cannot get WS28xx strip code working in eclipse swing

Hey all I have been looking at doing this for some time now. I ran across this posting and this is the type of led strip I am using. However, using that code seems to have errors when trying to add it ...
StealthRT's user avatar
  • 121
1 vote
1 answer
77 views

Using MAX7219 Dot Matrix module with Luma.Led on different GPIOs

I have a MAX7219 dot matrix module (this one) that I'm trying to run on my Raspberry Pi 4 with the Luma.LED library. Its documentation suggests the following GPIOs/pins be used: Board Pin Name ...
Vroni's user avatar
  • 11
2 votes
2 answers
392 views

SPI Clock Phase on CM4 spidev1.0

I have a CM4 Compute Module and am trying to set the clock phase on the second SPI channel. But the ioctl() to set mode returns an error whenever I attempt to set this phase bit: int fd = open("/...
Jon's user avatar
  • 121
3 votes
1 answer
350 views

Uninterrupted, endless SPI transfer - is it possible?

I wrote a linux driver for SPI protocol so RaspberryPi could communicate with my device that's using serial data transfer (the device has clock input and data output). It almost works, the problem is ...
PookyFan's user avatar
  • 133
2 votes
0 answers
150 views

spi overlay driver don't run due to shared pin11

I'm trying to run old FLIR Lepton driver on Raspberry Pi 3 Model B v1.2 (2015). FLIR SW driver here: https://www.flir.eu/developer/lepton-integration/lepton-integration-raspberry-pi/. PDF guide here: ...
Niko's user avatar
  • 21
3 votes
0 answers
233 views

Assistance with pigpio SPI slave bscXfer on Raspberry Pi 4

I am trying to write C code so my Raspberry Pi4 can be an SPI slave, and the SPI master can read data from the Pi4. I'm expecting to get this data from SPI master (in a continuous loop): 0x01 0x42 ...
dtbaker's user avatar
  • 151
2 votes
1 answer
320 views

2-ch-can-hat (mcp2515) on SPI1 rpi 3 b+

On a Raspberry Pi 1 Mod. B+ Raspberry Pi reference 2021-01-11 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 21090519d85bdaa1615d5d5057d37b09368ea5d2, stage2 Oct 29 2021 10:49:08 ...
martburg's user avatar
  • 121
1 vote
0 answers
465 views

SPI Chip Select (CS) Control?

I am working with spidev on my RPi4 project and I have noticed that there is a significant delay caused by the CS signal. I am using the hardware CS pin (CE0, pin header 24) to drive the CS signal for ...
zeruel.z's user avatar
2 votes
0 answers
195 views

Multiple SPI reads on Pi Pico requires reinitialisation

I'm playing around with reading in analogue inputs from an MCP3208 ADC via SPI. However, reading multiple inputs seems to cause a seg fault unless I reinitialise the SPI on each read/write. I've ...
user151296's user avatar
0 votes
2 answers
770 views

Pi Pico SPI Interrupt only fires once

I have set an interrupt for spi0 which fires only once. Here is my entire code: int main() spi_init(spi0, 1000 * 1000); spi_set_slave(spi0, true); gpio_set_function(...
Uncle Marvo's user avatar
0 votes
1 answer
907 views

Connecting MCP2515 with raspi

I am trying to connect mcp2515 can bus module with raspi 4b. On using pi@piv2:~ $ sudo ip link set can0 up type can bitrate 125000 the terminal freezes so i downgraded my terminal to 5.4.61-v7l ,t ...
VEDANT KABRA's user avatar
0 votes
0 answers
383 views

Adding two ENC2860 ethernets on 2 spi of Raspberry Pi Zero

I have successfully added enc2860 using spi0, I followed https://www.raspberrypi-spy.co.uk/2020/05/adding-ethernet-to-a-pi-zero/ to get it working without any issue on eth0. But I now want to add 2nd ...
Harish Patil's user avatar
1 vote
0 answers
1k views

How to use SPI touch screen with RPi?

I bought a SPI TFT 2.4" display with a resistive touchscreen from eBay (this one). The screen is ILI9341 and works fine with Python and displays what I want. But how do I make use of the touch ...
MLu's user avatar
  • 151
1 vote
0 answers
58 views

How do you connect 1 or more Waveshare 2.9inch eInk to Raspberry Pi 4 Model B (2018)?

Apologies for this newbie question, but I am not sure how to safely (?) connect at least one Waveshare 2.9inch eInk module to a Rasp Pi 4 Model B. I am assuming that the colored wires go into some of ...
ina's user avatar
  • 111

1
2 3 4 5
10