Flowcode Newbie Questions.

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

Posts: 114
Joined: Fri Jul 27, 2007 10:50 am
Been thanked: 1 time

Flowcode Newbie Questions.

Postby KeithSloan » Sun Oct 10, 2010 9:17 am

Being new to Flowcode I have some newbie questions.

1) I see in Chip you can set the oscillator to XTAL, but how does Flowcode know what crystal you have attached?
2) I notice that some components add C code that may not get called. Is the complier clever enough to eliminate code that is never called.
3) If I want to output a waveform on Pin X of Port Y i.e. timing critical. Do I have to allow any time for the Output function? Or can I just use the delays between Outputs without worrying that the Output takes a small delta of time.

Thanks Keith

User avatar
Matrix Staff
Posts: 14557
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4590 times
Been thanked: 4235 times

Re: Flowcode Newbie Questions.

Postby Benj » Mon Oct 11, 2010 8:14 am

Hello Keith,

1) Flowcode knows what the crystal speed is because it is set via the clock speed parameter.

V3 Chip -> Clock speed
V4 View -> Project options

2) C compilers do not add the functions to the device memory if they are not called by the program. One of the more useful features of the C language.

3) The output function itself should only be a couple of instructions so you should be able to rely on the delays. If you need extreme critical timing (eg on a instruction basis) then a C code block containing assembler code is probably your best bet.