Skip to main content
Visitor II
April 14, 2017
Question

Hello, I had developed one application using STVD

  • April 14, 2017
  • 1 reply
  • 840 views
Posted on April 14, 2017 at 14:29

void Menu(void)

{

    if(KeypadStatus == Button_ADD)

    {

        Display_Filling_Constant(&CONF[0],DISPLAY_1,5);

        Display_Filling_Constant(&MENU[0],DISPLAY_2,5);

        Display_Filling_Constant(&BLANK[0],DISPLAY_3,6);

        Display_Show();

        while(KeypadStatus != Button_NOPRESSED );

        delay(1000);

        Menu_Edit();

    }

}

this is my code.. problem in ' while(KeypadStatus != Button_NOPRESSED );' line.. program cant exit in while loop..!! stuck in while loop.. please find attachment file KeyScan.. here you find the Button_NOPRESSED value..

my 'Scan_Switch' function run with TIM2_25mS interrupt..

KeypadStatus is matrix keypad input.

help me for this..

thanks.. 

#interrupt
    This topic has been closed for replies.

    1 reply

    Visitor II
    April 15, 2017
    Posted on April 15, 2017 at 08:56

    Hi, It could be the delay(1000) which avoid testing the button during one second. Try without delay or small tempo...