Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

RE: [AVR-Chat] Multimaster network

2005-03-07 by Chuck Hackett

> From: Brian Dean
> 
> On Sat, Mar 05, 2005 at 08:17:18PM -0000, phisatho wrote:
> 
> > Anybody aware of a masterless(multimaster) protocol ( ie: any device
> > can communicate with any other device on the net based on device ID
> > - and any device can be shut-down without affecting the bus -
> > something similar to echelon bus but way simple) that can be applied
> > on AVRs and affordable for hobbyists
> 
> Have a look at ROBIN:
> 
>      http://www.bdmicro.com/code/robin/
> 
> -Brian

Brian,

In the ROBIN document, under "Multi-Master" you mention that, upon detection of
a collision between two masters (both trying to send at once) the master should
"back-off by a random amount".  I understand the concept, but, given two devices
containing identical hardware, software and reset at the same time (i.e.: has
the same "life history") how does it generate a random number with a high
probability of being different from other devices?  My thoughts:

0) Can't use memory contents as a random number seed since the devices history
may be the same causing lockstep random numbers.

1) Pass the on-chip timer/clock value through a hash to generate pseudo-random
delay values that are widely dispersed given small time value differences.  This
assumes that the devices are not running from the same clock and/or not reset by
the same HW reset signal.

2) Use a value from an independent clock source such as an RTC as the hash input
in #1.  The problem here, again, is that it doesn't work unless the RTCs are
different and not in lockstep.

So, if you don't have some independent random number seed source (independent
clock, noisy diode, etc.) how do you generate the random/pseudo-random back-off
delay?  Are there register/memory contents of an AVR that are truly "random" at
power-up/reset and not dependent on the device's past history?

Hmm, just thought of a #3: Use very high amplification on one of the internal
A/D's to intentionally read "noise" and use the low byte as the random number or
as the seed ...

Regards,

Chuck Hackett

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.