Delay time

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

Moderators: Benj, Mods

mel
Posts: 9
Joined: Tue Dec 12, 2006 4:11 pm
Location: UK
Contact:

Delay time

Postby mel » Sat May 29, 2010 10:19 am

Hi All
is there a way for the delay function to use micro seconds instead of the standard milliseconds?

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8543
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2456 times
Been thanked: 3528 times
Contact:

Re: Delay time

Postby medelec35 » Sat May 29, 2010 9:22 pm

Hello mel.
For microsecond delays, you will require a C code block.
Then for 10 microseconds delay use delay_10us(1);
for 500 microseconds delay use delay_10us(50); etc.
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

mhuang
Posts: 13
Joined: Fri Apr 15, 2011 11:20 am
Has thanked: 1 time
Contact:

Re: Delay time

Postby mhuang » Wed Apr 20, 2011 3:49 pm

Hi

I try to add the c code to make the delay in microseconds, the simulation is fine, but the compile to chip is failure. Please help me to solve it. I use the flowcode V3.




Huang Min

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: Delay time

Postby Spanish_dude » Wed Apr 20, 2011 4:02 pm

( The simulation will not execute the C code you added. )

Could you attach your flowcode file ?
Also, could you tell us what error you have when compiling ?

mhuang
Posts: 13
Joined: Fri Apr 15, 2011 11:20 am
Has thanked: 1 time
Contact:

Re: Delay time

Postby mhuang » Thu Apr 21, 2011 4:24 pm

Hi

The file is enclosed, when I change the delay time, e.g. delay_10us(1) to delay_10us(10), the waveform is no change after compile to chip. So what's problem?


Huang Min