🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    M5Stamp Pico - SPI pins

    Scheduled Pinned Locked Moved Modules
    m5stamp
    5 Posts 4 Posters 7.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      LukasC
      last edited by

      Hello, I would like to ask for your opinion. When I look at datasheet of ESP32 Pico D4, the pins for SPI are: (VSPI) CS - GPIO5, CLK - GPIO18, SPID - 23, SPIQ - GPIO19. But on the Stamp Pico pinout, there are marked as SPI pins: CS - G19, CLK - G18, SPID(MOSI) - G26, SPIQ(MISO) - G36.
      When I try to use the SPI in Arduino IDE, I can't get the SPI working. Is there anybody that has some experiences with this?

      Thank you very much,
      Lukas

      1 Reply Last reply Reply Quote 0
      • felmueF Offline
        felmue
        last edited by

        Hello @LukasC

        most functions (like SPI) can be defined to use almost any GPIOs.

        Try something like below:

        #define SCK GPIO_NUM_18
        #define MISO GPIO_NUM_36
        #define MOSI GPIO_NUM_26
        #define CS GPIO_NUM_19
        
        SPI.begin(SCK, MISO, MOSI, -1);
        

        Note: untested

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        1 Reply Last reply Reply Quote 0
        • M Offline
          macsbug
          last edited by

          Hello@LukasC

          The pin assign is below.
          m5stack / M5Unified Public
          https://github.com/m5stack/M5Unified
          :
          0_1652061167471_pico.png

          1 Reply Last reply Reply Quote 0
          • L Offline
            LukasC
            last edited by

            Hi,
            Thank you for your comments, the problem was on my side - a short circuit of SPI pins under one chip.
            Finally, the SPI works as specified.

            Have a good day,
            Lukas

            1 Reply Last reply Reply Quote 0
            • L Offline
              lavanya
              last edited by

              Hi Lukas,

              Even I'm trying to interface ADS1256 ADC with Stamp PICO using SPI protocol but it is not working and I'm not able to read any data in arduino IDE. I cross-checked all connections and seems to be OK.

              Any advice on this problem.

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post