Delay macro variable problem

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Taurus
Flowcode V4 User
Posts: 46
Joined: Tue Feb 23, 2010 3:58 pm
Has thanked: 3 times

Delay macro variable problem

Post by Taurus »

Hello

I have a little problem, please see the program enclosed.
I should expect that a square wave 50% on/off is, but it looks like that the variable is not working in the delay macro in uS.
As you can see, I did use one time a delay macro with a variable and one time without.
Please run the program and take a look on the oscilloscope.
For now I did not test it with mS and Seconds.

Please, tel me, what do I do wrong.

Thanks
Attachments
DelayTest.fcf
program
(4 KiB) Downloaded 278 times
Taurus

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Delay macro variable problem

Post by medelec35 »

Hello Taurus.
This is a know issue with Boost C
Benj wrote: The problem is that the boostC delay function only allows a byte parameter. When you give flowcode a fixed delay eg 1000 ms then it breaks this down into a series of calls that all use bytes. If you are using a variable value then Flowcode cannot do this correctly.
This would apply to you since using a delay value of 500. My guess is on the scope you are seeing delay on of 255us and off for 500us
There is a work around see:
http://www.matrixmultimedia.com/mmforum ... 92&p=15624
Martin

Post Reply