• This code works if there's not much data transfer. But it fails as soon as the bus becomes busy, the event queue will simply overflow (getting events at the bus clock frequency). And you skipped the CS detection in this code completely.

    To make it work you must add a logical AND gate with CS and MOSI as inputs, and MOSI as output to the electrical circuit. (Javascript is not fast enough to enable this code (or a setWatch) only after CS was detected).
    Or change the Master code and wiring: Instead of using one MOSI and multiple CS change to multiple MOSI lines (one for each slave) without CS.

  • 'And you skipped the CS detection in this code completely'

    I don't believe that is the case. The setWatch() is performing that task. Gordon's example #8 on which the last is based is fine. I'm with you Gordon.

    'But it fails as soon as the bus becomes busy'

    See second logic analyzer image in #1 above. One second between bus usage, and only the sixteen clock pulses there during valid data.

About

Avatar for Robin @Robin started