Exemple #1
0
int setupEdgeCount()
{
    //OpenTimer1(T1_ON | T1_SOURCE_EXT | T1_PS_1_1, T1PR); //no prescalor other than 1_1 work's?!
    //ConfigIntTimer1(T1_INT_ON | T1_INT_PRIOR_1);
    OpenTimer45(T45_ON | T45_SOURCE_EXT | T45_PS_1_1, T45PR); //no prescalor other than 1_1 work's?!
    ConfigIntTimer5(T5_INT_ON | T5_INT_PRIOR_6);
    return 0;
}
Exemple #2
0
inline void Timer45_Setup(void)
{
    OpenTimer45(
            T4_OFF &
            T4_IDLE_CON &
            T4_GATE_OFF &
            T4_PS_1_256 &
            T4_32BIT_MODE_ON &
            T4_SOURCE_INT,
            0xFFFFFFFF);

    ConfigIntTimer45(
            T5_INT_PRIOR_2 &
            T5_INT_ON
            );

    return;
}