12-17-2014 10:20 AM
Hello Everyone,
I'm learning how to use Mydaq and the task model, I have made a program to drive an LED using PWM on the digital output 0. It works, but it has a lot of flickering. I understand that the flickering perceived by the human eye should disapear about the 200 Hz. At the moment I'm using the simulate signal module to generate an square wave, and it does not matter how fast I drive it the flickering it does not go away. The document "myDAQ_Manual.pdf" in the section "General Purpose Counter/Timer" mentions:
Internal base clocks: 100 MHz
12-21-2014 12:30 PM
Software timing means you're at the mercy of Windows to start your loop. If Windows decides other tasks, like responding to your mouse or keyboard or updating the screen, is more important than your loop, those will go first. An any given iteration, this can be as muh as 100ms worth of added delay. If windows adds as little as 5ms on average, you'll fall below 200Hz. You're working with an excessively unpredictable clock. It'll be hard to get exactly what you want.