List of supported pins for various interfaces
-
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.
-
@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.
-
@jmarcelino Tested with a TSL2591 light sensor.
-
@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.
-
@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.
-
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.
-
@Eric24
Yes thanks, corrected. P13 to P18 are input only.
-
@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.
-
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