Page 1 of 1

PWM NOT WORK ON PIC16F1939

Posted: Tue May 15, 2018 9:42 pm
by SILVESTROS9
Hallo to all!
I would like to use PWM to controi load with mosfets. I used 5 channels of PWM at PIC16F1939 , but only CH1 (pin C.2) and CH2 (pinC.1) works..the other 3 channels (CH3-C.6, CH4-B.0, CH5-A.4) not work...PWM setup is simple, no wrong...I made a test with PIC16F1937 and all PWM channels works fine....Is there a problem with component or something else? I can't change the PIC because PIC16F1937 has different pins for PWM channels, and before make changes in PCB design I would like to know if is it possible to use all PWM channels of PIC 16F1939. Thanks.

Re: PWM NOT WORK ON PIC16F1939

Posted: Wed May 16, 2018 10:54 am
by Benj
Hello,

It looks like the definition file is wrong for the 16F1939, the PWM pins should match those of the 16F1937 device. Sorry for any inconvenience caused. The definition was using the 16F1938 pin configuration but this uses a smaller IC package.

Here is the corrected definition file.
16F1939.fcdx
(24.74 KiB) Downloaded 276 times
When designing PCBs it's probably always wise to double check pin connections in the device datasheet just in case we have made a mistake. Of course sometimes there can be mistakes in the datasheets too so it's sometimes unavoidable.

Re: PWM NOT WORK ON PIC16F1939

Posted: Thu May 17, 2018 8:05 pm
by SILVESTROS9
Thanks Ben , with corrected definition file for PIC16F1939 all PWM work fine....