[time-nuts] Form factor

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Dec 22 23:32:42 UTC 2010


In message <AANLkTinSVCO_Px6NpttFVrtJaFy-wctgTFKXe6keErho at mail.gmail.com>, Chri
s Albertson writes:

>How hard is it to do multi-master I2C. 

About as hard as multi-master MODBUS

>I still like I2C because it
>can be doe on the smallest of uP with zero extra hardware.   But
>something else might be better.

One thing you may want to consider is that I2C is hard to optoisolate
and debug.  Async is much easier for both.

>If I try to make a prototype I2C multi-master system what are some
>problems I should look out for.

Collisions and how to resolve them.

Same as with any protocol on shared media.

Badly written MODBUS implementations can get confused by multi-master
systems, but if you follow the spec precisely with timeouts etc,
and the masters have some way to resolve who gets to use the
bus, it will work just fine.

>I think prototypes or simulations are the way to decide this.

There is tons of experience to reuse, don't invent the deep water.

I built a pretty complicated battery-backed power-supply which ended
up having 7 microcontrollers for various bits of work.

I used a shared opto-isolated async bus.  You need two optocouplers
per microcontroller, and one place you power the shared bus, and
you're all set.

I have yet to see an microcontroller without an async port.

Poul-Henning

PS: I can highly recommend A. Tanenbaums "Computer Networks"
if you have never worked with this kinds of comms issues before.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the time-nuts mailing list