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.
490
questions
0
votes
1
answer
16
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. ...
0
votes
0
answers
23
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 ...
0
votes
0
answers
25
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)...
0
votes
1
answer
19
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 ...
0
votes
1
answer
26
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 ...
0
votes
0
answers
32
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
...
0
votes
0
answers
41
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 ...
0
votes
0
answers
28
views
How to enable SPI1 and SPI0 at the same time on Linux?
I'm trying this:
How to enable SPI1 and SPI0 at the same time?
on Simply Linux 10.2 with Raspberry Pi 4 Model B. I want to use two touchscreens.
I'm adding dtoverlay=spi1-3cs to /boot/config.txt
I'm ...
0
votes
0
answers
38
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 ...
0
votes
0
answers
32
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 ...
0
votes
1
answer
59
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 (...
0
votes
1
answer
141
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)
...
0
votes
0
answers
81
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 ...
0
votes
1
answer
231
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 ...
0
votes
0
answers
238
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, ...
-1
votes
1
answer
51
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 ...
1
vote
1
answer
96
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 ...
0
votes
0
answers
269
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 ...
2
votes
1
answer
118
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 ...
0
votes
0
answers
61
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 ...
0
votes
1
answer
46
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 ...
1
vote
1
answer
26
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-...
0
votes
0
answers
24
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 ...
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)...
0
votes
2
answers
127
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 ...
0
votes
1
answer
170
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 ...
1
vote
1
answer
159
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 ...
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 ...
1
vote
1
answer
66
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
...
2
votes
2
answers
321
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("/...
3
votes
1
answer
296
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 ...
2
votes
0
answers
138
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: ...
3
votes
0
answers
192
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 ...
2
votes
1
answer
285
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
...
1
vote
0
answers
397
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 ...
2
votes
0
answers
187
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 ...
0
votes
2
answers
695
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(...
0
votes
1
answer
709
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 ...
0
votes
0
answers
336
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 ...
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 ...
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 ...
1
vote
0
answers
119
views
How to connect SD card and battery to Pico?
I have been looking into components I need for a MicroPython project. I needs to be battery powered and be able to read/write to a removable SD card.
For this, I have discovered SD breakout boards. ...
1
vote
1
answer
272
views
Raspberry Pi spidev CLK working but no signal on MOSI
I have a Raspberry Pi Zero W that uses this LCD screen, including its touch interface using SPI0.
What I am trying to achieve is to add another SPI device that uses SPI0. I am able to successfully ...
3
votes
0
answers
137
views
Enabling SPI card reader in device tree on Raspberry Pi
Good evening,
I have MFRC522 card reader. It works well with generic spidev kernel-level driver and high-level python driver. However, as I wanted to learn device trees in linux, I tried to bind ...
0
votes
0
answers
188
views
Two independent SPI connections for LoRa modules using board and rfm9x libraries
We have been trying to allow for two simultaneous and independent SPI connections in a Raspberry Pi 4 but have had no luck until now. In particular, we want to use two rfm9x LoRa modules ...
0
votes
0
answers
129
views
SPI Interrupt Bit-Offset / Too Early
I´m running an SPI Slave on my Pico and executing an interrupt when 16 bits of Data are received.
I visualized the interrupt with a gpio spike on the beginning and end of the interrupt to see when it´...
0
votes
1
answer
586
views
How to set SPI master on RPI Pico to some exact frequency?
I want to have SPI master on my RPI Pico, and I require it to have exactly 4.8 MHz clock. But I don't know how to set it up properly, since SPI clock doesn't allow every value. I read about peripheral ...
0
votes
1
answer
539
views
Software SPI Interrupt
I´m trying to set up an interrupt function, that gets triggerd, when the 8bit RX register of my SPI port is filled on my Raspberry Pi Pico.
The Raspberry is running in Slave Mode.
I have checked the ...
-1
votes
1
answer
55
views
spi driver works on pi 3 and pi 4, but not on pi cm4
I have a spi driver for an nrc7292. When I load it on a pi3 or 4 it works every time, but when I load it on a cm4 it only loads correctly about half the time. What could possibly be different? Once ...
0
votes
0
answers
158
views
Getting fbcp to work on a generic ili9341 display
I’m trying to get fbcp to work on my raspberry pi. I’m following the instructions on the GitHub repo, however, when I type in make -j it gives an error. I’ll paste the error below