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.

Examples:<br />

Example Files:<br />

Also See:<br />

set_timerB(0);<br />

while(timerB < 200);<br />

none<br />

set_timerB( ), setup_timer_B( ), TimerB Overview<br />

get_timerx( )<br />

Syntax: value=get_timer0() Same as: value=get_rtcc()<br />

value=get_timer1()<br />

value=get_timer2()<br />

value=get_timer3()<br />

value=get_timer4()<br />

value=get_timer5()<br />

value=get_timer6()<br />

value=get_timer7()<br />

value=get_timer8()<br />

value=get_timer10()<br />

value=get_timer12()<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

None<br />

Timers 1, 3, 5 and 7 return a 16 bit int.<br />

Timers 2 ,4, 6, 8, 10 and 12 return an 8 bit int.<br />

Timer 0 (AKA RTCC) returns a 8 bit int except on the PIC18XXX where it<br />

returns a 16 bit int.<br />

Returns the count value of a real time clock/counter. RTCC and Timer0 are the<br />

same. All timers count up. When a timer reaches the maximum value it will flip<br />

over to 0 and continue counting (254, 255, 0, 1, 2...).<br />

Timer 0 - All devices<br />

Timers 1 & 2 - Most but not all <strong>PCM</strong> devices<br />

Timer 3, 5 and 7 - Some PIC18 and Enhanced PIC16 devices<br />

Timer 4,6,8,10 and 12- Some PIC18 and Enhanced PIC16 devices<br />

Nothing<br />

set_timer0(0);<br />

while ( get_timer0() < 200 ) ;<br />

ex_stwt.c<br />

Also See: set_timerx() , Timer0 Overview , Timer1 Overview , Timer2 Overview ,<br />

Timer5 Overview<br />

192

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

Saved successfully!

Ooh no, something went wrong!