NEW 1 LCDCMD=0 2 LCDCMD=12 3 A=49 10 LCDCMD=1 11 DELAY 2 12 LCDPRN "R" 13 LCDPRN "E" 14 LCDPRN "L" 15 LCDPRN "A" 16 LCDPRN "Y" 17 LCDPRN " " 18 LCDPRN (A) 20 IF DI1=0 30 21 IF DI2=0 50 22 IF DI3=0 40 23 GOTO 20 25 GOSUB 110 26 GOTO A 30 B=52 31 IF A=B 10 32 A=A+1 33 GOTO 10 40 B=49 41 IF A=B 10 42 A=A-1 43 GOTO 10 50 B=A 51 A=A-49 52 A=A*2 53 A=A+70 54 C=A 55 A=A+10 56 D=A 57 A=B 58 GOSUB 110 60 IF DI1=0 64 61 IF DI2=0 10 62 IF DI3=0 67 63 GOTO 60 64 GOSUB C 65 GOSUB 100 66 GOTO 60 67 GOSUB D 68 GOSUB 110 69 GOTO 60 70 RELAY1=1 71 RETURN 72 RELAY2=1 73 RETURN 74 RELAY3=1 75 RETURN 76 RELAY4=1 77 RETURN 80 RELAY1=0 81 RETURN 82 RELAY2=0 83 RETURN 84 RELAY3=0 85 RETURN 86 RELAY4=0 87 RETURN 100 LCDCMD=1 101 DELAY 2 102 LCDPRN (A) 103 LCDPRN "=" 104 LCDPRN "O" 105 LCDPRN "N" 106 RETURN 110 LCDCMD=1 111 DELAY 2 112 LCDPRN (A) 113 LCDPRN "=" 114 LCDPRN "O" 115 LCDPRN "F" 116 LCDPRN "F" 117 RETURN this line and the lines below are comments and can be removed with a text editor or the errors caused by trying to upload them can be ignored ------------------------------- menu.tmb for the TC51 shows how to use pushbutton switches and LCD to create a menuing function, (turn relays on/off as an example) DI1=UP/ON DI2=SELECT/EXIT DI3=DOWN/OFF also shows how a variable can be used with GOTO and GOSUB to jump to one of several lines based on the value of the variable