Chapter 2 I2C & I2S
Chapter 2 I2C & I2S
S1 2024
Chapter 2
ESP32 I2C & I2S
www.vut.ac.za
1
CONTENTS
1. I2C Communication
2. I2S Communication
2
I2C Communication
3
I2C Communication
Understanding I2C?
4
I2C Communication
Specific ESP32 GPIO pins can be configured as SDA and SCL lines to
connect to I2C sensors.
The sensor's datasheet provides its unique 7-bit address, which you'll use
to communicate with it.
5
I2C Protocol
6
I2C Protocol
the diagram .
• These connectors often bundle power, ground, SDA, and SCL
wires into a single cable.
7
I2C Protocol
I2S (Inter-IC Sound), is an electrical serial bus interface standard used for connecting digital
audio devices together. It is used to communicate PCM( Pulse Code Modulation) audio data
between integrated circuits in an electronic device. It was originally developed by Philips
Semiconductor (now NXP Semiconductors) for transporting digital audio data between integrated
.
circuits
Key Components of I2S
Serial Clock (SCK): This clock is used to synchronize the data transmission.
Word Select (WS): Also known as Left-Right Clock (LRCLK), this signal indicates whether the data is for
the left or right channel.
Serial Data (SD): This line carries the audio data.
How it works
1. Master-Slave Relationship: Master device generates clock and word select signals; slave devices
receive and decode data.
2. Data Transmission: Data is transmitted using a two's complement format; WS line indicates which
channel (left or right) is currently active.
I2S Communication
Timing Diagram
Digital Audio Conversion: Common in devices that convert digital audio data to analog form (DACs) and
vice versa (ADCs).
Consumer Electronics: Highlight usage in smartphones, televisions, and sound systems where quality
audio is essential.
Professional Audio: Usage in audio interfaces, mixing consoles, and studio equipment for pristine audio
quality.
I2S Communication
Advantages of I2S
High-Fidelity Audio: Ensures high-quality audio transmission with minimal jitter and
synchronization issues.
Simplicity and Efficiency: Minimal wiring and straightforward protocol reduce complexity and
cost.
Flexibility: Supports various audio data formats and sample rates, adaptable to different needs.
Andries Potgieter Blvd. Vanderbijlpark, 1900 , South Africa | T 098 008 8900 | E enquiries@ vut. ac. za www.vut.ac.za
13