Questions tagged [spi]

Serial Peripheral Interface. Allows full-duplex serial communication from a master device to one or more slave devices arranged on a bus. Sometimes referred to as a 4-wire bus.

Filter by
Sorted by
Tagged with
-1
votes
1answer
17 views

Write and read problem while interfacing 93LC46B EEPROM through SPI

I try to save and read data from 93LC46B EEPROM using SPI with Arduino UNO. I'm following this article https://www.arduino.cc/en/Tutorial/SPIEEPROM . So far I have correctly connected EEPROM pinout (...
0
votes
0answers
24 views

Combining ADC IRQ with SPI peripherals results in SPI not working

I'm working on a pet project that requires ADC, SD card (SPI interface, SdFat library) and a display in the future (also SPI). I have put together a piece of code that initializes ADC at the highest ...
4
votes
2answers
59 views

Writing to sd card with a sampling rate 50ms or less? I have a sketch that writes to sd every 1s but jams at faster sampling rates. Please help?

My code below reads data from an ADC and 3 digital pins via a Mega and prints to an SD Shield (Deek Robot). I want to be able to read the data every 50ms (20ms ideally). I can't get below 250ms. I've ...
0
votes
1answer
25 views

ESP12E Boot vs SPI

I was wondering how I could overcome the next issue; My ESP8266 12E is connected as follows: GPIO0 ground if needed to program, vcc otherwise GPIO2 vcc GPIO15 ground Bootmodes explained in the this ...
1
vote
2answers
46 views

SPI: test by connecting MOSI to MISO

Is it possible to test a SPI connection by wiring the MISO directly to the MOSI pin? I'm working on a low-level SPI implementation, and I want to check that the library is basically working. It ...
0
votes
1answer
21 views

Velleman KA02 not working on Mega 2560 r3

I have a Velleman KA02 audio shield. When I use this shield on an Arduino UNO R3 with this sample code, it works. And by "work" I mean when I interact with the Serial Monitor (by pressing Y, for ...
0
votes
1answer
38 views

How to utilize SPI Serial bus on a ATSAMD21G18?

Like the title suggests, I have a ATSAMD21G18 microcontroller that I want to interface with a LTC6803-4 chip, but I'm not sure how to set up the SPI bus on the microcontroller, and the datasheet ...
0
votes
0answers
23 views

LCD on top of SD datalogger flickers help!

I have a problem with my 16,2 with buttons lcd shield.(LCD Keypad Shield). It is connected on top of an SD dataloger. I came to the conclusion that every time the sd shield logs data and completes the ...
0
votes
0answers
36 views

SPI - different implementation / timing

I'm a little bit confused. I'm running the same code on a ESP32 (Adafruit Huzzah32) and an Arduino (SparkFun Pro Micro). It works on the ESP32 but not on the Arduino. Are there different API ...
0
votes
1answer
32 views

OLED DISPLAY USING SPI

My display is not responding to this code. Help please #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #define OLED_MOSI 10 #define ...
1
vote
1answer
40 views

Adafruit Micro-SD breakout not initializing on MEGA 2560

] [I am having quite a bit of trouble trying to get my Arduino MEGA 2560 to read my micro-SD card. My wiring is as follows: Breakout Arduino 5v 5v Gnd Gnd CLK 52 DO ...
0
votes
2answers
50 views

How can I rewrite Arduino Code using SPI library into C++?

The issue is that I have code using an Arduino library and need to convert it into C++ so I can use it with a raspberry pi on ROS (Robot operating system). Does anyone know the best way to change it ...
0
votes
1answer
35 views

Read write with half duplex SPI

I'm currently struggling interfacing an SPI device using just 3 pins (CLK, DATA, NSS). Wiring up? Connecting MOSI/MISO together? How do i read since it's half duplex? In ESP32 there are flags ...
1
vote
0answers
41 views

My PIR sensor output changes but digitalread high all the time

This is my final project, I have to communicate with two wemos d1 mini by LAN. The problem is that when I read the state of the PIR sensor it is "HIGH" all the time, but when I connect the led light, ...
0
votes
0answers
30 views

OSCOKIRQ failed to assert with USB HOST and SD card

I am having an issue using a MAX 3421 EE based Arduino USB Host shield and an SD card shield. From my understanding, they should both function as long as they are using different CS/SS pins and only ...
1
vote
0answers
31 views

Reading byte per byte from a txt file on SD Card without using the 512Bytes buffer

I am trying to read every sequenced-byte that is located on a txt file in the SD card. I have been reading quite a lot about the SPI and SD libraries, But I have found a lot of different information ...
0
votes
1answer
68 views

Send Strings via SPI both ways using two Arduino UNOs(Master to Slave & Slave to Master)

I need to create a two way String exchanger via SPI with two Arduino UNOs. Strings and their lengths are independent variables of the main loop and they can change with every iteration. I need both of ...
0
votes
0answers
48 views

Can't use MEGA as Transmitter and UNO as Receiver nRF24L01

I have a project with 7 May Deadline, i really need help on this. Here is the problem, I need to use my Arduino MEGA 2560 as transmitter and Ardino UNO(CH340G) as receiver. I can use uno as ...
0
votes
0answers
25 views

arduino due SPI

I'm trying to get spi communication to work on my due, but I am getting some unexpected results. I know how to use SPI on the Uno, Nano and Mega board but somethings happening to the Due. I connected ...
0
votes
0answers
47 views

Help Connecting Lidar sensor over SPI to arduino Due?

I'm very new to Arduino and have never used the SPI protocol before. I've tried following tutorials online, but my SPI.transfer always returns a value of 255 whether the sensor is connected or not. ...
0
votes
0answers
40 views

SPI Interceptor

Is it possible to use Arduino (or any other MCU) to intercept SPI communication between Raspberry Pi and external SD card ? I would like to intercept CMD24 and CMD25 of SD card SPI protocol to fail if ...
0
votes
0answers
61 views

sending array of data using spi

am using two arduino uno to start communicating using spi by sending an array of data but actually I having a trouble because the master is only showing me the first byte of the slave's array however ...
0
votes
0answers
25 views

Digital Potentiometer (TPL0501) Control Issues

I'm using SPI library in my code for controlling a digital potentiometer (TPL0501) with Arduino Mega. The code I have is: #include <SPI.h> byte address = 0x80; const int CS = 53; int SCLK = ...
0
votes
0answers
96 views

Trying to use an Arduino Uno together with an ISM330DLC communicating through SPI

I am trying to get a MEMS-module (ISM330DLC) to work together with an Arduino Uno but I can't get it to work. I am using the ism330dlc drivers. ISM330dlc Drivers: https://github.com/...
2
votes
1answer
47 views

Adafruit Feather 32u4 BLE compatible with Software SPI?

Let me preface by saying that I am not super experienced with electronics. I have an Adafruit Feather 32u4 that is using Hardware SPI to communicate over Bluetooth. Unfortunately, I'm also hoping to ...
0
votes
0answers
16 views

How do I talk to SigFox 2 Click module from Arduino Uno

I have a SigFox 2 Click[1] and an Arduino Uno Click Shield[2] and I've been trying communicate with the SigFox 2 Click to retrieve the ID and PAC number. (MikroeE website incorrectly said the numbers ...
0
votes
0answers
50 views

Unable to create a file on SD with Teensy 3.2 with FreeRTOS

I'm trying to log data to SD card using Teensy 3.2. I've taken the code from Arduino Examples SD > ReadWrite.ino and modified it slightly to run it with FreeRTOS - no changes in the header libraries ...
0
votes
1answer
51 views

Problem with SPI when using rf24 NRF24L01 transceiver with LED matrix MD_MAX72xx

I am currently using Arduino Mega to use a LED matrix and a NRF24L01 transceiver. for LED matrix, I use MD_MAX72xx library. While for the transceiver I use the RF24 library. I am already able to ...
0
votes
0answers
42 views

MOSI pin not turning low [duplicate]

I have the following code: #include <SPI.h> void initChips(){ SPI.begin(); SPI.beginTransaction(SPISettings(20000000, MSBFIRST, SPI_MODE0)); pinMode(SS, OUTPUT); ...
0
votes
2answers
81 views

Arduino SPI Multiplexer problems

I want to use the ADG731 32 ch multiplexer to read 32 potentiometers, I have wired everything and it works but it doesn't works as fast as I would want. The problem is that If I turn a potentiometer ...
0
votes
0answers
54 views

Need help with DAC to show more than one output with SPI (stuck and need help please)

I want to take 2 different outputs from my DAC from void setDacOutput function (and it should be switching with/like the timer for both outputs. One output of 2.9375V for 0.9ms from ISR if statement ...
0
votes
0answers
40 views

More than 3 SPI devices read by a single arduino

I've been working on a project that involves SSI Rotary Encoders from CUI. They are being read through the SPI interface, and I am bit-shifting appropriately to account for the differences between SSI ...
0
votes
1answer
63 views

Sending command through SPI on Arduino UNO

I am assuming the default pin configuration is pin 10(SS), 11(MOSI), 12(MISO), 13(CLK) from a default setup, SPI.begin(). The code compiles OK. Not sure about the int valuex and using the SPI.transfer(...
0
votes
1answer
29 views

NeoICSerial and SPI on the Uno - pin 10

The NeoICSerial documentation contains a table that states for the Uno: Transmit: 9 Receive: 8 PWM Unusable: 10 Pin 8 and 9 are used for the serial connection. Pin 10 is part of the pins for the SPI ...
1
vote
1answer
49 views

Is it possible to connect many (20+) SPI sensors to an Arduino Mega?

I am making a system for measuring whether or not there is vacuum present in big steel containers. They are located up to 100 meters from the control cabinet. The question is, how many SPI sensors ...
0
votes
1answer
194 views

Reading ADS1232 with Arduino

I'm a newbie and I'm trying to read an ADS1232 with an Arduino for a Weight Scale Project. I read data through the SPI interface, but i don't receive the result. #include <SPI.h> #define ...
2
votes
1answer
87 views

Cannot set MOSI pin low even after ending SPI

I'm building a battery operated device and must shutoff MOSI pin during sleep because it leaks current through the SD card if I don't (about 400 µA). Problem is, it won't stay off. I've looked at ...
0
votes
2answers
274 views

How to connect MPU9250 with NodeMCU using SPI or I2C Slave?

I want to connect 3 MPU9250 sensors, but since there is just one I2C bus, so there are another 2 sensors I want to connect through SPI. Library used - https://github.com/bolderflight/MPU9250/blob/...
0
votes
0answers
52 views

Adafruit Feather nRF52832 as a SPI slave

Like the title says, I am trying to configure the Adafruit Feather nRF52 as a SPI slave, who will receive information from a MSP430 microcontroller. I have found a few code examples that provide ...
1
vote
0answers
101 views

Is it possible to use I2C and SPI ons the same Clock line?

I'm trying to connect an I2C OLED display and an n RF24L01 WiFi module to an ATTiny85. But I only need 1 extra pin. Is it possible to use the same clock wire/pin for the I2C and SPI device? Maybe with ...
1
vote
1answer
116 views

SPI Wiring Confusion

I am currently trying to learn about SPI and how it works on the Arduino. I want to wire a MAX7219 chip to it to drive an 8x8 LED matrix with. Normally, I would assume the wiring from Arduino to ...
1
vote
0answers
184 views

Reading data from SPI on ESP32-WROOM-32

I'm newbie with Arduino and need to do a short task: read data from SPI (sent by another microcontroller) and send to WiFi (by ESP32-WROOM-32). I can't understand how to initialize and read data from ...
0
votes
0answers
157 views

WaveShare EPaper Display and Adafruit HUZZAH32 ESP32 Feather Board

I'm trying to understand how I could use WaveShare EPaper Display with Adafruit HUZZAH32 ESP32 Feather Board. With these connections SDI/SCK -> MOSI SCK/SCLK -> SCK CS -> 15 DC -> 33 RST/...
-1
votes
1answer
166 views

How to read Output data from SPI connector using Arduino Uno?

I am having main controller circuit board that give the data such as ("HAI", "HELLO") to 5 pin SPI Connector mounted on the same board. In that 5 pin SPI connector I could connect separate circuit ...
3
votes
1answer
132 views

SPI Connections to DAC [closed]

I'm hoping to construct a feedback loop for a laser using an Chipkit UC32 and an analog-digitial converter ( the one of I have is an AD5780 evaluation board). I've been reading through Digilint's SPI ...
0
votes
0answers
34 views

Arduino SPI ISR

Is there any way to trigger a ISR after a SPI transfer is complete? I am trying to send messages from one of three LORA radios and have the other two read the message. I am using the Radiohead (RF95) ...
0
votes
0answers
120 views

ESP32 MP3Decoding with VS1053/1003 not working

I want to build an webradio with my ESP32 and want to decode the mp3Stream with the Vs1053/1003. I´ve tried many libraries, but none of them worked, so I tried to understand the datasheet and I´ve ...
0
votes
3answers
136 views

Can Serial be safely used in an SPI interrupt routine

I have anecdotal experience that using Serial.print inside a slave's SPI interrupt routine (ISR) causes issues with transmission. It also seems that interrupts may be called more than once before the ...
0
votes
0answers
169 views

Arduino Mega and ADS1256 board

I found code for a Teensy board and now I added just digitalwriteFast library to code and changed port to SPI for Arduino Mega. And now I get just one number out: #include <SPI.h> #include <...
0
votes
1answer
50 views

Lines not pulsed fast enough (?))

Should this code pulse the PB3 and PB4 pins (MOSI and MISO of an Arduino Uno) at 2ms interval ? #include <avr/io.h> int main(void) { // for (byte i = 0; i < 32; i++) // pinMode(i, ...