br::ufrgs::ece::AIC::PWM Class Reference
[AIC Hardware Interface]

List of all members.

Detailed Description

Provices access to the PWM in an Actuator Interface Card.

Author:
Walter Fetter Lages (w.fetter@ieee.org)
Version:
AIC-1.3.0


Public Member Functions

void setFreq (double frequency)
 Sets the frequency of PWM.

double getFreq ()
 Returns the frequency of PWM.

 PWM (int base, double freq)
 Initializes the PWM.

 PWM (int base)
 Initializes the PWM using the default PWM frequency (20KHz).

native void finalize ()
 Finalizes the PWM.

int setDuty (double dutycycle)
 Sets the duty-cycle of PWM.


Static Public Member Functions

native void setCount (int count)
 Sets the frequency of PWM in cycles of 10MHz.

native int setDuty (int dutycycle)
 Sets the duty-cycle of PWM.

native void on ()
 Turns the PWM on.

native void off ()
 Turns the PWM off.


Static Public Attributes

final double REF_FREQ = 10e6
 Reference frequency = 10MHz.

final double SW_FREQ = 20e3
 Default Switching Frequency = 20KHz.


Constructor & Destructor Documentation

br::ufrgs::ece::AIC::PWM::PWM int  base,
double  freq
[inline]
 

Initializes the PWM.

Parameters:
base Base address for on board devices
freq PWM frequency

br::ufrgs::ece::AIC::PWM::PWM int  base  )  [inline]
 

Initializes the PWM using the default PWM frequency (20KHz).

Parameters:
base Base address for on board devices


Member Function Documentation

double br::ufrgs::ece::AIC::PWM::getFreq  )  [inline]
 

Returns the frequency of PWM.

Returns:
PWM frequency in Hz

native void br::ufrgs::ece::AIC::PWM::setCount int  count  )  [static]
 

Sets the frequency of PWM in cycles of 10MHz.

Parameters:
count number of cycles from 10 to 65530. Default value is 500
Since:
AIC-1.3.0

native int br::ufrgs::ece::AIC::PWM::setDuty int  dutycycle  )  [static]
 

Sets the duty-cycle of PWM.

Parameters:
dutycycle to be used by PWM as a int from 0 to 1000000
Returns:
the count value programmed to the PWM timer

int br::ufrgs::ece::AIC::PWM::setDuty double  dutycycle  )  [inline]
 

Sets the duty-cycle of PWM.

Parameters:
dutycycle to be used by PWM as a double from 0 to 1.0
Returns:
the count value programmed to the PWM timer

void br::ufrgs::ece::AIC::PWM::setFreq double  frequency  )  [inline]
 

Sets the frequency of PWM.

Parameters:
frequency frequency in Hz from 152.60Hz to 1MHz. Default value is 20KHz


The documentation for this class was generated from the following file:
Generated on Thu Mar 27 15:33:38 2008 for Actuator Interface Card by doxygen 1.3.6