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
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
1answer
386 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 ...
2
votes
2answers
1k 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
3answers
691 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
3answers
852 views

Separate SPI 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 ...
12
votes
3answers
23k 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
2k 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
128 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
16k 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.
2
votes
3answers
8k 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 ...
1
vote
1answer
2k 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....
0
votes
1answer
1k 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 ...
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
5k 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
815 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
votes
1answer
474 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
3k 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
14k 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
1k 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
3k 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 ...
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 ...
1
vote
3answers
2k 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 ...
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
6k 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 ...
2
votes
0answers
9k 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
456 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 +...
2
votes
1answer
595 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
96 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 ...
1
vote
1answer
664 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
1answer
593 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
1k 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
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
538 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
299 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
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
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
598 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
2answers
998 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?
0
votes
2answers
3k views

How to achieve a high sampling speed using an ADC with Raspberry Pi?

So, I am using the LTC 2366, 3 MSPS ADC and using the code given below, was able to achieve a sampling rate of about 380 KSPS. #include <stdio.h> #include <time.h> #include <bcm2835.h&...
0
votes
0answers
56 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
810 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 ...
0
votes
2answers
778 views

Reading only 0 from ADC using RPi SPI

Everytime I try to read analog channel 0 from ADC, it only prints 0. I am confused why. I shorted MISO and MOSI on my RPi to check SPI send/receive and it was working. But if I test it after properly ...
-1
votes
2answers
445 views

Interface AD7193 with Raspberry Pi

I have been trying to interface an ADC with raspberry Pi namely AD7193 via SPI . For that I have enabled my SPI and installed spidev on my pi. but i dont know what to do next in order to get the ...