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
0
votes
1answer
35 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
318 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
173 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
82 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 ...
3
votes
1answer
540 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
88 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
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
2answers
53 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?
-1
votes
1answer
168 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
81 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
231 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
458 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
172 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
264 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
378 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
689 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
193 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/...
0
votes
1answer
157 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
1answer
259 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 ...
2
votes
1answer
517 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
370 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
381 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
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
1answer
574 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
316 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
4k 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
412 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
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
1answer
183 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
988 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
780 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
1answer
2k 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
424 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
621 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 ...
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
1answer
94 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 ...
2
votes
1answer
207 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
825 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
449 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
249 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 ...
2
votes
1answer
2k 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
636 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() ...
-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 ...
0
votes
1answer
293 views

TFT screen not working on Rpi A+

I have an old TFT LCD SPI screen, which I believe uses ILI9341 and would like to use it on my (old) RPi A+. Unfortunately, it just stays blank. I am not even sure it is working... My RPiA+ has a fresh ...
0
votes
1answer
541 views

USB/Bridge using MAX3421

Please, could someone help me, I am trying to use the module (max3421-hcb) with the raspberry pi 3, but I really don't know how to load this module, with the parameters, like wich GPIO will act as INT ...
1
vote
0answers
224 views

Simultaneous sampling using ADC and displaying in graphical LCD

I am using Raspberry Pi 3 Model B and MCP3008 for sampling my analog signal and the sampling frequeny is approximately 10 kHz. I need to display the sampled values in 3.5' inch graphical LCD. I just ...
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
1answer
609 views

ADXL345 Accelerometer attached to Raspberry Pi - Problems with Sample Rate

I have an ADXL345 Accelerometer attached via SPI pins to my Raspberry Pi. I use the following Python script to collect data: #!/usr/bin/python # -*- coding: utf-8 -*- import sys, math, os, spidev, ...
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
564 views

soil moisture sensor analog output is 0

I'm a newbie to pi and using it for my final year project to display moisture value of soil using the soil moisture sensor. I have followed this tutorial website for the connection and code and ...

1 2
3
4 5
8