Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
18 views

Emulate USB devices from one Pi zero to another Pi zero

I'm looking for the best way to emulate USB devices that are plugged into a Pi zero and connected to another Pi zero through GPIO pins, so the second Pi zero will emulate the actual device that is ...
1
vote
2answers
66 views

5V-3.3V Sensors Confusion

Most of the sensors available in the market requires 3.3V-5V. The GPIO of the Raspberry Pi is 3.3V max only and not 5V tolerant. I have seen tutorials around the internet that they supply the sensors ...
0
votes
0answers
26 views

SPI voltage level

I had troubles reading an IC (ADAS1000-4) with my raspberry. As soon as I connect the chip to the SPI bus of the Raspberry, the Low voltage doesn't get as low as I expect (please have a look on the ...
0
votes
0answers
34 views

piscope SPI pin activity even though the SPI device is not connected

my final goal is to use python (spidev) to communicate with a BMS chip. Until now I was quite unsuccessful, thats why I wanted to use piscope to track the activity of the SPI pins. The device is not ...
0
votes
0answers
40 views

SPI DMA in Raspbian

Is it possible to access the SPI DMA on a Raspberry Pi running Raspbian without using custom drivers by directly reading and writing to the associated hardware registers? I assume the register ...
0
votes
0answers
82 views

MAX7219 7-segment via SPI not working

I am following these instructions to get a simple 7-segment display working: https://github.com/rm-hull/luma.led_matrix My problem is that as soon as one of the 3 SPI Pins are connected the digits ...
0
votes
0answers
40 views

How do I find which pins my TFT display is using?

I have a TFT Touch Screen Display from Tontec that I'm using for a project. According to the product description the display only uses 8 pins. However, the connector cable takes up 26 pins worth of ...
0
votes
0answers
46 views

How to stop the NXP NFC-EXPLORE library from interfering with my i2c oled display?

I've been working on a new project with my raspberry pi 3b+ to turn in into a NFC jukebox/bluetooth speaker and I used the NXP EXPLORE-NFC header to take on the NFC scanning part. I've connected it ...
1
vote
0answers
33 views

Bootup activity on SPI0, even when not enabled

RPi 3B+ uname -a Linux GWf231a6 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux /boot/config.txt: #dtparam=spi=on I'm getting weird waveforms on my SPI bus at boot even when SPI ...
0
votes
1answer
19 views

Why won't my Raspberry Pi connect using SSH when NRF24L01 or ATTiny85 are Connected via SPI?

As the question states, my Pi (3 B+) won't accept SSH connections (times out) when I have either my NRF24L01 or ATTiny85 boards hooked-up. I hook both up (at different times of course) to pins 17, 19, ...
1
vote
1answer
66 views

spi/mcp3008 trouble with getting a reading from chip, all channels read 0 (zero)

Pi model: Pi 3 A+ Os: Raspbian GNU/Linux 9 (stretch) <- it's stretch lite SPI: On Loop back test: spi mode: 0x0 bits per word: 8 max speed: 500000 Hz (500 KHz) TX | FF FF FF FF FF FF 40 00 00 ...
0
votes
1answer
71 views

Connect 6 accelerometers to Raspberry Pi

