Hello,
I want to use the toggle command to efficiently jump from LCD screen to LCD screen using just 2 push button switches. I have heard that using the toggle command is the best way to do this. Can anyone provide a sample code for doing this. Here is a small portion of my code....
thanks,





main:
Pause 100
While PORTB.6 = 0
LCDOut 254,1
LCDOut 254,130, "Is your favorite"
LCDOut 254,196, "color green?"
LCDOut 254,216, "Yes No"
Pause 50

IF switch1 = 0 Then YES 'yes selected
IF switch2 = 0 Then NO 'no selected
GoTo main

YES:
Pause 100'wait for enought time to remove finger
While PORTB.6 = 0 'always true
Low PORTB.4
LCDOut 254,1
LCDOut 254,128,"U must B a GRN thumb"
LCDOut 254,192,"Here is YOUR color!"
LCDOut 254,152,"Keep Going?"
LCDOut 254,216,"Yes No"
High PORTB.4
Pause 50
IF switch1 = 0 Then KeepGoing 'yes selected
IF switch2 = 0 Then Finished 'no selected
GoTo YES

Wend
GoTo intro'this condition will never be met

KeepGoing:
Pause 100'wait for enought time to remove finger
Low PORTB.4
While PORTB.6 = 0 'always true
Low PORTB.4
LCDOut 254,1
LCDOut 254,129,"Thanks for playing"
'LCDOut 254,195,"my game show!"
LCDOut 254,148,"Try it from the top?"
LCDOut 254,216,"Yes No"
Pause 50

IF switch1 = 0 Then YES3 'yes selected
IF switch2 = 0 Then NO3 'no selected
GoTo KeepGoing

Wend
GoTo intro'this condition will never be met

YES3:
GoTo intro
NO3:
Pause 50
LCDOut 254,1
LCDOut 254,134,"The End"
GoTo NO3