I2C: Difference between revisions

From Wiki :-)
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
I2C address slave 7-bit
The I2C slave address is coded on 7-bit and is shifted to the left for 1 bit to code the read-write (RW) bit.
 
{| class="wikitable"
!Operation
!RW
|-
|Write
|0
|-
|Read
|1
|}
addr << 1 | RW
addr << 1 | RW
RW=1 (0=WRITE, 1=READ)


Start: A high-to-low transition of SDA with SCL high
Start: A high-to-low transition of SDA with SCL high
Line 9: Line 16:
Stop: A low-to-high transition of SDA with SCL high
Stop: A low-to-high transition of SDA with SCL high


Acknowledge (ACK): On the ninth clock cycle after every address or data byte is transferred, the receiver
Acknowledge (ACK): On the ninth clock cycle after every address or data byte is transferred, the receiver will pull the SDA pin low to acknowledge proper reception of the byte.
 
will pull the SDA pin low to acknowledge proper reception of the byte.
 
Not Acknowledge (NOT ACK): Alternatively, on the ninth clock cycle after every address or data byte is
 
transferred, the receiver can leave the SDA pin high to indicate that there was a problem with the reception


of the byte or that this byte completes the group transfer.
Not Acknowledge (NOT ACK): Alternatively, on the ninth clock cycle after every address or data byte is transferred, the receiver can leave the SDA pin high to indicate that there was a problem with the reception of the byte or that this byte completes the group transfer.


== Resources ==
== Resources ==

Latest revision as of 20:18, 7 October 2017

The I2C slave address is coded on 7-bit and is shifted to the left for 1 bit to code the read-write (RW) bit.

Operation RW
Write 0
Read 1

addr << 1 | RW

Start: A high-to-low transition of SDA with SCL high

Stop: A low-to-high transition of SDA with SCL high

Acknowledge (ACK): On the ninth clock cycle after every address or data byte is transferred, the receiver will pull the SDA pin low to acknowledge proper reception of the byte.

Not Acknowledge (NOT ACK): Alternatively, on the ninth clock cycle after every address or data byte is transferred, the receiver can leave the SDA pin high to indicate that there was a problem with the reception of the byte or that this byte completes the group transfer.

Resources

I2C specification http://www.nxp.com/documents/user_manual/UM10204.pdf
SCCB specification http://www.ovt.com/download_document.php?type=document&DID=63