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 vote
1 answer
8k views

Making CS (chip select) work in SPI (for and SD card and OLED)

I'm working on a project that will log data to an SD card and display a user interface on an OLED. The SparkFun OLED breakout was super easy to set up. I was also able to get the SD-Card library ...
futurebird's user avatar
0 votes
1 answer
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 ...
Ariser's user avatar
  • 577
1 vote
1 answer
660 views

Teensy: SPI and Pressure Sensor

I'm first time working with a Teensy 3.1. I have to connect this (MS5803-01BA: http://www.amsys.de/products/ms5803.htm) pressure sensor via SPI to my Teensy. My problem is, that I don't have any ...
John's user avatar
  • 35
0 votes
2 answers
2k views

Digital Potentiometer and Motor Speed Controller

I'm trying to get a Chinese 20A DC Motor Speed Controller working with a MCP42100 Digital Potentiometer. The analogue potentiometer supplied was 100kOhm. I have programmed my arduino with the ...
JosephFTaylor's user avatar
3 votes
0 answers
797 views

Read from the SD card - ACMD41 times out

I'm trying to read from the SD card using an Arduino Pro Mini (3.3 V), Pololu micro-SD reader (the 3.3V one) over a SPI protocol. I've tried both the SD library from Arduino SDK, and the Adafruit one....
kamituel's user avatar
  • 141
0 votes
1 answer
678 views

Attiny88 as SPI slave

I have programmed Attiny88 with Arduino IDE 1.6.5 using https://github.com/SpenceKonde/ATTinyCore . I chose Attiny88 because it's the cheapest Attiny (as low as $0.5) and at the same time has 28 pins ...
Amir Samakar's user avatar
1 vote
2 answers
1k views

Connect the Sparkfun CAN bus shield with an RFduino

I have a problem which I am working on for some days now. I do have knowledge in electronics, but not extensively. I also posted this question in the RFduino Forum but couldn't get any good answers. ...
user avatar
2 votes
0 answers
2k views

Arduino stops working after some receivings from RF

I made a sketch that receives an rgb code from a remote Arduino using nrf24l01 and while it works for the first receivings then it stops working. I placed a testing Serial.println in the loop to test ...
Christos Mitsis's user avatar
0 votes
1 answer
924 views

Transferring OV7670 data with SPI port

I bought an OV7670 camera and I would like to use the following code: https://github.com/ComputerNerd/ov7670-no-ram-arduino-uno But I wonder whether it is possible to use SPI instead of I2C when I ...
Nownuri's user avatar
  • 115
0 votes
1 answer
558 views

Is crystal mandatory on attiny84?

I am trying to make a mini project with attiny84 and I searched the web so I can make an arduino on breadboard. What I saw on the internet is that they didnt use crystal. Is it mandatory if I want to ...
Christos Mitsis's user avatar
0 votes
1 answer
709 views

Reading and Writing on different clock edges with Arduino SPI interface

I'm trying to simulate a certain µController to characterize and measure a certain chip. I need to write my data on the negative edge of the master clock and read the data coming from the slave in ...
user avatar
0 votes
1 answer
657 views

SPI: problems communicating with sensor using Arduino

I have a sensor which I am trying to communicate with over SPI using an Arduino UNO. It is my first time using SPI and I'm experiencing some problems which I'm hoping are just due to some ...
user3668294's user avatar
1 vote
1 answer
25k views

How to write RFID data using the RFID-RC522 chip

I have got this library+code example from a friend, to read RFID numbers using the RFID-RC522 chip: RFID.ino #include <RFID.h> #include <SPI.h> /** * RFID pins * MOSI: Pin 11 / ICSP-4 * ...
Rumanoid's user avatar
3 votes
1 answer
273 views

Undefined functions send() and receive() on TwoWire/SPI

I have downloaded a sketch that uses SPI. The sketch includes the Wire library but at compilation time, I am getting errors that TwoWire doesn't have methods called send() and receive()?
Kolban's user avatar
  • 286
2 votes
1 answer
3k views

Ethernet shield and sd card not working togather on arduino mega

I am making a web-client with an Arduino mega and Ethernet Shield. I am trying to receive data from a web-server running a php script and saving that data to the SD card located in the Arduino ...
bmabir17's user avatar
2 votes
0 answers
123 views

Arduino DUE and a ledmatrix with issues

I am trying to code something for fun using an Arduino Due and a LED matrix. The led matrix has a backpack controller. This device is using SPI. So I connect MOSI and SCLK to their respective pins and ...
Faux_Clef's user avatar
  • 199
1 vote
2 answers
627 views

How to interface DS1801 digital resistor with Arduino DUE SPI interface? What clock rate so use?

I am trying to program a digital resistor and set it's wiper resistance. The general circuit looks a little like this where "pot" represents the Maxim DS1801 digital resistor and DUE is, of-course the ...
Hooplator15's user avatar
2 votes
0 answers
1k views

Simple question about the SPI clock for Intel Edison

I am doing a project with an Intel Edison Arduino breakout board. http://store.arduino.cc/product/E000052 http://download.intel.com/support/edison/sb/edisonmodule_hg_331189002.pdf I have a device ...
Paul Terwilliger's user avatar
3 votes
1 answer
3k views

I2C or SPI to control 6 motors?

I am a hobbyist & know little about electronics. I am making a robot arm, like this one. For which I will need 2 stepper motors (for elbow & shoulder joint) & 4 simple DC motors. Which ...
RinkyPinku's user avatar
0 votes
2 answers
316 views

Not able to receive the operation results from the slave after the command being sent by Master - SPI

Brief - I am using two arduino Uno's. One acts as a master and the other as slave using Arduino IDE. Below is the Master Code: // Taken from Nick Gammon's Forum// #include "SPI.h" #include"...
PsychedGuy's user avatar
2 votes
0 answers
120 views

Don's NDEF library and bluetooth

I am trying to connect my Android smartphone with my Arduino Uno by sending a NDEF message to my phone. I know that the MIME type for bluetooth is application/vnd.bluetooth.ep.oob but in my PN532 ...
Kishikage's user avatar
2 votes
1 answer
2k 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 ...
Mechatronical's user avatar
4 votes
1 answer
867 views

Trying to understand bitbanging, shiftIn(), reading EEPROM

Alright, so I have an Atmel 93C66, http://www.atmel.com/Images/doc0172Z.pdf Datasheet and I'm wanting to read whatever is in it. I copied the following code from this thread http://forum.arduino.cc/...
ItsMitch's user avatar
0 votes
1 answer
1k views

Unable to see SPI clock in oscilloscope

I am using the following code and when I am probing pin 13(SCK), I can't see any clock signal in the oscilloscope. #include <SPI.h> int SCS=10; int SI=11; int SCLK=13; int EXTCOMIN=4; void ...
Naresh's user avatar
  • 143
0 votes
2 answers
2k views

How can I drive this LCD TFT with an Arduino?

As I understand it, the Arduino comes with a TFT library which uses SPI to drive LCD TFTs. I recently bought a TFT labelled "HY-32.TFT" on the front and "HY-TFT320_262k heyaodz111211" on the back. It ...
Ell's user avatar
  • 101
2 votes
0 answers
510 views

What bytes do I send to the MAX7221 to light an LED (in an led Matrix)?

Datasheets LED Matrix (p2): https://www.circuitspecialists.com/products/pdf/M105057CHR1.pdf MAX7221: https://www.sparkfun.com/datasheets/Components/General/COM-09622-MAX7219-MAX7221.pdf ...
Minh Tran's user avatar
  • 121
2 votes
0 answers
691 views

How to disable RX led on Arduino Micro

I am using the RX LED pin as CS for my SPI connection and experiencing problems while debugging and communicating via SPI. Is it possible somehow to disable the RX blinking while using the serial ...
JavaCake's user avatar
  • 139
2 votes
1 answer
208 views

Unable to alter SPI speed on Arduino Micro

I am using SPI to communicate with a IMU device which is working perfectly, except the SPISpeed which is not being altered as it should: unsigned int m_SPISpeed = 400000; SPI.begin(); pinMode(...
JavaCake's user avatar
  • 139
22 votes
1 answer
28k 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?
Abhishek Kulshrestha's user avatar
0 votes
3 answers
5k views

Struggling with SD card read on Arduino

I'm attempting to read data from my SD card, but I have strange behavior and can't figure out why this is happening. I'm using CardInfo from the Arduino example and am trying to read the data from my ...
user avatar
1 vote
2 answers
743 views

What should the frequency reading of the SPI clock be with this code?

My Extech EX330 multimeter is reading 3.439Mhz on the pin 13 on my Arduino Uno running the following code. Is the reading correct? If the divider is 2, shouldn't I get 8 Mhz (16Mhz / 2)? #...
Adam Lee's user avatar
  • 113
1 vote
1 answer
2k views

Why is the output on the MOSI line shifted 1 bit over from what I commanded?

I've been trying to work with an AD5685R DAC. Per that datasheet, to get DAC1 to output max voltage (5V), I would perform: SPI.begin(); SPI.setBitOrder(MSBFIRST); SPI.setDataMode(SPI_MODE3); // DAC ...
Dang Khoa's user avatar
  • 173
6 votes
4 answers
31k views

How do I transfer more than 1 byte at once via SPI bus?

I have an AD5685R DAC that I am trying to communicate with over SPI. Per the datasheet, ...These [24] bits are transferred to the input register on the 24 falling edges of SCLK and are updated on ...
Dang Khoa's user avatar
  • 173
5 votes
1 answer
3k 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 (...
cgaubuchon's user avatar
6 votes
1 answer
9k views

References (e.g, libraries and tutorials) for connecting the 24-bit ADS1256 ADC to arduino

The ADS1256 chip is a high precision 24bit, 8 channel, analog digital converter based on SPI communication that is suitable for biomedical applications and perfect for sensing ECG and EEG signals. I ...
mrsteve's user avatar
  • 181
9 votes
1 answer
1k views

SPI Arduino Due conflict with pinMode(), bug?

Consider the following minimal example, where I set pinMode before calling SPI functions: #include <SPI.h> void setup() { pinMode(10, OUTPUT); SPI.begin(10); SPI.setDataMode(10,SPI_MODE1)...
newandlost's user avatar
0 votes
1 answer
665 views

Adafruit CC3000 WiFi Module working together with MFRC522 RFID Module Issues both SPI over Arduino

I'm asking if how can I implement this one. I'm aware about multiple devices being connected over SPI, like having to select individual SS pin for each. Adafruit's CC3000 works fine alone along with ...
Jeff Valerio's user avatar
1 vote
2 answers
8k views

Arduino Due SD Card

I have an Arduino Due and want to save data to an SD card. For this I use a 3.2 'display of ITead with integrated SD slot (http://imall.iteadstudio.com/im120419006.html). This I connected to the ...
Marques's user avatar
  • 21
4 votes
2 answers
2k views

Distance and Serial or SPI

I'm setting up a grid of 200+ slave modules which will be about 12 inches apart and the master will be anywhere from 5 to 10 meters away from the closest module. Each slave module will have a ATtiny85 ...
Jeremy Gillick's user avatar
11 votes
2 answers
2k views

Cheap Wired Multipoint Mesh Network

I'm looking to make a 15 x 15 grid of load sensors and RGB LEDs for an interactive dance floor. Each node will be driven by an arduino and the entire floor will be managed by a RaspberryPi. I'm trying ...
Jeremy Gillick's user avatar
2 votes
1 answer
2k views

Arduino: Hardware SPI hangs, bit-bang does not

I'm using FastLED with a custom board built around the ATMega32u4. When I set it to use Software SPI, everything works fine, but when I use hardware SPI it just hangs whenever it tries to write out ...
Adam Haile's user avatar
1 vote
0 answers
1k views

Can't read from / write to SPI EEPROM

I'm currently trying to write to and read from an 25LC256-E EEPROM with my Arduino Uno via SPI. I've made a program which is supposed to do this, but I only get weird answers. I'm sending in a Serial-...
DoTheGenes's user avatar
2 votes
2 answers
985 views

Can the SPI pins of an Arduino be separated from SPI?

Are the SPI pins on the ICSP header of an Arduino Uno "separable" from the correspondent I/O pins - when one chooses to the use the ICSP header can the corresponding I/O pins be used for something ...
joaocandre's user avatar
2 votes
1 answer
3k views

util/delay.h from arduino _delay_ms not delaying in accurate time with my hardware configuration

I have configured my arduino as a flash programmer and i'm sending data to an atmega328P. It is actually working and the data is send to my atmega328. But what is strange that the _delay_ms from from ...
user avatar
2 votes
2 answers
2k views

Arduino to Raspberry Pi wired communication

I am new to Raspberry Pi (just brought mine before writing this post), and I am looking to see what is the most ideal way for two way communication between an Arduino and a Raspberry Pi (USB, SPI or ...
BuddingEngineer's user avatar
2 votes
1 answer
338 views

Arduino Uno and Leonardo SPI clock can't be measured

I want to measure the SPI clock (pin 13) using the Arduino example code for the SPI library (very simple example). Basically independent from the loop function, the clock should be fired continuously. ...
user3213767's user avatar
3 votes
1 answer
5k views

Using SD card shield on Arduino Due

I have a Seeed Studio SD card shield (V3) that I am trying to use on my Arduino Due. I am having trouble using the SD examples that come with the Arduino IDE. They worked fine on my Arduino Uno by ...
bestfriendkumar's user avatar
3 votes
1 answer
687 views

Is there a transmission protocol library for SPI?

When communicating over SPI, one byte is sent at a time. Is there a library (C or C++) that allows for sending strings? Essentially it would be a protocol library handling the start and the end of a ...
Friend of Kim's user avatar

1
6 7 8 9
10