Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Several questions about the I2C-bus protocol

Status
Not open for further replies.

McShamrock

Member level 1
Joined
Oct 29, 2006
Messages
39
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
ITALY - Sardinia
Activity points
1,673
I would like to solve some questions about the I2C-bus protocol:

1. The arbitration mechanism is well described in specification (version 2.1) given by Philips. However, no information is given in case of arbitration between a transmitter and a receiver master device. I suppose the arbitration is first made on the 7 address bits of slave. In the worst case of addresses equal to each other, the arbitration is wined by the writing master, i.e. 8th bit = LOW. Is it correct?

2. Is even the arbitration taking place through the same wired-AND mechanism used by synchronization on SCL line?

3. Is the synchronization process taking place only during the arbitration (and just later the acknowledge bit in order the slave can tell the master to wait before transmitting again as a handshake mechanism)?

4. Is the synchronization process continuing until the end of the byte after a master understands it lost arbitration?

5. Is it possible the occurring of two different clock signals with equal frequency and opposite phase during the synchronization process? I suppose it is not, since the SCL line is HIGH when not used yet, and then both the two clock signals begin from HIGH position: they cannot have opposite phases since their phase shifting is at maximum equal to the START condition’s fall time, which is shorter than the minimum SCL clock period.

6. If a general call address is sent on the SDA line, every device requiring data from a general call address should reply by sending an acknowledge. How can several devices send acknowledge all together in the slot time of a bit only? As during synchronization process occurs, is it performed some wired-AND mechanism in this case as well?

7. What is the meaning of using a START BYTE? Could you give me a practical example…

8. Since a START BYTE does not need any acknowledge, how can an error be detected on the transmission of that byte? I suppose that if an error occurs in the START BYTE, the addressed device cannot read its address (that is sent in the byte following the START BYTE) and then cannot send any acknowledge to the master. In this way an occurring error on the START BYTE can be detected. Is my consideration correct?

9. In an Hs mode bus, a master code byte does not need any acknowledge from other devices but actually, after the master code byte is sent, a not-acknowledge bit is always occurring: is that a dummy not-acknowledge? I mean: is that not-acknowledge automatically (implicitly) set by the same device (that has sent the master code byte) simply releasing the SDA line, and then pulling it up?


Thank you for helping me.


Nicola
 

Re: I2C-bus questions

McShamrock said:
1. The arbitration mechanism is well described in specification (version 2.1) given by Philips. However, no information is given in case of arbitration between a transmitter and a receiver master device. I suppose the arbitration is first made on the 7 address bits of slave. In the worst case of addresses equal to each other, the arbitration is wined by the writing master, i.e. 8th bit = LOW. Is it correct?

The 8th bit is for R/W. the 9th bit is for ACK/NACK. If two slaves share the same address the system is designed poorly.

McShamrock said:
2. Is even the arbitration taking place through the same wired-AND mechanism used by synchronization on SCL line?

The master issues SCLK. Slaves synchronize to it.

McShamrock said:
3. Is the synchronization process taking place only during the arbitration (and just later the acknowledge bit in order the slave can tell the master to wait before transmitting again as a handshake mechanism)?

Synchronization should only need to take place once, although there probably is finite adjustment.

McShamrock said:
4. Is the synchronization process continuing until the end of the byte after a master understands it lost arbitration?

Is this a re-phrase of question #3?

McShamrock said:
5. Is it possible the occurring of two different clock signals with equal frequency and opposite phase during the synchronization process? I suppose it is not, since the SCL line is HIGH when not used yet, and then both the two clock signals begin from HIGH position: they cannot have opposite phases since their phase shifting is at maximum equal to the START condition’s fall time, which is shorter than the minimum SCL clock period.

You answered your own question.

McShamrock said:
6. If a general call address is sent on the SDA line, every device requiring data from a general call address should reply by sending an acknowledge. How can several devices send acknowledge all together in the slot time of a bit only? As during synchronization process occurs, is it performed some wired-AND mechanism in this case as well?

Only one slave should ACK.

McShamrock said:
7. What is the meaning of using a START BYTE? Could you give me a practical example…

It is not a START BYTE, but rather a START condition. It is the falling of SDA followed by SCLK.

McShamrock said:
8. Since a START BYTE does not need any acknowledge, how can an error be detected on the transmission of that byte? I suppose that if an error occurs in the START BYTE, the addressed device cannot read its address (that is sent in the byte following the START BYTE) and then cannot send any acknowledge to the master. In this way an occurring error on the START BYTE can be detected. Is my consideration correct?

Read question #7.

McShamrock said:
9. In an Hs mode bus, a master code byte does not need any acknowledge from other devices but actually, after the master code byte is sent, a not-acknowledge bit is always occurring: is that a dummy not-acknowledge? I mean: is that not-acknowledge automatically (implicitly) set by the same device (that has sent the master code byte) simply releasing the SDA line, and then pulling it up?

I believe (not sure on this) that every byte transmitted is followed by an ACK. It's a form of error checking. If you write the code properly, you can re-send that data in this case or be aware of transmission failure.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top