' ******************************************** ' * Title : Decr Function * ' * Last Updated : 1385/5/16 * ' * Target : Atmega8L * ' * Program code : BASCOM AVR * ' * Author : Foad Alikhani * ' * WebSite : Www.Mechatronics.Co.Sr * ' * E-mail : foad_8x@yahoo.com * ' ******************************************** $regfile = "m8def.dat" $crystal = 8000000 Config Lcd = 16 * 2 Config Lcdpin = Pin , Db4 = Portb.4 , Db5 = Portb.5 , Db6 = Portb.6 , Db7 = Portb.7 , Rs = Portb.2 , E = Portb.3 Cursor On Dim X As Byte CLS X = 10 Do Decr X Locate 1 , 1 Lcd " MECHATRONICS" Locate 2 , 1 Lcd "Count = " ; X Waitms 10 If X = 0 Then Cls Else Loop End If End