Page 1 of 1
PIC18F24J11 PWM not working (simulation working)
Posted: Sat Mar 28, 2026 11:06 pm
by iurius
Dear community,
I am trying to launch a PWM on PIC18F24J11 with a simple flow (increasing duty from 0 to 255 and starting over from 0, in a cycle) on $PORTC.2. Whenever the duty is zero, an LED blinks on the same pin 13.
Simulation works properly, the code compiles to target, but there is no PWM output on $PORTC.2, except the LED blinks on zero duty.
This same code works fine on ESP32, with PWM output.
What am I doing wrong?
Code attached.
Thank you!
Re: PIC18F24J11 PWM not working (simulation working)
Posted: Wed Apr 01, 2026 10:34 am
by iurius
It's April 1st today, I should be happy and crack jokes...
Yet, I'm sad, because there's no one here to help...
.
.
.
.
.
Ok, ok! I'm joking! Happy Fools Day to everyone!
Does anyone have an idea what's going on with the topic?

Re: PIC18F24J11 PWM not working (simulation working)
Posted: Wed Apr 01, 2026 11:08 am
by Steve-Matrix
Sorry for taking a while to respond and thanks for the polite reminder
I don't have that chip, but I have tried your project on another chip (PIC18F67K40) and it works fine.
At first I thought the issue might be because you are outputting to the same pin as the PWM, but that does not seem to cause a problem.
Have you tried the other channel settings for the PWM? If that works ok, it might help us discover the cause of the issue.
Re: PIC18F24J11 PWM not working (simulation working)
Posted: Wed Apr 01, 2026 5:12 pm
by BenR
Hello,
Sorry for the delay, I see the issue, bear with and I'll get it resolved for you.
Edit, hopefully resolved for you now via the library updates. You now need to assign the PWM remap pin via the component properties and hopefully it should then work correctly.
Re: PIC18F24J11 PWM not working (simulation working)
Posted: Wed Apr 01, 2026 10:54 pm
by iurius
BenR wrote: ↑Wed Apr 01, 2026 5:12 pm
Hello,
Sorry for the delay, I see the issue, bear with and I'll get it resolved for you.
Edit, hopefully resolved for you now via the library updates. You now need to assign the PWM remap pin via the component properties and hopefully it should then work correctly.
Hi Ben,
It's solved!
(No April 1st joke!)
I've finally had enough and re-installed FC11. That's it!
Sorry for bothering you and thank you all for your support!
I mean, I know you all tried (72 downloads!). I appreciate it!
All the best!
iurie