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 />

TB_DIV_32,<br />

TB_DIV_64, TB_DIV_128, TB_DIV_256<br />

· constants from different groups may be or'ed together with |.<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

undefined<br />

sets up Timer B<br />

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

Constants are defined in device's .h file.<br />

setup_timer_B(TB_OFF);<br />

setup_timer_B(TB_INTERNAL | TB_DIV_256);<br />

setup_timer_B(TA_EXT_L_TO_H | TB_DIV_1);<br />

none<br />

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

setup_timer_0( )<br />

Syntax:<br />

setup_timer_0 (mode)<br />

Parameters: mode may be one or two of the constants defined in the devices .h<br />

file. RTCC_INTERNAL, RTCC_EXT_L_TO_H or RTCC_EXT_H_TO_L<br />

RTCC_DIV_2, RTCC_DIV_4, RTCC_DIV_8, RTCC_DIV_16, RTCC_DIV_32,<br />

RTCC_DIV_64, RTCC_DIV_128, RTCC_DIV_256<br />

PIC18XXX only: RTCC_OFF, RTCC_8_BIT<br />

One constant may be used from each group or'ed together with the | operator.<br />

Returns:<br />

Function:<br />

Availability:<br />

Requires:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

undefined<br />

Sets up the timer 0 (aka RTCC).<br />

All devices.<br />

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

setup_timer_0 (RTCC_DIV_2|RTCC_EXT_L_TO_H);<br />

get_timer0(), set_timer0(), setup counters()<br />

303

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

Saved successfully!

Ooh no, something went wrong!