> > isn't 'keeping up' with the changes in the signal. When the signal > > isn't repeated zeros (or ones) then then step size is reduced to > > hopefully allow the ouput to track small signals more acccurately > > The DSP outputs a "dithering" stream of 01010101 when the input > is unchanging. A simpler scheme would imply that 00000000 would > be outputted, and I wonder if this is a result of the expansion of the > stored data as it goes through the integrators and the DAC. As you > say, the slope of the wave, whether up or down, is indicated by the > number of consecutive 1s or 0s. So the question still is (for me any > way) what exactly is the definition of those two integrators and from > there, how would their functions be accomplished in s/w ? I have > asked the list this some time ago and haven't had any bites, so I'm > assuming that no one knows 1. Normal" telephone systems convert from 8 bits to "more" bits using a companding curve which fits the available 8 bits to a curve which would take more bits to describe. Lopwer amplitude variations have more samples mapped while higher amplitude values are "sparse" (AFAIR). Their are two main curves. CCITT use "mu law" and US uses "A law" - I guess this means US and Europeans have different ear characteristics :-). 2. I belive there is a Master's thesis (or ? PhD by Chris Bowman in Ak engineering school library around ? 1980 covering this in some detail. Liable to be much on web too though. 3. The CVSD laws can be made up to suit but basically the system maintains a certain step size for a certain number of samles then, if the curve is going in the same direction for N samples it increases (typically doubles?) the value of each step. As soon as it stops consistently going in the same direction it reduces the value of each step again using some law. As long as both ends follow the same law all is well. Suimpler - if the converter has chased the input for N steps and not caught it then it increases the step size and continues. If it has still not caught it after M more steps it will increase again etc. The steps at a given step size do not have to be linear - ie if it gets VERY behind it may decide to double the step size every time until it overshoots in style. How it then "ramps down" is also not simple.. Having a 00000 stream would cause the output to drive one way continually. With a 1 bit output it will always be chasing its tail and hunt +/- one bit around the proper value.. eg say we say that step size is 1 for 4 samples in the same direction then doubles and that it will halve every time it has NOT gone on the same direction for 2 samples. (I'm making this law up but it may be OK) 1 means go up 0 means go down So Input Signal Result 0 1 1 1 ) 1 0 0 ) Correct value so 1010 hunting occurs 1 1 1 ) 2 1 2 Step up by 1 is able to be tracked 3 1 3 3 0 2 ) hunts again 3 1 3 3 0 2 8 1 3 ) big step so ramp up - by 1 at first 8 1 4 8 1 5 8 1 6 4 x 1's sent so step size now doubles 9 1 8 Goes up 2 9 1 10 Goes up 2 7 0 8 Down 2 5 0 6 <-- **** 5 0 4 5 1 6 Changes to 1 step after this 2 step up 3 0 5 3 0 4 3 0 3 3 0 2 Oh dear - just got there and now our down step has doubled ! -) etc - I see I didn't quite follow my laws after <-- **** but the idea will eithe rbe clear enough or totally obscure by then. In the absenmce of real algorithms you can have endles hours of fun simulating this in a spreadsheet or in high level code with graphical output. I find Excel is often good for this sort of simulation as it is easy to see patterns in the data etc. Russell McMahon -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu