You will also probably need some kind of "enable" line.
You can't guarantee that all three lines are going to transition between 
states at exactly the same time, so it is possible that you can get a 
transient invalid select while they are changing.
This may or may not be long enough to confuse what you are controlling.
Most 3 to 8 line decoders have some kind of auxiliary enable input.

--- Graham

==

On Monday, December 4, 2017 at 5:02:43 PM UTC-6, Robert M wrote:
>
> Hi all,
>
> I plan to interface with 8 SPI slave devices using the BBBlue along with 
> the RoboticsCape libraries.
>
> I plan to use a 3-to-8 line decoder (CD74AC138E) so that I will only need 
> three GPIO pins to access the slave select of each device.
>
> Has anyone done anything similar to this before? I presume some form of 
> bit-banging will be necessary, though I'm not yet certain what code I need 
> to modify to make this possible.
>
> It looks like modifying rc_spi.c 
> <https://github.com/StrawsonDesign/Robotics_Cape_Installer/blob/master/libraries/serial_ports/rc_spi.c>
>  
> might be my best bet. In particular, it looks like i would need to modify 
> the switch statements in *rc_manual_select_spi_slave()* and 
> *rc_manual_deselect_spi_slave()*, as well as the gpio_ss array 
> initialization in *rc_spi_init()*.
>
> The gpio_ss array currently uses BLUE_SPI_PIN_6_SS1 and BLUE_SPI_PIN_6_SS2 
> GPIOs for slave selects. Will I also be able to use the pins on the GPIO 
> headers to control slave selections?
>
>
> Thanks,
> Robert
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/a1a5fb8e-8f14-4871-820e-7f3972e49a96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to