Variable status on start

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

Moderators: Benj, Mods

Post Reply
saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

Variable status on start

Post by saschech@gmx.de »

Hello

My projekt run in flowcode simulator ok but on my board not corrΓ©kt.
I found out :
In flowcode the variable after start are 00 but on my board random.
Is ther a way in flowcode to definate the complete ram to 00?

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:

Post by Benj »

Hello

The variables and some of the registers inside PICmicro always start up with a random value. Currently the only way to know you are starting from a set point is to always initialise the variable / register before you begin using it. This can simply be a case of a calculation icon at the beginning of your program that gives variables a set value.

Note you only have to initialise variables that are used before being assigned a value.

Post Reply