Page 1 of 1

Pot range in delay

Posted: Mon Jan 31, 2011 6:16 am
by ronaldb
Hi,
I want to build a tap tempo version of the simple delay found here on the forum. I have a tap tempo timer set up in a ATmega and would like to control the FV-1 via digital potentiometer with 256 steps.

Now i would like that every step has 5ms so that i can vary between about 50ms and 1000ms.

How do i put that in code. Because now it's in steps of 10ms i believe.

Code: Select all

rdax   pot1,1 
and   %01111110_00000000_00000000   ;don't make jumps too small 
sof   61/64,3/64         ;50 ms to 1 second 
wrax   addr_ptr,0 
best regards
Ronald

Posted: Mon Jan 31, 2011 10:27 am
by frank
I have not tried this but I think this code will do it:

Code: Select all

rdax   pot1,1
and   %01111111_10000000_00000000
sof  243/256,13/256         ;50 ms to 1 second
wrax   addr_ptr,0 

Posted: Tue Feb 01, 2011 12:15 am
by ronaldb
Thanks frank,
I shall try it out.

Ronald