NEW 1 IF SW1=0 100 2 READCLOCK 3 A=S 4 IF A<>0 1 5 A=M 6 IF A=0 200 7 B=10 8 IF A=B 200 9 B=20 10 IF A=B 200 11 B=30 12 IF A=B 200 13 B=40 14 IF A=B 200 15 B=50 16 IF A=B 200 17 GOTO 1 100 LOOP 20 102 LED=1 103 DELAY 1 104 LED=0 105 DELAY 1 106 ENDLOOP 107 H=0 108 M=0 109 S=1 110 SETCLOCK 111 GOTO 1 200 LOOP 10 201 LED=1 202 DELAY 1 203 LED=0 204 DELAY 1 205 ENDLOOP 206 GOTO 1 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 ------------------------------- timesw.tmb for the SI51 Demonstrates how to run a sub program (#1) if the switch SW1 is pressed, or run another sub program (#2) every 10 minutes starting after program #1 ends. Sub programs turn LED on and off.