Hello,
I am having a bit of trouble with the algorithm of this menu selection. I have only two button to play with . When I push the Selection button it whiz over the next function.. How do i get around that? button command ?:
Code:SetYear: ThisYear = 2011 while Selection = 0 ' exit when selection becomes 1 Selection is a buton and next1 is another button on the main panel lcdout $FE,1, "Set Year" lcdout $FE,$C0, dec4 ThisYear pause 300 if NextOption=1 then ThisYear = ThisYear +1 'Button on NextOption (PORTB.3) if Selection=1 then Goto SetMonth wend SetMonth: ThisMonth= 1 while Selection = 0 ' exit when selection becomes 1 Selection is a buton and next1 is another button on the main panel lcdout $FE,1, "Set Month" lcdout $FE,$C0, dec2 ThisMonth pause 300 if NextOption=1 then ThisMonth=ThisMonth +1 if Selection=1 then Goto SetDay wend SetDay: ThisDay= 1 while NextOption = 0 ' exit when selection becomes 1 Selection is a buton and next1 is another button on the main panel lcdout $FE,1, "Set Day" lcdout $FE,$C0, dec2 ThisDay pause 300 if NextOption=1 then ThisDay=ThisDay +1 if Selection=1 then Goto SetHour wend SetHour: ThisHour= 1 while NextOption = 0 ' exit when selection becomes 1 Selection is a buton and next1 is another button on the main panel lcdout $FE,1, "Set Hour" lcdout $FE,$C0, dec2 ThisHour pause 300 if NextOption=1 then ThisHour=ThisHour +1 if Selection=1 then Goto SetMin wend SetMin: ThisMin= 1 while NextOption = 0 ' exit when selection becomes 1 Selection is a buton and next1 is another button on the main panel lcdout $FE,1, "Set Min" lcdout $FE,$C0, dec2 ThisMin pause 300 if NextOption=1 then ThisMin=ThisMin +1 if Selection=1 then Return wend:




Bookmarks