PCD
Function:
Availability:
Requires:
Examples:
Example
Files:
Also See:
Stores the value of duty into the appropriate PDCXL/H register. This duty value is
the amount of time that the PWM output is in the active state.
All devices equipped with PWM.
None
set_power_pwmx_duty(4000);
None
setup_power_pwm(), setup_power_pwm_pins(),
set_power_pwm_override()
set_pwm1_duty( ) set_pwm2_duty( ) set_pwm3_duty( )
set_pwm4_duty( ) set_pwm5_duty( )
Syntax:
set_pwm1_duty ( value )
set_pwm2_duty ( value )
set_pwm3_duty ( value )
set_pwm4_duty ( value )
set_pwm5_duty ( value )
Parameters: value may be an 8 or 16 bit constant or variable.
Returns:
Function:
Availability:
Requires:
Examples:
undefined
Writes the 10-bit value to the PWM to set the duty. An 8-bit value may be used if
the most significant bits are not required. The 10 bit value is then used to
determine the duty cycle of the PWM signal as follows:
?? duty cycle = value / [ 4 * (PR2 +1 ) ]
Where PR2 is the maximum value timer 2 will count to before toggling the output
pin.
This function is only available on devices with CCP/PWM hardware.
Nothing
// For a 20 mhz clock, 1.2 khz frequency,
// t2DIV set to 16, PR2 set to 200
// the following sets the duty to 50% (or 416 us).
long duty;
duty = 408; // [408/(4*(200+1))]=0.5=50%
set_pwm1_duty(duty);
252
相关PDF资料
PCI-EXP-T42G5-N1 IP CORE PCI EXPRESS ORCA 4
PCM18XH2 PROCESSOR MODULE MPLAB-ICE 2000
PCM18XN0 PROCESSOR MODULE FOR ICE2000
PDA-B-24-615-E-2B1-1-C CIRCUIT BREAKER MAG 1P 15A
PFMF.260.2 PFMF PTC FUSE SMT 2.6A 1812
PFNF.200.2 PFNF PTC FUSE SMT 2A 1206
PFRY.375 PTC-FUSE RADIAL 72 VDC
PFSM.150.33.2 FUSE PTC 8A 15V FST-TRIP SMD
相关代理商/技术参数
PCD_09 制造商:MACOM 制造商全称:Tyco Electronics 功能描述:Low Profile PCB Relay PCD
PCD-00173-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0E 制造商:Molex 功能描述:Ethernet Cable Assembly
PCD-00173-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00173-0K 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY
PCD-00174-0C 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Red; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet ;RoHS Compliant: NA
PCD-00174-0E 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY; Cable Length - Imperial:3ft; Cable Length - Metric:914.4mm; Connector Type A:RJ45 Plug; Connector Type B:RJ45 Plug; Jacket Color:Grey; Approval Bodies:CSA / UL; Body Material:PVC; Cable Assembly Type:Ethernet;RoHS Compliant: NA
PCD-00174-0H 制造商:Molex 功能描述:ETHERNET CABLE ASSEMBLY