I've been trying to use the stop bit to determine that a I2C transmission has ended. What i found is that sometimes i can see the stop bit set, most of the time i cannot. What is the current method to determine the end of a I2C transmission?
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
Posted: Sun Feb 02, 2014 9:58 am
Quote:
I've been trying to use the stop bit to determine that a I2C transmission has ended.
The stop sequence it is not a "command" in order to control a data flux, start and stop sequences mark the beginning and end
of a transaction with the slave device in an I2C Protocol. The sequence to use each one, must be used only as stated by I2C protocol.
Quote:
What is the current method to determine the end of a I2C transmission?
It depends of the transfer sequence:
From Master to Slave
The master sends DATA and waits for acknowledge (A) from the slave. The master completes the byte transfer by generating a stop bit (P) (or repeated start).
From Slave to Master.
After the data is transmitted from the slave to the master the master sends the acknowledge (A). If instead the master does
not want any data more, it must send a not-acknowledge, which indicates to the slave that it should release the bus.
This lets the master send the STOP or repeated START signal.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum