Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| pmod:pmodi2s2:reference-manual [2022/09/13 18:02] – changed forum.digilentinc.com to forum.digilent.com jeff.greenberg_ni.com | pmod:pmodi2s2:reference-manual [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Pmod I2S2 Reference Manual ====== | ||
| + | |||
| + | The Digilent Pmod I2S2 (Revision A) features a [[https:// | ||
| + | |||
| + | {{Digilent Image Gallery | ||
| + | | image = {{: | ||
| + | | image = {{: | ||
| + | | image = {{: | ||
| + | | image = {{: | ||
| + | }} | ||
| + | |||
| + | ---- | ||
| + | ====== Features ====== | ||
| + | |||
| + | * Stereo 24-bit A/D and D/A converters for I2S audio input and output | ||
| + | * Standard 1/8 in (3.5mm) stereo audio jacks | ||
| + | * Optional automatic serial clock generation for audio input | ||
| + | * 12-pin Pmod Port with two I2S interfaces | ||
| + | * Follows the Digilent {{/ | ||
| + | |||
| + | ---- | ||
| + | ====== Specifications ====== | ||
| + | |||
| + | ^ Parameter | ||
| + | | Power Supply Voltage | ||
| + | | Audio Input Sample Rate (Single-Speed Mode) | 4 | ||
| + | | Audio Input Sample Rate (Double-Speed Mode) | 86 | - | 108 | ||
| + | | Audio Output Sample Rate | ||
| + | |||
| + | ---- | ||
| + | ===== Pinout Table Diagram ===== | ||
| + | |||
| + | ^ Header J1 ^^^^^^^ | ||
| + | ^ Pin ^ Signal | ||
| + | | 1 | D/A MCLK | I2S Line Out Converter Master Clock | ||
| + | | 2 | D/A LRCK | I2S Line Out Converter Word Select | ||
| + | | 3 | D/A SCLK | I2S Line Out Converter Serial Clock | ||
| + | | 4 | D/A SDIN | I2S Line Out Converter Serial Data Input |:::| 10 | ||
| + | | 5 | GND | ||
| + | | 6 | VCC | ||
| + | |||
| + | ^ Jumper JP1 ^^ | ||
| + | ^ State | ||
| + | | MST | ||
| + | | SLV | ||
| + | |||
| + | ===== Physical Dimensions ===== | ||
| + | |||
| + | The pins on the pin header are spaced 100 mil apart. The PCB is 1.0 inches long on the sides parallel to the pins on the pin header and 0.8 inches long on the sides perpendicular to the pin header. The Line In and Line Out audio jacks are approximately 0.44 inches apart, measured from the center of each jack. | ||
| + | |||
| + | ---- | ||
| + | ====== Functional Description ====== | ||
| + | |||
| + | The Pmod I2S2 utilizes a (Cirrus Logic CS4344 Stereo D/A converter) to take digital audio data and output the corresponding analog signal through a standard stereo headphone jack (labeled Line Out). In addition, a (Cirrus Logic CS5343 Stereo A/D converter) is used to convert analog audio signals from a second 3.5mm audio jack (labeled Line In) into digital audio data. It is designed to work at a wide variety of standard audio sampling rates. | ||
| + | |||
| + | ===== Serial Communication ===== | ||
| + | |||
| + | The two primary integrated circuits of the Pmod I2S2 communicate with the host board via the (GPIO protocol). As each IC uses the Integrated Interchip Sound (I2S) protocol, several different clock lines are required, as described (below). | ||
| + | |||
| + | The CS4344 and CS5343 (henceforth referred to as the " | ||
| + | |||
| + | Any external power applied to the Pmod I2S must be within 3 V and 5.25 V; however, it is recommended that Pmod is operated at 3.3 V. Digital logic levels must correspond to the power supply voltage. | ||
| + | |||
| + | === I2S Overview === | ||
| + | |||
| + | The fastest clock signal of each I2S interface will be the Master Clock (MCLK); as the name implies, this signal will keep everything nicely synchronized. The Left-Right Clock (LRCK), also known as the Word Select Clock, indicates whether a particular set of data is associated with the left or right audio channel for stereo sound. | ||
| + | |||
| + | The final clock is the Serial Clock (SCLK), also known as the Bit Clock. The line-in and line-out converters can each either be provided this clock signal, or generate it internally. More information on how the serial clocks for each converter can be found (below). | ||
| + | |||
| + | The I2S protocol requires that data is clocked in on the falling edge of SCLK. The first bit of data (MSB) is not clocked in on the falling edge until the first complete serial clock cycle has passed after LRCK has changed state. Data must be valid on the rising edge of SCLK. | ||
| + | |||
| + | **NOTE**: The term "I2S input/ | ||
| + | |||
| + | An example timing diagram of a single I2S frame is shown below. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | === Line Out Serial Clock Generation === | ||
| + | |||
| + | The line-out converter will internally derive its SCLK if it is provided at least two consecutive frames of the LRCK without providing any SCLK signals. In this case, the line-out converter will measure the MCLK and LRCK rates and determine an appropriate SCLK rate. However, the MCLK/LRCK ratio must meet one of several specific ratios in order to properly generate SCLK, as outlined in the table below from the CS4344 datasheet. | ||
| + | |||
| + | ^ Internal SCK Mode ^ External SCK Mode | | ||
| + | | 16-bit data and SCK = 32*Fs if MCLK/LRCK = 1024, 512, 256, 128, or 64 | Up to 24-bit data with data valid on the rising edge of SCK | | ||
| + | | Up to 24-bit data and SCK = 48*Fs if MCLK/LRCK = 768, 384, 192, or 96 |:::| | ||
| + | | Up to 24-bit data and SCK = 72*Fs if MCLK/LRCK = 1152 |:::| | ||
| + | |||
| + | The ratio between the MCLK and LRCK rates must be an integer ratio so that the line-out converter' | ||
| + | |||
| + | ^ LRCK (kHz) ^ MCLK (MHz) | ||
| + | | ::: | ||
| + | | 32 | ||
| + | | 44.1 | ||
| + | | 48 | ||
| + | | 64 | ||
| + | | 88.2 | ||
| + | | 96 | ||
| + | | 128 | 8.1920 | ||
| + | | 176.4 | 11.2896 | ||
| + | | 192 | 12.2880 | ||
| + | ^ Mode | ||
| + | |||
| + | === Line In Serial Clock Generation === | ||
| + | |||
| + | The line-in converter can be placed in either Master Mode or Slave Mode by setting mode jumper JP1 to the corresponding position. The position of this jumper should not be changed while the Pmod I2S2 is powered on. | ||
| + | |||
| + | In Slave Mode, LRCK and SCLK must be generated by the host board. Supported sample rate ranges and their corresponding MCLK/LRCK and SCLK/LRCK ratios are provided in the table below from the CS5343 datasheet. The line-in converter automatically selects as needed from single- and double-speed modes. | ||
| + | |||
| + | ^ **Speed Mode** | ||
| + | | Single-Speed Mode | 256x | ||
| + | | ::: | 512x | ||
| + | | ::: | 384x | ||
| + | | ::: | 784x | ||
| + | | Double-Speed Mode | 128x | ||
| + | | ::: | 256x | ||
| + | | ::: | 192x | ||
| + | | ::: | 384x | ||
| + | |||
| + | In Master Mode, both LRCK and SCLK are automatically generated by the line-in converter. For Master Mode, the provided MCLK rate must be within the range of 4-54 KHz. Once the line-in converter has powered up, it automatically selects an MCLK/LRCK ratio of 256x/512x, depending on the MCLK rate. | ||
| + | |||
| + | **Note**: The CS5343' | ||
| + | |||
| + | A table of common MCLK frequencies, | ||
| + | |||
| + | ^ **Master and Slave Mode** | ||
| + | | **Sample Rate (kHz)** | ||
| + | | ::: | ::: | ||
| + | | 32 (*Slave Mode Only) | SSM | ||
| + | | 44.1 | ||
| + | | 48 | ||
| + | | **Sample Rate (kHz)** | ||
| + | | ::: | ::: | ||
| + | | 88.2 | ||
| + | | 96 | ||
| + | |||
| + | ===== Quick Start ===== | ||
| + | |||
| + | To set up a simple 44.1 kHz audio passthrough, | ||
| + | |||
| + | 1. A master clock (MCLK) at a frequency of approximately 22.579 MHz. | ||
| + | |||
| + | 2. A serial clock (SCLK), which fully toggles once per 8 MCLK periods. | ||
| + | |||
| + | 3. A Left/Right Word Select signal, which fully toggles once per 64 SCLK periods. | ||
| + | |||
| + | The Pmod I2S2's Master/ | ||
| + | |||
| + | Each of these control signals should be provided to the appropriate pin on both the top and bottom rows of the Pmod I2S2. | ||
| + | |||
| + | The ADOUT_SDIN pin should be driven by the ADIN_SDOUT signal. | ||
| + | |||
| + | See the [[# | ||
| + | |||
| + | ====== Additional Information ====== | ||
| + | |||
| + | The schematics of the Pmod I2S2 are available {{reference/ | ||
| + | |||
| + | More specific information about how to use the Pmod I2S2 can be found by checking out the additional resources on the Pmod I2S2 [[pmod: | ||
| + | |||
| + | If you have any questions or comments about the Pmod I2S2, feel free to post them under the appropriate section (" | ||
| + | |||
| + | {{tag>rm doc pmodi2s2}} | ||

