PDA

View Full Version : 18F4553 HPWM x2 problem



nickw
- 3rd August 2021, 13:59
Hello,

I designed a board to use a 18F4553 and run two pulse output circuits on portc.1 and portc.2. I was intending to use HPWM1 and HPWM2 to vary the frequency of each independently. It looks like this cannot be done since both HPWMs need to have the same frequency. I need these two pulse outputs to be always on and running in the background. Are there any workarounds for this or does anyone know of another 44 TQFP PIC that would drop in and work? Duty cycle is not important, just independently adjustable frequency on two pins. Thanks for the help.

mpgmike
- 4th August 2021, 00:57
Most of the newer PIC offerings have more than one Timer2/4/6 that can be used for CCP1/2/3 or PWM1/2/3.... Look at the PIC18FxxK40 and K42 offerings; both work with PBP3.1. I know there are more (including a bunch of PIC16F versions); you can search Microchip's site for these requirements (along with other requirements you need for your project).

nickw
- 4th August 2021, 16:47
Thank you mpgmike, that got me back on the right track. I swapped for a 18F46K80 and I have things working the way I wanted them to. Appreciate the help.