Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    List of supported pins for various interfaces

    Scheduled Pinned Locked Moved LoPy
    pinsdocumentationi2cspiuart
    9 Posts 3 Posters 2.5k Views 4 Watching
    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.
    • E Offline
      Eric24
      last edited by Eric24

      Re: CAN SPI Device and I2C Device Co-Operate on one LoPy?

      It would be useful to document the list of possible pins that can be supported for various interfaces (UART, I2C, SPI, etc.) It's clear from the docs that many interfaces can have their pins reassigned at initialization, but it's not clear which pins can be used. It would save a lot of trial-and-error.

      1 Reply Last reply Reply Quote 0
      • J Offline
        jmarcelino
        last edited by jmarcelino

        As far as I know you can assign any of the peripherals (SPI, UART, I2C..) to any GPIO pin. That big flexibility comes from the internal ESP32 GPIO matrix which connects GPIO with peripherals internally.

        Just make sure P13, P14, P15, P16, P17 and P18 are used only as inputs and if you're using the LoPy/SiPy stay away from P5, P6, P7.

        A map to show all the possible combinations would likely be more confusing

        E 1 Reply Last reply Reply Quote 1
        • E Offline
          Eric24 @jmarcelino
          last edited by

          @jmarcelino Thanks for the info. I suppose if there are no restrictions, then a list isn't needed. I'm generally used to MCUs that has "less universal" GPIO mapping capabilities.

          But doesn't the input-only restriction apply to P13 through P18? That's what I get from the pinout docs.

          J 1 Reply Last reply Reply Quote 0
          • J Offline
            jmarcelino @Eric24
            last edited by

            @Eric24
            Yes thanks, corrected. P13 to P18 are input only.

            1 Reply Last reply Reply Quote 0
            • RobTuDelftR Offline
              RobTuDelft
              last edited by

              I would also like to add that if you connect your I2C SDA and SCL on pins P11 and P12 you will always enter safe boot. So I guess that rules out P12 to be used for this kind of application.

              Without data you're just another person with an opinion.
              Hackster | About me

              E J 2 Replies Last reply Reply Quote 0
              • E Offline
                Eric24 @RobTuDelft
                last edited by

                @RobTuDelft See, that's really what I was originally after. The real answer isn't that "any pins can be used"; there are restrictions, and what I was looking for is a comprehensive list of those restrictions, or conversely, a list of acceptable pins. It would probably save a lot of people a lot of time.

                1 Reply Last reply Reply Quote 0
                • J Offline
                  jmarcelino @RobTuDelft
                  last edited by jmarcelino

                  @RobTuDelft
                  I think that only happens if you have external pull-ups? In general use the internal pull-ups of the Pycom boards are sufficient and shouldn't cause this.

                  Some I2C devices do come with external pull-ups already enabled.

                  RobTuDelftR 1 Reply Last reply Reply Quote 0
                  • RobTuDelftR Offline
                    RobTuDelft @jmarcelino
                    last edited by

                    @jmarcelino Tested with a TSL2591 light sensor.

                    Without data you're just another person with an opinion.
                    Hackster | About me

                    J 1 Reply Last reply Reply Quote 0
                    • J Offline
                      jmarcelino @RobTuDelft
                      last edited by

                      @RobTuDelft said in List of supported pins for various interfaces:

                      TSL2591

                      The Adafruit board (or a clone)? https://www.adafruit.com/product/1980

                      If so then yes Adafruit added pull-up resistors which you don't really need on the Pycom boards.

                      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
                      • 1 / 1
                      • First post
                        Last post

                      Pycom on Twitter

                      Pycom