<gauteh[m]>
Hi. Does anyone know of a SPI-mux type device? I'm trying to add a bunch of PT1000 sensors with an SPI ADC in between, but I don't have that many pins available for chip select.
K900 has joined #rust-embedded
<K900>
You can just use any mux wired to the CS pins?
<gauteh[m]>
Ok. Yes...
<gauteh[m]>
Would you happen to have a recommendation?
thejpster[m] has quit [Quit: Idle timeout reached: 172800s]
RobertJrdens[m] has joined #rust-embedded
<RobertJrdens[m]>
daisy chaining might also be an very convenient option
<Lumpio->
Technically for CS pins that would be a demultiplexer I think
<Lumpio->
An IO expander would also work
<Lumpio->
Or, alternatively, just get I2C ADCs with a configurable address.
AtleoS has quit [Ping timeout: 255 seconds]
thejpster[m] has joined #rust-embedded
<thejpster[m]>
I like the MCP23S17
<thejpster[m]>
I use it with a 3:8 decoder to ensure I can’t select multiple devices at once
cbjamo[m] has joined #rust-embedded
<cbjamo[m]>
If your adc supports daisy chaining, that's what I'd do. Very slick for this kind of thing.
<JamesMunns[m]>
yeah, thats what I used a while back for a client that was doing motor control, and we wanted all the ADCs to be in sync anyway for control reasons
<JamesMunns[m]>
one global "capture" strobe, then you drain the ADCs shift-register style
<JamesMunns[m]>
<thejpster[m]> "I use it with a 3:8 decoder to..." <- and "just use the N:M decoder logic chip" might also be a fair shout.
starblue has quit [Ping timeout: 256 seconds]
starblue has joined #rust-embedded
<RobertJrdens[m]>
be aware that combinatorial decoders are somewhat dangerous for this application as the transients can have sideeffects. E.g. spurious conversion starts for for common ADCs.
<JamesMunns[m]>
Thats a good point! I was only thinking chip select pins, but if that triggers a conversion, that would be not great!
<thejpster[m]>
I think I used one with an enable pin, to ensure that doesn’t happen.
<thejpster[m]>
But also because I need to disable the chip selects so I can talk to the SPI I/O expander instead.
<thejpster[m]>
I got 8 CS lines, 8 interrupt inputs and five debug LEDs, and it cost me the three SPI pins I had anyway plus two chip selects (one for the IO chip, one to enable the decoder)
<thejpster[m]>
And $2 on the BOM. But I was out of pins and out of options.
haobogu[m] has quit [Quit: Idle timeout reached: 172800s]
AdamHott[m] has quit [Quit: Idle timeout reached: 172800s]
corecode has joined #rust-embedded
<gauteh[m]>
Thanks for all the tips. I'm going to bookmark these.
IlPalazzo-ojiis1 has joined #rust-embedded
wyager[m] has quit [Quit: Idle timeout reached: 172800s]
NickStevens[m] has quit [Quit: Idle timeout reached: 172800s]
bguruprasath5[m] has quit [Quit: Idle timeout reached: 172800s]
atesterlol[m] has quit [Quit: Idle timeout reached: 172800s]
dngrs[m] has quit [Quit: Idle timeout reached: 172800s]
AtleoS has joined #rust-embedded
bpye has quit [Quit: Ping timeout (120 seconds)]
bpye has joined #rust-embedded
AtleoS has quit [Ping timeout: 268 seconds]
Lister has joined #rust-embedded
Lister has quit [Ping timeout: 260 seconds]
Lister has joined #rust-embedded
Lister has quit [Ping timeout: 256 seconds]
Lister has joined #rust-embedded
Lister has quit [Ping timeout: 255 seconds]
Lister has joined #rust-embedded
IlPalazzo-ojiis1 has quit [Quit: Leaving.]
StephenD[m] has quit [Quit: Idle timeout reached: 172800s]