On 2015-05-30, Bill Sloman wrote: as diagramming the transformation to make to the clock
(you said 4 but then diagrammed 5 bits reversed, I'll go with 4 as that's what you're discussing most recently)
By my reading of your wiring pattern above the comparitor sees a sequence that starts 0,1,2,3,4,5...,62,63,512,513,..543,256...319,
768...831, (please excuse any trivial arithmeti errors) so if we assume the pwm level input is is at 600 we'd see high for 192 clock periods then low for 64 ..."my" pattern (for some reason we're counting from 1 instead of from 0, I'll keep doing that)
b6 b5 b4 b3 b2 b1 b7 b8 b9 b10
My wiring pattern (shifting the low bits to the top and reversing the high bits at the bottom) gives 0,16,32,48,64...992,1008,8,24,40...1016,4,20...1004 ,1020,12... which is 16 steepness 16 staircases of dithered offset, and, I expect, what you intended.
it can be improved by usung the msb of the shifted bits to turn that sequence into a double staircase like so. ( ^ represents XOR ) b5 ^ b6 b4 ^ b6 b3 ^ b6 b2 ^ b6 b1 ^ b6 b6 b7 b8 b9 b10 that will stop the input from phase modulating the output to the same extent.. all the bit shuffling has me wondering about how a LFSR would perform in this application, has anyone tried that?