1.3.23.14 1.4.24.14 1.5.22.14 1.6.24.14 1.7.25.14 1.29.26.14 1.30.16.14 1.31.16.14 1.32.29.14 1.33.18.14 1.37.16.14 1.38.24.14 1.39.21.14 1.40.23.14 TCx_Timer8bitCompareSet Function
C
/* x = TC instance number */ void TCx_Timer8bitCompareSet ( uint8_t compare );
Summary
Sets the compare value of a given timer channel.
Description
This function writes the compare value. When timer counter matches compare value, interrupt can be generated.
Precondition
TCx_TimerInitialize function must have been called first for the given channel.
Parameters
Param | Description |
---|---|
compare | compare value of the timer |
Returns
None.
Example
TC0_TimerInitialize();
TC0_Timer8bitCompareSet(0xFul);
Remarks
This function is available only when TC timer mode is used by SYS_TIME module. SYS_TIME uses compare match interrupt to generate dynamic delay.