Skip to content

SPI pins #98

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

Closed
iddq opened this issue Jan 18, 2020 · 3 comments
Closed

SPI pins #98

iddq opened this issue Jan 18, 2020 · 3 comments

Comments

@iddq
Copy link

iddq commented Jan 18, 2020

SPI0_NPCS0 is PA28 and that is PIN 111 on the 144 pins package

Why is it 77 here?

#define PIN_SPI_SS0 (77u)

@per1234
Copy link
Contributor

per1234 commented Jan 18, 2020

77 is the Arduino pin number. This is just an arbitrary number used to refer to the pins in Arduino IO functions (e.g., pinMode, digitalRead, digitalWrite). Arduino pin numbers don't necessarily have any relation to the physical pin number.

@iddq
Copy link
Author

iddq commented Jan 18, 2020

Thanks. Can I find a schematic that uses this numbering? Can you please tell me which pin is used for SPI CS (Chip Select) by default if I'm not providing any pin number at SPI.begin() ?

@per1234
Copy link
Contributor

per1234 commented Jan 18, 2020

The Due's schematic and pin mapping table are both available on the "Documentation" tab of the Due's product page:
https://store.arduino.cc/arduino-due

But this isn't the appropriate place for this sort of discussion. This issue tracker is meant to be used only for reporting bugs and submitting feature requests. For general assistance, the appropriate place is the Arduino Forum. We're happy to provide all the assistance you need over there.

@iddq iddq closed this as completed Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants