M5Stamp Pico - SPI pins
-
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 -
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 -
Hello@LukasC
The pin assign is below.
m5stack / M5Unified Public
https://github.com/m5stack/M5Unified
:
-
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 -
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.