[sdiy] Multiple SPI devices on the same bus.
Jean-Pierre Desrochers
jpdesroc at oricom.ca
Thu Mar 25 16:37:27 CET 2021
Yeah it's a conceivable idea too..
Each sensor will be read only (no writing) so that calls for
3 pins needed (CS, SCK,MISO) x 11 packs of 8 sensors.
3 x 11 = 33 pins using SPI software generated.
So a 40 or 64 pins main PIC ?
Hmmm..
-----Message d'origine-----
De : Richie Burnett [mailto:rburnett at richieburnett.co.uk]
Envoyé : 25 mars 2021 10:58
À : Jean-Pierre Desrochers
Cc : '*SYNTH DIY'
Objet : Re: [sdiy] Multiple SPI devices on the same bus.
You could probably do it with one decent sized PIC, putting a few SPI devices on each I/O line and then bit-bashing the SPI in software? No?
-Richie,
-----Original Message-----
From: Jean-Pierre Desrochers
Sent: Thursday, March 25, 2021 2:41 PM
To: 'John Luciani'
Cc: '*SYNTH DIY'
Subject: Re: [sdiy] Multiple SPI devices on the same bus.
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
_______________________________________________
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
--
This email has been checked for viruses by AVG.
https://www.avg.com
More information about the Synth-diy
mailing list