discowookie / serotonin

Communication protocol within the Disco Wookie Neurosystem.
0 stars 0 forks source link

Serotonin should be level-agnostic and use the Universal Serial Interface #2

Open warren-craddock opened 9 years ago

warren-craddock commented 9 years ago

I'm concerned that the code in Serotonin is larger and more complex than necessary. I believe the ATtiny861A's should all run exactly identical code, and none of them should know their place in the tree. Their job is merely to receive the upstream data, break it up into N pieces, and send each piece downstream. The tree should be self-similar at every node.

We should also think really, really long and hard about whether or not we need data communicated upstream (from leaves to root). I personally cannot think of information, other than error conditions, that might need to be communicated upstream.

If bi-directional communication is desired, we should consider using open-drain signaling to prevent wasting power and risking device damage due to programmer error.

Serotonin must make use of the ATtiny861A's Universal Serial Interface (section 13, page 124 of the datasheet) to permit high throughput and reliable communication. It can be used in various modes (I2C, SPI, etc.), so we'll need to consider which mode is most advantageous. We should not be bit-banging serial data.

Manchester coding could be used to eliminate the clock signal going downwards. Each ATtiny861A should re-time serial data with its internal 8 MHz oscillator in some fashion (the USI does this automatically).

warren-craddock commented 9 years ago

Datasheet: http://www.atmel.com/images/doc8197.pdf