Good point.
I will make use of the enable lines to avoid such glitches. So, I will 
actually be using 4 GPIOs instead of 3.

In order to select individual slaves, I'll do the following:

   1. decoder enable pin will be driven low (all SS outputs high)
   2. slave is selected by 3-bit decoder select pattern
   3. decoder enable pin will be driven high after all decoder select bits 
   are set



Thanks,

Robert

On Monday, December 4, 2017 at 4:06:08 PM UTC-8, Graham wrote:
>
> 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/21259c01-9554-4601-ad58-0c62fe09ad47%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to