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
Delay macro variable problem
Moderator: Benj
-
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
Hello Taurus.
This is a know issue with Boost C
There is a work around see:
http://www.matrixmultimedia.com/mmforum ... 92&p=15624
This is a know issue with Boost C
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 500usBenj 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.
There is a work around see:
http://www.matrixmultimedia.com/mmforum ... 92&p=15624
Martin