Stack Exchange Network

Stack Exchange network consists of 174 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
21 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
36 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
17 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
0answers
15 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
35 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
27 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
31 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
51 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
36 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
0answers
13 views

Who to connect canbus device mcp2515 to PI3 SPI1

I'm trying to connect my canbus devcie to SPI1 but I can't see it this is what I have in the config - # Uncomment some or all of these to enable the optional hardware interfaces dtparam=i2c_arm=...
-1
votes
0answers
143 views

1.8" ST7735 SPI 128x160 TFT display

I have the above display - cheap from ebay! . perhaps that is the problem. I have been using the tutorial . Part 1 is a software version to drive the display. Part 2 uses the hardware version of SPI....
0
votes
2answers
40 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 (...
-1
votes
0answers
60 views

Raspberry pi Zero and ad7793

i try get data from ad7793 and adt7320 to RPi Zero by Pythone code. i success get temperature from adt7320, succes get ID and STAT from ADC... But i get 0xFF (or 0x00) from ADC data if i try connect ...
-1
votes
0answers
15 views

Weird interaction between 7" TFT display, MCP3008 and RPi SPI

I am currently working on a project where I am designing a functional ECG machine and I am using a RPi to drive my display. Currently I am working on a cardiac simulator where the ECG waveform is ...
0
votes
1answer
57 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
42 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 ...
-1
votes
0answers
70 views

Daisy Chaining Two Raspberry Pi 3b+ to have double GPIO pins?

I am trying to figure out the plausibility of connecting 2 Rpis together in order to take advantage of the additional GPIO pins and have synchronized output between both pis. I realize there are other ...
0
votes
1answer
28 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
56 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
77 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
130 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
44 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
61 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
168 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
88 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
129 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
0answers
114 views

wiringPi (C) , MCP23S17 , and interrupts

I've enjoyed using the wiringPi C library in various ways. Used it with vanilla GPIO, with its interrupt-handling feature, with MCP3008, MCP23017, and now the MCP23S17. However, I'm a bit stumped on ...
0
votes
0answers
143 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
158 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
105 views

No reading for the LDR using MCP3008 with SPI on raspberry pi in python 3

I'm a beginner to RPi and trying to learn how to use SPI & MCP3008 to read analog signal in Python3. The output displays 0.0V all the times despite the change in the light intensity. Light: 0 (0....
0
votes
0answers
37 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
90 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
367 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
105 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
290 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
65 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
337 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
122 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
553 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
162 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
134 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
212 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
43 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
107 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
112 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
162 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
86 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 ...
1
vote
1answer
259 views

Why isn't spidev showing up in /dev/?

I'm trying to do a spi loopback test with a raspberry pi 3 model B+ with kernel patched with RT_PREEMPT. This is the loopback test being attempted: https://www.raspberrypi.org/documentation/...
0
votes
0answers
211 views

How could I write a C function using the wiringPi SPI library to read the X and Y measurements from this 2-axis inclinometer?

How would one use the wiringPi SPI library (http://wiringpi.com/reference/spi-library/) to get the x and y readings from this SCA100T inclinometer? I understand that the function wiringPiSPIDataRW() ...
0
votes
1answer
165 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 ...