Built-in Functions
list of available pins and reference voltage settings. The constants ALL_ANALOG
and NO_ANALOGS are valid for all chips. Some other example pin definitions are:
Also See:
setup_adc(), read_adc(), set_adc_channel(), ADC Overview
setup_ccp1( ) setup_ccp2( ) setup_ccp3( ) setup_ccp4( ) setup_ccp5( )
setup_ccp6( )
Syntax:
setup_ccp1 ( mode )
setup_ccp2 ( mode )
setup_ccp3 ( mode )
setup_ccp5 ( mode )
setup_ccp6 ( mode )
or setup_ccp1 ( mode, pwm )
or setup_ccp2 ( mode, pwm )
or setup_ccp3 ( mode, pwm )
or setup_ccp5 ( mode, pwm )
or setup_ccp6 ( mode, pwm )
Parameters: mode is a constant. Valid constants are defined in the devices .h file and refer to
devices .h file for all options, some options are as follows:
Disable the CCP:
CCP_OFF
Set CCP to capture mode:
CCP_CAPTURE_FE
CCP_CAPTURE_RE
CCP_CAPTURE_DIV_4
CCP_CAPTURE_DIV_16
Set CCP to compare mode:
Capture on falling edge
Capture on rising edge
Capture after 4 pulses
Capture after 16 pulses
CCP_COMPARE_SET_ON_MATCH
CCP_COMPARE_CLR_ON_MATCH
CCP_COMPARE_INT
CCP_COMPARE_RESET_TIMER
Set CCP to PWM mode:
Output high on compare
Output low on compare
interrupt on compare
Reset timer on compare
CCP_PWM
Enable Pulse Width Modulator
Constants used for ECCP modules are as follows:
CCP_PWM_H_H
CCP_PWM_H_L
CCP_PWM_L_H
CCP_PWM_L_L
259
相关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