$regfile = "M32def.dat" $crystal = 1000000 Dim Abbas As Byte Dim Abbas2 As Byte Dim Abbas3 As Byte Dim Abbas4 As Byte Dim Abbas5 As Byte Dim Reza As Integer Dim Ali As Byte Dim A As Integer Dim B As Integer Config Lcd = 16 * 2 Config Lcdpin = Pin , Db4 = Porta.1 , Db5 = Porta.2 , Db6 = Porta.3 , Db7 = Porta.4 , E = Porta.5 , Rs = Porta.6 Config Portc = Input Config Portb = Output Ddrc = 0 : Portc = 255 Ali: Portb = &B00000000 Cls Lcd "Select Buton" Do If Pinc.1 = 0 Then Goto Abbas If Pinc.2 = 0 Then Goto Abbas2 If Pinc.3 = 0 Then Goto Abbas3 If Pinc.4 = 0 Then Goto Abbas4 If Pinc.5 = 0 Then Goto Abbas5 Loop Reza: Portb = &B00000001 Goto Ali Abbas: A = 60 B = 0 Do If Pinc.6 = 1 Then Goto Ali Incr B Cls Lcd A If Pinc.6 = 1 Then Goto Ali Wait 1 Decr A Print A If Pinc.6 = 1 Then Goto Ali Loop Until B = 61 Goto Reza Abbas2: A = 0 B = 0 A = 120 Do If Pinc.6 = 1 Then Goto Ali Incr B Cls Lcd A If Pinc.6 = 1 Then Goto Ali Wait 1 Decr A Print A If Pinc.6 = 1 Then Goto Ali Loop Until B = 121 Goto Reza Abbas3: A = 0 B = 0 A = 180 Do If Pinc.6 = 1 Then Goto Ali Incr Reza Cls Lcd A If Pinc.6 = 1 Then Goto Ali Wait 1 Decr A Print A If Pinc.6 = 1 Then Goto Ali Loop Until B = 181 Goto Reza Abbas4: A = 0 B = 0 A = 240 Do If Pinc.6 = 1 Then Goto Ali Incr Reza Cls Lcd A If Pinc.6 = 1 Then Goto Ali Wait 1 Decr A Print A If Pinc.6 = 1 Then Goto Ali Loop Until B = 241 Goto Reza Abbas5: A = 0 B = 0 A = 300 Do If Pinc.6 = 1 Then Goto Ali Incr Reza Cls Lcd A If Pinc.6 = 1 Then Goto Ali Wait 1 Decr A Print A If Pinc.6 = 1 Then Goto Ali Loop Until B = 301 Goto Reza