Questions tagged [spi]

SPI is a low-level 3 or 4 wire serial bus interface with clock (SCLK), data in (MISO) and data out (MOSI). The fourth wire is a Slave Select to uniquely select a device on the bus. This signal is usually active-low. Slave Select, Chip Select, CS#, SS# stand for the same function, typically. Be sure to check the datasheet, though. The SPI bus is a *de facto* standard lacking the formal specification.

Filter by
Sorted by
Tagged with
7
votes
3answers
12k views

Which SIPO chip is better, 74HC4094 or 74HC595 or something else?

I want to drive lots of LEDs in a spinning persistence-of-vision (POV) device. I need one output pin per LED, because matrix techniques don't work right in spinning POV devices. A serial-input, ...
117
votes
8answers
122k views

Tradeoffs when considering SPI or I2C?

What tradeoffs should I consider when deciding to use an SPI or I2C interface? This accelerometer/gyro breakout board is available in two models, one for each interface. Would either one be easier ...
24
votes
4answers
9k views

Short Distance Board to Board Communication

My MCU runs a SPI bus with about 4 devices. I'd like to extend this bus to be off board as well i.e. have some PCBs connect to the "main" board and extend the functionality. The "pad to pad" distance ...
11
votes
1answer
2k views

BMA180 accelerometer. How does it manage to share pins between I2C and SPI?

BMA180 accelerometer can be either SPI slave or I2C slave. The pins for both buses are shared. ...
9
votes
2answers
5k views

How to deal with multiple pull-up resistors on modules

I was thinking about doing a modules for a development board I did a few days ago that will include spi/i2c interfaces. The problem is that I didn't included pull-up resistors in the MCU pins in the ...
5
votes
2answers
3k views

Unpowered devices on I2C/SPI bus

I'm trying to develop a board that includes I2C and SPI devices that are unpowered for the majority of the time to save power. I found that for these particular devices (Honeywell HSC pressure sensors)...
8
votes
2answers
5k views

SPI device prevents ISP programming

I have an ATmega8 with a Nokia LCD 5510 connected to it. Everything works great on a breadboard and my next step is to move it to a more permanent board. My problem is that I can't program the ATmega8 ...
0
votes
1answer
5k views

Raspberry PI's SPI over RS485

I'm trying to understand how to connect a SPI device (a mifare RC522 RFID board) over long distance to my RPi via SPI. I searched and find I could connect those via SPI over RS485 using a MAX490. (...
5
votes
4answers
4k views

I2C and SPI ,if they share same connection , is there confilict or not

We have a product which uses PIC18F4520, and we used some devices like LCD driver and so on, that all use I2C bus to comunicate with the micro. But now we want to add a couple of AD5504, which is a ...
3
votes
1answer
2k views

SD card initialization problem - CMD8 wrong response

I am trying to interface an microSD card to a microcontroller board (FRDM-KE06Z) using FatFS code. I only modified SPI parts for my application. Besides digging into FatFS code also I checked this ...
33
votes
13answers
17k views

Software to create timing diagrams

In my professional life, I sometimes need to create timing diagrams for protocols: UART, SPI, etc. However, I can't find any good programs available. What programs can be recommended for this and what ...
22
votes
5answers
38k views

SPI Bus Termination Considerations

So, in my previous question I asked about using the SPI bus over short distance for board to board communication. I was recommended to try termination resistors. I placed a resistor close to the ...
36
votes
10answers
17k views

SPI or I2C: which to use for a longish bus

I'm contemplating a project that would require several AVRs talking to each other over a bus. They'd be separated by as much as 6 feet. It seems like both I2C and SPI can let a series of micros ...
8
votes
7answers
70k views

How do I write to SPI flash memory?

I'm working on an audio application where instead of storing audio data on an SD card (Waveshield on Arduino) I'm storing it on an SPI flash memory IC and rolling my own board with MCU, DAC, and amp. ...
6
votes
4answers
8k views

PCB Signal Bus design

I have a pcb with a SPI bus with several sensors that have to be connected to this bus. Since 90 degree traces are not recommended in a proper PCB design I ask myself how to connect so many sensors ...
8
votes
3answers
19k views

SPI max distance

I have a PIC16F877 µController, connected via SPI to a MCP23S17 and the last it connected to an keypad and LCD screen, the distance between the µController and the MCP integrated circuit is 5m. My ...
23
votes
5answers
55k views

What is dual/quad I/O?

Reading an SPI Flash datasheet, I encountered the concepts of "dual I/O" and "quad I/O". At first I thought that "dual I/O" was synonymous to "full duplex", but then what is "quad I/O"? What is dual ...
6
votes
1answer
6k views

Voltage Level Shifting

I know there are similar questions on the site, but I wanted to ask it from a somewhat different perspective. I've got a 5V device (Device A) that can operate at 3.3V. I've got a 3.3V device (...
1
vote
1answer
578 views

ILI9341 with STM32 SPI troubles

I am trying to interface with an SPI ILI9341 screen using an STM32 microcontroller. I know there are a whole lot of things that can go wrong with these interfaces, and I've spent an awful lot of time ...
7
votes
4answers
3k views

ATtiny2313 refuses to be programmed after setting CPU clock to 500kHz

The other day I was writing a program for an ATtiny2313. Once it worked I decided to test it at the various clock speeds that are available and programmed through setting the LFUSE as described on ...
6
votes
4answers
1k views

Will an SPI flash memory chip have the same issues with non-atomic write operations as a dsPIC's internal EEPROM?

A while back I had some intermittent trouble with the internal EEPROM of a dsPIC. Every so often, some value in the EEPROM would be found zeroed out on power-on. I tracked the problem down to when the ...
4
votes
2answers
939 views

STM32 SPI not working as I expect it should based on online reading

I am using an STM32F103C8 to connect to a Hope RF95W transceiver IC for the purpose of learning. I am only trying to read the chip version register, then write a config register that has a 0x00 reset ...
4
votes
2answers
2k views

Cascading several SPI devices

Is it possible to cascade several different ICs on the same data line, in order to use less CS pins, by tying the digital output of each to the digital input of the next? I am familiar with this ...
3
votes
3answers
3k views

Using I2C and SPI communication on the same same clock and data lines

I am using a PIC18F25K80 with multiple slave devices. All of them uses I2C except one. What i want to know is that can i first use I2C with the devives that uses I2C and then close I2C, change clock ...
2
votes
2answers
2k views

Flash memory SPI MISO line unresponsive, using PIC

I am interfacing a flash memory component (M25P16) to a PIC microcontroller (PIC18F14K22) using SPI. However, I am unable to see any data come through on the slave output line at all (literally ...
2
votes
1answer
867 views

Are all connections to my ENC28J60 required?

I'm trying to connect a ENC28J60 module that exposes a SPI interface to my Beaglebone Black. I only have pins 1 (NET_CS), 2 (SCK), 3 (MOSI, i.e., D0), 4 (MISO, i.e., D1), 5 (GND), 10 (VCC) connected ...
1
vote
1answer
1k views

5V to 3.3V Level shifting circuit

I am interfacing an SD card to the Z80, one of which uses 5 V logic (Z80) and the other uses 3.3 V logic (SD). I believe the 3.3 V to 5 V level shifting will be taken care ...
1
vote
1answer
683 views

chip select on one to one spi connection

I connect an imx233 (master) and atmega168a (slave) through SPI. I am trying to debug the communication. I have problem with imx233's chip select, therefore I connect CS of the AVR onto the ground. ...
0
votes
1answer
2k views

SPI over long distance

I want to connect chips that use SPI protocol to communicate (To be specific those chips are ws2801) the distance may reach 100 meters. How can I solve this issue? After a few days of searching I'...
52
votes
5answers
43k views

Programming microcontrollers: JTAG, SPI, USB oh my!?

I've noticed, with regards to microcontrollers, there are several way to program them. I am sorta familiar with USB as my Arduino's can be programmed via USB. What is a JTAG or SPI interface? ...
18
votes
7answers
2k views

General protocol for data transfer from one system to another?

What is the general protocol to send information from one system to another? For example, let's say we have some information collected from microcontroller over a length of time that we want to send ...
9
votes
3answers
2k views

Routing 30MHz clock thru several boards

I'm using TLC5945 LED driver. Microcontroller (I'm using LPC1343) must provide a clock for it's internal PWM timer/counter. Maximum allowed clock speed is specified as 30MHz. I will have several ...
24
votes
2answers
3k views

Alternatives to SPI because of EMI

I currently make a system consisting of a plastic enclosure which contains an MCU talking to 7 ADCs using 2MHz SPI over wires about 5cm long. The problem is that I'm concerned about EMI. Everything ...
7
votes
3answers
2k views

Distance between SPI traces to prevent cross talk

I'm wondering, what is the rule of thumb regarding the distance between the SPI bus (MISO,MOSI,CLK,nCS). How to make sure there is no cross talk from one trace to other trace? I guess the frequency ...
8
votes
1answer
4k views

SPI data storage devices: (micro)SD card, DataFlash, or serial EEPROM?

I am revisiting some of my design habits, and one of them is under serious scrutiny: the go-to SPI-based storage device is (micro)SD cards, for their price-to-capacity ratio and generally higher ...
7
votes
2answers
9k views

Is it possible to use 4-pin mode for an SD card with a microcontroller instead of SPI mode?

Is it possible to use the 4-pin mode of an SD card when designing an interface with a microcontroller, or must you always use SPI mode? I am particularly thinking of a microcontroller such as a PIC24. ...
10
votes
1answer
1k views

SPI Bus Termination Issue

I've been working on a project where an OMAP Linux SPI master interacts with 6 SPI slaves peripherals (5x A/D converters and single magnetometer). I can set the SPI clock frequency and have ...
6
votes
2answers
1k views

Reflection on SPI Clock Signal, termination or stub issue?

This is a SPI Clock. 6.25MHz frequency. I see something like a reflection. I don't think it's from cross talk on my board from another signal, not sure. Added as requested: This is my system diagram (...
5
votes
2answers
3k views

Arduino SPI limit

Is there a limit to how many slaves you can control with a Arduino board using the SPI bus as long as you do not run out of pins? Uno, for example, has 14 digital I/Os. So theoretically, I could ...
4
votes
1answer
1k views

Can SPI programmer interfere with other components on same pins?

I'm building custom made Arduino board, with SPI header. SPI pins on Atmega328 are 13,12,11 Arduino pins which I use in my project already. Can other components conected on these ports interfer with ...
4
votes
5answers
2k views

USB to SPI converter

I have a chip that uses SPI for communication and would like to connect it directly to the USB port on my computer. Does anyone have experience with using a USB to SPI converter? How would I design a ...
4
votes
1answer
3k views

Manual SPI interface on Raspberry PI

I am trying to control a MCP4131 digital pot from my Raspberry Pi using this library. Using the GPIO pins, I am "emulating" an SPI interface. I bring the ChipSelect pin to low, write my byte, then ...
3
votes
2answers
1k views

Configuring the DMA request multiplexer on a STM32H7 MCU

I have recently switched to the newly-produced SM32H7 MCUs and I am currently in the process of migrating some of my old code to them (I want to see how they handle some applications that require a ...
3
votes
2answers
6k views

Syncing Signals with Global Clocks in FPGAs/CPLDs and Edge Detection

I am a newbie in digital logic design and I'm trying to get my head around syncing external signals to the global clock in an FPGA. For example, the SCK signal/clock fed to an FPGA by the SPI Master. ...
3
votes
1answer
809 views

Why I can't issue commands after CMD8 to an SDHC card in SPI mode?

I am using the following sequence of commands at 250 kHz SPI to initialize SD cards: (1 ms wait, then 80 clocks) CMD0 with argument 0x00000000 CMD59 with argument 0x00000001 (turn on CRC ...
3
votes
1answer
1k views

Is it possible to communicate single SPI slave with Two SPI masters

I am using two STM8 micro-controllers as SPI masters. Master-1 is configured in full duplex mode. And the Master-2 is configured ...
2
votes
1answer
754 views

MCP2515, CAN bus, and transmission failure

I'm trying to interface with a GPS device that is intended to connect with a vehicle via the CAN bus. I'm using an MCP2515, driven via SPI by a Parallax Propeller project board. I've successfully been ...
1
vote
2answers
7k views

Using Arduino to program at89s51

I want to program at89s52, and on the internet there are many tutorials on how it is usually done, but almost all of them use the RS232 output from the computer, which I don't have. The only resource ...
1
vote
1answer
255 views

Splitting a bidirectional bus into two unidirectional ones

I am trying to sniff on a custom SPI-like bus protocol, which uses a unified bidirectional data line instead of separate MISO/MOSI. To make sense of the communication, I need to split it up into ...
0
votes
1answer
1k views

How to read/write in M25PE80 using PIC18F67k22 controller?

I have a PIC18F67K22 controller. I am a making data logging system using an M25PE80 external flash memory for storing data. I have interfaced this flash to the controller using SPI. My question is ...