What Is I2S (Inter-IC Sound)?
Last updated 28 June 2026 · 5 min read
Direct Answer
I2S (Inter-IC Sound) is a three-wire synchronous serial bus designed by Philips for transmitting digital audio data between integrated circuits. It carries stereo PCM audio over three signals — BCLK (bit clock), LRCK (left-right clock, also called WS/word select), and SD (serial data) — where BCLK clocks each bit and LRCK indicates which stereo channel (left or right) is currently being transmitted.
Detailed Explanation
I2S was developed by Philips (now NXP) in 1986 specifically to connect digital audio ICs — DACs, ADCs, audio codecs, DSPs, and microcontrollers — without the overhead of a full-featured bus protocol. It carries nothing but linear PCM audio samples, making it simple to implement in hardware and straightforward to debug.
The three I2S signals
BCLK (Bit Clock) — clocks each bit of the audio sample onto or off the SD line. BCLK runs continuously at a frequency equal to the sample rate multiplied by the total number of bits transmitted per sample frame. For 48 kHz stereo at 24 bits per channel, BCLK runs at 2.304 MHz.
LRCK (Left-Right Clock, also called WS — Word Select) — transitions at exactly the sample rate (e.g. 48 kHz), with a 50% duty cycle. When LRCK is low, the left-channel sample is being transmitted; when high, the right-channel sample. The LRCK period defines one complete stereo frame.
SD (Serial Data) — carries audio samples MSB-first, transmitted synchronously with BCLK. In standard I2S format, the first bit of a sample appears on the SD line one BCLK cycle after the LRCK transition — this one-cycle delay is a deliberate part of the I2S specification and distinguishes it from left-justified or right-justified variants.
Master and slave roles
One device in an I2S system must be the master — it generates BCLK and LRCK. All other devices are slaves that lock to these clocks. On many microcontrollers, the I2S peripheral can be configured as either master (generating clocks) or slave (receiving clocks from an external codec or DSP). The master is typically the device that drives the system audio clocks, often a dedicated audio clock generator or the MCU itself when a precise audio clock is not required.
Variants: left-justified, right-justified, PCM
The Philips I2S specification uses a one-cycle offset between LRCK and the first data bit. Other variants omit this offset:
- Left-justified: data MSB appears on the same BCLK rising edge as the LRCK transition (no delay). Common in some codecs and DSPs.
- Right-justified: data is LSB-aligned within the frame, padding with zeros from the MSB side. Used by some older DACs.
- PCM/DSP mode: a single short sync pulse (one BCLK wide) replaces LRCK; used for TDM multi-channel audio.
Hardware I2S peripherals on most microcontrollers (STM32, ESP32, nRF52) support selection among these formats. Codec datasheets specify which formats they accept.
Practical Examples
A typical embedded audio player connects an STM32 microcontroller to an external audio DAC (such as the PCM5102A or MAX98357A) over I2S. The MCU reads compressed audio from flash, decodes it to PCM in software, and streams the decoded samples to the DAC over I2S using DMA. The DAC converts the digital PCM to an analogue audio waveform and drives a speaker directly. The MCU I2S peripheral acts as master, generating the BCLK and LRCK clocks; the DAC locks to them as a slave.
For audio capture, a MEMS microphone with a PDM interface (such as the MP34DT01) connects to a PDM-to-PCM decimation filter on the MCU, which outputs PCM over I2S to an audio codec or streaming engine. The nRF52840 and STM32H7 both include PDM/I2S peripherals suitable for microphone array capture.
Design Considerations
- Audio clock accuracy: I2S sample rates are usually exact multiples of 44.1 kHz or 48 kHz, and these two clock families are mathematically incompatible — you cannot derive both from a single integer-ratio PLL unless you use a fractional PLL or a dedicated audio clock IC. Products supporting both standard families (44.1 and 48 kHz) typically use a dedicated audio oscillator or a fractional-N synthesiser.
- I2C for codec configuration: the I2S bus carries only audio data — no control. Most audio codecs use a separate I2C bus for register configuration (volume, sample rate, format, input selection). Plan for both buses in hardware.
- DMA requirement: streaming audio at 48 kHz / 16-bit stereo = 1.536 Mbit/s means the MCU must feed the I2S peripheral a constant stream of data. Use DMA with a double-buffer (ping-pong) arrangement — the CPU fills one buffer while the DMA transmits the other. Polling-based I2S transfer causes audio glitches under any interrupt latency.
- PCB layout: keep I2S traces short and direct, with a continuous ground reference plane beneath the traces. For clocks above a few MHz, treat BCLK as a moderately high-speed signal and avoid long stubs. I2S is not a differential bus, so it is more susceptible to common-mode noise than CAN or RS-485.
Common Mistakes
- Mismatched format between MCU and codec: standard I2S, left-justified, and right-justified all look similar on a scope (three lines, similar frequencies) but produce corrupted audio if the MCU and codec are configured differently. Confirm the format from both datasheets before assuming they are compatible.
- Incorrect bit depth vs BCLK frequency: if the BCLK frequency does not match the sample rate × bit depth × 2 channels, the LRCK will not divide the BCLK into equal halves per sample period, and the audio will be corrupted or the codec will lose synchronisation.
- Forgetting the MCLK requirement: many audio codecs require a master clock (MCLK) input, typically 256× or 384× the sample rate, in addition to BCLK and LRCK. This must come from the MCU or an external oscillator — check the codec datasheet for the required MCLK-to-sample-rate ratio.
- Not using DMA: blocking on the I2S peripheral in a polling loop causes audio dropouts the moment any other interrupt fires. DMA is not optional for reliable audio streaming.
Frequently Asked Questions
- What is the difference between I2S and SPI?
- Both are synchronous serial protocols that share a clock and data line. SPI is a general-purpose protocol designed for any type of data and uses chip-select lines for device addressing. I2S is specifically designed for audio: its word-select (LRCK) line replaces chip-select but instead indicates the stereo channel boundary, and the timing convention is specifically chosen to align PCM audio samples correctly. SPI peripherals cannot decode I2S framing, and vice versa — they require separate hardware peripherals or software implementations.
- What sample rates and bit depths does I2S support?
- I2S is not tied to specific sample rates or bit depths by the protocol itself. Common audio sample rates supported by I2S hardware include 8 kHz, 16 kHz, 44.1 kHz, 48 kHz, and 96 kHz. Bit depth is typically 16, 24, or 32 bits per sample. The BCLK frequency must equal: sample rate × bit depth per channel × 2 (for two stereo channels). For 48 kHz / 24-bit stereo: BCLK = 48000 × 24 × 2 = 2.304 MHz.
- What is TDM and how does it relate to I2S?
- TDM (Time Division Multiplexing) extends I2S to carry more than two channels on a single data line by dividing each LRCK cycle into multiple time slots. Where standard I2S carries one left and one right sample per LRCK cycle, TDM carries four, eight, or more channels in the same cycle. This is used in multi-channel audio systems, microphone arrays (PDM/TDM MEMS microphones), and audio DSPs.
References
Related Questions
What Is SPI (Serial Peripheral Interface)?
SPI is a synchronous full-duplex serial bus for connecting microcontrollers to peripherals at high speed. Learn how SCLK, MOSI, MISO, and CS work.
What Is I2C (Inter-Integrated Circuit)?
I2C is a two-wire serial bus for addressing multiple peripherals over shared SDA/SCL lines. Learn how addressing, speed grades, and pull-up resistors work.
What Is a DAC (Digital-to-Analog Converter) and How Does It Work?
Covers DAC resolution, LSB size, R-2R ladder, sigma-delta, MCU onboard DACs, output buffering, and key specs including settling time and SFDR.
What Is an ADC (Analog-to-Digital Converter) and How Does It Work?
An ADC converts analog voltages to digital numbers. Covers resolution, LSB, sampling rate, Nyquist, SAR vs sigma-delta architectures, and anti-aliasing filters.
What Is a Microcontroller (MCU)?
A microcontroller (MCU) combines a CPU, flash, RAM, and peripherals on one chip. Learn how MCUs work and how they differ from microprocessors and FPGAs.
SPI vs I2C vs UART: Which Protocol Should You Use?
SPI suits high-speed transfers, I2C minimises pins for multi-device buses, and UART suits point-to-point links. Learn which to choose for your embedded design.
Related Forum Discussions
STM32F401 UART printing garbage after switching to 84 MHz PLL — same 115200 baud in CubeMX and PuTTY
Got a WeAct Black Pill (STM32F401CCU6) project that's been running happily on the default HSI clock at 16 MHz. Using USART1 on PA9/PA10 thro
SPI reads all returning 0xFF — logic analyser shows MISO activity, W25Q32 not responding to commands
Been staring at this one for a day and a half. I'm trying to read the JEDEC ID from a W25Q32JV SPI flash chip on a custom STM32L432 board. T
I2C bus scan finding nothing — NACK on every address despite pull-ups
Working through my first proper I2C project — hooking up a BME280 temp/humidity sensor to an ESP32 devkit. Wired SDA to GPIO21 and SCL to GP
STM32 USB not detected by Windows after jumping to bootloader mode
Working on a custom STM32F411 board, trying to jump into the built-in USB DFU bootloader from application code instead of holding BOOT0 on p