[M480] Using PDM Microphone to Record Sound

Post Reply
chhsieh3
Posts: 271
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

User avatar
AnthonPab
Posts: 4
Joined: 29 Aug 2019, 05:57
Location: Bulgaria
Contact:

13 Jun 2022, 02:25

The dazzle itself has sound, but it depending on your model it might not be recognized by Ustream. Which would make it impossible to stream sound when only using a Dazzle. If your model does get picked up by dazzle you only need to select the dazzle as your audio source.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest