Barry Gershenfeld wrote: > As to conjectures about the dimming PWM, there are two factors I see that > have to be kept in mind. One is that this product may be used at night, a= nd > the user may want to make the screen very dim. So, while it seems to mak= e > sense that I don't really need 7 or 8 bits of resolution across the full > brightness range, I may well need to run at 1% duty at the dim end, someh= ow. > > > Factor number two is that 1% at 200 Hz is 50us, and if I introduce a 10us > disturbance into that pulse, it's wrong by 20%, and that will be visible = as > a flicker. > > I like the idea of the timers being used for the high and low portion of = the > cycle. I even believe that it may be less important to keep the frequenc= y > exact, as long as the "on" duty time doesn't jump around. That's relevan= t > because I'm concerned about reloading the timers to account for variable > software overhead. > =20 You could set up a 10mS interrupt interval, and in the interrupt set up=20 a CCP to turn off the backlight after an appropriate delay. PWM=3D750; int_rtcc() { turn on backlight; set CCP to turn off backlight in PWMuS; } Kerry --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .