Langues

Répondre au commentaire

I2c communication between 3 or more objects

I had a late night reflexion about I2C communication with more than 2 devices in a multi-master network. I made a videocast that explains the whole idea. However, my first real-life experiments has raised important synchronization issues with respect to I2C communication in multi-master networks.

The problem can be explained as follow: in a multi-master network containing 3 or more nodes, there is a risk of corrupted data as two masters can write on the same bus. Suppose you have three nodes: A, B and C. A has initiated communication with B and has requested some data from it. It then gets this data using the Wire.receive() function. However, in the mean time, C sends data to A. Then the data A is expecting from B will be corrupted by C. (yeah and, by the way, the network on the image isn't really working, because of that)

There is a very nice I2C FAQ that discusses these issues. In particular, the article Using the clock synchronizing mechanism as a handshake explains how to solve the issue, however it is very low-level and would require adding some new functionalities to the Wire library. See also this article.

So for now I see two ways to go with this project:

  1. Implement those functionalities (high burden + the risk that it won't work)
  2. Make a centralized network instead (one master, many slaves)

Anyway, I believe I'll drop it for now and start working on a simple chained serial communication network.

I had a late night reflexion about I2C communication with more than 2 devices in a multi-master network. I made a videocast that explains the whole idea. However, my first real-life experiments has raised important synchronization issues with respect to I2C communication in multi-master networks.

Répondre

Le contenu de ce champ ne sera pas montré publiquement.
  • Les adresses de pages web et de messagerie électronique sont transformées en liens automatiquement.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <h3> <h4> <h5> <h6>
  • Les lignes et les paragraphes vont à la ligne automatiquement.

Plus d'informations sur les options de formatage

CAPTCHA
Cette question permet de vérifier si vous êtes un visiteur humain afin d'empêcher les envois automatisés de pourriel.
Fill in the blank
By submitting this form, you accept the Mollom privacy policy.