Page 1 of 1

Symbolic variables

Posted: Tue Nov 24, 2009 8:59 am
by jadiflow
Hi,

Is it possible to attach symbolic variable definitions and call them out in the code?

Like I would have a signal 'Sel' attached to say pin RA1. I would have a 'define Sel RA1' perhaps as supplemental code, and then in my flowchart would say something like 'SelState=Sel'
Big advantage is to have all definitions in one place for easy modifications and debugging. In the current situation if I am porting a program to another PIC with different pin connections I need to go through each and every statement block and chance the pin assignments.

Also, I remember reading that it should be possible to attache a notepage to a flowchart with engineering info but can't find it back. Was I dreaming ? ;-)

thanks,

Jan Didden
Linear Audio

Re: Symbolic variables

Posted: Tue Nov 24, 2009 1:01 pm
by Steve
The "notepage" suggestion was on the list for v4, but did not make the final version.

Your suggestion about some kind of global reference for an i/o element is a great one and I'll make a note of it - but it will be v5 at the earliest.

Re: Symbolic variables

Posted: Mon Dec 07, 2009 8:07 am
by jadiflow
Thanks Steve.

You could even take it a step further so that whenever I use symbolic variable 'Sel' (which is defined as 'RA1') the code would automagically include either a read or write from/to that pin. More isolation between the flowchart and the code.

Example: 'define Sel RA1' in supplementary code or wherever.

Then in my flowchart I say: BlaBla = Sel >> 1
The code would say: Sel = RA1; BlaBla = Sel >> 1

Or if my flowchart would say: Sel = junk AND 0b00000001
The code would say: Sel = junk AND 0b00000001; RA1 = Sel

I don't think you would need to explicitly define Sel as either an input or an output, but I may overlook something. Over to you.

jan didden