[M480] Using PDM Microphone to Record Sound

Post Reply
chhsieh3
Posts: 307
Joined: 13 Mar 2020, 09:08

05 Jan 2022, 09:49

  • Application: This USB Audio Class example code records sound from PDM microphone connected on SPI or I2S when a microcontroller (MCU) has no dedicated interface for it. The example code includes a software converter to convert PDM to common PCM format.
  • BSP Version: M480 series BSP CMSIS v3.05.001
  • Hardware: NuMaker-PFM-M487 v3.0
A PDM microphone has two wires, data wire and clock wire. When a microcontroller (MCU) does not have a dedicated interface for PDM microphone, SPI or I2S can be used to capture the 1-bit data stream, called PDM format.

The example code uses SPI or I2S on NuMicro M487 to capture PDM microphone data, and converts the PDM data to common PCM format through decimation, high and low band pass filters. Also, the example code can be used as a USB Audio Class device that can record the PCM data via USB.

The filter code is released by STMicroelectronics with Apache License on Mbed OS site for the MP45D or MP34D series MEMS microphone. The sample code has been tested with Adafruit 4346 module which has a MP34D MEMS microphone.

You can download the sample code at https://www.nuvoton.com/resource-downlo ... 0103104244
Nuvoton

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests