Stack Exchange Network

Stack Exchange network consists of 174 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]

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.

0
votes
2answers
33 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
22 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
43 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, ...
0
votes
1answer
48 views

noisy output lines when waking up from a sleep

Using code similar to these examples from AVR https://www.microchip.com/webdoc/AVRLibcReferenceManual/group__avr__sleep.html my program causes my Adafruit Feather 32u4 to often sleep. When the ...
0
votes
0answers
18 views

Arduino Due, MCP2515, SPI and CAN message

I use Vector network to send CAN messages to MCP2515 through CAN HIGH and CAN LOW lines. I connect MCP2515 with Arduino Due through SPI protocol. Connections are good. But I receive "not acknowledge ...
1
vote
2answers
128 views

Arduino NANO hardware SPI not working

I have an Arduino NANO clone and a 2.4" ILI9341 TFT display. The VCC and LCD pins of the display are connected to the 5V pin of the board. The GND to the GND. All the logic pins are connected to ...
0
votes
1answer
42 views

Want to display an image from SD card to ILI9486 LCD display

I am completely new to Arduino. I have been given a side project to display a image from SD card to display. LCD used is ILI9486 which has a SD card slot at the back of the display module. I have ...
-1
votes
1answer
30 views

esp32 spi library, how read a mcp23s08 register

thanks for any help I need to read a gpio expander mcp23s08 set as 8 bits input. my code write correctly (I believe) the setup register using SPI library, with the enclosed example modified. But I do ...
2
votes
0answers
49 views

How to use SPI to set/ read registers for a sensor (Avoiding need for Github Lib)

Ok so as some readers might have seen, my current project involves using MPU's. The idea is sending data via CAN bus to a controlling MCU to then send to a raspberry pi to perform the calculations ...
0
votes
1answer
22 views

Using TFT with hardware SPI and speaker with tone()

I want to make a device with a TFT screen and a speaker that uses the builtin tone() function. However, according to the documentation, using tone() interferes with PWM on pins 3 and 11. On the ...
0
votes
1answer
38 views

Getting incorrect output from ADC over SPI in Arduino Uno

I am trying to read data from an ADC ADCS7476 (datasheet) using SPI on Arduino Uno. I am using the following code to read the data from the ADC and printing it on serial monitor. However, the code is ...
0
votes
1answer
43 views

Can SPI and serial.begin be used at the same time?

I have two modules where I want to control them through a single Arduino UNO. I guess Serial.begin(9600) uses serial port and UART. But Im not sure about SPI. Can I use SPI library hence the SPI ...
0
votes
1answer
54 views

Triggering an SPI transfer with an interrupt in Arduino Due

I have a DDS that is controlled by an Arduino DUE, loop() waits for Serial commands and based on them calls one or another function that sets the DDS's frequency, phase, amplitude etc via SPI. In ...
1
vote
0answers
68 views

Interfacing MAX6675 with Arduino Mega 2560

I'm trying to use a thermocouple k type and a MAX6675 IC. I bought the MAX6675 chip and made the circuit (just a 1 nf capacitor on +5 V and GND near the IC) with the help of the datasheet I used the ...
0
votes
1answer
69 views

Trouble configuring Arduino Due SPI to ADC

I am having trouble configuring Arduino Due SPI to an AD7490 ADC. Here is how I have the pins connected: +3.3V > 7490 pin 22 Vin +3.3V > 7490 Vref DUE CS (8) > 7490 pin 20 SS - slave select) DUE ...
0
votes
3answers
108 views

STM32 and NRF send & receive

This is my send and receive code in STM32 (blue board). But i can't send and receive data . why? I did use Enrf24.h . Enrf24 link: https://github.com/spirilis/Enrf24 send code is: #include <SPI.h&...
3
votes
1answer
49 views

Change operational mode of CAN transceiver

I have two MCP2515 stand-alone CAN controllers with SPI interface, two TJA1042 CAN transceivers and two Arduino Uno boards. As you may know TJA1042 have two operational modes: Sleep mode Normal mode. ...
0
votes
1answer
58 views

USART, SPI or Bit-Bang for the continuous transfer of bytes without inserted extra bits

I have heard that The SPI hardware introduces a 9th, HIGH bit between bytes USART still uses start and stop bits when in synchronous mode Are both these statements true? Can I modify the built-in ...
1
vote
1answer
64 views

