ich hab garkein Poti dran. das alte ging auch ohne.
$regfile = "m8def.dat"
$crystal = 5000000
$crystal = 10000000
$baud = 9600
Dim I As Byte
Config Lcdpin = Pin , Db4 = Portb.7 , Db5 = Portd.5 , Db6 = Portd.6 ,
Db7 = Portd.7 , E = Portb.6 , Rs = Portd.4 ' Natürlich so wie es
wirklich angeschlossen ist (4-Bit-Modus)
Dim A As Byte
Config Lcd = 20 * 4 'configure
lcd screen
'other options are 16 4 and 20 4, 20 * 2 , 16 * 1a
'When you dont include this option 16 * 2 is assumed
'16 * 1a is intended for 16 character displays with split addresses
over 2 lines
'$LCD = address will turn LCD into 8-bit databus mode
' use this with uP with external RAM and/or ROM
' because it aint need the port pins !
Config Pinb.1 = Input
Dim Zähler As Integer
Zähler = 1
Do
If Pinb.1 = 1 Then
Zähler = Zähler + 1
End If
Print Zähler
'clear the
LCD display
Lcd Zähler 'display
this at the top line
Loop 'turn
display on
'-----------------NEW support for 4-line LCD------
End