WM8960 Audio Board WM8960 Audio Board User Manual OVERVIEW The is WM8960 Audio board uses WM8690 which is a Low consumption, Stereo encoder/decoder. Can be used for portable digital audio applications, like recoding or drive speaker to play. FEATURES ⚫ High quantity MEMS silicon MIC, for recording without earphone. ⚫ 3.5mm 4 segment headphone mic, allows external headphone for recording or playing. ⚫ Dual-channel Speaker interface, for external speaker ⚫ Supports audio sample rate: 8/11.025/22.
WM8960 Audio Board ➢ Operating voltage: 3.3V ➢ Control Interface: I2C ➢ Audio Interface: I2S ➢ Audio Format: WAV ➢ DAC signal-noise ratio: 98dB ➢ ADC signal-noise ratio: 94dB ➢ Headphone controller: 16Ω 40mW ➢ Speaker controller: 8Ω 1W PINS PIN Descriptions VCC 3.
WM8960 Audio Board HARDWARE HARDWARE CONNECTION This WM8960 use I2C for controlling, I2S and SAI for Audio communicating. There are 3P pins for choosing MCLK signal, left one is MCLK signal transmitted, and the right one is MCLK signal received. You can connect 3 segment headphone or 4 segment headphone mic to EARPHONE port. Right one is the speaker interface for 8Ω speaker, recommend you to purchase one more 8Ω 5W Speaker from us.
WM8960 Audio Board WORKING PROTOCOL This module use WM8960 for audio encode/decode. WM8960 use I2C bus to control signal and configures internal registers, I2S bus used to transmit/receive audio signals. I2C BUS In I2C Bus, master device will first send an address frame for searching slave device and setting communication mode. High 7 bits are address, followed a control bit and finally the response signal. If slave device receives the response signal, it will return a response to master device.
WM8960 Audio Board I2S BUS I2S has four signal lines, they are: SCLK, LRCK, SDATA and MCLK. And the first three are most important. For better synchronize with system clock, you can mater device clock, or external clock circuit. Serial clock SCLK is also called as bit clock BCLK, which related to every bit of digital audio. SCLK Frequency = 2 x Sample rate x Sample bits. Frame clock LRCK (WS) is used to switch data of LEFT and RIGHT channels.
WM8960 Audio Board HOW TO USE We provide examples for this module, which are based on our Open429I-C and Open746I-C. For every board, there are three examples: play internal audio data, play WAV file from SD card, record WAV audio file to SD card. EXAMPLES FOR OPEN429I-C Example 1: Play audio data internal 1. Hardware connection Board: Open429I-C Module required: WM8960 Audio Board You should connect WM8960 module to I2S interface of the Open board PIN Open429I-C VCC 3.
WM8960 Audio Board 2. Description of files Examples are compiled on MDK-ARM V4, generated by STM32CubeMX ../Src: WM8960.c: Bottom driver of WM8960, mainly provide functions that sending data to chip, initializes chip and Use I2S to play internal audio data ../Inc: wave_data.h: file used to store audio data (the internal audio) 3. Expected result: Shorted MCLK and TX on board with jumper, connect WM8960 audio board to Open429 as table above.
WM8960 Audio Board GND GND SDA I2C1_SDA (PB9) SCL I2C1_SCL (PB8) CLK SAI1_SCK_B (PF8) WS SAI1_FS_B (PF9) TXSDA SAI1_SD_B (PF6) TXMCLK SAI1_MCLK_B (PF7) Note: Pins which doesn’t listed on table are not connected 2. Description of files Examples are compiled on MDK-ARM V4, generated by STM32CubeMX ../Src: WM8960.c: Bottom driver of WM8960, mainly provide functions that sending data to chip, initializes chip Play_WAV.
WM8960 Audio Board automatically, and print WAV files list and the information of current WAV file to USART port at the same time. You can use Joystick to control the play: Press to pause/play, left (C) to previous and right (B) to next. Example 3: Record WAV files to SD card 1. Hardware connection Board: Open429I-C Modules required: Micro SD Storage Board, SD card, WM8960 Audio Board You should insert SD card to Micro SD Storage Board, then connect the SD board to SDIO interface of Open429.
WM8960 Audio Board 2. Description of files Examples are compiled on MDK-ARM V4, generated by STM32CubeMX ../Src: WM8960.c: Bottom driver of WM8960, mainly provide functions that sending data to chip, initializes chip. In the top of this file, macros are used to choose record devices (On board mic or earphone mic), in the function of WM8960 initialization, you can uncomment codes to enable functions of bypass output Record_WAV.
WM8960 Audio Board EXAMPLES FOR OPEN746I-C Example 1: Play audio data internal 4. Hardware connection Board: Open746I-C Module required: WM8960 Audio Board You should connect WM8960 module to I2S interface of the Open board PIN Open746I-C VCC 3.3V GND GND SDA I2C1_SDA (PB9) SCL I2C1_SCL (PB8) CLK I2S2_CLK (PB13) WS I2S2_WS (PB12) TXSDA I2S2_SDA (PB13) TXMCLK I2S2_MCLK (PC6) Note: Pins which doesn’t listed on table are not connected 5.
WM8960 Audio Board to chip, initializes chip and Use I2S to play internal audio data ../Inc: wave_data.h: file used to store audio data (the internal audio) 6. Expected result: Shorted MCLK and TX on board with jumper, connect WM8960 audio board to Open746I-C as table above. Connect an earphone or speaker to audio board, then download the example to development board. Audio will be outputted to earphone/speaker. Example 2: Play WAV audio from SD card 1.
WM8960 Audio Board CLK SAI1_SCK_B (PF8) WS SAI1_FS_B (PF9) TXSDA SAI1_SD_B (PF6) TXMCLK SAI1_MCLK_B (PF7) Note: Pins which doesn’t listed on table are not connected 2. Description of files Examples are compiled on MDK-ARM V4, generated by STM32CubeMX ../Src: WM8960.c: Bottom driver of WM8960, mainly provide functions that sending data to chip, initializes chip Play_WAV.
WM8960 Audio Board You can use Joystick to control the play: Press to pause/play, left (C) to previous and right (B) to next. Example 3: Record WAV files to SD card 1. Hardware connection Board: Open746I-C Modules required: Micro SD Storage Board, SD card, WM8960 Audio Board You should insert SD card to Micro SD Storage Board, then connect the SD board to SDIO interface of Open746I-C. Finally insert Audio board to SAI interface of Open429. PIN Open746I-C VCC 3.
WM8960 Audio Board 2. Description of files Examples are compiled on MDK-ARM V4, generated by STM32CubeMX ../Src: WM8960.c: Bottom driver of WM8960, mainly provide functions that sending data to chip, initializes chip. In the top of this file, macros are used to choose record devices (On board mic or earphone mic), in the function of WM8960 initialization, you can uncomment codes to enable functions of bypass output Record_WAV.