Overview
I2s,pcm,iom-2 are digital audio interfaces that transmit data.
I2c,spi,uart,gpio is the control interface, the transmission of control signaling.
I2s
I2S (Inter-ic Sound bus) is a bus standard developed by Philips for audio data transmission between digital audio devices.
I2S at least 3 wires:
1. Bit clock line
First explain the bit clock line. The bit clock line has a pulse for each bit, and the bit clock frequency is
Sample rate * Number of bits per channel *channel, for example, when playing 44.1Khz CD, the bit clock frequency is: 44.1khz*16*2 = 1.4112MHz
2. Word Clock Line
The other clock can be called the word clock, indicating whether the current delivery is the left channel or the right channel. Note: I²c supports up to two channels! The low level represents the left channel, and the high level represents the right channel.
3. Multiplexing the data cable
The so-called multiplexing refers to the multiplexing of the left and right channels. Transmission data is given in the form of a 2 complement, big-endian.
I2S may also have a line that is the main clock line or uplink data cable. So don't be surprised to meet the four-line I2S!
Pcm
is also the transmission of digital audio, is generally fixed 8k sample rate of mono audio.
IOM-2
High-quality audio, generally passed to the Bluetooth A2DP is this interface
I2c
Two lines, a CLK line, a data line, a master-slave mode, the general MCU, the device to do from. I²c uses two bidirectional half-duplex lines, and the master provides the clock. The clock is a bit clock, when the request is sent, such as when the contents of the register, the master sends the request, then hand over the data line control, from the answer request, and return the register contents.
Here is an example of a master multi-slave:
Spi
Only 2chip Select lines so max number ofdevices is very limited. Bus is faster Andcan was driven over longer cable Runsthan I²c. Programming more difficult. Device selection very limited unless youare willing to solder SMD.
Uart
Welcome tothe 1970s! Universal asynchronous serial port. Two-way communication with standard baud rate is slow. UART Bus is asynchronous serial port, it is generally more complex than the first two synchronous serial port structure, generally by the baud rate generator (produced by the baud rate is equal to the transmission baud rate of 16 times times), the UART receiver, the UART transmitter composition, the hardware by two lines, one for sending, one for receiving. The UART is a chip used to control the computer and serial devices. One thing to note is that it provides a RS-232C data terminal device interface so that the computer can communicate with the modem or other serial devices that use the RS-232C interface.
GPIO
Gpio, general purpose input and output (Generalpurpose I/O) short, its pin can be used by the user by the program control free to use, pin pin can be used as a general-purpose input (GPI) or general output (GPO) or general-purpose input output (GPIO), such as when the CLK generator, Chip select and so on.
Since one pin can be used for input, output, or other special functions, there must be registers to select these functions. For the input, it is necessary to read a register to determine the level of the pin, for the output, must be written to a register to let the pin output high or low, for other special functions, there are additional registers to control them.
Example
There's a cell phone on this side. FM+BT Chip Interface Example: Bluetooth with the PCM/I2S transmission of audio data, control signaling go UART/I2C,FM audio analog circuit.
I2s,pcm,iom-2,i2c,spi,uart,gpio