Eagle files and PDFs of the schematic and board layout are on Github.
Frank, I took your comments about optimization as another learning opportunity and combined the two loops to one. That brought ISR execution time down from 113µs to 96µs. I then researched a bit about how to set compiler optimization options for single functions and used the "unroll-loops" option on the ISR. That brought the run time down to only 65µs and increased my test code size from 26356 to 26732 bytes. A good trade IMHO.
https://github.com/Ben-Rheinland/Audio/commit/cf013ec88efb83517e811df540bfa3027ba8c28d
I'm reluctant to issue a pull request as using these compiler options is a first for me...
-Ben
Oh ok, I thought there were 32b DSP instructions available. Paul mentioned he is interested in interpolation/oversampling as well
While I learned a lot and had some fun playing with CIC filters, I think it's ultimately not the best tool for 4x OS. CICs shine with very large OS factors where you can split up the OS into multiple stages, e.g. 120x OS split up in a 4x FIR stage and a 30x CIC stage.
IMHO a FIR or polynomial interpolator would be a better choice, both because these solutions can use DSP instructions on the Teensy and because it's the "more correct" way to do 4x OS.
I'm currently reading through this: http://www.rle.mit.edu/dspg/documents/main.pdf but I haven't actually tried anything yet.
-Ben
integrateLOld[0] = integrateL[0];
integrateROld[0] = integrateR[0];
integrateLOld[1] = integrateL[1];
integrateROld[1] = integrateR[1];
integrateLOld[2] = integrateL[2];
integrateROld[2] = integrateR[2];
for (int k = 0; k < AUDIO_PT8211_INTERPOLATION_CIC; k++){
integrateLOld[k] = integrateL[k];
integrateROld[k] = integrateR[k];
}
Yes, there's the Filter Design Tool from the university okawa-denshi (Japan) that does an excellent job for analog filters up to 3rd order: http://sim.okawa-denshi.jp/en/Fkeisan.htmHi Ben (or others)
thank you again for your filter-board+schematic. I've added it to by my own board !
I have two questions:
- Do you have a tool to calculate the values ?
With the okawa tool you can answer that question yourself- What are the needed changes to modify the filter to a freq of about ~8000Hz ? (I need it for a emulation-project)
(would be best to change the parts only, because i have the boards already ;-)
View attachment 9832
That's great to hear, although it's technically out of spec. But hey, if it works, it works. I recall the OP is immune to shorts on the output, so no worries.Btw, the OP-Amp is ok for 8 Ohm headphones. Not too loud, but very OK.
Regarding the actual topic of this thread: I have a fully assembled PT8211 shield on my desk at work that waits patiently to be tested and characterized, but I haven't found enough spare time so far. So my question is, does it still make sense to test the boards or have you (Frank) already tested the filter on your own board or on the PT8211 shield?
Yes, I ordered a pack of 10 from alieexpress. I don't want to post a link here, but it's easy to find.Did you order on aliexpress? They really seem to be an exact clone.
I may have access to an IC decapsulation machine later this year, might be fun to compare the dice![]()
vincentiuș;139160 said:Yes, you are right, but this is what i have now until i receive the PT chips![]()