1.18.20.8 TMR1_PeriodSet Function

C

void TMR1_PeriodSet(uint16_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

TMR1_Initialize() function must have been called first for the given timer.

Parameters

Param Description
period new period value to set for timer

Returns

None.

Example

uint16_t period = 0x100;
TMR1_Initialize();
TMR1_PeriodSet(period);

Remarks

None.