I have been trying to understand how the conversion from PDM to PCM happens so that I could interface with a microphone. I have been doing some research online and I found that the most common way to do this is to use an FIR filter and a decimator. I am having some trouble trying to determine the size of the FIR filter that I should use. Since in this case the FIR filter is using binary numbers, the output is affected by the 1’s density. If the coefficient of each tap is the same, then the number of possible values of each average is equal to the number of taps. If for example we have a 4 tap filter then 0101 would have the same results as for example 0110 since both values have the same density of 1’s. In this case the could be 5 different densities of 1 (0 – 1, 1-1, 2-1, 3-1, and 4-1) which can be stored in a 3 bit word. Using the same logic an FIR filter with 65534 taps would be needed to produce a 16 bit result. As already mentioned, in this case I am assuming that the coefficient are equal, example 1/N. I understand that the if the coefficients were not the same, then the results would be different because then the order of each bit would also make a difference but in this case, the order of the bits is irrelevant therefore a 1010 would yield the same results as 0110.
I hope that I have explained the problem that I am facing well. Can somebody please explain how a 16 bit resolution is obtained using FIR filter because to build a 65534 tap filter it becomes impractical.