also standard iss das hier:
ich schau nochmal, wegen der einzelnen pinbelegungCode:'------------------------------------------------------------------ ' LCDCUSTOM4BITE2.BAS ' demo shows 4 bit LCD mode with 2 E lines '------------------------------------------------------------------ ' this is the custom LCD lib $lib "Lcd4e2.lib" $crystal = 4000000 'to use 2 E lines we need a way to make a distinct between them Dim ___lcde As Byte '___LCDE set to 0 will use E1, set to any other value will use E2 Dim S As String * 10 S = "Hello" 'The Following Connections Are Used In The Asm Code: 'Rs = Portb.0 'Rw = Portb.1 We Don’t Use The R / W Option Of The Lcd In This Version So Connect To Ground 'E = Portb.2 'E2 = Portb.3 The Second E Pin Of The Lcd 'Db4 = Portb.4 The Data Bits Must Be In A Nibble To Save Code 'Db5 = Portb.5 'Db6 = Portb.6 'Db7 = Portb.7 ' write to the 2 first lines ___lcde = 0 Cls Lcd "test" Lcd S ___lcde = 1 'write to the 2 last lines Lcd "test" Lcd S End
Martin







Zitieren

Lesezeichen