spi multiple devices with bcm2835 library

98 views
Skip to first unread message

Javier Terres

unread,
May 7, 2021, 6:50:51 AM5/7/21
to bcm2835
Hi, I'm using a Raspberry Pi ZeroW in muy final proyect at university, and I am having problems with spi protocole. 
I have to use three spi devices, one digital to analog converter with two outputs,  and two analog to digital converters , all together. The problem is that the RaspberryPi only has two chip select pins, and I need three. Is it possible to use a gpio pin instead of a chip select pin? (like a conversion or similar).

It would be fantastic if someone could hel me, I have wasted a lot of time looking for information about this problem on the internet. Thank you very much ¡¡¡¡

Sam James

unread,
May 7, 2021, 7:15:54 AM5/7/21
to bcm2835

Hi Javier

I believe it is possible to use a standard GPIO line as a chip select. Although if your running two A to D converters could you daisy chain them? So you have one chip select for the D to A and one for both the A to D's.

here's some info on daisy chaining SPI chips:


S
--
You received this message because you are subscribed to the Google Groups "bcm2835" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bcm2835+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bcm2835/319840fe-dbc9-4b50-9a54-5b7220cf657dn%40googlegroups.com.

Javier Terres

unread,
May 7, 2021, 7:25:35 AM5/7/21
to bcm...@googlegroups.com
Trank you for the information, I'm going to ask my teacher if this methode is correct. But, if this IS wrong, how could I convert a gpio pin to a chip select pin? Is there any tool in the library to do that? 
Thanks 

You received this message because you are subscribed to a topic in the Google Groups "bcm2835" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bcm2835/OR4CTx9wjJ0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bcm2835+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bcm2835/em883465ff-07db-469b-957b-ea26fc681a94%40blackbeast.
Reply all
Reply to author
Forward
0 new messages