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
2answers
3k views

I want to use spi0 and spi1 at the same time

I want to use LCD and mcp3208 simultaneously. spi0(gpio8,9,10,11) is port for LCD and spi1(gpio16,19,20,21) is port for mcp3208. spi0 channel is always on and spi1 is opened when I want to collect ...
1
vote
1answer
845 views

Multiple concurrent SPI communications controlled by a single process

I am working on a project in which I need high time-resolution data. I will be measuring data from an IR break beam and an SPI device. My SPI device functions at 1ksps while I need readings from ...
0
votes
2answers
98 views

Handling sensor data and reacting on ms timescales

I have two related questions. I'm happy to get advice or links to recommended reading as well. How many times per second can a Pi pull data over SPI Over SPI what sort of timescale can I query ...
4
votes
1answer
953 views

Pi Zero SPI too slow (spi_bcm2835)

I am running a display using SPI. When running it on my Pi Model B, everything runs fine and fast. But when connecting it to my Zero instead, it runs very slow. Then I put the SD card of my Zero in ...
5
votes
1answer
3k views

Pi to Pi Communication over GPIO / USB

I have a Pi Zero that I would like to use to communicate with a B+. In theory I can connect an adaptor cable and a WiFi or Ethernet USB dongle to the Zero, and do the same on the B+. However, as an ...
3
votes
1answer
1k views

Trouble using spidev after RPi.GPIO

I'm using a Pi 3B to interface with an SPI device. My program is written in Python 2, the Pi is the SPI master and the external device is the slave. I am using both the spidev module and the RPi.GPIO ...
0
votes
3answers
870 views

How to use RC522 RFID on spidev1.x on Raspberry Pi 3

I followed this https://raspberrypi.stackexchange.com/a/56513/57412 trying to use my RC522 on spi 1.0 but I'm stuck. Could someone give me a hand wiring correctly (I hope it is) and how to use the ...
2
votes
2answers
1k views

How to have access to a USB port from inside the case?

I'm working on making a case for the project SamplerBox. I would like 2 or 4 USB ports of the Raspberry Pi to be reachable from outside the case, like the photo below. But then, how to access USB ...
0
votes
1answer
199 views

Is there a way to leave the SDI (MOSI) signal high during an SPI transaction?

I'm looking for a way to leave the MOSI signal high on a Raspberry Pi during an SPI transaction. I have an Si8902 ADC which reads voltage from a PCB, and its pins are connected to the appropriate pins ...
0
votes
1answer
2k views

QT segmentation fault when using BCM2835 for SPI

I am a novice when it comes to programming. I am attempting to set up SPI communication between a module and my RPI3. The following is my main.cpp code (I plan to neaten up the code once it works) #...
0
votes
1answer
397 views

Volume dial - ADC interrupts with SPI

