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
2
votes
4answers
1k 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 ...
1
vote
3answers
2k views

Possible SPI issues around NRF24 operations post RPi system update?

I have a number of RPis that communicate with Arduinos via BLavery's lib_nrf24.py (which appears to be derived from Barraca's pynrf24). Recently several of the RPis automatically updated via apt-get ...
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
2answers
4k 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 ...
2
votes
1answer
720 views

how can I get a fixed sampling rate of 1 ksps when interfacing MCP3008 (10 bit ADC) with raspberry pi using SPI?

Whenever I take data from the MCP3008, my sample rate keeps changing. Sometimes it's 24ksps, sometimes 200sps. I want to keep this fixed. Python Code for SPI communication on raspberry pi: import ...
1
vote
1answer
7k views

How to connect ST7789 LCD to Raspberry Pi

I'm trying to connect to this LCD ( sry 4 japanese page:( use translate plz ) This monitor driver is ST7789, 7pins.[GND VCC SCL SDA RES DC BLK] And now I'm connecting to pi like this https://imgur....
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 ...
1
vote
1answer
3k views

Touchscreen drivers disable GPIO interface in Python

I'm working on a raspberry pi (2B) project that is using a Waveshare 7" LCD Capacitive touchscreen that interfaces with the raspberry pi through HDMI (display) and USB (touchscreen). The ...
0
votes
1answer
210 views

Fluctuating SCLK voltage with increase in frequency

Raspberry pi newbie here. As part of my academics i was working on Raspberry Pi 3 B+ , Raspbian OS kernel 4.14.98-v7 and i was testing protocols and i am stuck at SPI. I am running spidev_test.c from ...
8
votes
2answers
18k 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.
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 ...
0
votes
1answer
2k views

nRF24L01+ only correctly retrieving status and config registers

I didn't write here before, though i get in often to find solutions for my problems with raspberry, so thanks in advance. I got the following problem with nRF24L01+ radio breakout board. Here is my ...
4
votes
3answers
405 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 ...
1
vote
1answer
5k views

SPI module on Raspberry Pi 2

I have a Raspberry Pi 2 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, so all that remains is ...
1
vote
2answers
7k views

how to enable spi1? / pi 3 and two rc522 RFID readers

Is it possible to connect two RC522 readers with one RaspberryPi 3? As far as I know I should just choose different CS pins for them (Add more than 2 SPI slaves). I have following connections: 1st ...
1
vote
1answer
865 views

How to access SPI on Raspberry Pi B+

