Mind map
Lecture 13 - Inter-Integrated Circuit (I2C)
Map content
Lecture 13 - Inter-Integrated Circuit (I2C)
I2C
- A serial data protocol which operates with a master/slave relationship
- Any Node can take on the role of Master
- Uses two wires:
- Serial Data (SDA)
- Serial Clock (SCL)
- Nodes can only pull SDA and SCL down to Logic 0 - but not up to Logic 1
- Pull-up resistor connected to each line holds then high unless node pulling it low
- A serial data protocol which operates with a master/slave relationship
I2C Communications
- SDA and SCL connected to all nodes
- Each I2C Node has an assigned address
- Node initiating data transfer becomes the 'master'
- Device being addressed is the 'slave'
- All nodes monitor the bus and responding only to data and commands sent to their own address
- Data Line (SDA) must be stable when Clock (SCL) is high i.e. Data changes while SCL is LOW
- SDA High - '1'
- SDA Low - '0'
- Each Data Byte followed by an ACK from the receiver
- Data sent MSB First
- START signalled by SDA falling while SCL is high
- STOP signalled by SDA rising while SCL is high
I2C ACK Signal
- The Acknowledgement (ACK) is generated by the receiver after each byte is transmitted to confirm data has been received
- At the end of each byte (sent by transmitter) receiver acknowledges receipt by pulling SDA Low
I2C Addressing
- The basic I2C System allows a 7-bit address
- First Byte after START is the address of the device being accessed
- The 8th bit is the R/W bit
- 1 = Read
- 0 = Write
I2C Data Transfer
- Master TX addresses a Slave RX and send 2 bytes of Data
- Master Reads the Slave immediately after Address Byte
I2C on the mbed
- There are two mbed I2C ports
- Mbed Master functions and Slave functions
- Master functions
- I2C
- frequency
- read
- write
- start
- stop
- Slave functions
- I2CSlave
- frequency
- receive
- read
- write
- address
- stop
- Master functions
I2C Assessment
- Widely applied to short distance data communication
- Provides much more reliable systems
- BUT doesn't not check for errors
Information
- Description
- Degree EL560 (Microcontroller Engineering) Mind Map on Lecture 13 - Inter-Integrated Circuit (I2C), created by Tom Revise on 03/01/2021.
- Created by
- Tom Revise
- Views
- 0
- Rating