[sdiy] Multiple SPI devices on the same bus.
Jean-Pierre Desrochers
jpdesroc at oricom.ca
Thu Mar 25 15:41:55 CET 2021
I like very much this option !
The 90 devices could be divide into 11 separate PICs
each reading 8 sensors. (88 sensors total)
These PIC could read their 8 specific sensors on very short timer interrupts
and refresh an 8 bits variable. This variable value
could be read on a common 8 bits bus + chip select for this PIC.
At idle each PIC would be floating on this bus.
Access to each of them would be using CS pulses.
A main PIC (again interrupt driven) would successively read the 11 separate PICs,
store their 11 values then do the MIDI out stuff.
As John Luciani stated SPI loading would not be a problem anymore..
De : John Luciani [mailto:jluciani at gmail.com]
Envoyé : 24 mars 2021 12:06
À : Jean-Pierre Desrochers
Cc : *SYNTH DIY
Objet : Re: [sdiy] Multiple SPI devices on the same bus.
Another option would be to use multiple PICs. You could connect 8, 12, 16 sensors
to a single peripheral PIC. These could be setup to monitor and interrupt the
main PIC when a change is detected. This should eliminate loading and muxing and
would free up processing time on the main PIC.
It is more code and some of it is interrupt routines which can get tricky to debug.
John L
On Wed, Mar 24, 2021 at 10:45 AM Jean-Pierre Desrochers <jpdesroc at oricom.ca> wrote:
In my quest for cheap SPI pressure sensors I found this tiny thing
based on Bosch BMP280 I2C/SPI sensor which is now obsolete but still available
(over 10,000 available) at aliexpress for $0.45CAD each !
My question to the DIY forum is:
Since there will be around 90 of these boards used in my project
read by the same PIC micro there will be a need for buffering
on each MOSI (SDI) & SCK lines. That’s ok. CS lines will be managed by 8 multiplexers (74HC154).
That’s ok too.
The above schematic shows the board parts.
R1,2,3,4 will be removed on each board to avoid heavy loading using 90 devices
(down to 97 ohms if each internal 70k pull-up resistors are calculated).
Only one of the 90 PCB will keep these resistors (the last one of the row).
My concern is about the MISO (SDO) line.
Even tristated each BMP280 will show some kind of capacitance on the MISO bus
that will be multiplied by 90 in my case.
Should this be taken in account ?
The SPI clock will be around 1Mhz.
No other types of SPI devices will be used here.
Thanks.
JP
_______________________________________________
Synth-diy mailing list
Synth-diy at synth-diy.org
http://synth-diy.org/mailman/listinfo/synth-diy
Selling or trading? Use marketplace at synth-diy.org
--
http://www.wiblocks.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20210325/cdf50028/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 137521 bytes
Desc: not available
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20210325/cdf50028/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.jpg
Type: image/jpeg
Size: 15229 bytes
Desc: not available
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20210325/cdf50028/attachment.jpg>
More information about the Synth-diy
mailing list