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

SPI communication with Arduino and PGA411-Q1 resolver sensor

I have been trying to implement SPI communication between an Arduino board and a PGA411-Q1 resolver sensor board. I have set up the Arduino SPI settings as indicated on the resolver sensor's datasheet ...
0
votes
2answers
86 views

ESP32-CAM not reading BME680

I am trying to read BME680 on ESP32-CAM with following code : (Before trying BME680, I have suscessfully connected BME280 to ESP32-CAM over S/W SPI) #include <Wire.h> #include <SPI.h> #...
1
vote
1answer
59 views

What pins can be used for chip select (CS, CC) on the Arduino nano every?

I’ve checked the nano’s tech specs but I can’t seem to find any information regarding it. I’ve tried setting it to pin 26 (digital output)
0
votes
1answer
35 views

How fast should I be able to write to AT45DB321D flash memory?

I checked the AT45DB321D datasheet and it says it operates at either 66 MHz oder 33 MHz. Both of these speeds are higher than what an Arduino Nano supports (my google fu fails me here, but according ...
0
votes
1answer
30 views

SD writing problem

I have an Arduino code for logging sensor data, time and date. Then I store all the data in the SD card and then I will send the sensor value to another node by using Lora. but I can't write the data ...
0
votes
1answer
35 views

can I program a nano over SPI with another nano?

I'm fairly new to arduino, but I want to program a nano over SPI to skip the bootloader. I know I can program the nano with an uno as a programmer to do this, but I don't have an uno, but I do have a ...
0
votes
0answers
32 views

RadioHead Library and SPI Device (MAX7219) not working together

I am trying to use the RadioHead Library (receiving a 433Mhz Signal) and an LED Matrix (Max7219 via SPI) on the same Arduino Leonardo. Now either one works fine when only it is connecting. But when ...
0
votes
1answer
24 views

When does interrupt get fired

When does the ISR mapped to SPI_STC_vect (SPI transmission complete) get fired? Does it fire after a byte has been received (eight clock cycles) of when the slave select changes back to high to ...
0
votes
1answer
52 views

Reading data from the MCP3002

I am using a MCP3002 to convert an analog signal to digital data. It works fine actually, sends good data. However; After a while, when the power is turned off and on again a few times, it only ...
0
votes
0answers
23 views

Is it possible to synchronize two SPI busses to send data out in parallel on the same clock signal?

We're working with these very odd driver chips which are sort of like shift registers except rather than latch the data at the end, the latch needs to happen over the last 'n' clock cycles in parallel ...
0
votes
1answer
40 views

AD7476 adc and SPI

I'm trying to understand if I can use the AD7476 with Arduino and SPI: datasheet My rough idea is that I should put CS low, then read two bytes using SPI.transfer() twice, and then bring CS high ...
0
votes
0answers
20 views

TRANSFER one byte from MASTER (arduino NANO) to SLAVE (Arduino UNO), and RECEIVING two bytes from SLAVE, using SPI.transfer(byte)

good afternoon I'm working on: SEND & RECEIVED one integer from Master(NANO) to Slave(UNO). I'll get temperature, humidity and heat index from DHT11 ID01, DHT11 ID02 and DHT22 ID03, so I have ...
0
votes
1answer
44 views

'TCCR1B' was not declared in this scope

I'm trying to use a MS5540C (digital pressure sensor) and the sample code has this line: TCCR1B = (TCCR1B & 0xF8) | 1; //generates the MCLK signal I'm a bit of a noob to the IoT but its not ...
-1
votes
3answers
89 views

How can I connect 6 solenoid locks to an arduino

Im in college and our research is about a fingerprint based door lock system. We really dont have any idea about arduino. Now we bought arduino mega for our research but I dont know how to connect ...
0
votes
0answers
59 views

MPU9250 with Arduino Nano and Arduino Nano 33 BLE

I am trying to read sensor data from two MPU9250s with both one Arduino Nano and a Arduino Nano 33 BLE using SPI. As for the Arduino nano, I was successful to acquire the sensor data and output it in ...
1
vote
0answers
119 views

reference to 'File' is ambiguous. Why am I getting this error?

The program is supposed to take photo and store the picture into the SD card with the timestamp. My Program Code: #include <SdFat.h> #include <Adafruit_VC0706.h> #include <SPI.h> #...
0
votes
1answer
86 views

Arduino Due as Triggered DMA SPI Slave is possible?

Is it possible for arduino Due to act as DMA-SPI-slave device which can exchange SPI data (uint16_t TX[10] and RX[10]) in triggered slave mode? I have a setup in which time period is very short (~...
0
votes
1answer
40 views

Does MFRC522 supports native SPI of Arduino Due?

Does MFRC522 library support native SPI interface of Arduino Due? By native SPI I mean this one: I came here with this question because the initializer asks for 2 pins: SS and Reset: MFRC522(byte ...
1
vote
1answer
33 views

Is the code correct? Nrf24l01

I'm am a beginner, so I'm sorry I have written this wrong. Is this piece of code correct? If not where? Transmitter: #include <SPI.h> #include "RF24.h" int* Msg, mSg, msG; RF24 radio(9, 10);...
0
votes
0answers
24 views

Why is I2C OLED failing to initialise when SPI device is added to project (SD.h causing issue)? [duplicate]

My project uses an RTC, GY-521 MPU-6050 3-Axis Gyro and MakerHawk OLED Display Module. All working fine together to show current date and time as well as displaying Acceleration on 3 Axis. I now want ...
1
vote
1answer
154 views

Nano can't get reply from ENC28J60 Ethernet Shield

My Arduino Nano can't get a reply from my new ENC28J60 Ethernet Shield - I can't get any library examples to work. Using the UIPEthernet lib, and running the EchoServer example with logging turned up, ...
0
votes
0answers
79 views

SPI receive register size of ESP32

ESP32 has 64 byte SPI FIFO size, but I could not find what is the largest bit size it can receive over SPI? P.S. I need to interface a sensor, which returns 32 bit response. EDIT to clarify why I am ...
0
votes
0answers
38 views

Communication between Arduino and Can Bus

Function mcp2515_get_message appears the following instruction: uint32_t i1 = (uint32_t) spi_putc(0xff), i2 = (uint32_t) spi_putc(0xff), i3 = (uint32_t) spi_putc(0xff), ...
0
votes
1answer
113 views

How to connect two LED strips (APA102/SK9822) to Arduino UNO?

So what I am trying to do is to connect two SK9822 LED strips to Arduino UNO. I am a bit confused about how to properly set this up so I can individualy control any led. So obviously 5V should go to ...
0
votes
1answer
55 views

Using Arduino to Record analog signals with SPI ADC + Sampling Rate Issue

I am using Arduino UNO to Read 8-channel, 24-bits resolution Analog signals using ADS1299 Analog-fornt-end. ADS1299 use SPI interface to talk with Arduino. Currently, I can record the analog signal ...
0
votes
1answer
136 views

How to connect SPI device on Etherntet shield on Arduino Uno

In my project I need to connect RFID reader (RC522) on top of the Ethernet shield because of it's capability of reading and editing SD card. When I connect only RFID sensor on Arduino, it works. Same ...
0
votes
0answers
120 views

Using the Broadcom AFBR-S50 with Arduino

I'm trying to interface with a Broadcom AFBR-S50MV85G ToF sensor over SPI using an Arduino, which is complicated by the fact that the provided library and reference application is written for Cortex ...
-2
votes
1answer
43 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
36 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
82 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
35 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
139 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
24 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
69 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
46 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
43 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
36 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 ...
0
votes
1answer
71 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
65 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
156 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
49 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
51 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
45 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
130 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
94 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
48 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
93 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
65 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
111 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
53 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 = ...