I finally tried this one out, and at least for ME:
1) The code as presented actually generates a 9-second delay at 32 kHz.
2) Attempts to change the sampling divisor are a little strange. here's the section of code where you'd think you could adjust this to your heart's content:
Code: Select all
; Add 0.1 to the loop counter.
ldax loop
sof 1, 0.1
wrax loop, 1
; IF loop counter is > 0.8, THEN write the temp variable to the output, and reset loop variable to 0
sof 1, -0.8
skp neg, Done
ldax temp
wrax output, 0
wrax loop, 0
Done:
So then I thought maybe this is due to quantization, that we are getting some rounding errors and it is putting the values off ever so slightly. So I tried using -0.79 or -0.81 but that didn't help.
Anyone messed with this code to give a 2:1 delay multiplier? That's what I'm really after. It doesn't have to be adjustable. With this code, and the small amount of time I spent, I could get 1 or 3 but not 2.