17.02.2015 Views

CCS C Compiler Manual PCB / PCM / PCH

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

#use profile()<br />

Syntax:<br />

#use profile(options)<br />

Elements: options may be any of the following, comma separated:<br />

ICD<br />

TIMER1<br />

BAUD=x<br />

Default – configures code profiler to use the ICD<br />

connection.<br />

Optional. If specified, the code profiler run-time on<br />

the microcontroller will use the Timer1 peripheral as<br />

a timestamp for all profile events. If not specified<br />

the code profiler tool will use the PC clock, which<br />

may not be accurate for fast events.<br />

Optional. If specified, will use a different baud rate<br />

between the microcontroller and the code profiler<br />

tool. This may be required on slow microcontrollers<br />

to attempt to use a slower baud rate.<br />

Purpose:<br />

Tell the compiler to add the code profiler run-time in the microcontroller and configure<br />

the link and clock.<br />

Examples: #profile(ICD, TIMER1, baud=9600)<br />

Example ex_profile.c<br />

Files:<br />

Also See: #profile(), profileout(), Code Profile overview<br />

#use pwm<br />

Syntax:<br />

#USE PWM(options)<br />

Options are separated by commas and may be:<br />

Elements:<br />

PWMx or CCPx<br />

OUTPUT=PIN_xx<br />

Selects the CCP to use, x being the module number to use.<br />

Selects the PWM pin to use, pin must be one of the CCP pins. If<br />

device has remappable pins compiler will assign specified pin to<br />

specified CCP module. If CCP module not specified it will assign<br />

138

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

Saved successfully!

Ooh no, something went wrong!