Algorithm development and general DSP issues
Moderator: frank
mark2
Posts: 22 Joined: Mon Jan 20, 2020 4:17 pm
Post
by mark2 » Thu Mar 24, 2022 10:48 am
In this section:
http://www.spinsemi.com/knowledge_base/ ... Pot_inputs
It reads
Code: Select all
RDAX POT0,0.01 ;read POT0 times a small number
RDAX pot0fil,0.99 ;read filter register times 1-previous coefficient
WRAX pot0fil,0 ;filtered pot value ready for use in register labeled pot0fil
But should the second line be RDFX?
mark2
Posts: 22 Joined: Mon Jan 20, 2020 4:17 pm
Post
by mark2 » Thu Mar 24, 2022 11:26 am
Actually I don't think that makes sense either. I'll spend some more time trying to figure this one out.
frank
Posts: 1244 Joined: Wed Oct 19, 2005 12:26 pm
Contact:
Post
by frank » Thu Mar 24, 2022 1:28 pm
It works, it is doing:
old_val = C*POT + (1-C)*old_val
Put it a spread sheet program to test it.
mark2
Posts: 22 Joined: Mon Jan 20, 2020 4:17 pm
Post
by mark2 » Wed Mar 30, 2022 1:37 pm
Thank you. I've got it now. Sorry for the false start; I was too quick to post the thought/question and should have spent more time on it.