' ******************************************** ' * ((IN THE NAME OF GOD)) * ' ******************************************** ' * Title : LCD AVR TEST * ' * 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 = 1000000 Config Lcdpin = Pin , Db4 = Pinb.4 , Db5 = Pinb.5 , Db6 = Pinb.6 , Db7 = Pinb.7 , Rs = Pinb.2 , E = Pinb.3 Config Lcd = 16 * 2 Dim Mbar As Byte Cursor Off Deflcdchar 0 , 32 , 32 , 32 , 32 , 32 , 32 , 32 , 6 Deflcdchar 1 , 32 , 32 , 32 , 32 , 32 , 32 , 6 , 6 Deflcdchar 2 , 32 , 32 , 32 , 32 , 32 , 6 , 6 , 6 Deflcdchar 3 , 32 , 32 , 32 , 32 , 6 , 6 , 6 , 6 Deflcdchar 4 , 32 , 32 , 32 , 6 , 6 , 6 , 6 , 6 Deflcdchar 5 , 32 , 32 , 6 , 6 , 6 , 6 , 6 , 6 Deflcdchar 6 , 32 , 6 , 6 , 6 , 6 , 6 , 6 , 6 Deflcdchar 7 , 6 , 6 , 6 , 6 , 6 , 6 , 6 , 6 Cls Locate 1 , 3 Lcd "MECHATRONICS" Do Portb = 255 Waitms 100 For Mbar = 0 To 7 Step 1 Locate 1 , 1 Lcd Chr(mbar) Waitms 100 Next Mbar For Mbar = 6 To 0 Step -1 Locate 1 , 1 Lcd Chr(mbar) Waitms 100 Next Mbar Portb = 0 Waitms 100 Loop End