Differece between V5 and V8 program

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
venturi
Flowcode V4 User
Posts: 9
Joined: Sun Apr 02, 2006 10:07 pm

Differece between V5 and V8 program

Post by venturi »

Hi all,
i just upgraded to version 8 and realized that V5 flowcharts could not be imported in V8.
So i made the same V8 flowchart by simply making a new one icon by icon and so on.
But after compiling i noticed that i had to reduce a delay component by roughly 7 times for achieving the same result. The flowchart is a 50Hz zerocross interrupt driven dimming device. After an ADC conversion it reads value of a potmeter with a byte as return value. This return value multiplied with the delay component is the firing angle for firing a triac. In version 5 this value is 22 us and in version 8 i have to decrease this value till 3 us. Otherwise it won't work. There is a lot of flikkering and undefined behavior. Could it have something to do with 10 bit sample depth of AN3 inV8? While in V5 this is maybe default 8 bit?
Is it possible to edit the sample depth? I would like a 8 bit, but i cannot find a way to edit this.
Device is PIC12F615. I hope pictures are good enough.
Attachments
IMG_0978.jpeg
IMG_0978.jpeg (125.85 KiB) Viewed 1663 times
IMG_0977.jpeg
IMG_0977.jpeg (125.56 KiB) Viewed 1663 times

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

Re: Differece between V5 and V8 program

Post by medelec35 »

venturi wrote:i just upgraded to version 8 and realized that V5 flowcharts could not be imported in V8.
There are plenty of forum members like myself and forum staff that will be happy to convert V5 to V8 for you.
You can PM if wanted to keep flowcharts private.
There is no cost involved.
venturi wrote:after compiling i noticed that i had to reduce a delay component by roughly 7 times for achieving the same result.

I would guess the issue is to do with overheads.
V8 uses XC8 compiler , whereas V5 uses BoostC compiler.
Maybe V8 is not quiet as good as BoostC with small delays, so you need to reduce value to get the equivalent?
Do you also have warnings when compiling like - Caution: Delay inaccurrate: 'delay_us', Delay overhead:0.01ms, Unit delay:0.001ms, Delay resolution:4 units?
Depending on your clock speed you may not be able to get the small delays required.
E.g 3 uS delay could really be a 10uS delay in reality.
Martin

venturi
Flowcode V4 User
Posts: 9
Joined: Sun Apr 02, 2006 10:07 pm

Re: Differece between V5 and V8 program

Post by venturi »

Thank you for replying so quick,
Do you also have warnings when compiling like - Caution: Delay inaccurrate: 'delay_us', Delay overhead:0.01ms, Unit delay:0.001ms, Delay resolution:4 units?
Depending on your clock speed you may not be able to get the small delays required.
E.g 3 uS delay could really be a 10uS delay in reality.
The only delay-related warning i have is:
C:\ProgramData\MatrixTSL\FlowcodeV8\CAL\PIC\PIC_CAL_Delay.c: 105: non-reentrant function "_delay_ms" appears in multiple call graphs and has been duplicated by the compiler
I would guess the issue is to do with overheads.
V8 uses XC8 compiler , whereas V5 uses BoostC compiler.
I tried also another flowchart (made an exact copy from V5 to V8), a more sophisticated and bigger program, but does not compile at all. RAM not big enough i think.
This is what compiler says: FlowcodeV8\CAL\internals.c: 76: (1250) could not find space (20 bytes) for variable _FCI_TMP_STR while in V5 it all compiles well en even have 8% space left in RAM. And a working program of course. I am trying to figure out what benefits i have now, after upgrading. But must say, for now for me, there are none.
Is there a possibility to change compiler to sourceboost of another? I develop zerocrossing related light control units and would really like to have same compile functionality like V5 but with the features of V8?

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

Re: Differece between V5 and V8 program

Post by medelec35 »

Unfortunately there was no choice to change from BoostC to XC8 as the former was not supporting new targets.
As for the memory, I would recommend to try compiling with 18F27k40 as I used that with touch gLCD that has a fair few bitmap images loaded.
FC8 does offer many more target devices, components and code profiling etc.
Plus compiling sped is lightning compared to Boost C.
V8 is like windows 10 compared to V5 is like windows 95.
Win 95 cant run as much as win10.
We need to progress.
Martin

Post Reply