I need to connect 6 LIS3DH Accelerometers to a Raspberry Pi. Is this possible, and how would I do this? Do I need to use I2C or SPI? Or do I need something like an I2C multiplexer? (If another type ...
0
votes
0answers
32 views

What is the maximum usable SPI frequency for Raspberry Pi 3 Compute Module?

I have checked What SPI frequencies does Raspberry Pi support? question, anyway its subject is RPi, not RPi Compute module. Also, I want to check for usable frequency, not theoretical. Limitations ...
1
vote
1answer
72 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 ...
1
vote
1answer
43 views

Finding the right SPI pins on the Rapsberry for Digital Pot MCP42010

Here is the data sheet for the MCP42010: http://ww1.microchip.com/downloads/en/devicedoc/11195c.pdf Here are my best guesses: Pin 1 CS goes to Pin 11 / SPI1 CS0 (GPIO17) Pin 2 SCK goes to Pin 23 / ...
2
votes
0answers
35 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
2answers
37 views

Connecting 2 raspberry pi zero to one spi screen

I wanted to know if you can connect 2 pi zero's to 1 spi screen and have a switch to switch between them?
0
votes
1answer
65 views

Raspberry PI SPI interface

I'm looking at a Raspberry Pi and I am a bit new to Serial Peripheral Interface. I see the Rasperry Pi has two SPI interfaces on the GPIO pins. Can one SPI interface be programmed to connect to ...
0
votes
1answer
43 views

Raspberry pi with NRF24

I've tried building a few libraries from source; they compile fine, but the receiving pi gets no data. I found this post describing similar issues. If someone could help me understand the reply that ...
0
votes
2answers
60 views

After switching from pigpio to pigpiod, how can SPI write operations display random bit errors?

I've already written and tested some code using pigpio to drive a Futaba GP9002A VFD. When using the pigpio lib directly, it worked almost absolutely fine, but after migrating to the pigpio daemon (...
0
votes
1answer
138 views

How to speed up SPI chip select transition using “spidev”?

I successfully drive a DAC via SPI using the spidev native SPI driver using a RaspberryPi3. The core portion of my code is as follows: fd = open("/dev/spidev0.0", O_RDWR); txarr[0]=0xAA; txarr[1]=...
0
votes
1answer
72 views

Is SPI in Raspberry Pi Reliable..?

I'am trying to initiate a two way communication between Raspberry pi and Arduino. I worked with spidev library and directly using the SPDR register in the Arduino micro-controller without being able ...
0
votes
1answer
42 views

Disabling only SPI0 and keeping SPI1 in use?

is it possible to disable SPI0 channel on Raspberry Pi 3 B (with latest Raspbian) and keep SPI1 in use? I would like to use SPI1 only (due to custom PCB tracing) and need to use SPI0 pins as GPIOs... ...
2
votes
2answers
116 views

SPI xfer2 callback possible?

I would like to control 10 different devices with SPI. As there is not enough ChipSelect outputs I use GPIO to toggle a MUX on the clock. Problem is I have to wait until the SPI is done transmitting ...
0
votes
0answers
137 views

3,5" LCD display not work in raspberry pi

I have bought a 3,5" display from ebay, and I installed it onto my raspberry pi 3. I installed the LCDshow drivers, but when it restarts the display is white. I tried to start the gui, but it gives: ...
1
vote
1answer
134 views

Imprecise result after bitwise operation on GPIO registers

I am using a Raspberry Pi(Model 1 B+) and an oscilloscope in order to program SPI with C. I am doing this by using direct access to the GPIO register. Like this: https://elinux.org/...
1
vote
1answer
63 views

Multiple Raspberry Pi zeros (no wifi) + touchscreen. Daisy-chained communication?

I'm trying to devise a solution that will connect multiple Raspberry Pi zeros together for communication between them. I'm using a touchscreen on each of them, so GPIO pins 1-24 are taken. Also, I'm ...
1
vote
0answers
87 views

Single channel SPI DMA

The documentation on the SPI peripheral says: Two DMA channels are required, one to read from and one to write to the SPI. Is this necessarily true? I have a device where I need to write a few ...
1
vote
1answer
233 views

SPI only returning zeros with Raspbian (It works with IoT core)

I am using this ADC connected to the channel 0 of my Pi3 board for reading values from a sensor. In IoT core, I was using a very simple code for testing the my device, and it worked fine. The C# code ...
0
votes
1answer
121 views

Sharing SPI Adafruit PiTFT and RFID RC522

I have a Pi Zero 1.2 connected to an Adafruit 2.8" PiFTF screen and a RFID-RC522 board. I also have a thermal printer connected to TX/RX, but I don't think this plays a part in my question. The TFT ...
1
vote
2answers
193 views

Can't blink a LED using SPI interface on Raspberry Pi v3

As a part of my PoC project, I'm using single 5050 LED made by Adafruit. I wired it like this (LED - RPi): DI (Data Input) - SPI0 MOSI CI (Clock Input) - SPI0 SCLK GND (Ground) - GND VCC (5V) - 5V ...
0
votes
1answer
206 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
1answer
252 views

Why does a communication over SPI returns garbage?

I am trying to read from a gps module NEO-6M using Raspbery Pi 3 B over SPI. It nicely works with Arduino but it doesn't want to work with Raspberry. I have used different libraries in Pyhon, even ...
0
votes
0answers
46 views

LIS3DSH Accelerometer attached to Raspberry - Problem to read registers SPI

I have an LIS3DSH Accelerometer (Accel 2 click from Mikroe) attached via SPI pins to my Raspberry Pi. I use the following Python script to collect data: import spidev import wiringpi as pi from time ...
0
votes
0answers
109 views

How to control SPI1 gpio port on Android-Things?

Hello Recently, I use Android-Things on Raspberry pi. and I want reader tag on RC522 so, I decided to refer to source in on Git-hub https://github.com/Galarzaa90/android-things-rc522 first I try ...
1
vote
1answer
642 views

What is the mode supposed to be for CE0 and CE1 when SPI is enabled?

I have enabled SPI on my Raspberry Pi 3, and want to know why the mode for physical pins 24 and 26 are set to Mode 'OUT' and not 'ALT0'. According to the documentation here and here the mode of all ...
1
vote
2answers
148 views

pi4j implementation for SPI communications with MCP3008 reading zeros

I have hardwired a MCP3008 IC into the SPI input on a Raspberry Pi3. MCP3008 is wired as follows: pin 10 (CS) to Pi GPIO_10 (pin 24) this is CE0 pin 11 (Din) to Pi GPIO_12 (pin 19) this is MOSI ...
1
vote
2answers
473 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
1answer
84 views

About multiple SPI on Raspberry Pi3

I'm tying to use MCP3008 to read the ADC signal from sensors. But I need to transfer the data through the LoRa module. Which is also the SPI interdace. The example of ping pong has been done. But ...
3
votes
1answer
487 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 ...
0
votes
2answers
210 views

How to read a specific register using spi_xfer from PIGPIO

I am building a single channel LoRa gateway using the RFM95W module. I am using this github repo; single_chan_pkt_fwd, as a guide. However I am not yet using a PCB, even though it is very difficult, ...
0
votes
0answers
883 views

Reading data from MCP3551 via SPI

I am trying to read data via SPI from an ozone sensor that I have connected to the Raspberry Pi's GPIO. This set up uses a Mikro Pi click shield and Mikro Ozone 2 click sensor. The output of the ...
0
votes
1answer
187 views

pigpio spi : use an other GPIO for chip select

I'm using the Waveshare High-Precision AD/DA Board, and they not use the default chip select pin of RPi (GPIO# 7, 8) for SPI. Using the pigpio python library, I want to know how to change the chip ...
0
votes
2answers
178 views

SPI Burst Read of 2048 32bit registers

i have build a Smartmeter based on an SPI ADC from Analog Devices. The measured values are beeing transfered to an Raspberry Pi with lib bcm2835 for visualization. The lib works with single bytes in ...
0
votes
1answer
285 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
1answer
51 views

Wired communication of Raspberry Pi 3 Model B to Pi Zero

I am trying to make a personal robotic assistant, and i am using 2 Pi Zero's to control 2 main parts of the robot, the assistant's voice and voice recognition systems, and the facial recognition ...
1
vote
1answer
125 views

SPI vs HDMI power consumption

I'm using a Pi Zero in a portable project and wondered if there were any power savings to be made by using an SPI display over a HDMI one or vice versa.
0
votes
1answer
214 views

SPI not working on a Pi Model B

I have an issue and I think it is the SPI module not starting up. if i run this: pi@raspberrypi:~ $ gpio load spi gpio: Unable to load/unload modules as this Pi has the device tree enabled. You ...
1
vote
2answers
200 views

What creates /dev/spidev*?

I’ve got a little program that uses an spi hat that I set to start running from rc.local. It was all running fine under Jessie, but I’ve upgraded to Stretch and now it appears rc.local is being called ...
0
votes
0answers
106 views

How to improve the reading speed of a DESfire with PN532 spi reader?

I'm developing a application with PN532 card reader through SPI. I'm using libfreefare library to communicate with Mifare DESfire EV1 mainly. My problem is in the reading speed I'm getting. I've to ...