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

    M5Stamp Pico - SPI pins

    Modules
    m5stamp
    4
    5
    5.7k
    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
      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
        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
          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
            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
              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
              • First post
                Last post