1.3.23.18 1.4.24.18 1.5.22.18 1.6.24.18 1.7.25.18 1.29.26.18 1.30.16.18 1.31.16.18 1.32.29.18 1.33.18.18 1.37.16.18 1.38.24.18 1.39.21.18 1.40.23.18 TCx_Timer8bitPeriodSet Function

C

/* x = TC instance number */
void TCx_Timer8bitPeriodSet( uint8_t period );

Summary

Sets the period value of a given timer.

Description

This function writes the period value. When timer counter matches period value,counter is reset and interrupt can be generated.

Precondition

TCx_TimerInitialize() function must have been called first.

Parameters

Param Description
period new period value to set for timer

Returns

None.

Example

uint8_t period = 0x500U;
TC0_TimerInitialize();
TC0_Timer8bitPeriodSet(period);

Remarks

The caller must know the number of significant bytes of timer. Period value is right-aligned.