Hi, i'm going through the projects at my Uni, each semester we must partake in one. One of the projects is creating a DAQ to read in MEMS microphone data. I'm reading up on pulse density modulation PDM, and I am confused on how to interpret the bitstream. I am reading the wiki
here and under section description, the description is actually a little vague. I understand perfectly the equation they give but the wiki goes on to say
"a
run consisting of all 1s would correspond to the maximum (positive) amplitude value, all 0s would correspond to the minimum (negative) amplitude value, and alternating 1s and 0s would correspond to a zero amplitude value. The continuous amplitude waveform is recovered by low-pass filtering the bipolar PDM bitstream."
What do you define as a
run?
I'm very confused on how to decode the bitstream and obtain the amplitude of say the sine wave example they give here, a single period of a sine wave samples 100 times
which has the bitstream
0101011011110111111111111111111111011111101101101010100100100000010000000000000000000001000010010101
If i was reading this bitstream on a micro, are there so many values I am suppose wait and then that turns into my value? For example, the
run would be 010101 and those 6 bits correspond to some value of the sine wave amplitude? I did a simple test in matlab, using the equation given, I set A = 5, and used the bitstream from the example. I calculated a 1 by 100 array of consisting of -5 and 5, which i dont understand how this expresses the amplitude of the sine wave.