This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

INFINEON c517 MICROCONTROLLER

I want to use external interrupts on Pin P1.2 & p1.3 for frequancy measurement
When Positive transition occours on pin External interrupt should be occour
And in interrupt vector I want to increment one count
time base is generated by timer 0 for ).1 seconds.

My probelm is even thouh frquancy of 1 Khz is applied to Pin P1.2 interrupt is not generate.

I want to know regisier detail configurations of resigistrs so that externl interrupt will generate

Parents Reply Children
  • Thanks for your reply.

    My hardware is perfect because if i measure the freqauncy by polling port pin for 0.1 sec using timer 1 it shows (for 1Khz it show 100 count = 0.1 sec time base.)
    Frequancy present at one i/p at time. so f_counter one variable is used for both.
    timer 1 is used for 0.1 sec time base code is not added here to make it small to read
    My code is something like this

    P1_2 |=1; //frequancy i/p 1 (Rotor 1/INT 5/cc2)
    P1_3 |=1; //frequancy i/p 2 (Rotor 2 inpINT 6/cc3)
    T2CON |=0x11; //|=b00010001; f oscilator/12
    CTCON |=b00000000//msb bits of T2CON & CTCON
    EX5=1; //enable ext int 5, P1_2
    EX6=1; //enable ext int 6, P1_3
    EN2 |= b00111100; //CCU int enable bits
    EAL=1; //enable global int
    CCEN =0x50; //cap on rising edge p1.3 & p1.2)
    //CMSEL =0xff;

    for ( ; ; ) { _SRVWDT(); //watchdog

    //*****scratch pad trial code******
    SET_CURSOR (1,0);
    DISP_STRING ("= ",0);
    DISP_DEZ(f_counter,5,0); //Display freq dec. form
    }

    //**************************************************** void EXT5_int (void) interrupt 12 //using 2 { f_counter=f_counter+1; }
    //**************************************************** void EXT6_int (void) interrupt 13 //using 2 { f_counter=f_counter+1; }

    //****************************************************