17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Built-in Functions<br />

CCP_SHUTDOWN_ON_COMP1_INT0 VIL on INT pin or Comparator 1<br />

change<br />

CCP_SHUTDOWN_ON_COMP2_INT0 VIL on INT pin or Comparator 2<br />

change<br />

CCP_SHUTDOWN_ON_COMP_INT0 VIL on INT pin or Comparator 1<br />

or 2 change<br />

CCP_SHUTDOWN_AC_L<br />

CCP_SHUTDOWN_AC_H<br />

CCP_SHUTDOWN_AC_F<br />

Drive pins A and C high<br />

Drive pins A and C low<br />

Drive pins A and C tri-state<br />

CCP_SHUTDOWN_BD_L<br />

CCP_SHUTDOWN_BD_H<br />

CCP_SHUTDOWN_BD_F<br />

CCP_SHUTDOWN_RESTART<br />

CCP_DELAY<br />

Drive pins B and D high<br />

Drive pins B and D low<br />

Drive pins B and D tri-state<br />

the device restart after a<br />

shutdown event<br />

use the dead-band delay<br />

pwm parameter is an optional parameter for chips that includes ECCP module.<br />

This parameter allows setting the shutdown time. The value may be 0-255.<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

undefined<br />

Initialize the CCP. The CCP counters may be accessed using the long<br />

variables CCP_1 and CCP_2. The CCP operates in 3 modes. In capture mode<br />

it will copy the timer 1 count value to CCP_x when the input pin event<br />

occurs. In compare mode it will trigger an action when timer 1 and CCP_x are<br />

equal. In PWM mode it will generate a square wave. The PCW wizard will help<br />

to set the correct mode and timer settings for a particular application.<br />

This function is only available on devices with CCP hardware.<br />

Constants are defined in the devices .h file.<br />

setup_ccp1(CCP_CAPTURE_RE);<br />

ex_pwm.c, ex_ccpmp.c, ex_ccp1s.c<br />

set_pwmX_duty(), CCP1 Overview<br />

setup_clc1() setup_clc2() setup_clc3() setup_clc4()<br />

Syntax:<br />

setup_clc1(mode);<br />

283

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!