Thank you! With analog circuits, I know
. How to add it, for example here?
equ tovrx reg0
equ sigin reg1
equ lf1 reg2
equ lf2 reg3
equ lf3 reg4
equ lf4 reg5
rdax adcl,1 ;read input signal
log -1,-3/16 ;coefficient is the LOG version of threshold ! ! !
exp 1,0 ;provides t/X
wrax tovrx,1 ;save t/X, we'll need it later...
mulx tovrx ;(t/X)^2
rdax tovrx,-2 ;inverts multiplicand, which will invert phase
mulx adcl ;multiply by the input signal
rdax lf1,0.75 ;restore gain and filter
wrax lf1,1 ;output in ACC and lf1
log -1,-3/16 ;coefficient is the LOG version of threshold ! ! !
exp 1,0 ;provides t/X
wrax tovrx,1 ;save t/X, we'll need it later...
mulx tovrx ;(t/X)^2
rdax tovrx,-2 ;inverts multiplicand, which will invert phase
mulx lf1 ;multiply by the input signal
rdax lf2,0.75 ;restore gain and filter
wrax lf2,1 ;output in ACC and lf2
log -1,-3/16 ;coefficient is the LOG version of threshold ! ! !
exp 1,0 ;provides t/X
wrax tovrx,1 ;save t/X, we'll need it later...
mulx tovrx ;(t/X)^2
rdax tovrx,-2 ;inverts multiplicand, which will invert phase
mulx lf2 ;multiply by the input signal
rdax lf3,0.75 ;restore gain and filter
wrax lf3,1 ;output in ACC and lf3
log -1,-3/16 ;coefficient is the LOG version of threshold ! ! !
exp 1,0 ;provides t/X
wrax tovrx,1 ;save t/X, we'll need it later...
mulx tovrx ;(t/X)^2
rdax tovrx,-2 ;inverts multiplicand, which will invert phase
mulx lf3 ;multiply by the input signal
rdax lf4,0.75 ;restore gain and filter
wrax lf4,1 ;output in ACC and lf1
wrax dacl,0