KBI1ES = 0b10000000; // PWR_MON-RisingEgde, M_BTN-FallingEgde, // D_BTN-FallingEgde, UST-FallingEdge, KLMS-FallingEdge KBI1PE = 0b11011000; // PWR_MON, M_BTN, *D_BTN*, UST, KLMS KBI1SC = 0b00000100; // Edge detect, KBIIE = 0 KBI1SC_KBACK = 1; KBI1SC_KBIE = 1;
Can you check for me please KBI1 has a bug?
SDID of the LC60 that I use: Rev=1, ID=12
Thank you.
  PTADD = 0;  KBI1SC = 0b00000100;  // level detect, KBIIE = 0  KBI1PE = 0b11011000;  // PWR_MON, M_BTN, *D_BTN*, UST, KLMS  KBI1ES = ~PTAD;  KBI1SC_KBIE = 1;  EnableInterrupts;      while(1)  {    __asm stop;    PTCD_PTCD2 = !PTCD_PTCD2;  // toogle BACKLIGHT to debug  }interrupt vNum_Vkeyboard1 void intKBI1(void){  unsigned char dummy;    dummy = PTAD;  KBI1ES = ~dummy; // change level to detect    KBI1SC_KBACK = 1;}