<html 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 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Nur Text Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.NurTextZchn
{mso-style-name:"Nur Text Zchn";
mso-style-priority:99;
mso-style-link:"Nur Text";
font-family:"Calibri",sans-serif;}
.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 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=DE-CH link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'>Tomas<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'>Perhaps this comparison helps:<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'> SPI I2C<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'>Wires 3 or 4 2 <o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'>Speed higher slower<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'>Power less more<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'>Multiple devices own CS per device yes<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'>Reception verified no yes<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'>Device can lock bus no yes<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'>Cost more expensive cheaper<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'>how many masters one several<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'>noise susceptible more robust<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'>Distance short longer<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'>Standard variations exist yes<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'>Jörg<o:p></o:p></span></p><p class=MsoPlainText><span lang=EN-US style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoPlainText><span lang=DE>Am 17.12.18, 15:45 schrieb "Oberon im Auftrag von John R. Strohm" <oberon-bounces@lists.inf.ethz.ch im Auftrag von strohm@airmail.net>:<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE><o:p> </o:p></span></p><p class=MsoPlainText><span lang=DE> The one catch is that you need a separate CS (chip select) line for each <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> device you want to connect to a given SPI bus. Only one CS may be active at <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> any time. (Hint: 3-8 decoder/demultiplexer, or even 4-16.)<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> Some microcontroller SPI devices need very careful software design and <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> implementation to make SPI work properly. Motorola/Freescale/NXP is very <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> much in this category. To trigger a data transfer, you must read (and <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> implicitly clear) the SPI Data In buffer register. The implication is that <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> you have to have a way to "snoop" that register, without actually reading <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> and clear it, to get the last data byte in a message, and your driver must <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> KNOW enough about the particular device's data protocol to know when to read <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> and when to snoop. Analog Devices Blackfin SPI devices are a nightmare. <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> (Friends don't let friends do Blackfin SPI. Those words are written in my <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> personal blood, thank you for asking.)<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> -----Original Message----- <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> From: Tomas Kral<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> Sent: Monday, December 17, 2018 3:10 AM<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> To: oberon@lists.inf.ethz.ch<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> Subject: Re: [Oberon] PO2013 - Real time measurement<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> > You can connect as many slaves to the ribbon as you wish, but you can<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> > only communicate with a single slave while others are not active.<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> Wojtek,<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> Thank you, I wanted to achieve a small system bus for Oberon devices,<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> inexpensive, with as few components as possible. I learnt SPI cannot be<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> addressed, but only chip selected by `CS'. My idea was to drive `CS'<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> by Oberon through `GPIO' + interrupt, being a master letting only one<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> party to talk, the other listen, at at time.<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> Thus having a simple HUB, for some A/D sensors. Alternatively to have<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> also D/D, D/A outputs.<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> Designing a small control system, so to speak.<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> -- <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> Tomas Kral <thomas.kral@email.cz><o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> --<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> https://lists.inf.ethz.ch/mailman/listinfo/oberon <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> ---<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> This email has been checked for viruses by Avast antivirus software.<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> https://www.avast.com/antivirus<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> <o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> --<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> https://lists.inf.ethz.ch/mailman/listinfo/oberon<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE> <o:p></o:p></span></p></div></body></html>