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.

pwm_off()<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

pwm_off([stream]);<br />

stream – optional parameter specifying the stream defined in<br />

#USE PWM.<br />

Nothing.<br />

To turn off the PWM signal.<br />

All devices.<br />

#USE PWM<br />

#USE PWM(OUTPUT=PIN_C2, FREQUENCY=10kHz, DUTY=25)<br />

while(TRUE){<br />

if(kbhit()){<br />

c = getc();<br />

}<br />

}<br />

if(c=='F')<br />

pwm_off();<br />

None<br />

#use_pwm, pwm_on(), pwm_set_duty_percent(),<br />

pwm_set_duty(), pwm_set_frequency()<br />

pwm_on()<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

pwm_on([stream]);<br />

stream – optional parameter specifying the stream defined in<br />

#USE PWM.<br />

Nothing.<br />

To turn on the PWM signal.<br />

All devices.<br />

#USE PWM<br />

#USE PWM(OUTPUT=PIN_C2, FREQUENCY=10kHz, DUTY=25)<br />

while(TRUE){<br />

if(kbhit()){<br />

c = getc();<br />

}<br />

}<br />

if(c=='O')<br />

pwm_on();<br />

None<br />

#use_pwm, pwm_off(), pwm_set_duty_percent(),<br />

pwm_set_duty, pwm_set_frequency()<br />

238

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

Saved successfully!

Ooh no, something went wrong!