AnsweredAssumed Answered

GPIO interrupt problem for MC9S08SH8  8 bit microcontroller

Question asked by senthil kumar on Dec 12, 2013
Latest reply on Dec 23, 2013 by EARL GOODRICH

Hello,

I am working DEMO9S08SH8 development board  with CW V6.3.

My GPIO interrupt  is not working. my code is ,

void main()

{

    PTBSC_PTBIE = 0; // Disable interrupt

    PTBPS_PTBPS0 = 1; // PortB, bit-0 is enabled for interrupt

    PTBSC_PTBMOD = 0; // edges only

    PTBES_PTBES0 = 0; // interrupt on falling edge

    PTBSC_PTBACK = 1;    // acknowledge flag

    PTBSC_PTBIE = 1; // enable interrupt

 

PTBDD_PTBDD0 = 0;                  

EnableInterrupts;

for(;;)

{

     ;

}

}

interrupt 21 void PORTB_ISR(void)

{

      PTBSC_PTBACK = 1;    // acknowledge flag

}

 

Please any one help me

Outcomes