PIC16F1824 PWM

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

Moderator: Benj

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

PIC16F1824 PWM

Postby Osta » Sun Aug 27, 2017 5:35 pm

Error Code

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

Re: PIC16F1824 PWM

Postby Osta » Sun Aug 27, 2017 5:41 pm

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

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8334
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2382 times
Been thanked: 3393 times
Contact:

Re: PIC16F1824 PWM

Postby medelec35 » Sun Aug 27, 2017 8:42 pm

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

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

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

Re: PIC16F1824 PWM

Postby Osta » Sun Aug 27, 2017 9:37 pm

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

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

Re: PIC16F1824 PWM

Postby Osta » Sun Aug 27, 2017 9:42 pm

It appeared with the latest update

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8334
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2382 times
Been thanked: 3393 times
Contact:

Re: PIC16F1824 PWM

Postby medelec35 » Sun Aug 27, 2017 10:20 pm

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

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

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

Re: PIC16F1824 PWM

Postby Osta » Mon Aug 28, 2017 12:58 am

Yes, I noticed it!
But I can not understand why.
EDIT:
Rearranged the program.
And checked with every update.
That's what happened ....
Flowcode_7_Latest_240817.jpg
And with it does not compile and there is a point on PWM
Flowcode_7_Latest_240817.jpg (26.48 KiB) Viewed 3322 times

Flowcode_7_Latest_170717.jpg
This compiles
Flowcode_7_Latest_170717.jpg (92.87 KiB) Viewed 3322 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: 1844
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 612 times
Contact:

Re: PIC16F1824 PWM

Postby LeighM » Tue Aug 29, 2017 9:28 am

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: 1844
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 612 times
Contact:

Re: PIC16F1824 PWM

Postby LeighM » Mon Sep 04, 2017 4:17 pm

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

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

Re: PIC16F1824 PWM

Postby Osta » Tue Sep 05, 2017 8:07 am

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

User avatar
LeighM
Matrix Staff
Posts: 1844
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 612 times
Contact:

Re: PIC16F1824 PWM

Postby LeighM » Tue Sep 05, 2017 9:11 am

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: 146
Joined: Tue Jul 05, 2016 9:42 am
Been thanked: 13 times
Contact:

Re: PIC16F1824 PWM

Postby Osta » Tue Sep 05, 2017 10:26 am

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

User avatar
LeighM
Matrix Staff
Posts: 1844
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 612 times
Contact:

Re: PIC16F1824 PWM

Postby LeighM » Tue Sep 05, 2017 10:29 am

Ah, good then :D

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

Re: PIC16F1824 PWM

Postby Osta » Tue Sep 05, 2017 10:45 am

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 30 times
PWM_PIK18F67K22.jpg
PWM_PIK18F67K22.jpg (82.28 KiB) Viewed 3164 times