Hi,
I have an ATmega32 interfaced with an lcd on port B. I want to switch between the lcd menus upon pushing a push button.
First, it should show XXXX and upon pressing the button it should switch to YYYY.
Actually menu X and Y each represent a lot of other things. But first I want to learn how to do this switching part.
The C program I have written for that is as below:
at first XXXX is shown with no problem, but of course as I push the button, the second menu only remains for 250ms. How can I switch between the menus using a push button?
I have an ATmega32 interfaced with an lcd on port B. I want to switch between the lcd menus upon pushing a push button.
First, it should show XXXX and upon pressing the button it should switch to YYYY.
Actually menu X and Y each represent a lot of other things. But first I want to learn how to do this switching part.
The C program I have written for that is as below:
Rich (BB code):
while (1){
lcd_gotoxy(0,0);
lcd_putsf("XXXX");
if (PINA.0==0){
delay_ms(250);
lcd_clear();
lcd_gotoxy(0,0);
lcd_putsf("YYYY");}}
Attachments
-
39.2 KB Views: 23