??? 03/17/06 13:50 Modified: 03/17/06 13:52 Read: times Msg Score: +1 +1 Good Answer/Helpful |
#112382 - Two ways Responding to: ???'s previous message |
Raj said:
The application layer calls my function to set the volume with a steps of 0-100. Now I need to convert this 0-100 steps to suit 0-32 steps possible on the DS1808 chip.
The problem is that DS1808 provides 1db step for the first 12 taps, 2db per step for the next 12 taps and 3db per step for the bottom 8 taps, providing a total attenuation range of 0-60db. Is there any formula to do this kind of convertion? I presume that just a linear lookup table will not work here? I see two ways: 1. You distribute the 101 settings (0...100) equally over the 34 taps, in such a way, that 3 succeding seetings make one of the 34 taps, means you follow the step size given by the manufacturer: 0, 1, 2 -> 0dB 3, 4, 5 -> 1dB 6, 7, 8 -> 2dB . . 36, 37, 38 -> 12dB 39, 40, 41 -> 14dB 42, 43, 44 -> 16dB . . 72, 73, 74 -> 36dB 75, 76, 77 -> 39dB . . 96, 97, 98 -> 60dB 99, 100 -> 90dB 2. Another way is to make a linear characteristis, where the dampening is 60dB/99 x n (n=0...99). Then, take the dampening which fits best: 0 -> 0dB 1 -> 1dB 2 -> 1dB 3 -> 2dB 4 -> 2dB . . 20 -> 12dB 21 -> 12dB 22 -> 14dB 23 -> 14dB 24 -> 14dB 25 -> 16dB . . 95 -> 57dB 96 -> 57dB 97 -> 60dB 98 -> 60dB 99 -> 60dB 100 -> 90dB Kai |
Topic | Author | Date |
log-taper digital potentiometer | 01/01/70 00:00 | |
Lookup table | 01/01/70 00:00 | |
Two ways | 01/01/70 00:00 | |
Spec | 01/01/70 00:00 | |
That'll be a look-up table, then...! | 01/01/70 00:00 | |
Not necessarily | 01/01/70 00:00 | |
thanks...![]() | 01/01/70 00:00 |