jcontrol.io
Class PWMext

java.lang.Object
  extended byjcontrol.io.PWM
      extended byjcontrol.io.PWMext

public class PWMext
extends jcontrol.io.PWM

Provides furter functions for Pulse Width Modulation of JControl.

Version:
1.0
Author:
boehme

Method Summary
static void setFrequency(byte channel, int freq)
          Sets the frequency of the PWM signal (in Hz), of the given channel.
static int setPeriod(byte channel, int period)
          Sets the period of the PWM signal (in microseconds) of the given channel.
static int setPeriod(int period)
          Sets the period of the PWM signal (in microseconds).
 
Methods inherited from class jcontrol.io.PWM
getDuty, getFrequency, setActive, setCycles, setDuty, setFrequency
 
Methods inherited from class java.lang.Object
clone, equals, finalize, notifyAll, wait
 

Method Detail

setFrequency

public static void setFrequency(byte channel,
                                int freq)
Sets the frequency of the PWM signal (in Hz), of the given channel. Not supported by all hardware platforms.

Parameters:
channel - to use (valid range: 0...3, hardware dependent)
freq - the frequency to use (range 244 ... 32767 - hardware dependent)
See Also:
PWM#setCycles(byte scale, short load), #setPeriod(short value)

setPeriod

public static int setPeriod(byte channel,
                            int period)
Sets the period of the PWM signal (in microseconds) of the given channel. Not supported by all hardware platforms.

Parameters:
channel - to use (valid range: 0...3, hardware dependent)
period - to use (range 1 ... 32767)
See Also:
PWM#setCycles(byte scale, short load), PWM#setFrequency(short freq)

setPeriod

public static int setPeriod(int period)
Sets the period of the PWM signal (in microseconds). This method affects all channels.

Parameters:
period - to use (range 1 ... 32767)
See Also:
PWM#setCycles(byte scale, short load), PWM#setFrequency(short freq)