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
1answer
23 views

Unable to open device /dev/spi

I'm trying to communicate with a 128x64 screen on SPI (GFX-hat pimori). It seems that the device /dev/spi* does not exist, I looked at how to do it on the net, but the device refuses to be created. ...
1
vote
2answers
23 views

Raspberry Pi and Arduino Due Spi

Is there any way to establish SPI communnication between Raspberry Pi 3B + and Arduino Due. Both only support master mode. I tried to google but mostly answers from 2013 come up. Has there any recent ...
1
vote
3answers
65 views

Options to add 20 UART to RPi

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 ...
0
votes
0answers
36 views

Using waveshare LCD and SPI1 for LEDs

My problem is that I cant get SPI1 and the LCD screen to work at the same time. Only SPI1 with the spi1-1cs overlay worked and only the waveshare35a overlay working, I tried to make my own overlay ...
0
votes
1answer
26 views

Adding a USR-ES1 W5500 chip for Raspberry 3 A+

I am currently thinking about a project in which space should be kept to a minimum. Now I am using the A+ model because it is smaller however I do need an ethernet port. So what I am planning to do ...
1
vote
2answers
94 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
vote
0answers
27 views

Cant read both SPI Buses of Raspberry Pi 3B+

I want to read 3 analogue sensors simultaneously. I have successfully connected 2 sensors using a MCP 3002 A/D converter which is connected to CS0 of SPI 0 of raspberry pi and I have activated 3 more ...
0
votes
1answer
73 views

Using FLIR Lepton3 module with Raspberry Pi 0 W low frame rate issue

I'm trying to use FLIR Lepton 3 module with Raspberry Pi 0 W board running Raspbian 9 Stretch. I followed all official FLIR recomendations: connected Lepton module to Raspberry in the correct way (...
1
vote
0answers
19 views

CAN bus read on RPI3

I have 10 CAN IDs on the bus and would like to read all the 10 IDs every 0.1 seconds. I was able to write the code below but it shows me one message only. import can bus = can.interface.Bus ("can0", ...
2
votes
2answers
78 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 ...
1
vote
2answers
64 views

Find out whether SPI is enabled or not

I have a game that needs SPI. In the installation instructions, I noted that SPI has to be enabled via raspi-config. Now, I'd like to check in a shell script whether the user has activated SPI or not....
1
vote
1answer
60 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
0answers
42 views

Configure SPI from Kernel Space by writing to the SPI Registers

I'd like to write my own SPI driver to configure the SPI interface by means of writing to the CS, FIFO, and CLK SPI registers. I have disabled the SPI interface in raspi-config. I followed the ...
1
vote
1answer
88 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 ...
1
vote
1answer
74 views

SPI sending function

I'm currently reworking a project from someone who graduated a few years back and I'm supposed to change the function of his work for a bit. I have trouble understanding these few lines from SPI ...
0
votes
0answers
25 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
182 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
40 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
45 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
106 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
130 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
47 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
53 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
20 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
131 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
96 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
39 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 ...
2
votes
1answer
138 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
47 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
53 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
44 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
101 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
53 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
76 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
198 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
101 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
76 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
175 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
191 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
139 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
73 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
99 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
279 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
159 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
248 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
254 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
301 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
59 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
139 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 ...