Mike Harrison wrote: > On Tue, 28 Nov 2006 09:59:37 -0200, you wrote: > >>Alden Hart wrote: >> >>> It's also worth noting that they tend to use 16 bit controls on the PWM >>> for dimming. It seems that fewer bits than this (i.e. less temporal >>> resolution in the pulses) gives you visible steps (quantization >>> errors) at low light levels. >> >> If you had a log scaled PWM generator, fewer bits would be fine -- most >> are not, but it's not impossible, depending on the technology used. > > You generally need a minimum of 12 bits, mostly to cope with > nonlinearity at low levels - you can take a 256 level value and put it > through a linearising table to give a 12 bit PWM value to get a nice > smooth fade. That's why I said "a log scaled PWM generator". I meant a hardware circuit that translates eg. 256 linear steps of voltage or time into 256 log scaled steps of time. For example by using a capacitor (dis)charging function. Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist