formula for converting linear taper digital pot to audio taper
I'm using ADCIN on a linear analog pot to generate a number 0 - 127. This number is used to simultaneously control several 100k digital pots. Unfortunately, one of the digital pots needs to be linear taper....or I should say, its optimal taper would be linear. And I'm not so good with the math and logarithmic equations and such.
Could someone please help me with the formula to create a taper that approximates the line in graph "TAPERS A SERIES" found here: http://www.taiwanalpha.com.tw/englis...p_e_106_10.htm
1 Attachment(s)
Re: formula for converting linear taper digital pot to audio taper
Hi,
For "only" 127 values I'd probably go with a lookup table. Perhaps something like:
Code:
Lookup LinValue, [0,0,0,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,4,5,5,5,5,6,6,6,7,7,7,7,8,8,8,8,9,9,9,10,_
10,10,11,11,11,11,12,12,12,13,13,13,14,14,15,15,15,16,16,16,17,17,18,18,18,19,19,20,20,21,21,21,22,_
22,23,23,24,24,25,26,26,27,27,28,28,29,30,30,31,32,32,33,34,35,35,36,37,38,39,40,41,42,43,44,45,46,_
47,48,50,51,53,54,56,58,60,62,64,67,69,72,76,80,85,91,98,109,127], LogValue
Attachment 7825
/Henrik.
Re: formula for converting linear taper digital pot to audio taper
Quote:
Originally Posted by
HenrikOlsson
Hi,
For "only" 127 values I'd probably go with a lookup table. Perhaps something like:
Code:
Lookup LinValue, [0,0,0,1,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,4,5,5,5,5,6,6,6,7,7,7,7,8,8,8,8,9,9,9,10,_
10,10,11,11,11,11,12,12,12,13,13,13,14,14,15,15,15,16,16,16,17,17,18,18,18,19,19,20,20,21,21,21,22,_
22,23,23,24,24,25,26,26,27,27,28,28,29,30,30,31,32,32,33,34,35,35,36,37,38,39,40,41,42,43,44,45,46,_
47,48,50,51,53,54,56,58,60,62,64,67,69,72,76,80,85,91,98,109,127], LogValue
Attachment 7825
/Henrik.
Ah, yes! That makes perfect sense. Thank you, Henrik.