Close

SPI selection trick

A project log for CleverHand - EMG

Modular & portable high-density dry sEMG acquisition devices

aightechAightech 11/23/2022 at 11:271 Comment

SPI buses are very fast however the number of wires needed increases with the number of modules connected to the bus. In this project, we are limited by the number of connections as we cannot afford to have 3+16 lines just for communication.

A solution would be to create an addressing system to select a module on fewer buses. A standard addressing system requires a hard-coded address for each module. It could be done with pads to solder on each board to set their individual address. Unfortunately, this system is not very modular as it forces each module to be "differentiated".

A solution I came up with after chatting with my father is :

Addressing the module by their order on the bus.

The addressing system works on 4 wires. Each module read the 4 bits address present on the 4 wires and then increments by one the address for the following module. Each module is activated only if they read 0xF (0b1111, 15). Indeed, when the module tries to increment 0xf, it activates a carry bit connected to the chip select of the chip!

Here a schematics providing a visual explanation of the system:

Discussions

Noctemsum wrote 12/21/2022 at 08:25 point

Hey,

have you taken the delay into account, that the address increment will bring with it?

I would suggest a trigger line for synchronisation and a daisy chain approach for the spi.

  Are you sure? yes | no