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
2
votes
1answer
808 views

ATmega328P SPI Slave

I was scrolling through the ATmega328P datasheet when I came across a rather fascinating statement about the way in which the data part of the SPI interface is buffered. I can't seem to understand why ...
0
votes
0answers
286 views

Are (how much are) interupts interfering I2C or SPI communication?

I am thinking over an autonomous rover. One of the features/components of the rover will be ability to know how fast is the rover moving and what distance did it travel. I would like to use ...
0
votes
1answer
234 views

Why is the SPI response mis-ordered?

I have a Raspberry Pi and an Arduino Micro. The two are connected by a SPI bus, the RPi is the master; the Arduino the slave. I need to send 5 bytes to the Arduino and get 5 bytes as an answer. The ...
1
vote
0answers
417 views

SPI communication between two Ethernet Shields (W5100)

I am a newbie to the world of IoT, I want to ask... Is it possible to connect two Ethernet shields with SPI? And if yes, how can I codes them? I have reference from http://www.gammon.com.au/spi and ...
0
votes
2answers
200 views

Multiple SPI reads slows down read time dramatically

I have a two channel 24bit ADC(LTC2402- http://cds.linear.com/docs/en/datasheet/24012f.pdf) that I am communicating with via Arduino Leonardo(Leonardo because it was free!). If I attempt to do ...
0
votes
2answers
3k views

Transfer 10-bit via Arduino-to-Arduino SPI protocol

The task I need to accomplish is as follows: I have an analog/digital converter that sends out a 10-bit signal. This signal needs to be transferred to an Arduino Uno using the SPI protocol. Because ...
0
votes
1answer
68 views

Mega SPI communication changing between setup and loop

I am attempting to use an arduino MEGA 2560 to control a digital potentiometer (AD5206), but I am getting some strange behavior. I have attached the CLK and MOSI pins (52 and 51, respectively) to an ...
2
votes
1answer
604 views

Controlling I2C slave on Arduino with Python

Typically, when I connect my Arduino to a slave device through I2C or SPI, I'll control the slave using instructions coded in the firmware. The output data will be then printed to the Serial port and ...
2
votes
1answer
551 views

SPI Problem with K-Thermocouple and Potentiometer?

I have a setup where the Arduino reads input from the k-thermocouple and uses that info to regultate the an output voltage through a potentiometer. I know the potentiometer is not faulty because able ...
0
votes
1answer
5k views

Multiple 3-wire SPI sensor interfacing with Arduino

I want to connect 4 MAX6675 thermocouple to Arduino. MAX 6675 description. It comes with its own Arduino library. library link. I tested the example code for one sensor and it works perfectly. ...
5
votes
3answers
839 views

Crash when datalogging MPU-6050 to SD card

On an Arduino Pro Mini, I'm using Jeff Rowberg's stuff in i2cdevlib to read from the MPU6050, and using SdFat to write data to an SD card. Each part in isolation is fine, but when both DAQ and logging ...
1
vote
1answer
461 views

Slave SPI does not work

I am trying to use both an SRAM (23LC1024) and SD card reader on an SPI bus. My connections (for SPI): Arduino pin 11 (MOSI) -> SRAM pin 5 (SI/SIO0) Arduino pin 12 (MISO) -> SRAM pin 2 (SO/SIO1) ...
2
votes
2answers
2k views

Which library to use for 23LC1024 SRAM 1 Mbit

I noticed there are quite some libraries for the 23LC1024 SRAM 1 Mbit memory: SpiRam Extended library SpiRam library Direct SPI ? I tried 1 and 3 so far. What I noticed was that to read 1 byte took ...
2
votes
1answer
269 views

Adding slave device to Arduino Uno-SPI | Configuring pins

I recently started an oled project. I use a small "128X64 OLED LCD LED Display Module" and I control it using SPI protocol(with my Arduino). It is the only device connected to the microcontroller. ...
1
vote
0answers
419 views

SPI or A0/A1: what is the best solution for pin allocation on an Arduino shield?

When you design an Arduino shield you want to make it compatible with a maximum number of shields that may be stacked with it on an Arduino (UNO). Considering the following two possible tradeoffs, ...
2
votes
0answers
527 views

Do software SPI read from a register using shiftin()

How to read from a register using software SPI, presumably shiftin()? It works using the builtin SPI library + hardware SPI. I seem to be able to write but not read using manual shiftin()/shiftout()...
2
votes
1answer
595 views

Master doesn't receive the correct values in a master/slave SPI link

I've been struggling for 3 weeks looking for a solution to my problem concerning SPI communication. So, I need to establish a SPI communication between two Arduino devices: for instance, the master ...
-1
votes
1answer
427 views

SPI.H library to control APA102

I am trying to run a strip of APA102 addressable LED's using a Mini pro. The same strip I can run using a raspberry pi using SPI so I know the Strip works and what data I need to send to get it ...
2
votes
1answer
2k views

Global memory reduction when using SPI/SD

I want to use an SD card and when including the library both SPI.h and SD.h are included. Also later I want to use an external SRAM chip (probably using SPI.h as well). However, without the SRAM chip ...
0
votes
1answer
4k views

The working of a MFRC522 and its Interface protocols?

I've actually messed up and posted into the stackoverflow site, even though I'm probably not meant to. I've been given this datasheet, but even though it does explain somewhat how each host interfaces ...
1
vote
2answers
1k views

MISO pin issue in SPI

I have interfaced sd card and ADS1262 (ADC module) with Arduino mega board and sharing the SPI control pin i.e. SCK, MISO and MOSI. I have found that sd card is not initialized and ADS1262 is giving ...
-1
votes
1answer
2k views

MPU-9250 IMU on SPI, external sensor or magnetometer using I2C master

I'm trying (for sport...) to use an MPU-9250 in SPI mode as it should be faster, and wasn't able to talk to the embedded magnetometer in my code. I've gone through the documentation (RM-MPU-9250A-00 ...
0
votes
0answers
49 views

Will an in-circuit programmer mess up my board?

I am designing a circuit board that will contain, among other things, an ATtiny85 and an NRF24L01 module. I would also like to use an SOIC-8 ATtiny variant. In order to program this chip I will then ...
1
vote
1answer
480 views

Can regular Arduino pins be used during SPI?

I have a circuit in which I'm using an Arduino Pro Mini to interface with an RF69 radio via SPI. The SCK pin on the Pro Mini is pin 13, which also happens to be the LED pin. Is it possible to write ...
3
votes
2answers
1k views

M0 pro: SPI communication, code works on Uno, but not in M0. Using ICSP port

I am trying to establish a communication between a sensor and a M0 -pro using SPI. The code : #include <SPI.h> unsigned int result = 0; void readAngle(); void setup() { ...
0
votes
1answer
6k views

OVF in serial monitor instead of data

I am currently working with two Arduinos and I'm trying to synchronize them. I want to get data from four LIS3DH accelerometers. The LIS3DH accelerometers are connected to the Arduino using I2C ...
0
votes
1answer
462 views

SPI communication Problem Arduino

I'm trying to set up SPI communication between two Arduinos (UNO and Mega), I want to read the status of the slave output pin from the master. I connected a diode to pin 9 of Mega and I wanted to ...
1
vote
1answer
1k views

How to connect a digital sensor through SPI

I want to connect a ADXL355 development board accelerometer to an Arduino. I cant get any data form the sensor. The data_ready pin is never high and I can't read the registers. The connections (user ...
2
votes
2answers
1k views

Can I set arbitrary SPI clock speeds?

I would like to interface an ADC (in particular this one: http://www.linear.com/product/LTC1400) with an Arduino Nano via SPI. The specified max clock speed for the ADC is 6.4 MHz. The Nano can do up ...
2
votes
2answers
191 views

Arduino based SPI programming of LT1257 not working

I am trying to talk to an LT1257 using an Arduino Nano Atmega328. I am not using the default slave select pin. I am using pin 5 as chip select for the DAC. The LT1257 data sheet shows this timing ...
0
votes
0answers
550 views

Reading values from Wiznet w5500 chip over SPI

I am trying to get the MAC address that is stored on the Wiznet w5500 chip. On page 29 - click here, it has the address of the values. It state that "This block can be selected by the BSB[4:0] value ...
2
votes
1answer
6k views

Arduino Nano nRF24L01+ DFPlayer Mini SPI Problem

I'm working with an Arduino Nano board clone (CH340) on wireless control of DFPlayer Mini, transceiver sending a Struct variable with MachinePrefix (just in case), sound type (I have more folders by ...
1
vote
0answers
2k views

Load website from SD card

I combined two different codes together, a captive portal and a SD card web server. I encountered a problem which the website in the SD card doesn't load when I connect to the AP (captive portal page)....
0
votes
2answers
249 views

Using 8-bit instead of 16-bit in Adafruit library

I tried to modify the Adafruit_GFX and Adafruit_ST7735 libraries to make the color variable( as shown in code below) to use 8-bit instead of 16-bit for displaying 8-bit color on LCD screen. void ...
0
votes
1answer
371 views

Does anyone know how to connect 2 digipots to Arduino? (MCP4141)

I'm struggling with getting the code right. I'm trying to connect 2 digipots (MCP 4141) to Arduino to work separately over SPI. Has anyone got any experience with that?
1
vote
1answer
1k views

Writing to a SPI memory

Recently I salvaged a BIOS chip (EN25QH16) which has 2 Megabytes of memory (8192 pages, 256 bytes/page). I followed this instructables and it works. I double checked the opcodes because the code is ...
0
votes
1answer
1k views

Disable SCK temporarily to save power

for logging of environmental data, I am using a MicroSD card adapter (no brand name, eBay, China) and a 4GB Intenso SD card. I want to read data and write it to the SD card once every 10 minutes. ...
1
vote
2answers
2k views

How to use multiple SPI slaves in MKR1000 if it doesn't have Slave Select (SS/CS) pin?

I'm using a Genuino MKR1000 and I want to use the SPI interface, which I've seen that there is no Slave Select (SS)/Chip Select(CS) pin usage. How can I use the SPI interface with multiple slaves ...
2
votes
1answer
557 views

ADS1262 and 2.2 SPI TFT (Two SPI Slave) with Arduino

I am interfacing two SPI slave module i.e. ADS1262 and 2.2 SPI TFT with the Arduino Ethernet board. When I test each device on its own it works. Initially, I interfaced the TFT to the Arduino and it ...
-1
votes
3answers
2k views

Arduino Problem with using SoftwareSerial and SPI

I am using an external ADC (via SPI) and also a GPS receiver (Software Serial). I tried each one of them and it's working fine. Now, when I try to integrate both of them in one sketch, I can only make ...
1
vote
0answers
962 views

How do you debug SPI connected devices?

EDIT: Changed the title to better express what I'm after. I've been dabbling in connecting two Arduino Nano 3's with the RFM69HCW breakout for the past 5 days.. but got nowhere. I've followed the ...
2
votes
3answers
12k views

How do I send a string from an Arduino Slave using SPI?

I have an Arduino Uno acting as a master with 3 Arduino Nano's acting as a slaves. Looking at this example: http://www.gammon.com.au/forum/?id=10892, it tells me how to send a string from the master ...
1
vote
2answers
4k views

How to flash an ATmega directly without a dedicated flashing device?

An ATmega microcontroller can be flashed by a C compiler and a USB dedicated device (ISP). I tried to flash the program into the microcontroller by saving the machine code to a MicroSD card that I ...
0
votes
1answer
2k views

ArduCam ESP8266 and (Not-Mini) OV2640 Camera Module interface?

I bought ArduCam ESP8266 and a OV2640 Module. However it is not the mini-version. At the time it didn't seem like it was necessary. I might have made a big mistake here. The board has 8 female pins ...
-1
votes
2answers
279 views

which spi mode shall i use given this timing diagram

I need some help to ensure my understanding of how this is supposed to work. I want to know given the attached serial timing diagram which spi mode should I use? Based on my newly found knowledge I ...
3
votes
4answers
270 views

Creating variable inside if statement (conditional signed vs unsigned int)

I have an SPI chip that I would like to read out with an Arduino. Some of the registers are signed int others are unsigned int. I am writing a function to read any register. A simplified version: ...
1
vote
2answers
615 views

Arduino add two spi slaves that has no slave select pin

I am working on a project where Arduino is communicating with two devices using SPI. Unfortunately, these two devices has no ss(slave select) pin to communicate with each one separately. How Can I ...
3
votes
2answers
7k views

I2C and SPI at the same time?

I would like to ask a question relating to the following communication setup: STM32 -- Arduino Pro Mini -- ADNS3080 sensor The interface between STM32 -- Arduino is I2C and the interface between ...
0
votes
1answer
429 views

SPI conflict with two shields - IOREF?

Update: I've refactored the code to be very resilient to boards missing or not being able to talk to them. Then I tinkered with a bunch of pins and learned that it all comes down to the IOREF pin ...
0
votes
1answer
252 views

Understanding Nikon modified version of SPI

I am trying to use this library to connect a Nikon lens to an Arduino. https://lainy.github.io/NikonLens/classlain_1_1t_nikon_lens.html I'm finding it very hard to understand the correct wiring. ...

1
4
5
6 7 8