1

I was wondering if there is a way to use three different channels for SPI through the wiring pi library. I mean I know that a chip/slave/channel select pin can be any pin capable of sending a high or low signal. but the way the wiring pi library is constructed, it only allows me to select between two channels, which are passed to the function as an argument. Technically, it should not be difficult to modify the source code to allow me to use a third channel. But I am not sure how to do this. Especially given that the source code is in C (I am primarily a Python programmer).

Can anyone may be walk me through the process of building from the source with this modification?

Is there another, more Pythonic way of doing SPI communication on the pi with 3 chip-selects?

Also, just to learn this more thoroughly, I would love to see if someone has written an SPI bit banger for the pi in python!

Thanks

  • Google will answer all four of your questions. This site is mainly used to answer a specific question about a specific problem. – joan Jul 21 '16 at 17:59
  • well, I never found a way to do 3 SPI channels through wiring pi on google. I thought some one might have done it, but not have published their method. So asking around was the only way. Also, I think "weather 3 SPI channels are possible via wiring pi, and if so, how do i do it?" is a pretty specific question. right? – Adi Jul 21 '16 at 21:08
  • 1
    You asked four questions and didn't provide any details of what you have tried. What you want to do is quite possible and frankly it's trivial even with wiringPi, you just need to apply a little lateral thinking. – joan Jul 21 '16 at 21:20
  • The last 3 questions are just interesting followups. Yes, they can probably be answered via google, but anyone who has an answer to the first question might probably have something specific and useful to say about the others. Also, Don't you think triviality is a function of experience. Someone who has never done much hardware hacking, might not see something as obvious which someone with a phd in Electrical engineering might. i have a few ideas that I am starting to try now, but to judge peoples questions as trivial through your experience, I think defeats the point of this platform. – Adi Jul 21 '16 at 21:42
  • 1
    The point of this platform is to provide specific answers to specific (single) questions. The chances of getting an answer are also significantly improved when there is evidence of prior research and at least a tentative solution. Remember these are just my opinions, I'm not preventing anyone else from answering your questions. – joan Jul 21 '16 at 22:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.