Hello, I never used this chip, I have read only the datasheet just now. http://ww1.microchip.com/downloads/en/DeviceDoc/40001819A.pdf I found TIMER2 more complicated than it was earlier. If I see well, you would like to use one 10 bit PWM modul. There is TABLE 25-5 on page 326 which is showing the associated registers to 10 bit PWM modules. For using PWM10 module you decided to use TIMER2 module by not change the default value of CCPTMRS2 register <7:6>. I'm not sure but I think the source of your problem is the TIMER2 module. It has the T2CLKCON register. You can set the source of the clock for TIMER2 module trough this register. The default value is 0x00 and that means clock come for an input pin named it RC3 according the T2INPPS register default value ( 0x13 ). So I think you should set T2CLKCON register to 0x01 ( or 0x02 ) if you want to use Fosc/4 ( of Fosc ) as a clock source for TIMER2 module. You can check it on page 301. Regards, Zsolt 2016-07-06 19:51 GMT+02:00 Jim Ruxton : > I have used PWM a number of times in the past but for some reason I am > having trouble getting it to work on this chip. Can anyone think of any > gotchas I may be missing? Could it be something to do with the PPS? I > have never used that feature on a PIC before. I am expecting PWM output > on RA3 but getting nothing. Below is the code I am using to start the > PWM? Any thoughts? Pulling my hair out on this one. Thanks. > > TRISA=3D0xFF; > PWM10CON=3D0x00; > T2PR=3D0x52; > PWM10DCL =3D 0x80; > PWM10DCH =3D 0xF0; > PIR1bits.TMR2IF =3D 0; > T2CON =3D 0x00; > T2CON=3D0x80; > TRISA=3D0xF0; > RA3PPS=3D0x1E; > PWM10CON =3D 0x80; > > Jim > > > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 ~~~~~~~~~~~~~~~~ http://galzsolt.zzl.org --=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 .