Free Trials

Download a free trial to find out which Altium software best suits your needs

How to Buy

Contact your local sales office to get started on improving your design environment

Downloads

Download the latest in PCB design and EDA software

  • PCB DESIGN SOFTWARE
  • Altium Designer

    Complete Environment for Schematic + Layout

  • CircuitStudio

    Entry Level, Professional PCB Design Tool

  • CircuitMaker

    Community Based PCB Design Tool

  • NEXUS

    Agile PCB Design For Teams

  • CLOUD PLATFORM
  • Altium 365

    Connecting PCB Design to the Manufacturing Floor

  • COMPONENT MANAGEMENT
  • Altium Concord Pro

    Complete Solution for Library Management

  • Octopart

    Extensive, Easy-to-Use Component Database

  • PRODUCT EXTENSIONS
  • PDN Analyzer

    Natural and Effortless Power Distribution Network Analysis

  • See All Extensions
  • EMBEDDED
  • TASKING

    World-Renowned Technology for Embedded Systems Development

  • TRAININGS
  • Live Courses

    Learn best practices with instructional training available worldwide

  • On-Demand Courses

    Gain comprehensive knowledge without leaving your home or office

  • ONLINE VIEWER
  • Altium 365 Viewer

    View & Share electronic designs in your browser

  • Altium Designer 20

    The most powerful, modern and easy-to-use PCB design tool for professional use

    ALTIUMLIVE

    Annual PCB Design Summit

    • Forum

      Where Altium users and enthusiasts can interact with each other

    • Blog

      Our blog about things that interest us and hopefully you too

    • Ideas

      Submit ideas and vote for new features you want in Altium tools

    • Bug Crunch

      Help make the software better by submitting bugs and voting on what's important

    • Wall

      A stream of events on AltiumLive you follow by participating in or subscribing to

    • Beta Program

      Information about participating in our Beta program and getting early access to Altium tools

    All Resources

    Explore the latest content from blog posts to social media and technical white papers gathered together for your convenience

    Downloads

    Take a look at what download options are available to best suit your needs

    How to Buy

    Contact your local sales office to get started improving your design environment

    • Documentation

      The documentation area is where you can find extensive, versioned information about our software online, for free.

    • Training & Events

      View the schedule and register for training events all around the world and online

    • Design Content

      Browse our vast library of free design content including components, templates and reference designs

    • Webinars

      Attend a live webinar online or get instant access to our on demand series of webinars

    • Support

      Get your questions answered with our variety of direct support and self-service options

    • Technical Papers

      Stay up to date with the latest technology and industry trends with our complete collection of technical white papers.

    • Video Library

      Quick and to-the-point video tutorials to get you started with Altium Designer

    SPI Versus I2C: How to Choose the Best Protocol for Your Memory Chips

    February 9, 2018

     Icon of memory chip

    I was going shoe-hunting the other day and realized exactly why I don’t buy shoes all that often: all of the parameters. I was looking for sneakers specifically so there were metrics for comfort, bounciness, durability, wet-resistance, weight, toe-size, arch-support, and more. Sometimes it feels like you need to have a graduate degree just to find the right shoe for your foot. That’s what I call an overburden of information.

    You will deal with a similarly burdensome decision in electronics design when choosing between the Serial Peripheral Interface (SPI) and Inter-Integrated Circuits (I2C) protocols for memory chips. Your decision becomes even tougher when both choices don’t differ much in terms of cost. Keeping track of your memory chip parameter needs comes with the knowledge of what the functions will accomplish for your product.

    SPI and I2C Fundamentals

    The SPI is a communication protocol with a full duplex configuration. It uses four signals, Chip Select (CS), Clock (SCK), Master Out / Slave In (MOSI), and Master In / Slave Out (MISO), for communications between a master and a slave. A single master to slave connection requires one CS signal. This means that the number of CS signals increases if more than a single slave is connected to the same bus.

    There is no official limit on the speed of an SPI bus. It is for microcontrollers to drive the SPI bus at speeds up to 10Mhz. There are four modes of SPI where the data latches on the different edges and polarity of the clocking signal. There is, however, no standard mechanism that enables a master to confirm that the data has been successfully received and stored by the slave.

    The I2C bus, on the other hand, requires only two wires, serial data (SDA), and serial clock (SCLK). It operates at a much lower speed of 100 kHz, although there are higher possible speeds that may not be supported by most microcontrollers. Slave devices connected to the I2C bus are identified by chip address, defined by the hardware. Signal pins of the microcontroller are their lowest with I2C.

    A well-defined standard for I2C covers not only the speed of the protocol but also the commands, initialization, data transfer, and acknowledgment between master and slave devices. This ensures that all devices that support I2C observe a single standard for ease of implementation.

    Important Considerations When Choosing Between SPI and I2C for Memory Chips

    Both SPI and I2C are popular protocols with serial memory chips like Static Random Access Memory (SRAM), Flash, or Electrically Erasable Programmable Read-Only Memory (EEPROM). Determining the protocol that best suits your design requires more than comparing the cost alone. Here are some important considerations that may simplify your decision-making process:

    1. Speed

    When you’re transferring data in bulk or have a tight window to verify user input against the data stored in a memory chip, every single microsecond counts. If speed is your primary concern, choose SPI to experience a data transfer rate of 10 MHz, much faster than I2C’s full speed of 400Khz.

     Car zooming with lights all around

    If speed matters, choose SPI.

    2. Limited Pins

    Not all hardware designers have the joy of using high-end microcontrollers with over 100 pins. Some struggle to connect memory chips with 28-pin microcontrollers. In these situations, I2C is ideal as it only requires a couple of tracks for communication.

    3. PCB Size

    If you’re not bound by any PCB size constraint, then either SPI or I2C will be great for you. But if you’re trying to squeeze your PCB into a tiny enclosure, fewer tracks means a smaller PCB for which I2C is the wiser choice.

    4. Glitches And Error Recovery

    Designers are not perfect and neither is the I2C protocol. The I2C bus is sensitive to glitches and lockups as both the transmission and reception occur on the same physical tracks. When a master fails to release the bus in time, the slave may enter a lock-up state as it has sent a reply that the master failed to receive. Handling error recovery may be tricky, as some cases may necessitate a power reset on the lock-up devices.

    5. Power

    If you’re designing battery operated or solar powered devices, power consumption must be minimized. I2C devices generally consume more power than SPI and if power usage is a concern, you should choose SPI for your design.

    Small single-board PCB

    Choose I2C if you need your PCB to be small and sweet. Editorial credit: Robson90 / Shutterstock.com

    Make the Best Decision for Your Design

    Regardless of your ultimate choice, both SPI vs I2C protocols require signals to be routed in parallel and involve similar length to prevent any signal glitches. Your decision impacts not only the functionality of your design but also the turnaround time and overall efficiency.

    By using PCB design software which can give you the functionality and tools you need to move effortlessly from schematic to layout to output, you will be able to make these design choices easily. Take advantage of multiple signal routing tools and unlimited design content to make the process easier with Altium’s CircuitStudio®.

    Still wondering which protocol best suits your design? Ask an expert at Altium.

     

    Check out Altium in action...

    Real-time Management

    most recent articles

    Back to Home