We’re rewarding the question askers & reputations are being recalculated! Read more.

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
44
votes
1answer
169k views

How do you use SPI on an Arduino?

With reference to the Arduino Uno, Mega2560, Leonardo and similar boards: How does SPI work? How fast is SPI? How do I connect between a master and a slave? How do I make an SPI slave? Please note: ...
17
votes
1answer
17k views

How to access multiple SPI interfaces on Arduino

I have worked on SPI devices connected with an Arduino one at a time. How do I work with two different SPI devices at the same time?
7
votes
3answers
688 views

Multiple SPI device

I want to connect Ethernet board (W5100 HR911105A) to Arduino Leonardo with SPI and I also want to connect SD reader. When I test these boards separately everything working. But when I connect them ...
3
votes
1answer
143 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 ...
2
votes
1answer
1k views

Slaving multiple Arduinos via SPI

I am attempting to use SPI communication between a Master Arduino Mega 2560, and standalone Slave Arduino Unos (4, to be exact). The intention is for the Unos to do some trivial work and produce one ...
1
vote
2answers
593 views

Uniform timing when using Arduino for data acquisition

I am using Arduino UNO together with a SPI ADC (LTC1859) and SRAM (23CL1024) to record a series of data points at approx 2 kHz sampling rate (let's say a few thousand data points). I have some ...
5
votes
1answer
2k views

Digital Potentiometer not fading LED

So I am trying to test what will eventually be a Arduino controlling 3 110V motors that are currently controlled by an analog pot. But more on that later. I am trying to test out using a digital pot (...
3
votes
2answers
5k 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 ...
3
votes
1answer
1k views

Arduino in Eclipse IDE: How to add SPI library (core library already added)?

I want to use eclipse for arduino programming, so I followed the guides to set up a static project for the arduino core library. Then I added the library file (.a) and the .h and .cpp files to my new ...
3
votes
2answers
93 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 ...
2
votes
1answer
369 views

Connecting Saleae Logic 8 to MISO (pin 12) on Uno 3 w/ NRF24L01+ halts program

I have an NRF24L01+ with the base module (regulates voltage) connected to an Arduino Uno 3. I'm using the tmrh20 NRF24 library and am running one of the example programs. I'm trying to sniff the SPI ...
1
vote
1answer
417 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) ...
1
vote
2answers
909 views

Atmega328P - SCK pin

I am using Atmega328p with arduino bootloader in a project. There happens to be an LED connected on SCK pin. During Start (or restarts), the LED appears to flicker a couple of times (3 times to be ...
0
votes
1answer
79 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
0answers
474 views

trouble running i2c and spi at the same time

I know this question has been asked before but I am having trouble running I2c and SPI at the same time. I am attaching my code below. The problem when I run the code is that the LED's don't blink ...
0
votes
3answers
186 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
1answer
2k views

MCP23S17: Programming IODIRx-Register works in loop(), but not in setup()

I use a single MCP23S17 connected to an Arduino Uno. I use its port B for output and port A for input. When I first started to use this device I noticed, I could read pins, but using them as output ...