Hmmm... tinkering with PWM (for the first time) on an 18F45K22 and can't=20 get it to work. I'm using timer-6 on RB3 (CCP2) which is the only=20 output I'm trying to PWM for now, and for now I'm using fairly random=20 values for PR6 and CCPR2L. I'm following the PWM setup sequence in=20 section 14.3.2 of the datasheet (DS41412D). Any clues to what else I am=20 missing here? #pragma config CCP2MX =3D PORTB3 void init(void) { ... ... TRISBbits.TRISB3 =3D 1; // RB3/CCP2 =3D Input for now. CCPTMRS0 =3D 0b00010000; // CCP2 uses TMR6 PR6 =3D 123; CCP2CON =3D 0b00111100; // ECCP: Single output, PWM=20 LSB + PxA active-high CCPR2L =3D 200; // Sets PWM width (together=20 with CCP2CON<5:4>) PSTR2CON =3D 0b00000001; // Only enable P2A PIR5bits.TMR6IF =3D 0; T6CON =3D 0b00000100; // Timer 6 on, no prescale TRISBbits.TRISB3 =3D 0; // Enable RB3/CCP2 output ... } Thanks. --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .