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!
PIC18F24J11 PWM not working (simulation working)
-
iurius
- Posts: 3
- http://meble-kuchenne.info.pl
- Joined: Thu May 05, 2022 3:29 pm
- Has thanked: 3 times
PIC18F24J11 PWM not working (simulation working)
- Attachments
-
- PIC18F24J11 - PWM.fcfx
- (12.14 KiB) Downloaded 75 times
Re: PIC18F24J11 PWM not working (simulation working)
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?
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?
-
Steve-Matrix
- Matrix Staff
- Posts: 1818
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 262 times
- Been thanked: 421 times
Re: PIC18F24J11 PWM not working (simulation working)
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.
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.
-
BenR
- Matrix Staff
- Posts: 2164
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 588 times
- Been thanked: 777 times
Re: PIC18F24J11 PWM not working (simulation working)
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: PIC18F24J11 PWM not working (simulation working)
Hi Ben,BenR wrote: ↑Wed Apr 01, 2026 5:12 pmHello,
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.
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