I'm trying to implement a volume dial. I've got a potentiometer hooked into ADC 0832B (http://www.ti.com/lit/ds/symlink/adc0832-n.pdf), timing diagram below: When I turn the volume dial, I want an ...
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 ...
0
votes
2answers
570 views

Touch screen with Raspberry Pi

I have a 240x320 2.8" touchscreen, with "driver IC: ILI9341". It seems to use a SPI interface. How to connect it to the Pi (which pins to which pins of the GPIO?) and how to use it, e.g. from Python ...
0
votes
1answer
313 views

device tree and spi controller file

why is the file spi_bcm2708.c is not present inside the path linux/drivers/spi and while inside the boot partition of pi the bcm2708-rpi-version.dts file is only present.how come kernal use the ...
1
vote
1answer
2k views

Block read py-spidev using xfer or xfer2

I wrote some Python to read data from an SPI A/D converter MCP3208 using: dat = spi.xfer([0x06, 0x00, 0x00]) for the first channel. The variable dat contains the data which I need to shift and ...
2
votes
1answer
519 views

Is it possible to sample 6 microphones at 11 kHz each with a Raspberry Pi Zero?

I am working on a project that requires me to sample 6 microphones as close to simultaneously as possible at a rate of at least 11 kHz each and then run a processing algorithm on the data in real time....
1
vote
1answer
1k views

How to properly Daisy Chain MCP23017 and MCP 23008

I've recently wanted to use I2C to communicate to multiple 23017s (PDF Datasheet) or Multiple 23008s (Smaller version of 23017). I saw this post, but it was never answered as to if the diagram was ...
1
vote
0answers
347 views

reading analog not working

I have a Raspberry Pi3, and I am following this tutorial: http://raspberrypi-aa.github.io/session3/spi.html The code I am using is: #!/usr/bin/env python # # Bitbang'd SPI interface with an MCP3008 ...
2
votes
0answers
318 views

How construct MISO byte order with SPI interface

I have a raspberry Pi 3, model B. I have an RFID-RC522 hooked up to it using SPI. I want to read from it, raspi being master device, RFID being slave(MISO). I am struggling to construct the correct ...
1
vote
0answers
304 views

Using three SPI channels with wiring pi?

I was wondering if there is a way to use three different channels for SPI through the wiring pi library. I mean I know that a chip/slave/channel select pin can be any pin capable of sending a high or ...
1
vote
0answers
985 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 ...
2
votes
1answer
619 views

Read synchronous serial communication with Raspberry Pi

I am evaluating different Linux Plattforms and would like to know: Is it possible to read synchronous serial data at 300 to 350 kbaud with any Raspberry Pi? I am getting the data as RS422. Thus I ...
1
vote
2answers
829 views

Several devices on SPI bus

Now I'm developing project and I want to choose Raspberry like the control module. I want to control the frequency synthesizer by SPI, but also I need SPI for TFT Touch Display. So what can I do to ...
4
votes
1answer
8k views

Control seconds SPI interface with SpiDev

Is there any option to control the second SPI interface of Raspberry Pi 2 B with SpiDev? http://pinout.xyz/pinout/spi Pin 19, 21, 23 are SPI0 and Pin 35, 38, 40 are SPI1. SPI0 works perfect, but if ...
1
vote
2answers
3k 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
0answers
131 views

Need help using Bus Pirate SPI with Rspberry pi

I am using a Pi 3 I recently acquired for a project at work. I am pretty new to most of this electronics, so a large pool of ignorance may follow. Also, if you are not familiar with the tool i used 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
0answers
1k views

MCP3008 Installation Issues

CH5 is connected to my AO from my moisture sensor. pi@raspberrypi:~ $ ls -l /dev/spi* crw-rw---- 1 root spi 153, 0 Jun 18 12:13 /dev/spidev0.0 crw-rw---- 1 root spi 153, 1 Jun 18 12:13 /dev/spidev0....
1
vote
0answers
127 views

USB Transmitter for RasPi, or GPIO solution Thru SPI

OK, so i am attempting to send and receive data from an arduino Uno to my ras pi via the NRF24 chips. i have been successfully able to communicate between the two HOWEVER, the pins i need for my 5" ...
2
votes
1answer
438 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
2answers
4k views

Setup of SPI TFT LCD Display

I've been using the Sainsmart 3.2" and 3.5" TFT LCD (http://www.sainsmart.com/sainsmart-3-5-inch-tft-lcd-320-480-touch-screen-display-for-raspberry-pi-2-b-b.html) with my Raspberry Pi 2's. I recently ...
1
vote
3answers
9k views

How to enable SPI on Raspberry Pi 3

I run raspi-config, enable SPI from menu and get message The SPI interface is enabled But in console I see /usr/bin/raspi-config: 597: /usr/bin/raspi-config: dtparam: not found Is SPI Enabled? ...
0
votes
1answer
487 views

how do i proceed with SPI on raspberry pi 2?

i am quite new to programming raspberry pi. (though i have used apt-get update and upgrade to install, and i have enabled the SPI mode in the rasp-config) i have recently purchased the arducam mini ...
0
votes
1answer
3k views

Emulate an SD card with a Raspberry?

I have a special embedded device which has an SD card slot and reads data files from an inserted SD card. These data files are validated only once (because validating them on every access would take ...
1
vote
1answer
748 views

SPI control of WS2801 LEDs, fails when using GPIO interrupts

I have three libraries (is library the right word?) that I'm using in my Python code: An Adafruit NeoPixels library, which comes from the rpi_281x library to control them via PWM, on GPIO pin 18. ...
0
votes
1answer
2k views

SPI using SpiDev with LIS2DH sensor, need to send 2 repeated bytes in spi.xfer2 to get data valid back

class LIS2DH_Class(object): mySpi = 0 def __init__(self): self.spi = spidev.SpiDev() self.spi.open(0,0) self.spi.max_speed_hz = 10000000 #10 Mhz is max limit on LIS2DH SPI communication ...
0
votes
1answer
500 views

raspbian : How do I both enable built-in wifi and SPI interface for pi3?

The problem is that I need to disable device tree to let SPI work successfully, but it results in malfunctioning built-in wifi and bluetooth. uname -a linux raspberrypi 4.1.19-v7+ #858 SMP Tue Mar ...
1
vote
1answer
864 views

py-spidev and ADNS3080

I have been trying a lot to deal with the flow-motion sensor but I couldn't arrive to a clear result. It might be I can't understand the procedure.. I'm using cs1 on raspberry Defining the spi by ...
1
vote
0answers
476 views

Use Touchscreen and MF-RC522 via SPI simultaneously

So recently I've been testing the official 7" touchscreen and everything went ok. But after adding the last update of the bcm2835 library to use the SPI port in order to use the MF-RC522 board, the ...
4
votes
3answers
16k views

Rpi3 missing spi-bcm2708 module

I installed Raspbian 4.1.18-v7+ on my new RPi 3 and WiFi works great however when I proceed with instructions for connecting the MCP3009 ADC I don't find spi-bcm2708 listed in /etc/modprobe.d/raspi-...
0
votes
1answer
204 views

Python script using SPI as a service on boot

I wanted to display IP address using MAX7219 and SPI on the startup. I followed instructions on web page Getting a Python script to run in the background (as a service) on boot. Script is loaded as ...
1
vote
0answers
759 views

Rpi2 image on a Rpi3: Module spi-bcm2708 not found

I was using a RPi2 with an RFID-RC522 Board. Now I bougth an new RPi3 because of the included WLAN. I am trying to use the same image I use with my RPi2 in my RPi3 now. But I encounter a very ...
1
vote
1answer
7k views

Python: Use SPI with WiringPi

I've been searching google and stackexchange for quite a while: I would like to access an ADC (MCP3201) via SPI, to do so, I have to use Python and would like to use WiringPi. Sadly it seems ...
0
votes
1answer
166 views

How can I set 100 kHz on Raspberry 2 SCLK pin?

I need to interface with a micro SD card in SPI mode, and the datasheet says that the serial clock speed should be between 100 and 400 kHz. So I connected it to the 23rd pin but I can not find any ...
2
votes
1answer
2k views

Max SPI transfers / sec speed using WiringPi

I'm trying to interface with MCP3002 ADC using SPI and it's working nicely except for the amount of the samples I'm able to collect per second. I'm using WiringPi and the code is very simple: ...
1
vote
2answers
2k views

Microphone via SPI

I am trying to read mic output via SPI. I am using an ADC0831 8 bit convertor. I tested the ADC and the code by using a voltage regulator. The value coming from the ADC's DO pin is correct. I want ...
0
votes
1answer
560 views

Connect more than 6 DAC using Raspberry Pi 2

How can I connect more than 5 or 6 MCP4922 DAC using Raspberry Pi 2 Model B, if it is possible? I saw SPI SDA GPIO Rspi.
1
vote
1answer
2k views

No signal from MCP3008 to RPi 3 using Python

I connected a Raspberry Pi 3 with ArchLinux to a MCP3008 following the wiring explained in this tutorial. When I run lsmod I see spi_bcm2835. My /boot/config.txt has the following line to enable spi:...
1
vote
1answer
932 views

Audio sampling using SPI interface

I want to record sound using an electret microphone and ADC(MCP3002), with Raspberry Pi 2 model B. Can I sample audio using the SPI interface on the Pi? I am using one microphone, and I need to get ...
6
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 ...

1 3 4 5 6 7