PIC18F24J11 PWM not working (simulation working)

Use this section to discuss your embedded Flowcode projects.
Post Reply
iurius
Posts: 3
http://meble-kuchenne.info.pl
Joined: Thu May 05, 2022 3:29 pm
Has thanked: 3 times

Flowcode v11 PIC18F24J11 PWM not working (simulation working)

Post 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!
Attachments
PIC18F24J11 - PWM.fcfx
(12.14 KiB) Downloaded 75 times

iurius
Posts: 3
Joined: Thu May 05, 2022 3:29 pm
Has thanked: 3 times

Flowcode v11 Re: PIC18F24J11 PWM not working (simulation working)

Post 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? :?:

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)

Post 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.

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)

Post 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.

iurius
Posts: 3
Joined: Thu May 05, 2022 3:29 pm
Has thanked: 3 times

Flowcode v11 Re: PIC18F24J11 PWM not working (simulation working)

Post 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

Post Reply