PIC16F1824 PWM

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

Post Reply
User avatar
Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Been thanked: 13 times
Contact:

PIC16F1824 PWM

Post by Osta »

Error Code

User avatar
Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Been thanked: 13 times
Contact:

Re: PIC16F1824 PWM

Post by Osta »

Does not compile
Attachments
....
....
ERR.jpg (101.28 KiB) Viewed 11460 times
TX.fcfx
file
(8.04 KiB) Downloaded 291 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: PIC16F1824 PWM

Post by medelec35 »

I Have moved topic from Fixed bugs to Bug reports.
Compiles for me ok:

Code: Select all

Device:        PIC.16F.16F1824
Generated by:  Flowcode v7.2.1.4
Date:          Sunday, August 27, 2017 20:20:51
Users:         1
Registered to: Martin
Licence key:   BA48R5
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode 7\compilers\pic\bin\xc8.exe  --chip=16F1824 "TX.c" --MSGDISABLE=359,1273,1388
Microchip MPLAB XC8 C Compiler (Free Mode) V1.41
Build date: Jan 24 2017
Part Support Version: 1.41
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

. . . . . .

TX.c: 191: (1257) local variable "_FCR_RETVAL" is used but never given a value (warning)

Memory Summary:
    Program space        used    BFh (   191) of  1000h words   (  4.7%)
    Data space           used    24h (    36) of   100h bytes   ( 14.1%)
    EEPROM space         used     0h (     0) of   100h bytes   (  0.0%)
    Data stack space     used     0h (     0) of    DBh bytes   (  0.0%)
    Configuration bits   used     2h (     2) of     2h words   (100.0%)
    ID Location space    used     0h (     0) of     4h bytes   (  0.0%)


You have compiled in FREE mode.
Using Omniscient Code Generation that is available in PRO mode,
you could have produced up to 60% smaller and 400% faster code.
See http://www.microchip.com/MPLABXCcompilers for more information.


Launching the linker/assembler...
C:\Program Files (x86)\Flowcode 7\tools\DoNothing\DoNothing.exe  


FINISHED


As a complete guess, Perhaps it is something to do with language settings?
Have you tried changing to English and seeing it it will compile for you?
Martin

User avatar
Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Been thanked: 13 times
Contact:

Re: PIC16F1824 PWM

Post by Osta »

If I remove the delay, then everything is fine ...
Attachments
Del.jpg
Del.jpg (94.96 KiB) Viewed 11441 times

User avatar
Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Been thanked: 13 times
Contact:

Re: PIC16F1824 PWM

Post by Osta »

It appeared with the latest update

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: PIC16F1824 PWM

Post by medelec35 »

Take a look at how much program space your flowchart is using when you compiled it (99.7%) compared to when I compiled it (4.7%) and that was with the delay!

The Reason your first flowchart did not compile was due to using too much program space.
Not sure how such a small flowchart can use up lots of rom when you try to compile, but not when I compile it?
Martin

User avatar
Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Been thanked: 13 times
Contact:

Re: PIC16F1824 PWM

Post by Osta »

Yes, I noticed it!
But I can not understand why.
EDIT:
Rearranged the program.
And checked with every update.
That's what happened ....
And with it does not compile and there is a point on PWM
And with it does not compile and there is a point on PWM
Flowcode_7_Latest_240817.jpg (26.48 KiB) Viewed 11424 times
This compiles
This compiles
Flowcode_7_Latest_170717.jpg (92.86 KiB) Viewed 11424 times
EDIT2:
It turns out that the last update introduces an error in the compiler.
Last edited by EtsDriver on Mon Aug 28, 2017 5:59 pm, edited 1 time in total.
Reason: Please, use edit button to edit your old message instead. It makes the topic much easier to read! :)

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: PIC16F1824 PWM

Post by LeighM »

Thanks for the report.
Seems that simulation code is erroneously getting created as part of the download code.
We will investigate.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: PIC16F1824 PWM

Post by LeighM »

Updated PWM component attached,
to go into Flowcode7\components directory.
This should reduce the download code size
Attachments
PWM.fcpx
(8.96 KiB) Downloaded 313 times

User avatar
Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Been thanked: 13 times
Contact:

Re: PIC16F1824 PWM

Post by Osta »

Thanks for the correction!
Yes, the code has become smaller.
But the simulation indicator remained.
Attachments
ZZZ.jpg
ZZZ.jpg (51.75 KiB) Viewed 11296 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: PIC16F1824 PWM

Post by LeighM »

But the simulation indicator remained.
That is a new feature that indicates when the PWM is enabled.
Do you have a problem with it?

User avatar
Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Been thanked: 13 times
Contact:

Re: PIC16F1824 PWM

Post by Osta »

Hi LeighM !!
I did not know about it.
I apologize.
Everything else works !!!
Thank you!!!!!!!!

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: PIC16F1824 PWM

Post by LeighM »

Ah, good then :D

User avatar
Osta
Posts: 159
Joined: Tue Jul 05, 2016 9:42 am
Been thanked: 13 times
Contact:

Re: PIC16F1824 PWM

Post by Osta »

I am very sorry !!!
Please see what I'm doing wrong ...
Or is it a compiler error?
Thank you!!! :?
Attachments
TX.fcfx
(10.43 KiB) Downloaded 197 times
PWM_PIK18F67K22.jpg
PWM_PIK18F67K22.jpg (82.27 KiB) Viewed 11266 times

Post Reply