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.

Built-in Functions<br />

set_cog_phase( )<br />

Syntax:<br />

set_cog_phase(rising_time);<br />

set_cog_phase(falling_time, rising_time);<br />

Parameters:<br />

Returns:<br />

Function:<br />

Availability:<br />

Examples:<br />

Example Files:<br />

Also See:<br />

falling time - sets the falling edge phase time.<br />

rising time - sets the rising edge phase time.<br />

Nothing<br />

To set the falling and rising edge phase times on the Complementary<br />

Output Generator (COG) module. The time is based off the source clock of th<br />

module, the times are either a 4-bit or 6-bit value, depending on the device.<br />

Some devices only have a rising edge delay, refer to the device's datasheet.<br />

All devices with a COG module.<br />

set_cog_phase(10,10);<br />

None<br />

setup_cog(), set_cog_dead_band(), set_cog_blanking(), cog_status(), cog_re<br />

.<br />

set_compare_time( )<br />

Syntax:<br />

set_compare_time(x, ticcr, [ccrs]])<br />

Parameters: x is 1-8 and defines which output compare module to set time for<br />

ocr is the compare time for the primary compare register.<br />

ocr is the optional compare time for the secondary register. Used for dual<br />

compare mode.<br />

269

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

Saved successfully!

Ooh no, something went wrong!