--- /dev/null
+/* Humusoft data acquisition library.\r
+ *\r
+ * Example that shows using of PWM output channels.\r
+ */\r
+\r
+/* Copyright 2002-2007 Humusoft s.r.o. */\r
+\r
+#include <stdio.h>\r
+\r
+#include "hudaqlib.h"\r
+\r
+\r
+int main(int argc, char* argv[])\r
+{\r
+ HUDAQHANDLE h;\r
+ double value;\r
+\r
+ /* open a handle to the first MF624 device in the system */\r
+ h = HudaqOpenDevice("MF624", 1, 0);\r
+ if (h==0)\r
+ {\r
+ printf("\nData acquisition device not found.\n");\r
+ return(-1);\r
+ }\r
+\r
+ /* set first PWM channel to frequency 1.5kHz with duty cycle 0.5 */\r
+ HudaqPWMWrite(h,0,1500,0.5);\r
+\r
+ /* set second PWM channel to frequency 2.5kHz with duty cycle 0.75 */\r
+ HudaqPWMWrite(h,1,2500,0.75);\r
+\r
+ /* close the device handle */\r
+ HudaqCloseDevice(h);\r
+\r
+ return(0);\r
+}\r
+\r