' ********************************************************************** ' ** Program name: LCD_AU.BAS - Version : 1.3 - 06 February 2001 ** ' ** Compiler: BASCOM AVR (IDE V. 1.11.4.0, LIB V. 1.11.4.0) ** ' ** Board : K51-AVR ** ' ** Firm: grifo(r) ITALIAN TECHNOLOGY ** ' ** Via Dell' Artigiano 8/6 40016 San Giorgio di Piano (BO) ** ' ** Tel.+39 051 892 052 Fax +39 051 893 661 ** ' ** http://www.grifo.com http://www.grifo.it ** ' ** sales@grifo.it tech@grifo.it grifo@grifo.it ** ' ** ** ' ** Written by: Graziano GAIBA ** ' ********************************************************************** ' ' This program allows to manage an alphanumeric LCD featuring a number ' rows and columns definible bythe User. ' The display must be connected to CN5 following the connections shown ' in the diagram of K51-AVR page 4 of 4. ' ' '*********************************************************************** ' '********************* Compiler Directives ***************************** ' $regfile = "8515def.DAT" ' AT90s8515 registers list $romstart = &H0 ' code start address $crystal = 5529600 ' micro clock frequence $baud = 19200 ' baud rate Config Lcd = 20 * 4 ' Lcd with 20 columns and 4 rows Config Lcdmode = Port ' Shows LCD settings in report ' LCD signals connections (see on line help for more information) Config Lcdpin = Pin , Db4 = Portb.5 , Db5 = Portb.6 , Db6 = Portb.7 , Db7 = Portb.2 , E = Portb.4 , Rs = Portb.3 ' Character (R) registered, created using the LCD designer of menu Edit. Deflcdchar 0 , 253 , 245 , 249 , 245 , 245 , 225 , 226 , 252 ' '*********************** Variables declaration ************************* ' Dim A As Byte ' general purpose variable '*************************** Main program ****************************** ' Main: Cls ' LCD clear screen Lcd "Grifo" ' show string Lcd Chr(0) ; ' show (R) character Lcd " www.grifo.com" ' show string Locate 2 , 1 ' cursor in row 2 column 1 Lcd "Tel.+39051892052" ' show string Wait 1 ' delay 1 second For A = 1 To 10 ' repeat 10 times Shiftlcd Right ' right shift display screen Waitms 255 ' delay 255 ms Next For A = 1 To 10 ' repeat 10 times Shiftlcd Left ' left shift display screen Waitms 255 ' delay 255 ms Next Thirdline ' place cursor in row 3 Lcd "Line 3" ' vshow string Fourthline ' place cursor in row 4 Lcd "Line 4" ' show string Do Loop ' infinite loop End ' '**************************** Program end ******************************** '