[time-nuts] V standards

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Dec 3 13:40:01 UTC 2008


In message <20081203104032.E3F3FBCD7 at ip-64-139-1-69.sjc.megapath.net>, 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
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.




More information about the Time-nuts_lists.febo.com mailing list