Timer

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

Moderators: Benj, Mods

Post Reply
RAMTEC
Posts: 18
Joined: Thu Jul 27, 2006 4:32 am
Location: Dominican Republic
Contact:

Timer

Post by RAMTEC »

Hi Steve. The timer have milisecond and second options, the new version could have microsecond optios?
Thank you
RAMTEC

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

RAMTEC:

Good suggestion, but too late for the V3 release. I'll put it on the worklist for v3.1

[NOTE: The following info is for v3 of Flowcode only]

In the meantime, you will need to use a 'C' icon with the following single line of code in it:

Code: Select all

delay_10us(5);
This will produce a 50us delay. Note that you cannot currently have less than a 10us delay. [Aside: there is an equivalent delay_us() function, but if you use this you may not be able to compile your code due to a linker error - depending on the clock speed used].

If you need a variable delay, you can access Flowcode's variables within your 'C' icon code. For example, if you have a variable "MyDelay", then you would use the following:

Code: Select all

delay_10us(FCV_MYDELAY);

RAMTEC
Posts: 18
Joined: Thu Jul 27, 2006 4:32 am
Location: Dominican Republic
Contact:

Timer in microsecond

Post by RAMTEC »

I use very very frecuently time in microsecod and some time is dificult to me use loop or TMRO for it. Some time i use program with variable time from 5 microsecond to 500 microsecod or more.
The timer just have time in milisecond and second.
Will Matrix M. integrate in flowCode 3.1V microsecod time in the timer icon?

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Post by Steve »

I don't think you'll actually get a microsecond delay in the delay icon in Flowcode v3.1 - I've got a lot to do with this release already and not much time. The workaround listed above should work fine if you need microsecond delays.

However, I do hope to incorporate your suggestion in a future release of Flowcode.

Post Reply