<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.gmail-m7624613570335509962msoplaintext, li.gmail-m7624613570335509962msoplaintext, div.gmail-m7624613570335509962msoplaintext
        {mso-style-name:gmail-m_7624613570335509962msoplaintext;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR-CA link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I like very much this option !<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The 90 devices could be divide into 11 separate PICs<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>each reading 8 sensors. </span><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>(88 sensors total)<br>These PIC could read their 8 specific sensors on very short timer interrupts<br>and refresh an 8 bits variable. This variable value<br>could be read on a common 8 bits bus + chip select for this PIC.<br>At idle each PIC would be floating on this bus.<br>Access to each of them would be using CS pulses.<br>A main PIC (again interrupt driven) would successively read the 11 separate PICs,<br>store their 11 values then do the MIDI out stuff.<br>As John Luciani stated SPI loading would not be a problem anymore..<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><br><br><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-CA style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De :</span></b><span lang=EN-CA style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> John Luciani [mailto:jluciani@gmail.com] <br><b>Envoyé :</b> 24 mars 2021 12:06<br><b>À :</b> Jean-Pierre Desrochers<br><b>Cc :</b> *SYNTH DIY<br><b>Objet :</b> R</span><span lang=FR style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>e: [sdiy] Multiple SPI devices on the same bus.<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>Another option would be to use multiple PICs. You could connect 8, 12, 16 sensors<o:p></o:p></p></div><div><p class=MsoNormal>to a single peripheral PIC. These could be setup to monitor and interrupt the <o:p></o:p></p></div><div><p class=MsoNormal>main PIC when a change is detected. This should eliminate loading and muxing and<o:p></o:p></p></div><div><p class=MsoNormal>would free up processing time on the main PIC.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>It is more code and some of it is interrupt routines which can get tricky to debug.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>John L<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Wed, Mar 24, 2021 at 10:45 AM Jean-Pierre Desrochers <<a href="mailto:jpdesroc@oricom.ca">jpdesroc@oricom.ca</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=gmail-m7624613570335509962msoplaintext><span lang=EN-CA style='color:#1F497D'>In my  quest for cheap SPI pressure sensors I found this tiny thing</span><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><span lang=EN-CA style='color:#1F497D'>based on Bosch BMP280  I2C/SPI sensor which is now obsolete but still available</span><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><span lang=EN-CA style='color:#1F497D'>(over 10,000 available) at aliexpress for $0.45CAD each !</span><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><span lang=EN-CA style='color:#1F497D'> </span><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><span style='color:#1F497D'><img border=0 width=416 height=406 id="gmail-m_7624613570335509962Image_x0020_1" src="cid:image001.png@01D72162.E7882590"></span><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><span lang=EN-CA style='color:#1F497D'> </span><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><span style='color:#1F497D'><img border=0 width=458 height=252 id="gmail-m_7624613570335509962Image_x0020_2" src="cid:image002.jpg@01D72162.E7882590"></span><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><span lang=EN-CA style='color:#1F497D'>My question to the DIY forum is:</span><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><span lang=EN-CA style='color:#1F497D'>Since there will be around 90 of these boards used in my project<br>read by the same PIC micro there will be a need for buffering<br>on each MOSI (SDI) & SCK lines. That’s ok. CS lines will be managed by 8 multiplexers (74HC154).<br>That’s ok too.</span><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><span lang=EN-CA style='color:#1F497D'>The above schematic shows the board parts.</span><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><span lang=EN-CA style='color:#1F497D'>R1,2,3,4 will be removed on each board to avoid heavy loading using 90 devices</span><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><span lang=EN-CA style='color:#1F497D'>(down to 97 ohms if each internal 70k pull-up resistors are calculated).<br>Only one of the 90 PCB will keep these resistors (the last one of the row).</span><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><b><i><span lang=EN-CA style='color:#1F497D'>My concern is about the MISO (SDO) line.</span></i></b><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><b><i><span lang=EN-CA style='color:#1F497D'>Even tristated each BMP280 will show some kind of capacitance on the MISO bus<br>that will be multiplied by 90 in my case.</span></i></b><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><b><i><u><span lang=EN-CA style='color:#1F497D'>Should this be taken in account ?</span></u></i></b><b><i><span lang=EN-CA style='color:#1F497D'><br>The SPI clock will be around 1Mhz.</span></i></b><span lang=EN-CA style='color:#1F497D'><br>No other types of SPI devices will be used here.</span><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext><span lang=EN-CA style='color:#1F497D'>Thanks.<br>JP</span><o:p></o:p></p><p class=gmail-m7624613570335509962msoplaintext style='margin-bottom:12.0pt'><o:p> </o:p></p></div></div><p class=MsoNormal>_______________________________________________<br>Synth-diy mailing list<br><a href="mailto:Synth-diy@synth-diy.org" target="_blank">Synth-diy@synth-diy.org</a><br><a href="http://synth-diy.org/mailman/listinfo/synth-diy" target="_blank">http://synth-diy.org/mailman/listinfo/synth-diy</a><br>Selling or trading? Use <a href="mailto:marketplace@synth-diy.org" target="_blank">marketplace@synth-diy.org</a><o:p></o:p></p></blockquote></div><p class=MsoNormal><br clear=all><br>-- <o:p></o:p></p><div><p class=MsoNormal><a href="http://www.wiblocks.com" target="_blank">http://www.wiblocks.com</a>  <o:p></o:p></p></div></div></body></html>