Page 1 of 1

Wrong instruction (typo) in the quick setup doc?

Posted: Thu Mar 24, 2022 10:48 am
by mark2
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?

Re: Wrong instruction (typo) in the quick setup doc?

Posted: Thu Mar 24, 2022 11:26 am
by mark2
Actually I don't think that makes sense either. I'll spend some more time trying to figure this one out.

Re: Wrong instruction (typo) in the quick setup doc?

Posted: Thu Mar 24, 2022 1:28 pm
by frank
It works, it is doing:

old_val = C*POT + (1-C)*old_val

Put it a spread sheet program to test it.

Re: Wrong instruction (typo) in the quick setup doc?

Posted: Wed Mar 30, 2022 1:37 pm
by mark2
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.