Delay Time

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

Moderators: Benj, Mods

Post Reply
wayne millard
Posts: 234
Joined: Thu May 31, 2007 2:18 pm
Has thanked: 7 times
Been thanked: 12 times

Delay Time

Post by wayne millard »

Can you have a delay of less than 1ms in flowcode. :D

Thanks

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 Wayne

Yes you can get delays of micro seconds by using a C code block and the following.

//Delay for multiples of 1us
delay_us(1); //You can replace the 1 with any number up to 255 to acheive longer delays.

One problem with the last command is that it will not work at certain frequencies due to problems scaling the delay value correctly. To remove this problem you can use this command.

//Delay for multiples of 10us
delay_10us(1); //Again you can replace the 1 for longer delays.

Post Reply