IOWJ (advertising) supports new SpecialModeFunction PWM of IO-Warrior 56

This is the English forum for all topics related to IO-Warrior. Please post in English only

Moderator: Guido Körber

Post Reply
towaibw
Posts: 197
Joined: Sat Dec 27, 2003 10:55 pm
Location: Berlin / Germany
Contact:

IOWJ (advertising) supports new SpecialModeFunction PWM of IO-Warrior 56

Post by towaibw »

To generate a frequency of 1kHz with duty cycle of 50%, just three lines of Java code are necessary:

Iow56 dev56 = devs.getIow56Device();
PWM pwm = new PWM(PWM.PWM_CLOCK_2MHZ,1999,1000);
dev56.addSpecialModeFunctionImpl(pwm);

With toString() method of class PWM, you can see the actual parameters of the generated output:

System.out.println(pwm); provides "PWM:clock[2],period[1999],pulse[1000],frequency[1.0 kHz],duty[50.0 %]"

PS: Since this year, commercial support for IOWJ is available.

Post Reply