16 bit SPI on Arduino Due

I'm trying to control AD7091-8 using Arduino Due. This IC calls for 16 bit SPI R/W. I'd read that I can change the transmit and receive bits of Arduino DUE by changing a register (bits 4-7 of SPI_CSR)...
2
votes
1answer
208 views

SPI.transfer(buffer, size) does not send data from buffer

I am having trouble getting SPI.transfer(buffer, size) to work as expected. Here is the code: // inslude the SPI library: #include <SPI.h> // set pin 10 as the slave select for the digital ...
0
votes
2answers
141 views

send more than one byte at a time SPI Arduino

I have recently been trying to send integers via SPI between two arduino Uno's. I am using the first example of Nick Gammons tutorial, and trying to modify it to get a basic understanding of how to ...
1
vote
1answer
69 views

Looking for a waterproof SPI temperature sensor

In my current project I'm using a DS18B20, which seems to be the only temperature sensor to show up when googling for waterproof temperature sensor for an arduino. The sensor itself is fine, however, ...
0
votes
2answers
399 views

SPI Digital Potentiometer not working on ESP32

I have an MCP4151 digital potentiometer chip. I have managed to get it to work using and Arduino Uno using the code below: #include <SPI.h> byte address = 0x00; int CS= 5; void setup() { ...
-3
votes
2answers
155 views

What's wrong with my code

I use a mega as a master and a nano as a slave. Both should convey texts. However, I get the master always only the answer that I send. The text from the slave does not arrive. Master: #include <...
0
votes
0answers
105 views

Using ICSP header for SPI extension in Arduino DUE

I'm trying to connect a sensor and a TFT display to the hardware SPI pins of Arduino DUE using the concept of extended SPI. The TFT and sensor need the SPI's MISO,MOSI AND SCK pins commonly. But for ...
0
votes
1answer
424 views

Interfacing with an SSI sensor?

I'm trying to interface with version RM08S of this rotary encoder using an Arduino Mega. The sensor supports a "Synchro serial interface (SSI), single ended" interface. I'm unfamiliar with this ...
3
votes
2answers
82 views

Stacking 3 of the same shields on top of each other and instructing them in sync

Context: I have an audio track separated into individual channels grouped by frequency and speaker location. I need to play all three of these channels simultaneously and perform instructions like ...
0
votes
1answer
63 views

Difference in pinout (types?) Uno/Mega

As a hands-on guy, I've started my first ever Arduino project 5 hours ago with no prior knowledge about Arduinos (I have coding experience tho. included this in case I am missing something obvious to ...
0
votes
1answer
204 views

How to change the default Slave Select pin (Digital pin 10) on Arduino UNO R3 for SPI communication?

Currently I am working on an Arduino based project. My project require interfacing 6 servo motors and an SD card module to my Arduino UNO. The problem is that I need all the six PWM pins for six ...
0
votes
0answers
88 views

Arduino hangs when sending data using UDP

I am trying to use the W5500 ethernet chip with the Arduino to send some stuff over UDP, but my program hangs when I call Udp.endPacket(). The library in question is here: https://github.com/sstaub/...
1
vote
1answer
38 views

How do I include a file that is not a .h, .c or .cpp file?

I am using the ADF7030 on the breakout board (not motherboard) and I am trying to interface it with an Arduino Uno. I want to load the transceivers configuration file onto the chip using SPI. To do ...
0
votes
0answers
126 views

TMC2660 SPI Communication

