Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get by without SS("ChipSelect")? #37

Closed
trycoon opened this issue Aug 25, 2019 · 3 comments
Closed

Get by without SS("ChipSelect")? #37

trycoon opened this issue Aug 25, 2019 · 3 comments
Labels
invalid This doesn't seem right resolved Issue was resolved (e.g. bug fixed, or feature implemented)

Comments

@trycoon
Copy link

trycoon commented Aug 25, 2019

Hi, and thanks for a nice library!
I'm have very few pins to spare on my ESP32, I need to run SPI with the fewest pins possible.
I need to find pins for MOSI, MISO, SCK, but the RST I'm connecting to the ESP32 "Reset" pin.
And what about the "SS" ("CS"), since I'm only running ONE device on my SPI bus, do I really need to set this?? Can't I hardwire SS to VCC or GND on the SX1278 module and enter SS=-1 when initializing the library? All feedback is welcome since I'm a total newbee on LoRa.

@trycoon trycoon changed the title Get by without ChipSelect? Get by without SS("ChipSelect")? Aug 25, 2019
@jgromes
Copy link
Owner

jgromes commented Aug 25, 2019

From SX1278 datasheet, page 80:

A transfer is always started by the NSS pin going low.

SX1278 (and almost all other SPI devices I have used in the past) require CS falling edge to signal the start of communication, so you can't just tie it directly to GND. I would suggest to try and save pins elsewhere - using multiplexers, for example.

Also, as this is unrelated to the library code, I have to close this as invalid. Use Arduino or Espressif forums to ask general questions about Arduino or ESP32.

@jgromes jgromes closed this as completed Aug 25, 2019
@jgromes jgromes added the invalid This doesn't seem right label Aug 25, 2019
@trycoon
Copy link
Author

trycoon commented Aug 27, 2019

Thanks, after making further research I believe you are right, SS going low trigger many SPI devices. I will look for a free pin to use.
How the SX1278 works have little with Arduino and Espressif to do, the question was about how the SX1278 will react and how the library will react when setting SS=-1.

@jgromes
Copy link
Owner

jgromes commented Aug 27, 2019

I beg to differ - the CS pin is only used in the SPI transfer. The only use in the library is when calling digitalWrite() Arduino function during SPI transfer, so it really is a generic Arduino/SPI question.

@jgromes jgromes added the resolved Issue was resolved (e.g. bug fixed, or feature implemented) label Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right resolved Issue was resolved (e.g. bug fixed, or feature implemented)
Projects
None yet
Development

No branches or pull requests

2 participants