04-08-2012 03:16 AM
I have a simple test program which is a digital FIR filter. I am simulating it for the Rio in fact, as I am having similar problems there.
as it stands, the program in the pic below actually works well. It should null a frequency at 1/4 sampling which it does. However, if I replace the array of fixed point zeros
with am initialise array function (see below the diagram) then it fails. The reason I want the initialise array is that it could be quite a large array - say 400 values in it and I don't want a hugh load of fixed point zeros there. I changed the format of the initialising zero to fixed point but it still doesn't work.
Thanks
Solved! Go to Solution.
04-08-2012 03:34 AM - edited 04-08-2012 03:49 AM
The FXP values in the array are of different FXP type (32bit lenght, 16bit integer word length) to the one where you initialize the array (1.bit lenght), so the results will definitely differ. You need to make sure the constant is of the desired type.
Also the constant you use to initialize the shift register is 1bit, probably not enough.
Why don't you use autoindexing on the coefficient array?
04-08-2012 04:34 AM
Fixed now thank you, that was simple!!
04-09-2012 08:14 AM
Please provide the solution credit to altenbach, and not to your thank you post. You can unmark your post as the solution from the Options menu on the right, above the thread, and then mark altenbach's post as the solution.
04-09-2012 01:59 PM
Sorry about that, all sorted now.