Flowcode v11. ATMEGA328 3xchannel PWM not compiling

For general Flowcode discussion that does not belong in the other sections.
Post Reply
Mcat
Posts: 3
http://meble-kuchenne.info.pl
Joined: Tue Jul 23, 2024 2:47 pm

Flowcode v11. ATMEGA328 3xchannel PWM not compiling

Post by Mcat »

Hello!
My project on ATMEGA328 uses three PWM channels. Everything works fine in the simulator, but it won't compile and gives errors like the ones in the picture. Please help.
Attachments
Problem.jpg
Problem.jpg (104.59 KiB) Viewed 1169 times

Steve-Matrix
Matrix Staff
Posts: 1810
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 260 times
Been thanked: 416 times

Re: Flowcode v11. ATMEGA328 3xchannel PWM not compiling

Post by Steve-Matrix »

I've just tried compiling an ATMEGA328 with PWM and it compiles without error for me. Make sure you are up-to-date with library updates.

Also, it was tricky to see what the error is from a screenshot. In future, it is much easier to solve problems if the output is available in text (e.g. by attaching the generated msg.txt file to a forum post).

It's also very useful to attach the fcfx file too as this saves a lot of time trying to replicate a project that exhibits your problem.

If library updates does not solve your problem, please post these files here and we will investigate further.

BenR
Matrix Staff
Posts: 2153
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 583 times
Been thanked: 767 times

Re: Flowcode v11. ATMEGA328 3xchannel PWM not compiling

Post by BenR »

It looks like the specific error being generated it due to the 7 segment quad component pin connections, something there is referring to PortA which doesn't exist on the device you're using.

Maybe try going through the properties and checking there isn't a hidden pin thats referring to PortA.

Mcat
Posts: 3
Joined: Tue Jul 23, 2024 2:47 pm

Re: Flowcode v11. ATMEGA328 3xchannel PWM not compiling

Post by Mcat »

Hello!
Thank you for your reply. I updated the component library, but the problem remains.
Everything simulates fine, but it still won't compile.
Project files:
Attachments
PWM Nano328.msg.txt
(3.87 KiB) Downloaded 69 times
PWM Nano328.fcfx
(32.61 KiB) Downloaded 71 times

medelec35
Valued Contributor
Posts: 2270
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 698 times
Been thanked: 768 times

Re: Flowcode v11. ATMEGA328 3xchannel PWM not compiling

Post by medelec35 »

From Ben's post, Please pay attention to this:
BenR wrote:
Thu Dec 18, 2025 10:16 am
It looks like the specific error being generated it due to the 7 segment quad component pin connections, something there is referring to PortA which doesn't exist on the device you're using.
Select the 7seg Quad component on the 2D Legacy panel then right click and select properties.
Within the properties change any pin that has Port A selected.
E.g. the top pin is connected to port A.0 which does not exist.
Port A does not exist.png
Port A does not exist.png (139.06 KiB) Viewed 1093 times
As Ben stated port A does not exist, hence not able to compile.
Martin

Mcat
Posts: 3
Joined: Tue Jul 23, 2024 2:47 pm

Re: Flowcode v11. ATMEGA328 3xchannel PWM not compiling

Post by Mcat »

Hello!
Everything worked out, thank you.
The maximum PWM frequency is 31 kHz. Does the standard PWM component not provide FAST_PWM mode? Is it possible to increase the PWM frequency?

Post Reply