I'm using ESP32 Doit Board 40Mhz, and trying to communicate with TMC2660-BoB. I've successfully flashed Arduino into ESP32, and it's working well. I've got SPI connection right. Meaning by that: (you ...
0
votes
1answer
43 views

1.54 e-ink without driver [closed]

i wan’t to know if is possible to use this raw e-ink display with arduino. if it’s possible to directly connect cables from this ribbon cable to arduino without any driver pcb and control it with 3 ...
0
votes
2answers
32 views

Arduino Due ICSP location [closed]

I am making a shield for Arduino Due. It will be a simple board with ribbon connectors for taking a variety of interfaces to external boards. It will be Open Source hardware. I have been searching ...
0
votes
0answers
47 views

Is the ATMega328P powerful enough to deal with a lot of SPI data while reading a rotary encoder?

I need to: Output data to a 128x64 screen with ug8lib (via SPI) Keep track of the position of a high-precision rotary encoder (1024p/r) Send about 2 bytes of data up to 120 times per second via an ...
0
votes
3answers
216 views

How to drive SPI MAX7219 7-segment led module using MCP23S17 extender

I have used Nick Gammon's (MAX7219) and (bitBangedSPI) libraries to drive SPI 7-segment 8 digit led modules successfully from the Arduino Uno. I would like to extend the number of Slave Select (CS) ...
0
votes
0answers
91 views

SPI Library for Galileo Gen-2

I am getting the following error while compiling the LoRa Sender code for Galileo Gen-2.I understand that Galileo uses a different SPI.h which contains the function SPISettings, which is missing in ...
0
votes
0answers
476 views

Can't get I2C + SPI working on Wemos D1 Mini Pro

I've been struggeling allday to get I²C and SPI working on the same time on my Wemos D1 Mini Pro, i want to use a BME280 + the Wemos D1 Mini 1,4' TFT Shield. If i comment one or the other out, the ...
0
votes
1answer
101 views

DLHR differential pressure sensor SPI

I am new to using SPI with an Arduino. But I'm trying to wrap my head around the "coding protocols"/syntax of the Arduino IDE code. I understand the basics of how SPI works conceptually, just not how ...
2
votes
2answers
178 views

Two SD card interfaces on one ESP8266?

I know it's possible to hook up multiple SPI devices, but how can one access the second drive from a sketch? Looking at the SDWebServer.ino example, my doubt is with the SD.begin(SS); part. If I ...
0
votes
0answers
243 views

Connect two D1 R2 (8266) via SPI with Github SPISlave Library

Problem: SPI Connection between two D1 (ESP8266) boards does not work properly, only master to slave transfers data correctly. What I did: I connected two Wemos D1 R2 via SPI and installed the ...
0
votes
0answers
50 views

TinyScreen+ coupled with 433MHZ Radio (Setup)

I'm using the following shields: 1. TINYSCREEN+ (PROCESSOR, OLED & USB IN ONE) https://tinycircuits.com/products/tinyscreenplus 2. 433MHZ LONG RANGE RADIO TINYSHIELD https://tinycircuits.com/...
1
vote
2answers
178 views

Writing “theremin” outputs to a MIDI file on an SD card

I am making a musical instrument (theremin simulator). I want there to be a "record" capability which stores the volume and note the user is playing, into a MIDI file. Note this doesn't actually ...
1
vote
1answer
79 views

Small Baseball Scoreboard using 2 to 3 breadboards

I'm helping my son start an Arduino small baseball scoreboard (roughly 2 or 3 breadboards in size). Im thinking to use qty 2, 2 digit 7 segment LED's (score of each team), an LCD 1602 module (inning ...
1
vote
1answer
326 views

ArduCAM OV2640 and microSD card module — SPI problems

So what I'm trying to do is use the ArduCAM OV2640 (2MP Mini) to take a timelapse. Of course the first thing I have to do it to get it to take a picture and write it to an SD card. The thing is, the ...
0
votes
1answer
182 views

What is the tool to send file to SPIFSS on ESP8266/32?

Is there good tools (IDE, CLI or IDE addon) to send file via USB port to SPIFSS internal espressif ESP hardware SoC ?
0
votes
1answer
215 views

Reading data from potentiometer with MISO and MOSI on same pin

I am working with the MCP4131 Digital Potentiometer and I am running into some trouble. The MISO and MOSI functionalities are multiplexed onto the same pin. Obviously, this means that I have to have ...
0
votes
0answers
2k views

NodeMCU (ESP8266) with SPI TFT, I2C RTC, & 2 Buttons, correct GPIO to use?

From all my research it seems that the NodeMCU only has 11 available GPIO (6-11 are used to connect flash memory chip), i'm wondering if anybody can help me with these final connections I have left ...
0
votes
1answer
94 views

SH1106 - Transferring long buffer via SPI

I am using an SH1106 and am creating my own driver for it. Nearly everything is doing great with about 2/3ms send time using transfer16. I did notice however that I can use transfer with a buffer and ...
0
votes
0answers
144 views

SH1106 OLED display on Mega2560 not working?

I am trying to use an SH1106 display with the Mega2560 but simply can't get it too work. I have tried using various different libraries and pins but nothing. (Note I got it working on an Uno just fine)...