LusoRobótica - Robótica em Português
Sistemas específicos => Arduino / AVR => Tópico iniciado por: Capeleiro em 19 de Novembro de 2011, 15:48
-
Estou a tentar implementar uma comunicação I2C entre vários masters e slaves e surgiu-me uma dúvida ao ler o datasheet do ATmega328:
Note that arbitration is not allowed between:
• A REPEATED START condition and a data bit.
• A STOP condition and a data bit.
• A REPEATED START and a STOP condition.
It is the user software’s responsibility to ensure that these illegal arbitration conditions never
occur. This implies that in multi-master systems, all data transfers must use the same composition
of SLA+R/W and data packets. In other words: All transmissions must contain the same
number of data packets, otherwise the result of the arbitration is undefined.
[pág 222, versão mais recente 5/11]
Não consigo perceber porque as transmissões têm que ter o mesmo número de pacotes de dados...
Alguém me pode explicar melhor?
-
Se tiveres vários masters a concorrer a mesma linha I2C, o que tiver mais dados para enviar vai acabar por esperar mais tempo e por isso vai ser sempre o mesmo a ganhar a arbitragem da linha.
-
Obrigado senso ;)