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.

Built-in Functions<br />

Example<br />

Files:<br />

Also See:<br />

None<br />

#USE TIMER, set_ticks()<br />

get_timerA( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

value=get_timerA();<br />

none<br />

The current value of the timer as an int8<br />

Returns the current value of the timer. All timers count up. When a timer<br />

reaches the maximum value it will flip over to 0 and continue counting<br />

(254, 255, 0, 1, 2, …).<br />

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

Nothing<br />

set_timerA(0);<br />

while(timerA < 200);<br />

none<br />

set_timerA( ), setup_timer_A( ), TimerA Overview<br />

get_timerB( )<br />

Syntax:<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

value=get_timerB();<br />

none<br />

The current value of the timer as an int8<br />

Returns the current value of the timer. All timers count up. When a timer<br />

reaches the maximum value it will flip over to 0 and continue counting<br />

(254, 255, 0, 1, 2, …).<br />

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

Nothing<br />

191

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

Saved successfully!

Ooh no, something went wrong!