[Oberon] PO2013 - Real time measurement

Jörg joerg.straube at iaeth.ch
Mon Dec 17 16:19:50 CET 2018


Tomas

 

Perhaps this comparison helps:

 

                           SPI                I2C

Wires                     3 or 4               2               

Speed                      higher            slower

Power                       less              more

Multiple devices     own CS per device         yes

Reception verified          no                 yes

Device can lock bus         no                 yes

Cost                   more expensive        cheaper

how many masters           one               several

noise                    susceptible       more robust

Distance                  short              longer

Standard             variations exist          yes

 

Jörg

 

Am 17.12.18, 15:45 schrieb "Oberon im Auftrag von John R. Strohm" <oberon-bounces at lists.inf.ethz.ch im Auftrag von strohm at airmail.net>:

 

    The one catch is that you need a separate CS (chip select) line for each 

    device you want to connect to a given SPI bus.  Only one CS may be active at 

    any time.  (Hint: 3-8 decoder/demultiplexer, or even 4-16.)

    

    Some microcontroller SPI devices need very careful software design and 

    implementation to make SPI work properly.  Motorola/Freescale/NXP is very 

    much in this category.  To trigger a data transfer, you must read (and 

    implicitly clear) the SPI Data In buffer register.  The implication is that 

    you have to have a way to "snoop" that register, without actually reading 

    and clear it, to get the last data byte in a message, and your driver must 

    KNOW enough about the particular device's data protocol to know when to read 

    and when to snoop.  Analog Devices Blackfin SPI devices are a nightmare. 

    (Friends don't let friends do Blackfin SPI.  Those words are written in my 

    personal blood, thank you for asking.)

    

    

    -----Original Message----- 

    From: Tomas Kral

    Sent: Monday, December 17, 2018 3:10 AM

    To: oberon at lists.inf.ethz.ch

    Subject: Re: [Oberon] PO2013 - Real time measurement

    

    > You can connect as many slaves to the ribbon as you wish, but you can

    > only communicate with a single slave while others are not active.

    

    Wojtek,

    

    Thank you, I wanted to achieve a small system bus for Oberon devices,

    inexpensive, with as few components as possible. I learnt SPI cannot be

    addressed, but only chip selected by `CS'. My idea was to drive `CS'

    by Oberon through `GPIO' + interrupt, being a master letting only one

    party to talk, the other listen, at at time.

    

    Thus having a simple HUB, for some A/D sensors. Alternatively to have

    also D/D, D/A outputs.

    

    Designing a small control system, so to speak.

    

    -- 

    Tomas Kral <thomas.kral at email.cz>

    --

    Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems

    https://lists.inf.ethz.ch/mailman/listinfo/oberon 

    

    

    ---

    This email has been checked for viruses by Avast antivirus software.

    https://www.avast.com/antivirus

    

    --

    Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems

    https://lists.inf.ethz.ch/mailman/listinfo/oberon

    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20181217/faee1cb4/attachment.html>


More information about the Oberon mailing list