Data Registers in Flowcode 8

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

Moderator: Benj

Post Reply
Dave Squibb
Flowcode v5 User
Posts: 104
Joined: Fri Oct 10, 2014 11:15 am
Has thanked: 27 times
Been thanked: 22 times
Contact:

Data Registers in Flowcode 8

Post by Dave Squibb »

Hi all
I've just upgraded from Flowcode 6 to 8 and am having problems with Data Registers.
In Flowcode 6 you could use a C box and put things like

Code: Select all

set_bit(intcon,2);  
clear_bit(intcon,2); 
cmcon=7;
This is not accepted in Flowcode 8, probably because of the Compiler change to XC8
How do I achieve this please?

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: Data Registers in Flowcode 8

Post by medelec35 »

Hi Dave,
Registers in boostC (up to and including V6) are in lower case.
Registers in XC8 (V7 and above) are in upper case.
This may also help
Martin

Dave Squibb
Flowcode v5 User
Posts: 104
Joined: Fri Oct 10, 2014 11:15 am
Has thanked: 27 times
Been thanked: 22 times
Contact:

Re: Data Registers in Flowcode 8

Post by Dave Squibb »

Hi Martin,
Thanks for that, I'll have a look. The C simulation doesn't seem to like lower or upper case.
Dave

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Data Registers in Flowcode 8

Post by Benj »

Hello Dave,

The C code simulation will not simulate the microcontroller registers it is designed to simulate generic C code.

e.g. as shown here.
https://www.matrixtsl.com/flowcode/new/#idElement3

Dave Squibb
Flowcode v5 User
Posts: 104
Joined: Fri Oct 10, 2014 11:15 am
Has thanked: 27 times
Been thanked: 22 times
Contact:

Re: Data Registers in Flowcode 8

Post by Dave Squibb »

The only time I use a C icon is to set / clear bits in microcontroller variables. The simulator always jumped over C boxes so I was delighted that Flowcode 8 could simulate C..........

Is this something that could be added in the future? I appreciate that Flowcode can't know the initial value of the variable but if it is initialised by the user?

Post Reply