ähhm, dann zeigt jetzt aber immer nur 0 an? oda?
Code:
$regfile "m8def.dat"
$crystal = 8000000
$sim
Config Lcdpin = Pin , Db4 = Portd.4 , Db5 = Portd.5 , Db6 = Portd.6 , Db7 = Portd.7 , E = Portd.1 , Rs = Portd.0
Config Lcd = 16 * 2
Config Lcdbus = 4
Config Timer1 = Timer , Prescale = 1
Config Int0 = low level
Enable Interrupts
Enable Int0
On Int0 Sprung:
Config Portd.1 = Output
Config Portd.7 = Output
Config Portd.6 = Output
Config Portd.5 = Output
Config Portd.4 = Output
Config Portd.2 = Input
Dim Wert As Word
Start Timer1
Do
lcd wert
waitms 100
loop
end
Sprung:
Wert=Timer1
Timer1=0
return
Lesezeichen