Barry Gershenfeld gmail.com> writes: >=20 > I have, what was to be a simple controller, that suddenly got an addition= al > job of controlling an LED backlight. Dimming is done via PWM, and the sp= ec > states a max frequency around 250 Hz. It's a PIC18LF45K22, and seems to = be You can use TMR2/4/6 with postscaler to generate interrupts. Load PRx regi= ster with value for pulse or blank. This will generate only 2 interrupts per cy= cle.=20 Another way is to use CCP module with 16-bit registers (page 182 of the datasheet), this will give you a better resolution by avoiding post-scaler.= In the special event IRQ load correct values for the duration of pulse or blan= k. =20 Sergey Dryga http://beaglerobotics.com --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .