pic24_dspic33::pwm Class Reference

This class provides basic control of the pulse-width modulation peripheral for the PIC. More...

List of all members.

Public Member Functions

def __init__
 Create the class instance for a PWM output.
def set
 Set the duty cycle for a PWM output.
def setCounts
 Set the duty cycle for a PWM output.


Detailed Description

This class provides basic control of the pulse-width modulation peripheral for the PIC.

Definition at line 134 of file pic24_dspic33.py.


Member Function Documentation

def pic24_dspic33::pwm::__init__ (   self,
  freq,
  isTimer2,
  oc,
  ocPin = -1 
)

Create the class instance for a PWM output.

Parameters:
freq Frequency at which the PWM will operate, in Hz.
isTimer2 True to use timer2, false to use timer3 for PWM.
oc Output compare module to use.
ocPin For remappable devices, the port P pin on which to map the PWM output. For non-remappable devices, this value must be < 0.
__NATIVE__
return configPwmPy(ppframe);

Definition at line 143 of file pic24_dspic33.py.

def pic24_dspic33::pwm::set (   self,
  ratio 
)

Set the duty cycle for a PWM output.

Parameters:
ratio The desired duty cycle, ranging from 0 (off completely) to 1 (maximum, 100% duty cycle).
__NATIVE__
return setPwmRatioPy(ppframe);

Definition at line 152 of file pic24_dspic33.py.

def pic24_dspic33::pwm::setCounts (   self,
  counts 
)

Set the duty cycle for a PWM output.

Parameters:
counts The number of PR2/3 counts which gives the on time of the PWM wave to generate.
__NATIVE__
return setPwmCountsPy(ppframe);

Definition at line 161 of file pic24_dspic33.py.


The documentation for this class was generated from the following file:

Generated on Mon Oct 18 07:40:50 2010 for Python-on-a-chip by  doxygen 1.5.9