I tried searching here and other places. What is the best way to access the SPI and get the fastest speed out of it. My project involves interfacing the Pi with an ADC that is rated for 5Msps (http://...
1
vote
2answers
349 views

Getting a NRF24L01 module running with Java

I'm currently trying to make a NRF24L01 module work by using Java. I found this library that makes use of the JNI, but I can't get it to work. When I try to run the provided example code the ...
0
votes
1answer
1k views

Using two SPI ports simultaneously on Raspberry Pi 0 W

I'm trying to use two SPI busses on Raspberry Pi 0 W. I found some hints around but I really cannot understand how to use it and if there are restrictions on it. On this thread it seems that the ...
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 ...
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 ...
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 ...
1
vote
0answers
4k views

RFID RC522 Stops reading data after reading data continuously

I'm trying to make RFID RC522 work with my Raspberry Pi 3 B+. I use the library MFRC522, and the the sensor can read data most of the times. However if I just put the card on the sensor it will stop ...
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 ...
1
vote
1answer
2k views

Connect multiple SPI e-paper devices to a single Pi

So I'm thinking of getting these 2.9" displays: https://www.waveshare.com/wiki/2.9inch_e-Paper_Module#Working_with_Raspberry_Pi they come with an SPI interface that can be connected to the Pi. Is it ...
1
vote
3answers
3k views

Raspberry Pi won't recognize nRF24L01+

I'm a Raspberry Pi n00b and a python beginner, but I have a lot of experience with DIY electronics, arduino and c#. I've tried everything I can think of, and I just can't get the Pi to recognise the ...
1
vote
2answers
734 views

Using ENC28J60 on /dev/spidev1.0 or /dev/spidev1.2

I'm forced to use port /dev/spidev0.0 with a camera that I'm not able to configure at this time. Hence I need to change my current configuration where I'm using ENC28J60 on /dev/spidev0.0 and move it ...
1
vote
1answer
2k views

Does SPI port work on Raspberry B+

I've been trying talk to a MCP3008 ADC from the Raspbeery Pi B+. There are loads of examples of this working out there but I don't seem to be able to configure the port. I've followed the various ...
0
votes
2answers
3k views

RPi 2: spi_bcm2708 or spi_bcm2709?

I have already seen the questions: Does SPI port work on Raspberry B+ and SPI module on Raspberry Pi 2, but they don't answer my question. I can't seem to get the SPI port working on my Raspberry Pi ...
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 ...
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 ...
3
votes
2answers
820 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/...
2
votes
1answer
714 views

GPIO stopped working under Python after using SPI

I'm using a Gertboard, and the GPIO Python demos were running fine. I started using/modifying the DAC and ADC demo code, and now I can't output to GPIO using Python (e.g. the Gertboard leds-rg.py ...
2
votes
1answer
2k views

I am using a RFID reader module MFRC522 with my raspberry pi but it is not working with python 3

I am using RFID reader module (MFRC522) with my raspberry pi and when I run the script with python 2 it works fine and reads the RFID tag but when I run it with python3 I get an error - No Module ...
2
votes
1answer
168 views

Two data parsing frames for SPI reads of MCP3008 ADC, any advantages or disadvantages of either one?

I am reading an MCP3008 ADC using pigpio, I've abstracted the script below. I have also found a slightly different construction or parsing of the three SPI command bytes and reconstruction of the ADC ...
2
votes
0answers
11k views

How to check whether SPI working or not?

I am totally new to Raspberry Pi. I am trying to simulate a sensor with raspberry pi where my - Devices Sensor: ANALOG DVICES ADIS16227-CMLZ iSensor (ADIS1622x/PCBZ) Device: ...
2
votes
1answer
486 views

spi stopped working after upgrade

I recently ran apt-get dist-upgrade on my Raspberry Pi B. Afterwards the spi-devices /dev/spi* were gone. This is the changelog of the upgrade: Package changes: +device-tree-compiler 1.4.1-1+rpi1 +...
1
vote
2answers
623 views

Kernel Configuration for CAN-Bus

I'm trying to configure my can-bus module. I'm following these steps . My branch is 3.18.y-rebase (from github) When I came to device drivers->spi support step I couldn't see BCM2798 SPI controller ...
1
vote
1answer
329 views

What protocol is used for the built-in microSD slot on the RPi3?

The datasheet above shows different pin configurations for SD and SPI modes on either SD or microSD cards. Does the built-in microSD slot on the Raspberry Pi 3 B use SPI or SD mode for activities ...
1
vote
2answers
1k views

SPI SDA GPIO Rspi

Can anyone help me to connect more than 2 devices (other CE0 and CE1) and use any GPIO for the SDA pin?
1
vote
1answer
704 views

SPI Communication with ADS7851

I'm currently trying to communicatie Raspberry Pi 2 B+ with ADS7851, an adc chip made from TI. ADS7851_DATASHEET I've done pretty much of research, but I'm still stuck on how to communicate in SPI ...
1
vote
0answers
1k views

Connect two SPI RFID readers in the Raspberry Pi B +

I followed this tutorial to connect one RC522 RFID reader in a Raspberry Pi. http://www.nikolaus-lueneburg.de/2014/06/rfid-rc522-modul-mit-spi-schnittstelle/ I'm able to connect it to work with ...
1
vote
2answers
4k views

MFRC522 Not working over SPI Interface

I am running (on a Pi3) an MFRRC522 reader - much like this one: It has been working fine, but after I changed SD card, to increase capacity - whilst also doing a new Raspian install I haven't been ...
1
vote
2answers
2k views

I want to use spi0 and spi1

I try to use my RPi3 and the RC522 and a touchscreen display as well so i need to put my RC522 on the auxiliary SPI1 right ? How can I do it ?
1
vote
1answer
744 views

Crash on radio.begin() (for NRF24 Module )

I have connected my NRF24 module as described at bottom of this webpage. I cloned that repository and have Build using SPIDEV (I have ensured SPI was enabled and double checked that SPI module works, ...
1
vote
2answers
631 views

RF24L01 - RF24 Creation Segmentation Fault in Raspberry

What I have Raspberry Pi 3 B RF24L01 RF24 Library TMRh20 How I've Connected It Based on the library indications: RF24L01 pin | RPi 3B 1 GND | 9 GND 2 VCC | 1 (3.3V) 3 CE | 15 (...
1
vote
1answer
2k views

pigpio's spi_xfer and spi_open functions

In my previous project I have used spidev in order to work with ADC, and in python script I could have: spi = spidev.SpiDev() spi.open(0,0) ... adc = spi.xfer2([1,(8+channel)<<4,0]) Now I'm ...
1
vote
0answers
55 views

Problem in the SPI communication with RFID-RC522 (spi mode)

I have some trouble using the RFID-RC522 reader with my RPi. It was working in the past, but now it stopped. I'm trying to find if a configuration changed somewhere and I also looked at the code of ...
0
votes
1answer
31 views

Scaling down the SPI0 clock value on RPi 3B+/4B

I have a custom STM32 MCU board that interfaces with an RPi 3B+ via the SPI protocol. The MCU (STM32F407) has its SPI peripheral clock set at 84MHz and is configured as a slave device. For reliable ...
0
votes
0answers
282 views

How should I be connecting CE/CS pins of a SPI device to GPIO pins in userspace?

I am trying to avoid using the built-in CS/CE 0 and 1 pins that the system defaults to when using SPI communication so that I can expand out to as many as 10 devices in the future. The devices in ...
0
votes
1answer
35 views

Connecting raspberry pi 4 to an FPGA for a data logging system. What is the fastest/most appropriate communication method?

I have a test set-up where an STM32F4 microcontroller is reading in an analogue signal and sending it to a windows PC through UART. The windows PC runs a Python script that interprets the data and ...