Diolan DLN-series adapters have rich functionality. By using DLN-4M adapter you can use PC-I2C, USB-GPIO and USB-SPI interfaces. Also there are pulse counter, PWM and ADC module. DLN-4S has the same capabilities as DLN-4M but it also has slave capabilities of USB-I2C and USB-SPI interfaces.
There are available large amount of demo examples which show all the possibilities of Diolan DLN-series adapters and were created to help your software and hardware development with latest Diolan products.
Here we’ll look on USB-GPIO interface PWM module possibilities. With USB-IO Adapter Pulse Width Modulation interface you can control wide range of analog circuits from your PC. Some of them are listed in the following articles: PWM DC Motor Controller, PWM Digital to Analog Converter, PWM Lamp & LED Dimmer.
To use USB-ADC module you need to enable PWM channel and its port by using DlnPwmChannelEnable() and DlnPwmEnable() functions. To set PWM frequency simply use DlnPwmSetFrequency() function() or DlnPwmGetFrequency() function to get current frequency value.
Also you can set duty cycle value by using DlnSetDutyCycle() and get current duty cycle value by calling DlnGetDutyCycle().
You can share all this functions from the dln.dll library or by using static qt libdln.a and dln.lib libraries. Try to run “Pwm Gui” application for testing installed by DLN setup package.