element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum What pinouts are you using for connecting to I²C and SPI modules?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 3 replies
  • Subscribers 664 subscribers
  • Views 780 views
  • Users 0 members are here
  • i2c
  • spi
  • pinout
Related

What pinouts are you using for connecting to I²C and SPI modules?

ajcc
ajcc over 4 years ago

Hi!

 

I want to put some pin-headers for modules on a board with a RPi Zero W for sensors and other peripherals on modules (or break out boards). Starting with the assumption that there's a de facto standard for the pinout on modules, I tried to find one with Excel by simply entering the pin-out of different manufacturer's modules into columns. I found that some manufactured seemed to just use whatever worked for a 2-layer board, while others were using a consistent pinout (if you accept that they're sometimes mirrored).

From one manufacturer's modules I found that pin 1. GND, 2. VDD, 3. SDA and 4. SCL was used somewhat consistently for I²C modules (or its mirrored variant). But my joy was short lived when I read the Pmod specification: pin 1. SCL, 3. SDA, 5. GND and 7. VCC (single row on a 2x4 connector). GND and VDD are flipped compared to the other (interestingly this was the most common pinout used by the manufacturer that didn't seem to have a very consistent pinout at first glance). Another standard is the mikroBUS which has a consistent pins for SPI, I²C, UART, Analog, PWM, Power, etc. Their I²C pins are ordered in a row: GND, +5V, SDA and SCL (+3V3 is on another pin).

 

With SPI it was much harder to find something consistent since most SPI boards I found were configurable as I²C or SPI. It's the same story as with I²C when comparing Pmod: CS, SDO, SDI, SCK, GND and VCC, to MikroBUS: CS, SCK, SDI, SDO, 3v3 and GND (using the OSHWA naming scheme).

 

When I was looking at the Pmod connector which has muxed pins and fixed GND and VCC, I started to wonder if it would make more sense to do that with a RPi that have alternative functions for its GPIO pins? I'm even starting to wonder if it makes sense at all to use a smaller pinheader for modules, instead of just wiring them up on a breadboard and not have to think too much about it. One aspect I wanted from using a fixed pinout is that I can put voltage-level converters between the module and RPi (for example to use 5V with I/O expanders or 1V8 with cheap SPI flash memory). The high-to-low or low-to-high might be an issue since some voltage-level converters I've looked at required that the second input is a strictly lower voltage (not equal and absolutely not higher).

 

Anyway... I'm interesting to hear what your thoughts are about this?

  • Sign in to reply
  • Cancel
  • wolfgangfriedrich
    wolfgangfriedrich over 4 years ago

    Don't go with a manufacturer's standard. They usually want to sell only their parts, so the pinout might be deliberately different to make it not compatible to the competition. image

    If you need I2C and SPI, I would go with the pmod standard.

    For I2C only connections, the mikrobus seems to be identical to Sparkfun's Quiic system. Could be helpful to have access to other boards, cables.

     

    Most of all, don't make a new standard, because 927.

    - W.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • ajcc
    ajcc over 4 years ago in reply to wolfgangfriedrich

    That's a really good point, Quiic would just need a cable to work with any incompatible I²C board.

     

    If the alternative functions work out with Pmod then that's a really neat solution, so that you're not limited by fixing their function. Adding to your comment about cables to adapt other boards to Quiic, the same could be done with inbetween boards for voltage-levels and an alternative header.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • ajcc
    ajcc over 4 years ago

    Took some time to write up all the alternative pin functions of the Pmod 1.3.0 connector in a spreadsheet. There are three additional modes (or types) for H-bridges that I didn't included here.

    image

    The amazing people over at the Embedded Linux Wiki have already put together a chart over all of the BCM2835 GPIO functions and sadly there's no GPIO/I²C/SPI pins. So getting fully compatible Pmod headers isn't going to work if you're just wires and pin configurations.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube