Posts

Showing posts from July, 2023

Implementing FIR on RP2040's PIO

The purpose of this blog post is to describe the process of connecting a MEMS microphone with PDM to a microcontroller, and the steps taken to optimize the PDM-to-microcontroller data processing for better performance. Introduction In my latest research I'm in need to connect MEMS microphone with Pulse Density Modulation (PDM) to micro-controller to evaluate their parameters. In contrary to more popular Pule Code Modulation (PCM) that sends data at reasonable sample rate (40-192khz) with wide words (8-24 bits) PDM sends one bit stream at Mhz sample rate straight from sigma-delta modulator. To do anything useful with this stream it needs to be decimated to lower sample rate while increasing word width and filtering out high frequency noise. My microphone generates PDM stream at around 3Mhz. I want to downsample it around 40khz to feed my "standard" software DSP to have enough time to process data. Why? Decimating signal is as simple as selecting one sample every N and d