In message <[EMAIL PROTECTED]>, Hal Murr
ay writes:

>> You don't want 24bit PWM, you want to combine a normal DAC with PWM
>> modulation.
>
>> The disadvantage is that the result is not linear.  But it is
>> monotonic and approximately the lower 4/5th of the distinct
>> combinations are practically useful. 
>
>Where is the non linearity coming from?
>
>Why is only the bottom 4/5s useful?

Because the DAC and PWM multiply instead of add:

Run this script and plot the '_f' file:

        #!/bin/sh
        echo | awk '
                {
                for (i = 0; i < 4096; i++) {
                        for (j = 0; j < 1024; j++) {
                                x = 3.3 * (i / 4096.) * (j / 1024.)
                                printf "%12.9f\n", x
                        }
                }
                }
        ' | sort -u | tee /tmp/_f | wc -l

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

_______________________________________________
time-nuts mailing list -- [email protected]
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Reply via email to