While working with sensors with SPI connection, is it necessary to connect the pins on the right pins of the Arduino/Esp-32 board? For example: i need to connect the SCK/MISO/MOSI pin of my sensor on the GPIO18/GPIO19/GPIO23 of an ESP-32 or can i use another pin as SCK/MISO/MOSI?
Why do you ask - are those pins already in use? For what? Because if you've already got an SPI device wired, remember, SPI is a bus - you just need multiple device selects.
(forgive me if you know this, but my response is triggered by a recent thread where a user wanted multiple I2C busses, because he had multiple I2C devices).
No problem hehe, i'm asking because i'm also working on a 1 layer pcb and the trails keep crossing each other and it would be a lot easier if i could just use any pin on the board
Others will correct me if I'm wrong, but I don't think you can reassign those pins, certainly not without creating some form of unique pinmap at a much lower level than we usually do. Is price so sensitive that a single layer pcb makes sense? If so, I'd probably just use 3 thru-hole 0 ohm resistors as jumpers to run the traces to a new alignment. But that might cost as much as the board savings. Or, are you etching your own, just for the pain?
Take a look at ESP32 SPI Communication: Pins, Multiple SPI, Peripherals (Arduino) | Random Nerd Tutorials
Interesting. Would take more digging to find out what pins are acceptable, but the concept is there. Reading on the comments later on that page, though, there's a fair amount of 'it doesn't work...', so try it before you commit to it.
Why is it a 1-layer board? Are you etching it yourself?
Thanks @UKHeliBob !!
Thanks @camsysca !!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.