PCWHD IDE COMPILER Custom Computer Services Inc (CCS), PCWHD IDE COMPILER Datasheet - Page 89

PCWHD PIC10,16,18,24, DSPIC

PCWHD IDE COMPILER

Manufacturer Part Number
PCWHD IDE COMPILER
Description
PCWHD PIC10,16,18,24, DSPIC
Manufacturer
Custom Computer Services Inc (CCS)
Type
Compilerr
Datasheet

Specifications of PCWHD IDE COMPILER

For Use With/related Products
Microchip PIC10, PIC12, PIC16, PIC18, PIC24, dsPIC MCUs
Lead Free Status / RoHS Status
Not applicable / Not applicable
Other names
429-1009
Motor Control PWM
These options lets the user configure the Motor Control Pulse Width Modulator (MCPWM) module.
The MCPWM is used to generate a periodic pulse waveform which is useful is motor control and
power control applications. The options for these functions vary depending on the chip and are
listed in the device header file.
Relevant Functions:
setup_motor_pwm(pwm,options,
timebase);
setup_motor_pwm_duty(pwm,unit,time)
set_motor_pwm_event(pwm,time)
setup_motor_unit(pwm,unit,options,
active_deadtime, inactive_deadtime);
get_motor_pmw_event(pwm);
Relevant Preprocessor:
None
Relevant Interrupts :
#INT_PWM
Relevant Include Files:
None, all functions built-in
Relevant getenv() parameters:
None
Example Code:
// Sets up the motor PWM module
setup_motor_pwm(1,MPWM_FREE_RUN | MPWM_SYNC_OVERRIDES, timebase);
// Sets the PWM1, Unit A duty cycle value to 0x55
setup_motor_pmw_duty(1,0,0x55);
//Set the motor PWM event
set_motor_pmw_event(pwm,time);
set_power_pwm0_duty(duty_cycle));
Configures the motor control PWM module.
Configures the motor control PWM unit duty.
Configures the PWM event on the motor control unit.
Configures the motor control PWM unit.
Returns the PWM event on the motor control unit.
PWM Timebase Interrupt
// Sets the duty cycle of the PWM 0,1 in
//Complementary mode
75

Related parts for PCWHD IDE COMPILER